/* =====================================================================
   One Party Hire — hireitems design system (Phase 4)
   Path: public_html/hireitems/css/hire.css
   Prefix: hx-  (old pages keep their Bootstrap classes until converted)
   ===================================================================== */

:root {
  /* Theme colours: defaults here, real values printed by includes/theme.php (ampanel + business settings) */
  --hx-ink: #2B1D33; --hx-primary: #5B3A73; --hx-accent: #E9A23B;
  --hx-bg: #F4F5F7; --hx-surface: #FFFFFF; --hx-text: #231A29; --hx-muted: #6E6577; --hx-line: #E2DFE7;
  --hx-new: #2F6FDB; --hx-out: #C9761F; --hx-back: #2E8B57; --hx-stop: #B33A4C; --hx-wait: #7A5BD1;
  --hx-on-ink: #FFFFFF; --hx-on-primary: #FFFFFF; --hx-on-accent: #1A1A1A;
  /* Derived (never set directly) */
  --hx-glow:       var(--hx-accent);
  --hx-paper:      var(--hx-surface);
  --hx-ink-2:      color-mix(in srgb, var(--hx-ink) 86%, var(--hx-on-ink));
  --hx-primary-2:  color-mix(in srgb, var(--hx-primary) 82%, #000);
  --hx-line-2:     color-mix(in srgb, var(--hx-line) 55%, var(--hx-surface));
  --hx-side-text:  color-mix(in srgb, var(--hx-on-ink) 90%, var(--hx-ink));
  --hx-side-muted: color-mix(in srgb, var(--hx-on-ink) 62%, var(--hx-ink));
  --hx-tint:       color-mix(in srgb, var(--hx-bg) 45%, var(--hx-surface));
  --hx-hover:      color-mix(in srgb, var(--hx-primary) 4%, var(--hx-surface));
  --hx-field:      color-mix(in srgb, var(--hx-line) 82%, var(--hx-text));
  --hx-shadow:     color-mix(in srgb, var(--hx-ink) 16%, transparent);
  /* Shape */
  --hx-r:          8px;
  --hx-r-sm:       5px;
  --hx-side:       236px;
  --hx-font:       "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- App shell ---------- */
body.hx-body { background: var(--hx-bg); font-family: var(--hx-font); color: var(--hx-text); font-size: 15px; line-height: 1.5; margin: 0; }
.hx-app { display: flex; min-height: 100vh; font-family: var(--hx-font); }
.hx-app *, .hx-app *::before, .hx-app *::after { box-sizing: border-box; }

.hx-side {
  width: var(--hx-side); flex: 0 0 var(--hx-side); background: var(--hx-ink); color: var(--hx-side-text);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; z-index: 40;
}
.hx-brand { padding: 20px 20px 0; display: block; text-decoration: none; }
.hx-brand img { max-width: 100%; max-height: 54px; display: block; background: #fff; border-radius: var(--hx-r-sm); padding: 6px 8px; }
.hx-brand-name { color: var(--hx-on-ink); font-weight: 700; font-size: 17px; line-height: 1.25; display: block; }

/* the one decorative element: a string of festoon lights under the brand */
.hx-festoon { margin: 14px 20px 6px; position: relative; }
.hx-festoon svg { width: 100%; height: auto; display: block; overflow: visible; }
.hx-festoon .wire { stroke: color-mix(in srgb, var(--hx-on-ink) 30%, transparent); fill: none; stroke-width: 1; }
.hx-festoon .bulb { fill: var(--hx-glow); }
.hx-festoon .bulb.dim { fill: color-mix(in srgb, var(--hx-accent) 38%, transparent); }

.hx-role { margin: 0 20px 10px; font-size: 12.5px; color: var(--hx-side-muted); }
.hx-nav { flex: 1; overflow-y: auto; padding: 6px 10px 16px; }
.hx-nav-group { font-size: 12px; color: var(--hx-side-muted); padding: 14px 10px 6px; }
.hx-nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: var(--hx-r-sm);
  color: var(--hx-side-text); text-decoration: none; font-size: 14.5px; position: relative;
}
.hx-nav a svg { width: 18px; height: 18px; flex: 0 0 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.hx-nav a:hover { background: var(--hx-ink-2); color: var(--hx-on-ink); }
.hx-nav a.is-active { background: color-mix(in srgb, var(--hx-accent) 16%, transparent); color: var(--hx-on-ink); font-weight: 600; }
.hx-nav a.is-active::before { content: ""; position: absolute; left: -4px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--hx-glow); box-shadow: 0 0 8px 2px color-mix(in srgb, var(--hx-accent) 55%, transparent); }
.hx-side-foot { padding: 12px 20px 18px; border-top: 1px solid color-mix(in srgb, var(--hx-on-ink) 10%, transparent); font-size: 13px; color: var(--hx-side-muted); }
.hx-side-foot a { color: var(--hx-side-text); }

.hx-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hx-top {
  height: 60px; background: var(--hx-paper); border-bottom: 1px solid var(--hx-line);
  display: flex; align-items: center; gap: 12px; padding: 0 24px; position: sticky; top: 0; z-index: 30;
}
.hx-menu-btn { display: none; background: none; border: 0; padding: 6px; margin-left: -6px; cursor: pointer; color: var(--hx-ink); }
.hx-menu-btn svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.hx-top-title { font-size: 15px; color: var(--hx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-top-title b { color: var(--hx-text); font-weight: 600; }
.hx-top-spacer { flex: 1; }

.hx-user { position: relative; }
.hx-user > button {
  display: flex; align-items: center; gap: 10px; background: none; border: 1px solid transparent; border-radius: 999px;
  padding: 4px 10px 4px 4px; cursor: pointer; font: inherit; color: var(--hx-text);
}
.hx-user > button:hover, .hx-user.open > button { border-color: var(--hx-line); background: var(--hx-bg); }
.hx-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--hx-primary); color: var(--hx-on-primary); display: grid; place-items: center; font-weight: 700; font-size: 14px; overflow: hidden; }
.hx-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hx-user-name { font-size: 14px; font-weight: 600; text-align: left; line-height: 1.2; }
.hx-user-name small { display: block; font-weight: 400; color: var(--hx-muted); font-size: 12px; }
.hx-user-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: var(--hx-paper);
  border: 1px solid var(--hx-line); border-radius: var(--hx-r); box-shadow: 0 12px 28px var(--hx-shadow); padding: 6px; z-index: 50;
}
.hx-user.open .hx-user-menu { display: block; }
.hx-user-menu a { display: block; padding: 8px 12px; border-radius: var(--hx-r-sm); color: var(--hx-text); text-decoration: none; font-size: 14px; }
.hx-user-menu a:hover { background: var(--hx-bg); }
.hx-user-menu hr { border: 0; border-top: 1px solid var(--hx-line-2); margin: 6px 0; }

.hx-cart-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; color: var(--hx-ink); }
.hx-cart-btn:hover { background: var(--hx-bg); }
.hx-cart-btn svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hx-cart-btn .cnt:not(:empty) { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--hx-accent); color: var(--hx-on-accent); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.mini_cart { position: relative; }
.mini_cart_html { display: none; position: absolute; right: 0; top: calc(100% + 8px); width: min(380px, 92vw); background: var(--hx-paper); border: 1px solid var(--hx-line); border-radius: var(--hx-r); box-shadow: 0 12px 28px var(--hx-shadow); padding: 10px 14px; z-index: 50; }
.mini_cart_html ul { list-style: none; margin: 0; padding: 0; }
.mini_cart_html ul li { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--hx-line-2); padding: 8px 0; font-size: 13.5px; }
.mini_cart_html ul li.empty_cart { justify-content: center; border: none; color: var(--hx-muted); }
.mini_cart_html li img { width: 40px; height: 40px; object-fit: cover; border-radius: var(--hx-r-sm); }
.mini_subtotal { display: block !important; text-align: right !important; font-weight: 600; }
.view_cart_button { border-bottom: none !important; justify-content: flex-end; }

.hx-content { padding: 24px; max-width: 1400px; width: 100%; }

/* ---------- Page title bar ---------- */
.hx-titlebar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.hx-titlebar h1 { font-size: 26px; line-height: 1.2; font-weight: 700; color: var(--hx-ink); margin: 0; letter-spacing: -.01em; }
.hx-titlebar p { margin: 4px 0 0; color: var(--hx-muted); font-size: 14px; }
.hx-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- Buttons ---------- */
.hx-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 16px; border-radius: var(--hx-r-sm);
  border: 1px solid var(--hx-primary); background: var(--hx-primary); color: var(--hx-on-primary) !important; font: 600 14px/1 var(--hx-font);
  text-decoration: none !important; cursor: pointer; white-space: nowrap;
}
.hx-btn:hover { background: var(--hx-primary-2); border-color: var(--hx-primary-2); }
.hx-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hx-btn-ghost { background: var(--hx-paper); color: var(--hx-primary) !important; border-color: var(--hx-line); }
.hx-btn-ghost:hover { background: var(--hx-bg); border-color: var(--hx-primary); }
.hx-btn-danger { background: var(--hx-paper); color: var(--hx-stop) !important; border-color: color-mix(in srgb, var(--hx-stop) 28%, var(--hx-surface)); }
.hx-btn-danger:hover { background: color-mix(in srgb, var(--hx-stop) 8%, var(--hx-surface)); border-color: var(--hx-stop); }
.hx-btn-sm { height: 32px; padding: 0 11px; font-size: 13px; }
.hx-btn-icon { width: 32px; padding: 0; justify-content: center; }
.hx-btn:focus-visible, .hx-input:focus-visible, .hx-nav a:focus-visible, .hx-user > button:focus-visible, .hx-link:focus-visible { outline: 3px solid var(--hx-accent); outline-offset: 2px; }

/* ---------- Panels ---------- */
.hx-panel { background: var(--hx-paper); border: 1px solid var(--hx-line); border-radius: var(--hx-r); }
.hx-panel + .hx-panel { margin-top: 18px; }
.hx-panel-head { padding: 14px 18px; border-bottom: 1px solid var(--hx-line-2); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hx-panel-head h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--hx-ink); }
.hx-panel-body { padding: 18px; }

/* ---------- Filter bar ---------- */
.hx-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 14px 18px; border-bottom: 1px solid var(--hx-line-2); }
.hx-filters .hx-field { margin: 0; }
.hx-filters .hx-grow { flex: 1 1 260px; }
.hx-search { position: relative; }
.hx-search svg { position: absolute; left: 11px; top: 50%; width: 17px; height: 17px; margin-top: -8.5px; stroke: var(--hx-muted); fill: none; stroke-width: 2; stroke-linecap: round; }
.hx-search .hx-input { padding-left: 36px; }
.hx-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 18px; font-size: 13.5px; color: var(--hx-muted); border-bottom: 1px solid var(--hx-line-2); }
.hx-chip { display: inline-flex; align-items: center; gap: 6px; background: color-mix(in srgb, var(--hx-primary) 10%, var(--hx-surface)); color: var(--hx-ink); border-radius: 999px; padding: 3px 4px 3px 11px; font-size: 13px; }
.hx-chip a { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: var(--hx-muted); text-decoration: none; font-size: 15px; line-height: 1; }
.hx-chip a:hover { background: color-mix(in srgb, var(--hx-primary) 20%, var(--hx-surface)); color: var(--hx-ink); }

/* ---------- Forms ---------- */
.hx-field { margin-bottom: 16px; }
.hx-field > label, .hx-label { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; color: var(--hx-text); }
.hx-field .hx-req { color: var(--hx-stop); }
.hx-input, .hx-app select.hx-input, .hx-app textarea.hx-input {
  width: 100%; height: 40px; padding: 8px 12px; border: 1px solid var(--hx-field); border-radius: var(--hx-r-sm);
  background: var(--hx-surface); font: 15px var(--hx-font); color: var(--hx-text); box-shadow: none;
}
textarea.hx-input { height: auto; min-height: 96px; resize: vertical; }
.hx-app select.hx-input, .hx-auth select.hx-input {
  -webkit-appearance: none; appearance: none; padding-right: 34px;
  background: var(--hx-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E6577' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
}
.hx-input::placeholder { color: color-mix(in srgb, var(--hx-muted) 80%, var(--hx-surface)); opacity: 1; }
.hx-input:focus { outline: none; border-color: var(--hx-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hx-primary) 18%, transparent); }
.hx-input[readonly], .hx-input:disabled { background: var(--hx-bg); color: var(--hx-muted); }
.hx-hint { display: block; font-size: 12.5px; color: var(--hx-muted); margin-top: 5px; }
.hx-field.has-error .hx-input { border-color: var(--hx-stop); }
label.error, .hx-error { display: block; color: var(--hx-stop); font-size: 12.5px; font-weight: 500; margin-top: 5px; }
.hx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.hx-grid .hx-span-2 { grid-column: 1 / -1; }
.hx-check { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; margin: 0; }
.hx-check input { margin: 0; }
.hx-check input { width: 18px; height: 18px; accent-color: var(--hx-primary); }
.hx-field > label.hx-check { display: flex; font-weight: 500; margin: 0; }
.hx-form-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--hx-line-2); background: var(--hx-tint); border-radius: 0 0 var(--hx-r) var(--hx-r); }

.hx-photo { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.hx-photo img { width: 84px; height: 84px; border-radius: var(--hx-r); object-fit: cover; border: 1px solid var(--hx-line); background: var(--hx-bg); }

/* ---------- Tables ---------- */
.hx-table-wrap { overflow-x: auto; }
.hx-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.hx-table th { text-align: left; font-weight: 600; color: var(--hx-muted); font-size: 13px; padding: 10px 14px; border-bottom: 1px solid var(--hx-line); white-space: nowrap; background: var(--hx-tint); }
.hx-table th a { color: inherit; text-decoration: none; }
.hx-table th a:hover { color: var(--hx-primary); }
.hx-table td { padding: 12px 14px; border-bottom: 1px solid var(--hx-line-2); vertical-align: middle; }
.hx-table tbody tr:hover td { background: var(--hx-hover); }
.hx-table .hx-num { text-align: right; }
.hx-table .hx-row-actions { white-space: nowrap; text-align: right; }
.hx-table .hx-row-actions .hx-btn { margin-left: 4px; }
.hx-cell-main { font-weight: 600; color: var(--hx-text); }
.hx-cell-sub { display: block; font-size: 12.5px; color: var(--hx-muted); }
.hx-empty { text-align: center; padding: 48px 20px; color: var(--hx-muted); }
.hx-empty strong { display: block; color: var(--hx-text); font-size: 16px; margin-bottom: 4px; }

/* ---------- Status tags: shaped like a hire tag (notched left edge) ---------- */
.hx-tag {
  --c: var(--hx-muted);
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 11px 0 19px; font-size: 12.5px; font-weight: 600;
  color: var(--c); background: color-mix(in srgb, var(--c) 11%, var(--hx-surface)); border-radius: 3px 999px 999px 3px; position: relative; white-space: nowrap;
}
.hx-tag::before { content: ""; position: absolute; left: 7px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--hx-surface); box-shadow: 0 0 0 1.5px var(--c); }
.hx-tag.new { --c: var(--hx-new); } .hx-tag.out { --c: var(--hx-out); } .hx-tag.back, .hx-tag.on { --c: var(--hx-back); }
.hx-tag.stop, .hx-tag.off { --c: var(--hx-stop); } .hx-tag.wait { --c: var(--hx-wait); }

/* ---------- Pager ---------- */
.hx-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 18px; font-size: 13.5px; color: var(--hx-muted); }
.hx-pages { display: flex; gap: 4px; flex-wrap: wrap; }
.hx-pages a, .hx-pages span { min-width: 34px; height: 34px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: var(--hx-r-sm); border: 1px solid var(--hx-line); color: var(--hx-text); text-decoration: none; background: var(--hx-surface); }
.hx-pages a:hover { border-color: var(--hx-primary); color: var(--hx-primary); }
.hx-pages .is-current { background: var(--hx-ink); border-color: var(--hx-ink); color: var(--hx-on-ink); font-weight: 600; }
.hx-pages .is-gap { border: 0; background: none; }
.hx-pages .is-off { color: color-mix(in srgb, var(--hx-muted) 45%, var(--hx-surface)); }

/* ---------- Alerts ---------- */
.hx-alert { border-radius: var(--hx-r-sm); padding: 11px 14px; font-size: 14px; margin-bottom: 16px; border: 1px solid; }
.hx-alert.info { background: color-mix(in srgb, var(--hx-primary) 8%, var(--hx-surface)); border-color: color-mix(in srgb, var(--hx-primary) 22%, var(--hx-surface)); color: var(--hx-ink); }
.hx-alert.warn { background: color-mix(in srgb, var(--hx-out) 10%, var(--hx-surface)); border-color: color-mix(in srgb, var(--hx-out) 32%, var(--hx-surface)); color: color-mix(in srgb, var(--hx-out) 55%, var(--hx-text)); }
.hx-alert.error { background: color-mix(in srgb, var(--hx-stop) 8%, var(--hx-surface)); border-color: color-mix(in srgb, var(--hx-stop) 28%, var(--hx-surface)); color: var(--hx-stop); }

/* ---------- Help modal (Close button only) ---------- */
.hx-modal { position: fixed; inset: 0; background: color-mix(in srgb, var(--hx-ink) 55%, transparent); display: none; align-items: center; justify-content: center; padding: 16px; z-index: 1000; }
.hx-modal.open { display: flex; }
.hx-modal-box { background: var(--hx-surface); border-radius: var(--hx-r); width: 100%; max-width: 620px; max-height: 86vh; display: flex; flex-direction: column; box-shadow: 0 24px 60px color-mix(in srgb, var(--hx-ink) 35%, transparent); font-family: var(--hx-font); }
.hx-modal-head { padding: 16px 20px; border-bottom: 1px solid var(--hx-line-2); }
.hx-modal-head h3 { margin: 0; font-size: 18px; color: var(--hx-ink); font-weight: 700; }
.hx-modal-body { padding: 16px 20px; overflow-y: auto; font-size: 14.5px; line-height: 1.6; color: var(--hx-text); }
.hx-modal-body h4 { font-size: 15px; margin: 16px 0 4px; color: var(--hx-ink); font-weight: 700; }
.hx-modal-body ul, .hx-modal-body ol { padding-left: 20px; margin: 6px 0; }
.hx-modal-foot { padding: 12px 20px; border-top: 1px solid var(--hx-line-2); text-align: right; }

/* ---------- Login / public pages ---------- */
.hx-auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 480px); font-family: var(--hx-font); }
.hx-auth *, .hx-auth *::before, .hx-auth *::after { box-sizing: border-box; }
.hx-auth-art { background: var(--hx-ink); color: var(--hx-side-text); padding: 40px 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.hx-auth-art .hx-festoon { margin: 0 -8px; }
.hx-auth-art h2 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.12; color: var(--hx-on-ink); margin: 0 0 14px; font-weight: 700; letter-spacing: -.015em; max-width: 14ch; }
.hx-auth-art p { max-width: 42ch; color: var(--hx-side-muted); font-size: 16px; margin: 0; }
.hx-auth-links a { color: var(--hx-side-text); margin-right: 18px; font-size: 14px; }
.hx-auth-form { background: var(--hx-paper); padding: 48px 44px; display: flex; flex-direction: column; justify-content: center; }
.hx-auth-form .hx-brand-logo { max-height: 56px; max-width: 220px; margin-bottom: 28px; }
.hx-auth-form h1 { font-size: 26px; margin: 0 0 6px; color: var(--hx-ink); font-weight: 700; }
.hx-auth-form > p { margin: 0 0 24px; color: var(--hx-muted); }
.hx-auth-row { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 20px; font-size: 14px; }
.hx-auth .hx-btn { width: 100%; justify-content: center; height: 44px; font-size: 15px; }
.hx-link { color: var(--hx-primary); font-weight: 600; text-decoration: none; }
.hx-link:hover { text-decoration: underline; }

/* ---------- Old pages inside the new shell (until converted) ---------- */
.hx-content #content { padding: 0; margin: 0; background: transparent; }
.hx-content .box-content { margin: 0; padding: 0; width: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hx-side { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s ease; }
  .hx-app.nav-open .hx-side { box-shadow: 0 0 40px var(--hx-shadow); }
  .hx-app.nav-open .hx-side { transform: none; }
  .hx-scrim { display: none; position: fixed; inset: 0; background: color-mix(in srgb, var(--hx-ink) 40%, transparent); z-index: 35; }
  .hx-app.nav-open .hx-scrim { display: block; }
  .hx-menu-btn { display: inline-flex; }
  .hx-content { padding: 18px 16px; }
  .hx-top { padding: 0 16px; }
  .hx-user-name { display: none; }
}
@media (max-width: 760px) {
  .hx-grid { grid-template-columns: 1fr; }
  .hx-titlebar h1 { font-size: 22px; }
  .hx-auth { grid-template-columns: 1fr; }
  .hx-auth-art { padding: 28px 24px; min-height: 0; }
  .hx-auth-art h2 { font-size: 26px; }
  .hx-auth-art p { display: none; }
  .hx-auth-form { padding: 32px 24px; }
  /* tables become cards */
  .hx-table.hx-stack thead { display: none; }
  .hx-table.hx-stack tr { display: block; border-bottom: 1px solid var(--hx-line); padding: 8px 0; }
  .hx-table.hx-stack td { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border: 0; padding: 5px 16px; }
  .hx-table.hx-stack td > div { text-align: right; min-width: 0; overflow-wrap: anywhere; }
  .hx-table.hx-stack td::before { flex: 0 0 auto; }
  .hx-table.hx-stack td::before { content: attr(data-label); color: var(--hx-muted); font-size: 13px; }
  .hx-table.hx-stack td.hx-row-actions { justify-content: flex-end; }
  .hx-table.hx-stack td.hx-row-actions::before { content: none; }
}
@media (prefers-reduced-motion: reduce) { .hx-side { transition: none; } }

/* =====================================================================
   Legacy layer: old page markup (Bootstrap + main.css classes) inside the new shell,
   restyled to match until each page is rebuilt. Scoped to .hx-content.
   ===================================================================== */
.hx-content, .hx-content .form-control, .hx-content .btn, .hx-content table { font-family: var(--hx-font); }
.hx-content .page-header { margin: 0 0 18px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; }
.hx-content .page-header .page-title { width: 100%; }
.hx-content .page-header .page-title h1 { font-size: 26px; line-height: 1.2; font-weight: 700; color: var(--hx-ink); margin: 0; letter-spacing: -.01em; }
.hx-content .page-header .page-searchbar { width: 100%; background: var(--hx-surface); border: 1px solid var(--hx-line); border-radius: var(--hx-r); padding: 14px 18px; }
.hx-content .page-header .page-searchbar .input-group input,
.hx-content .form-control {
  height: 40px; border: 1px solid var(--hx-field); border-radius: var(--hx-r-sm) !important; box-shadow: none; background-color: var(--hx-surface);
  color: var(--hx-text); font-size: 15px;
}
.hx-content textarea.form-control { height: auto; }
.hx-content .form-control:focus { border-color: var(--hx-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hx-primary) 18%, transparent); }
.hx-content .form-group > label, .hx-content label { font-weight: 600; font-size: 13.5px; color: var(--hx-text); }
.hx-content .white-box { background: var(--hx-surface); border: 1px solid var(--hx-line); border-radius: var(--hx-r); box-shadow: none; padding: 22px; }
.hx-content .table-shadow { box-shadow: none; border: 1px solid var(--hx-line); border-radius: var(--hx-r); background: var(--hx-surface); }
.hx-content table.custom-table { margin: 0; font-size: 14px; color: var(--hx-text); font-variant-numeric: tabular-nums; background: var(--hx-surface); }
.hx-content table.custom-table thead th { background: var(--hx-tint); color: var(--hx-muted); font-weight: 600; font-size: 13px; border: 0; border-bottom: 1px solid var(--hx-line); padding: 10px 12px; white-space: nowrap; vertical-align: bottom; }
.hx-content table.custom-table td { border: 0; border-bottom: 1px solid var(--hx-line-2); padding: 11px 12px; vertical-align: middle; word-break: normal; overflow-wrap: normal; }
.hx-content table.custom-table td[data-column*="Date"], .hx-content table.custom-table td[data-column="Order No"] { white-space: nowrap; }
.hx-content table.custom-table tbody tr:hover td { background: var(--hx-hover); }
.hx-content .datanot_found { text-align: center; padding: 40px 16px !important; color: var(--hx-muted); }

/* buttons */
.hx-content .btn { border-radius: var(--hx-r-sm); font-weight: 600; font-size: 13.5px; text-transform: none; line-height: 1.2; padding: 8px 14px; box-shadow: none; }
.hx-content .btn-add-store, .hx-content .submit-form-btn, .hx-content .btn-save, .hx-content .btn-primary,
.hx-content table .action-buttons .btn-view-record, .hx-content table .action-buttons .btn-view-order {
  background: var(--hx-primary); border: 1px solid var(--hx-primary); color: var(--hx-on-primary) !important; text-transform: none; font-size: 13.5px; margin-left: 0;
}
.hx-content .btn-add-store:hover, .hx-content .submit-form-btn:hover, .hx-content .btn-save:hover, .hx-content .btn-primary:hover,
.hx-content table .action-buttons .btn-view-record:hover, .hx-content table .action-buttons .btn-view-order:hover { background: var(--hx-primary-2); border-color: var(--hx-primary-2); }
.hx-content table .action-buttons .btn-view-order { background: var(--hx-surface); color: var(--hx-primary) !important; border-color: var(--hx-line); }
.hx-content table .action-buttons .btn-view-order:hover { background: var(--hx-bg); border-color: var(--hx-primary); }
.hx-content .btn-edit, .hx-content .btn-delete, .hx-content .action-buttons .btn-cart { width: 32px; height: 32px; padding: 0; display: inline-grid; place-items: center; border: 1px solid var(--hx-line); background: var(--hx-surface); color: var(--hx-primary); border-radius: var(--hx-r-sm); }
.hx-content .btn-delete { color: var(--hx-stop); border-color: color-mix(in srgb, var(--hx-stop) 28%, var(--hx-surface)); }
.hx-content .btn-cancel, .hx-content .btn-danger { background: var(--hx-surface); color: var(--hx-stop) !important; border: 1px solid color-mix(in srgb, var(--hx-stop) 28%, var(--hx-surface)); text-transform: none; }
.hx-content .btn-cancel:hover, .hx-content .btn-danger:hover { background: color-mix(in srgb, var(--hx-stop) 8%, var(--hx-surface)); }
.hx-content .btn-success { background: var(--hx-back); border-color: var(--hx-back); color: #fff; }
.hx-content .action-buttons { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hx-content .action-buttons > a, .hx-content .action-buttons > button { margin: 0; }

/* old status labels -> hire tags */
.hx-content h5.status {
  --c: var(--hx-muted);
  display: inline-flex; align-items: center; height: 24px; padding: 0 11px 0 19px; margin: 0; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  color: var(--c) !important; background: color-mix(in srgb, var(--c) 11%, var(--hx-surface)); border: 0 !important; border-radius: 3px 999px 999px 3px; position: relative;
}
.hx-content h5.status::before { content: ""; position: absolute; left: 7px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--hx-surface); box-shadow: 0 0 0 1.5px var(--c); }
.hx-content h5.status.neworder-status { --c: var(--hx-new); }
.hx-content h5.status.inprogress-status { --c: var(--hx-out); }
.hx-content h5.status.picked-status { --c: var(--hx-out); }
.hx-content h5.status.completed-status { --c: var(--hx-back); }
.hx-content h5.status.pending-status { --c: var(--hx-wait); }
.hx-content h5.status.failed-status { --c: var(--hx-stop); }

/* old pager */
.hx-content .paginate { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin: 16px 0 0 !important; }
.hx-content .paginate a, .hx-content .paginate span { min-width: 34px; height: 34px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: var(--hx-r-sm); border: 1px solid var(--hx-line); background: var(--hx-surface); color: var(--hx-text); text-decoration: none; }
.hx-content .paginate span.current { background: var(--hx-ink); border-color: var(--hx-ink); color: var(--hx-on-ink); }
.hx-content .paginate span.disabled { color: color-mix(in srgb, var(--hx-muted) 45%, var(--hx-surface)); }
.hx-content .paginate .paginate { border: 0; padding: 0; margin: 0 !important; }

/* bootstrap modals */
.modal-content { border: 0; border-radius: var(--hx-r); font-family: var(--hx-font); box-shadow: 0 24px 60px var(--hx-shadow); }
.modal-header { border-bottom: 1px solid var(--hx-line-2); }
.modal-title { font-weight: 700; color: var(--hx-ink); }
.modal-footer { border-top: 1px solid var(--hx-line-2); }
.modal-backdrop.show { opacity: .5; }

/* toastr messages in the theme */
#toast-container > div { font-family: var(--hx-font); border-radius: var(--hx-r-sm); box-shadow: 0 10px 24px var(--hx-shadow); opacity: .97; }
#toast-container > .toast-success { background-color: var(--hx-back); }
#toast-container > .toast-error { background-color: var(--hx-stop); }

/* old mobile table-to-card rules */
@media (max-width: 991px) {
  .hx-content table.custom-table td { padding-left: 50%; }
  .hx-content table.custom-table td::before { color: var(--hx-muted); font-size: 13px; }
}

/* ---------- Order lists (includes/orders.php) ---------- */
.ox-tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--hx-line); overflow-x: auto; scrollbar-width: thin; }
.ox-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 13px 10px 11px; font-size: 14px; font-weight: 500; color: var(--hx-muted); text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.ox-tabs a b { font-weight: 600; font-size: 12px; min-width: 22px; padding: 1px 7px; border-radius: 10px; background: var(--hx-tint); color: var(--hx-muted); text-align: center; }
.ox-tabs a:hover { color: var(--hx-text); }
.ox-tabs a.is-on { color: var(--hx-ink); font-weight: 650; border-bottom-color: var(--hx-primary); }
.ox-tabs a.is-on b { background: var(--hx-primary); color: var(--hx-on-primary); }
.ox-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--hx-muted)); flex: 0 0 7px; }
.ox-dot.k-new { --c: var(--hx-new); } .ox-dot.k-out { --c: var(--hx-out); } .ox-dot.k-back { --c: var(--hx-back); }
.ox-dot.k-stop { --c: var(--hx-stop); } .ox-dot.k-wait { --c: var(--hx-wait); }

.ox-range-row { display: flex; gap: 6px; }
.ox-range-row select { width: auto; }
.ox-range-row input[type=date] { width: 148px; }

.ox-table td { vertical-align: top; }
.ox-no { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--hx-primary); cursor: pointer; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--hx-primary) 35%, transparent); text-underline-offset: 3px; }
.ox-no:hover { text-decoration-color: currentColor; }
.ox-no:focus-visible { outline: 2px solid var(--hx-primary); outline-offset: 2px; border-radius: 2px; }
.ox-item { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ox-dates { white-space: nowrap; }
.ox-late { color: var(--hx-stop); font-weight: 600; }
.ox-due { color: color-mix(in srgb, var(--hx-out) 80%, var(--hx-text)); font-weight: 600; }
.ox-pay.p1 { color: var(--hx-back); font-weight: 600; }
.ox-pay.p0 { color: color-mix(in srgb, var(--hx-wait) 85%, var(--hx-text)); font-weight: 600; }
.ox-pay.p2 { color: var(--hx-stop); font-weight: 600; cursor: help; }
.ox-reason { max-width: 200px; margin-left: auto; }
.ox-table .hx-tag + .hx-cell-sub { margin-top: 4px; }
.ox-actions { width: 1%; }
.ox-actions .hx-btn { margin: 0 0 4px 4px; }
.ox-actions .ox-wait { display: block; font-size: 12.5px; color: var(--hx-muted); white-space: normal; max-width: 160px; margin-left: auto; text-align: right; }

.ox-modal-box { max-width: 760px; }
.ox-small { max-width: 420px; }
.ox-view-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; color: var(--hx-muted); font-size: 13.5px; margin-bottom: 4px; }
.ox-view-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 4px 22px; }
.ox-view-grid p { margin: 0; }
.ox-items td { vertical-align: middle; }
.ox-prod { display: flex; align-items: center; gap: 10px; }
.ox-prod img { width: 36px; height: 36px; object-fit: cover; border-radius: 5px; border: 1px solid var(--hx-line); flex: 0 0 36px; }

@media (max-width: 760px) {
  .ox-range-row input[type=date] { width: 100%; min-width: 0; }
  .ox-range-row { flex-wrap: wrap; }
  .ox-range-row select { flex: 1 1 100%; }
  .ox-range-row input { flex: 1 1 40%; }
  .ox-filters-more { display: none; }
  .ox-item { max-width: 190px; margin-left: auto; }
  .ox-actions { width: auto; }
  .ox-actions .hx-btn { margin: 4px 0 0 6px; }
  .ox-reason { max-width: none; }
}
.ox-table td:first-child, .ox-table .hx-num .hx-cell-sub, .ox-table td[data-label="Customer"] .hx-cell-sub { white-space: nowrap; }
@media (max-width: 760px) { .ox-table td:first-child { white-space: normal; } }

/* ---------- Settings pages ---------- */
.hx-tabs { display: flex; gap: 2px; margin: -6px 0 18px; border-bottom: 1px solid var(--hx-line); overflow-x: auto; scrollbar-width: thin; }
.hx-tabs a { padding: 10px 12px 9px; font-size: 14px; font-weight: 500; color: var(--hx-muted); text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.hx-tabs a:hover { color: var(--hx-text); }
.hx-tabs a.is-on { color: var(--hx-ink); font-weight: 650; border-bottom-color: var(--hx-primary); }

.hx-set { max-width: 980px; }
.hx-set-row { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; padding: 22px 22px 6px; border-bottom: 1px solid var(--hx-line-2); }
.hx-set-row:last-of-type { border-bottom: 0; }
.hx-set-row > header h2 { margin: 0 0 6px; font-size: 15px; font-weight: 700; color: var(--hx-ink); }
.hx-set-row > header p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: var(--hx-muted); }
.hx-set-row .hx-grid { gap: 0 18px; }
.hx-img-pick { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.hx-img-pick .hx-img-box { width: 168px; height: 84px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--hx-field); border-radius: var(--hx-r); background: repeating-conic-gradient(var(--hx-bg) 0 25%, var(--hx-surface) 0 50%) 0 0 / 14px 14px; flex: 0 0 auto; }
.hx-img-pick .hx-img-box.sq { width: 84px; }
.hx-img-pick img { max-width: 90%; max-height: 80%; object-fit: contain; }
.hx-img-pick .hx-img-empty { font-size: 12.5px; color: var(--hx-muted); }
.hx-img-pick input[type=file] { font-size: 13.5px; max-width: 100%; }
.hx-secret-saved { display: inline-block; margin-left: 6px; font-weight: 500; font-size: 12px; color: var(--hx-back); }
@media (max-width: 860px) {
  .hx-set-row { grid-template-columns: 1fr; gap: 0; padding: 18px 16px 4px; }
  .hx-img-pick { flex-wrap: wrap; }
}

/* Email settings (shared NS screen, public_html/includes/mail_settings_ui.php) in the hire app look */
.hx-body .nsm { max-width: 980px; margin: 0; font-family: var(--hx-font); color: var(--hx-text); }
.hx-body .nsm-titlebar, .hx-body .nsm-sub { display: none; }
.hx-body .nsm-panel { border-color: var(--hx-line); border-radius: var(--hx-r); margin-top: 0; margin-bottom: 18px; background: var(--hx-surface); }
.hx-body .nsm-panel > h2 { background: var(--hx-tint); color: var(--hx-ink); font-size: 15px; font-weight: 700; padding: 12px 18px; border-color: var(--hx-line-2); border-radius: var(--hx-r) var(--hx-r) 0 0; }
.hx-body .nsm-body { padding: 18px; }
.hx-body .nsm-field label { font-size: 13.5px; color: var(--hx-text); }
.hx-body .nsm-field input, .hx-body .nsm-field select { height: 40px; border-color: var(--hx-field); border-radius: var(--hx-r-sm); font-family: inherit; }
.hx-body .nsm-field input:focus, .hx-body .nsm-field select:focus { border-color: var(--hx-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hx-primary) 18%, transparent); }
.hx-body .nsm-field small { color: var(--hx-muted); font-size: 12.5px; }
.hx-body .nsm-note { border-left-color: var(--hx-accent); background: color-mix(in srgb, var(--hx-accent) 9%, var(--hx-surface)); }
.hx-body .nsm-btn { background: var(--hx-primary); color: var(--hx-on-primary); border-radius: var(--hx-r-sm); font-family: inherit; font-weight: 600; height: 40px; }
.hx-body .nsm-btn:hover { background: var(--hx-primary-2); }
.hx-body .nsm-btn.nsm-alt { background: var(--hx-surface); color: var(--hx-primary); border-color: var(--hx-field); }
.hx-body .nsm-btn.nsm-alt:hover { background: var(--hx-hover); }
.hx-body .nsm-flash { margin: 0 0 16px; border-radius: var(--hx-r); }
.hx-body .nsm-modal { background: color-mix(in srgb, var(--hx-ink) 55%, transparent); }
.hx-body .nsm-modal-box { border-radius: var(--hx-r); font-family: var(--hx-font); }
.hx-body .nsm-modal-box h3 { background: var(--hx-surface); color: var(--hx-ink); border-bottom: 1px solid var(--hx-line-2); padding: 16px 20px; font-size: 18px; }
.hx-body .nsm-modal-body { font-size: 14.5px; line-height: 1.6; padding: 16px 20px; }
.hx-body .nsm-modal-body h4 { color: var(--hx-ink); font-size: 15px; }
.hx-body .nsm-modal-foot { border-color: var(--hx-line-2); }
.hx-body .thm-head { display: none; }
.hx-body .nsm-field input { color: var(--hx-text); }
.hx-body .nsm-field input::placeholder, .hx-input::placeholder { color: var(--hx-muted); opacity: .75; }
.hx-set-row > * { min-width: 0; }
.hx-photo > div { min-width: 0; }
.hx-photo input[type=file], .hx-img-pick input[type=file] { max-width: 100%; font-size: 13.5px; }
@media (max-width: 860px) { .hx-photo { flex-wrap: wrap; } }

/* Payment gateway tabs (Settings > Payments) */
.hx-gw { margin: 18px 18px; border: 1px solid var(--hx-line); border-radius: var(--hx-r); overflow: hidden; }
.hx-gw-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 14px; background: var(--hx-tint); border-bottom: 1px solid var(--hx-line); }
.hx-gw-label { font-size: 13px; font-weight: 600; color: var(--hx-muted); }
.hx-gw-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.hx-gw-tabs button { height: 34px; padding: 0 14px; border: 1px solid var(--hx-field); border-radius: var(--hx-r-sm); background: var(--hx-surface); color: var(--hx-text); font: 600 13.5px var(--hx-font); cursor: pointer; }
.hx-gw-tabs button:hover { border-color: var(--hx-primary); }
.hx-gw-tabs button[aria-selected=true] { background: var(--hx-primary); border-color: var(--hx-primary); color: var(--hx-on-primary); }
.hx-gw-tabs button:focus-visible { outline: 2px solid var(--hx-accent); outline-offset: 2px; }
.hx-gw-panel[hidden] { display: none; }
.hx-gw .hx-set-row { padding-left: 16px; padding-right: 16px; }
@media (max-width: 860px) { .hx-gw { margin: 14px 12px 4px; } }

/* Rich text editor (textarea[data-hx-editor], js/hire.js) */
.hx-editor { border: 1px solid var(--hx-field); border-radius: var(--hx-r-sm); background: var(--hx-surface); overflow: hidden; }
.hx-editor:focus-within { border-color: var(--hx-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--hx-primary) 18%, transparent); }
.has-error .hx-editor { border-color: var(--hx-stop); }
.hx-editor-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 5px 6px; background: var(--hx-tint); border-bottom: 1px solid var(--hx-line); }
.hx-editor-bar button { width: 32px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: var(--hx-r-sm); background: none; color: var(--hx-text); cursor: pointer; }
.hx-editor-bar button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hx-editor-bar button:hover { background: var(--hx-surface); border-color: var(--hx-line); }
.hx-editor-bar button[aria-pressed=true] { background: color-mix(in srgb, var(--hx-primary) 12%, var(--hx-surface)); border-color: color-mix(in srgb, var(--hx-primary) 35%, var(--hx-surface)); color: var(--hx-primary); }
.hx-editor-bar button:focus-visible { outline: 2px solid var(--hx-primary); outline-offset: 1px; }
.hx-editor-sep { width: 1px; height: 20px; background: var(--hx-line); margin: 0 4px; }
.hx-editor-area { min-height: 150px; max-height: 420px; overflow-y: auto; padding: 10px 12px; font-size: 14.5px; line-height: 1.55; color: var(--hx-text); outline: none; }
.hx-editor-area p { margin: 0 0 8px; }
.hx-editor-area ul, .hx-editor-area ol { margin: 0 0 8px; padding-left: 22px; }
.hx-editor-area a { color: var(--hx-primary); }
.hx-editor.is-empty .hx-editor-area::before { content: attr(data-placeholder); color: var(--hx-muted); opacity: .75; pointer-events: none; }

/* Customer / item info icons in order rows */
.ox-with-ic { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.ox-ic { flex: 0 0 auto; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid transparent; border-radius: 50%; background: none; color: var(--hx-primary); cursor: pointer; }
.ox-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ox-ic:hover { background: color-mix(in srgb, var(--hx-primary) 10%, var(--hx-surface)); border-color: color-mix(in srgb, var(--hx-primary) 25%, var(--hx-surface)); }
.ox-ic:focus-visible { outline: 2px solid var(--hx-primary); outline-offset: 1px; }
.ox-modal-narrow { max-width: 560px; }
.ox-view-more { margin: 14px 0 0; }
.ox-linkbtn { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
.ox-items tfoot th, .ox-items tfoot td { border-top: 1px solid var(--hx-line); border-bottom: 0; font-weight: 500; color: var(--hx-muted); }
.ox-items tfoot th { text-align: left; }
@media (max-width: 760px) { .ox-with-ic { justify-content: flex-end; } }
.ox-dl { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 6px 12px; margin: 0; }
.ox-dl dt { color: var(--hx-muted); font-weight: 500; font-size: 13.5px; padding-top: 1px; }
.ox-dl dd { margin: 0; overflow-wrap: anywhere; }
.ox-view-grid.ox-one { grid-template-columns: 1fr; gap: 0; }
.hx-table.ox-items tfoot th { background: none; }

/* ---------- Take an order (store-product-listing) ---------- */
.hx-tag.mute { --c: var(--hx-muted); }
.sp-dates { margin-bottom: 18px; border-left: 4px solid var(--hx-accent); }
.sp-dates.is-set { border-left-color: var(--hx-back); }
.sp-dates-form { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; }
.sp-dates-icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--hx-accent) 16%, var(--hx-surface)); color: color-mix(in srgb, var(--hx-accent) 55%, var(--hx-ink)); }
.sp-dates.is-set .sp-dates-icon { background: color-mix(in srgb, var(--hx-back) 14%, var(--hx-surface)); color: var(--hx-back); }
.sp-dates-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sp-dates-text { flex: 1 1 260px; min-width: 0; }
.sp-dates-text h2 { margin: 0; font-size: 15px; font-weight: 700; color: var(--hx-ink); }
.sp-dates-text p { margin: 2px 0 0; font-size: 14px; color: var(--hx-muted); }
.sp-dates-text p b { color: var(--hx-text); font-weight: 650; }
.sp-dates-fields { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.sp-dates-fields .hx-field { margin: 0; }
.sp-dates-fields input[type=date] { width: 160px; }
.sp-clear { align-self: center; margin-top: 18px; font-size: 13.5px; }
.sp-dates-note { margin: 0; padding: 10px 18px 12px 78px; font-size: 13.5px; color: var(--hx-muted); border-top: 1px solid var(--hx-line-2); }
.sp-dates-note.is-error { color: var(--hx-stop); font-weight: 600; }

.sp-desc { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--hx-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sp-add { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.sp-qty { display: inline-flex; border: 1px solid var(--hx-field); border-radius: var(--hx-r-sm); overflow: hidden; height: 40px; }
.sp-qty button { width: 34px; border: 0; background: var(--hx-tint); color: var(--hx-text); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.sp-qty button:hover:not(:disabled) { background: color-mix(in srgb, var(--hx-primary) 10%, var(--hx-surface)); }
.sp-qty button:disabled { opacity: .45; cursor: not-allowed; }
.sp-qty svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.sp-qty input { width: 52px; border: 0; border-left: 1px solid var(--hx-line); border-right: 1px solid var(--hx-line); text-align: center; font: 600 15px var(--hx-font); color: var(--hx-text); -moz-appearance: textfield; }
.sp-qty input::-webkit-outer-spin-button, .sp-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sp-qty input:disabled { background: var(--hx-surface); color: var(--hx-muted); }
.sp-add-btn { flex: 1; justify-content: center; }
.sp-add-btn:disabled { opacity: .5; cursor: not-allowed; }
.sp-msg { margin: 0; min-height: 0; font-size: 13px; font-weight: 600; }
.sp-msg:empty { display: none; }
.sp-msg.is-ok { color: var(--hx-back); }
.sp-msg.is-bad { color: var(--hx-stop); }
.sp-more { margin-top: 4px; border-top: 1px solid var(--hx-line-2); padding-top: 8px; font-size: 13.5px; }
.sp-more summary { cursor: pointer; color: var(--hx-primary); font-weight: 600; font-size: 13px; list-style: revert; }
.sp-more .ox-dl { margin-top: 8px; grid-template-columns: 64px minmax(0, 1fr); }
@media (max-width: 760px) {
  .sp-desc { display: none; }
  .sp-add { flex-wrap: wrap; }
  .sp-qty { width: 100%; }
  .sp-qty input { flex: 1; }
  .sp-dates-note { padding-left: 18px; }
  .sp-dates-fields { width: 100%; }
  .sp-dates-fields .hx-field { flex: 1; }
  .sp-dates-fields input[type=date] { width: 100%; }
}
@media (max-width: 420px) { .sp-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .sp-qty { width: auto; }
  .sp-add { flex-wrap: nowrap; }
  .sp-dates-icon { display: none; }
}

/* Take an order: list */
.sp-table td { vertical-align: top; }
.sp-row.is-out .sp-thumb img { opacity: .5; filter: grayscale(.6); }
.sp-prod { display: flex; gap: 12px; align-items: flex-start; min-width: 260px; }
.sp-thumb { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 6px; border: 1px solid var(--hx-line); background: var(--hx-tint); overflow: hidden; display: block; }
.sp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sp-prod-text { min-width: 0; }
.sp-prod-text .hx-cell-main { display: block; font-size: 15px; }
.sp-more { margin-top: 4px; font-size: 13.5px; }
.sp-more summary { cursor: pointer; color: var(--hx-primary); font-weight: 600; font-size: 12.5px; }
.sp-more .sp-desc { margin: 6px 0; max-width: 460px; line-height: 1.45; color: var(--hx-text); }
.sp-more .ox-dl { grid-template-columns: 64px minmax(0, 1fr); max-width: 420px; }
.sp-price { font-size: 15px; color: var(--hx-ink); }
.sp-split { margin-top: 4px; white-space: nowrap; }
.sp-split b { color: var(--hx-text); }
.sp-split .ok b { color: var(--hx-back); }
.sp-split .no b { color: var(--hx-stop); }
.sp-held-in { width: 76px; height: 34px; text-align: right; padding: 4px 8px; }
.sp-act { width: 1%; white-space: nowrap; }
.sp-act .sp-add { padding-top: 0; margin: 0; }
.sp-qty { height: 36px; }
.sp-qty input { width: 48px; }
.sp-add-btn { height: 36px; }
.sp-act .sp-msg { margin-top: 6px; white-space: normal; max-width: 230px; }
@media (max-width: 760px) {
  .sp-prod { min-width: 0; text-align: left; }
  .hx-table.hx-stack td[data-label="Product"] > div { text-align: left; }
  .hx-table.hx-stack td[data-label="Product"]::before { content: none; }
  .sp-act { width: auto; }
  .sp-act > div { width: 100%; }
  .sp-act .sp-add { justify-content: flex-end; }
  .sp-act .sp-msg { max-width: none; text-align: right; }
}
.sp-table .sp-more { border-top: 0; padding-top: 0; margin-top: 2px; }
.sp-table td { padding-top: 10px; padding-bottom: 10px; }

/* ---------- Shell: full-width content, foldable side menu ---------- */
.hx-content { max-width: none; }
.hx-menu-btn { display: inline-flex; border-radius: var(--hx-r-sm); }
.hx-menu-btn:hover { background: var(--hx-tint); }
.hx-menu-btn:focus-visible { outline: 2px solid var(--hx-primary); outline-offset: 1px; }
@media (min-width: 1025px) {
  .hx-side { transition: width .18s ease, flex-basis .18s ease; overflow: hidden; }
  .hx-app.side-closed .hx-side { width: 68px; flex-basis: 68px; }
  .hx-app.side-closed .hx-brand,
  .hx-app.side-closed .hx-festoon,
  .hx-app.side-closed .hx-role,
  .hx-app.side-closed .hx-side-foot { display: none; }
  .hx-app.side-closed .hx-nav { padding: 14px 10px; overflow-x: hidden; }
  .hx-app.side-closed .hx-nav-group { font-size: 0; padding: 0; margin: 10px 8px; height: 1px; background: color-mix(in srgb, var(--hx-on-ink) 14%, transparent); }
  .hx-app.side-closed .hx-nav-group:first-child { display: none; }
  .hx-app.side-closed .hx-nav a { justify-content: center; padding: 11px 0; }
  .hx-app.side-closed .hx-nav a span { display: none; }
  .hx-app.side-closed .hx-nav a svg { width: 20px; height: 20px; flex-basis: 20px; }
}
@media (prefers-reduced-motion: reduce) { .hx-side { transition: none !important; } }

/* Logged in as a store (impersonate.php) */
.hx-imp { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 24px; background: var(--hx-accent); color: var(--hx-on-accent); font-size: 14px; position: sticky; top: 0; z-index: 31; }
.hx-imp span { display: inline-flex; align-items: center; gap: 8px; }
.hx-imp svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hx-imp .hx-btn { background: var(--hx-ink); border-color: var(--hx-ink); color: var(--hx-on-ink); }
.hx-imp ~ .hx-top { top: 0; }
.hx-inline-form { display: inline; margin: 0; }
@media (max-width: 1024px) { .hx-imp { padding: 8px 16px; } }
.hx-imp { position: static; }
.hx-imp span { display: block; }
.hx-imp svg { vertical-align: -4px; margin-right: 8px; }

/* ---------- Cart + checkout (store_cart) ---------- */
.ck-items tfoot th, .ck-items tfoot td { border-top: 1px solid var(--hx-line); border-bottom: 0; background: none; }
.ck-items tfoot th { text-align: left; font-weight: 500; color: var(--hx-muted); }
.ck-form { margin-top: 18px; }
.ck-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ck-choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--hx-field); border-radius: var(--hx-r); background: var(--hx-surface); cursor: pointer; }
.ck-choice:hover { border-color: var(--hx-primary); }
.ck-choice input { margin-top: 3px; accent-color: var(--hx-primary); width: 16px; height: 16px; flex: 0 0 16px; }
.ck-choice b { display: block; font-size: 14.5px; color: var(--hx-ink); }
.ck-choice small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: var(--hx-muted); }
.ck-choice:has(input:checked) { border-color: var(--hx-primary); background: color-mix(in srgb, var(--hx-primary) 6%, var(--hx-surface)); box-shadow: 0 0 0 1px var(--hx-primary) inset; }
.ck-choice.is-off { cursor: not-allowed; opacity: .6; background: var(--hx-tint); }
.ck-choice.is-off:hover { border-color: var(--hx-field); }
.ck-choices.has-error .ck-choice { border-color: var(--hx-stop); }
.ck-address[hidden], .ck-bank[hidden] { display: none; }
.ck-foot { align-items: center; justify-content: space-between; }
.ck-total { font-size: 15px; color: var(--hx-muted); }
.ck-total b { color: var(--hx-ink); font-size: 18px; margin-left: 4px; }
@media (max-width: 760px) { .ck-choices { grid-template-columns: 1fr; } }
.ck-form.hx-set { max-width: none; }

/* ---------- Page loader (js/hire.js: hxLoading) ---------- */
.hx-loader { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--hx-bg) 62%, transparent); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: opacity .15s ease, visibility 0s linear .15s; cursor: progress; }
.hx-loader.on { opacity: 1; visibility: visible; transition: opacity .15s ease; }
.hx-loader-box { background: var(--hx-ink); color: var(--hx-on-ink); border-radius: 12px; padding: 20px 26px 16px; text-align: center;
  box-shadow: 0 18px 50px color-mix(in srgb, var(--hx-ink) 35%, transparent); font-family: var(--hx-font); }
.hx-loader svg { width: 200px; height: auto; display: block; overflow: visible; }
.hx-loader svg path, .hx-loader svg line { fill: none; stroke: color-mix(in srgb, var(--hx-on-ink) 35%, transparent); stroke-width: 1.2; }
.hx-loader svg .b { fill: color-mix(in srgb, var(--hx-accent) 25%, var(--hx-ink)); animation: hx-bulb 1.08s ease-in-out infinite; }
.hx-loader p { margin: 12px 0 0; font-size: 14px; font-weight: 600; letter-spacing: .01em; color: var(--hx-side-text); }
@keyframes hx-bulb {
  0%, 100% { fill: color-mix(in srgb, var(--hx-accent) 25%, var(--hx-ink)); filter: none; }
  45% { fill: var(--hx-glow); filter: drop-shadow(0 0 5px var(--hx-glow)); }
}
@media (prefers-reduced-motion: reduce) {
  .hx-loader svg .b { animation: none; fill: var(--hx-glow); }
  .hx-loader, .hx-loader.on { transition: none; }
}

/* ===================================================================
   Eftpos till screen (eftpos_payment.php) — ps-
   Full screen: terminal on the left, receipt on the right.
   =================================================================== */
#eftpos_payment-page { background: var(--hx-ink); }
.ps { min-height: 100vh; display: flex; flex-direction: column; background: var(--hx-ink); color: var(--hx-on-ink); font-family: var(--hx-font); }
.ps-bar { display: flex; align-items: center; gap: 16px; padding: 14px 28px; border-bottom: 1px solid color-mix(in srgb, var(--hx-on-ink) 12%, transparent); font-size: 15px; }
.ps-bar-store { font-weight: 700; }
.ps-bar-title { color: var(--hx-side-muted); }
.ps-bar-order { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }

.ps-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; padding: 32px 28px; align-items: start; max-width: 1240px; width: 100%; margin: 0 auto; box-sizing: border-box; }

/* terminal */
.ps-term { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 36px 32px 32px; border-radius: 22px;
  background: var(--hx-ink-2); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--hx-on-ink) 10%, transparent), 0 24px 60px rgba(0,0,0,.35); }
.ps-term-label { margin: 0; font-size: 15px; color: var(--hx-side-muted); }
.ps-amount { margin: 4px 0 26px; font-size: clamp(56px, 9vw, 96px); line-height: 1; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.ps-pad { position: relative; width: 112px; height: 112px; margin-bottom: 26px; display: grid; place-items: center; }
.ps-pad-icon { position: absolute; width: 64px; height: 64px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .25s, transform .25s; transform: scale(.9); }
.ps-pad-wait { color: var(--hx-glow); }
.ps-pad-ok { color: var(--hx-back); }
.ps-pad-no { color: var(--hx-stop); }
.ps[data-state="sending"] .ps-pad-wait, .ps[data-state="waiting"] .ps-pad-wait,
.ps[data-state="approved"] .ps-pad-ok, .ps[data-state="failed"] .ps-pad-no, .ps[data-state="review"] .ps-pad-wait { opacity: 1; transform: none; }
.ps-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--hx-glow); opacity: 0; }
.ps[data-state="waiting"] .ps-ring { animation: ps-ring 2.2s ease-out infinite; }
.ps[data-state="waiting"] .ps-ring + .ps-ring { animation-delay: 1.1s; }
@keyframes ps-ring { 0% { transform: scale(.55); opacity: .7; } 100% { transform: scale(1.25); opacity: 0; } }
.ps-tick { stroke-dasharray: 30; stroke-dashoffset: 30; }
.ps[data-state="approved"] .ps-tick { animation: ps-tick .45s .15s ease-out forwards; }
@keyframes ps-tick { to { stroke-dashoffset: 0; } }

/* terminal display: the lines the pinpad shows */
.ps-lcd { width: 100%; max-width: 440px; box-sizing: border-box; padding: 16px 18px; border-radius: 10px; display: flex; flex-direction: column; gap: 4px;
  background: color-mix(in srgb, var(--hx-glow) 9%, #0d0d10); border: 1px solid color-mix(in srgb, var(--hx-glow) 30%, transparent);
  color: color-mix(in srgb, var(--hx-glow) 80%, #fff); font-size: 20px; font-weight: 600; letter-spacing: .04em; min-height: 76px; justify-content: center; }
.ps-lcd-2 { font-size: 15px; font-weight: 500; opacity: .8; }
.ps[data-state="approved"] .ps-lcd { background: color-mix(in srgb, var(--hx-back) 14%, #0d0d10); border-color: color-mix(in srgb, var(--hx-back) 45%, transparent); color: color-mix(in srgb, var(--hx-back) 70%, #fff); }
.ps[data-state="failed"] .ps-lcd { background: color-mix(in srgb, var(--hx-stop) 14%, #0d0d10); border-color: color-mix(in srgb, var(--hx-stop) 45%, transparent); color: color-mix(in srgb, var(--hx-stop) 55%, #fff); }

.ps-msg { margin: 16px 0 0; max-width: 440px; font-size: 16px; line-height: 1.5; color: var(--hx-side-text); min-height: 48px; }

.ps-steps { list-style: none; display: flex; gap: 6px; margin: 18px 0 24px; padding: 0; width: 100%; max-width: 440px; }
.ps-steps li { flex: 1; padding-top: 10px; border-top: 4px solid color-mix(in srgb, var(--hx-on-ink) 14%, transparent); font-size: 13px; color: var(--hx-side-muted); text-align: left; }
.ps-steps li.is-now  { border-color: var(--hx-glow); color: var(--hx-on-ink); }
.ps-steps li.is-done { border-color: var(--hx-back); color: var(--hx-on-ink); }
.ps-steps li.is-bad  { border-color: var(--hx-stop); color: var(--hx-on-ink); }

.ps-actions { display: flex; flex-wrap: wrap; gap: 12px; width: 100%; max-width: 440px; }
.ps-btn { flex: 1 1 180px; min-height: 60px; padding: 0 22px; border-radius: 12px; border: 0; font: 600 18px/1 var(--hx-font); cursor: pointer; transition: filter .15s, transform .05s; }
.ps-btn:active { transform: translateY(1px); }
.ps-btn:focus-visible { outline: 3px solid var(--hx-glow); outline-offset: 3px; }
.ps-btn[hidden] { display: none; }
.ps-btn-go { background: var(--hx-accent); color: var(--hx-on-accent); }
.ps-btn-go:hover { filter: brightness(1.06); }
.ps-btn-stop { background: var(--hx-stop); color: #fff; }
.ps-btn-quiet { background: transparent; color: var(--hx-on-ink); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--hx-on-ink) 28%, transparent); }
.ps-btn-quiet:hover { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--hx-on-ink) 55%, transparent); }
.ps-confirm { margin-top: 18px; width: 100%; max-width: 440px; padding: 16px; border-radius: 12px; text-align: left; background: color-mix(in srgb, var(--hx-stop) 16%, var(--hx-ink-2)); }
.ps-confirm[hidden] { display: none; }
.ps-confirm p { margin: 0 0 14px; color: var(--hx-on-ink); font-size: 15px; line-height: 1.5; }

/* receipt */
.ps-paper { position: relative; background: var(--hx-paper); color: var(--hx-text); padding: 26px 24px 30px; border-radius: 6px 6px 0 0; font-size: 14px; line-height: 1.45; font-variant-numeric: tabular-nums; }
.ps-paper::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px;
  background: linear-gradient(-45deg, transparent 7px, var(--hx-paper) 0) 0 0 / 14px 10px repeat-x, linear-gradient(45deg, transparent 7px, var(--hx-paper) 0) 0 0 / 14px 10px repeat-x; }
.ps-r-head { margin: 0; text-align: center; font-size: 18px; font-weight: 700; }
.ps-r-sub { margin: 2px 0 16px; text-align: center; color: var(--hx-muted); font-size: 13px; }
.ps-r-meta { display: grid; grid-template-columns: 82px 1fr; gap: 6px 10px; margin: 0; padding: 14px 0; border-top: 1px dashed var(--hx-field); }
.ps-r-meta dt { color: var(--hx-muted); }
.ps-r-meta dd { margin: 0; font-weight: 600; }
.ps-r-meta dd span { font-weight: 400; color: var(--hx-muted); }
.ps-r-items { width: 100%; border-collapse: collapse; border-top: 1px dashed var(--hx-field); }
.ps-r-items td { padding: 7px 0; vertical-align: top; }
.ps-r-items .ps-q { width: 1%; white-space: nowrap; padding-right: 12px; color: var(--hx-muted); text-align: right; }
.ps-r-items .ps-n { text-align: right; white-space: nowrap; padding-left: 10px; }
.ps-r-tot { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; margin: 0; padding-top: 12px; border-top: 1px dashed var(--hx-field); }
.ps-r-tot dd { margin: 0; text-align: right; }
.ps-r-tot .ps-due { font-size: 18px; font-weight: 700; padding-top: 6px; }
.ps-r-foot { margin: 16px 0 0; font-size: 12.5px; color: var(--hx-muted); text-align: center; }

@media (max-width: 960px) {
  .ps-main { grid-template-columns: 1fr; padding: 20px 16px; gap: 24px; }
  .ps-receipt { max-width: 520px; width: 100%; margin: 0 auto; }
  .ps-bar { padding: 12px 16px; }
}
@media (max-width: 520px) {
  .ps-bar-title { display: none; }
  .ps-term { padding: 26px 18px; border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ps-ring, .ps[data-state="waiting"] .ps-ring { animation: none; opacity: .4; }
  .ps-tick, .ps[data-state="approved"] .ps-tick { animation: none; stroke-dashoffset: 0; }
}

/* Cart: find a past customer (store_cart.php) */
.ck-cust .hx-field { position: relative; }
.ck-find { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% - 2px); margin: 0; padding: 4px; list-style: none;
  background: var(--hx-surface); border: 1px solid var(--hx-field); border-radius: var(--hx-r); box-shadow: 0 10px 28px var(--hx-shadow); max-height: 320px; overflow-y: auto; }
.ck-find[hidden] { display: none; }
.ck-find li { display: grid; grid-template-columns: 1fr auto; gap: 0 10px; padding: 8px 10px; border-radius: var(--hx-r-sm); cursor: pointer; }
.ck-find li b { font-weight: 600; color: var(--hx-text); }
.ck-find li span { grid-column: 1; font-size: 13px; color: var(--hx-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ck-find li small { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 12px; color: var(--hx-muted); white-space: nowrap; }
.ck-find li:hover, .ck-find li.is-on { background: var(--hx-hover); }
.ck-find li.is-on { box-shadow: inset 3px 0 0 var(--hx-primary); }
.ck-known { margin: 0; padding: 8px 12px; border-radius: var(--hx-r-sm); background: color-mix(in srgb, var(--hx-back) 10%, var(--hx-surface)); color: var(--hx-text); font-size: 14px; }
.ck-known[hidden] { display: none; }

/* Cart: same email, different name / phone (store_cart.php) */
.ck-clash .hx-modal-box { max-width: 680px; }
.ck-clash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 10px; }
.ck-clash-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--hx-line); border-radius: var(--hx-r); background: var(--hx-tint); }
.ck-clash-card h4 { margin: 0 !important; }
.ck-clash-card dl { display: grid; grid-template-columns: 70px 1fr; gap: 4px 10px; margin: 0; flex: 1; }
.ck-clash-card dt { color: var(--hx-muted); }
.ck-clash-card dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.ck-clash-card dd.is-diff { color: var(--hx-stop); }
.ck-clash-card .hx-btn { width: 100%; justify-content: center; }
@media (max-width: 600px) { .ck-clash-cols { grid-template-columns: 1fr; } }

/* Top bar: business time zone label (top_header.php) */
.hx-tz { display: inline-flex; align-items: center; gap: 6px; margin-right: 14px; font-size: 13px; color: var(--hx-muted); white-space: nowrap; cursor: help; }
.hx-tz svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 720px) { .hx-tz { display: none; } }

/* ===================================================================
   Public pages (store_list, contactus, order_success, payment_failed, thank_you) — hx-pub
   One column on paper, the business's festoon across the top, a single card per page.
   =================================================================== */
.hx-pub { min-height: 100vh; display: flex; flex-direction: column; background: var(--hx-bg); color: var(--hx-text); font-family: var(--hx-font); }
.hx-pub *, .hx-pub *::before, .hx-pub *::after { box-sizing: border-box; }
.hx-pub-top { display: flex; align-items: center; gap: 20px; padding: 16px 28px; background: var(--hx-ink); color: var(--hx-on-ink); }
.hx-pub-brand { display: flex; align-items: center; gap: 12px; color: var(--hx-on-ink); text-decoration: none; font-weight: 700; font-size: 17px; }
.hx-pub-brand img { max-height: 38px; max-width: 150px; }
.hx-pub-top nav { margin-left: auto; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hx-pub-top nav a { color: var(--hx-side-text); text-decoration: none; font-size: 14px; }
.hx-pub-top nav a:hover, .hx-pub-top nav a[aria-current] { color: var(--hx-on-ink); text-decoration: underline; text-underline-offset: 4px; }
.hx-pub-top nav a.hx-pub-cta { padding: 7px 14px; border-radius: var(--hx-r); background: var(--hx-accent); color: var(--hx-on-accent); text-decoration: none; font-weight: 600; }
.hx-pub .hx-pub-festoon { background: var(--hx-ink); margin: 0; padding: 0 24px 10px; overflow: hidden; }
.hx-pub-festoon svg { display: block; width: 100%; max-width: 760px; height: 34px; margin: 0 auto; }
.hx-pub-main { flex: 1; width: 100%; max-width: 900px; margin: 0 auto; padding: 40px 24px 56px; }
.hx-pub-main > h1 { margin: 0 0 6px; font-size: 30px; font-weight: 700; color: var(--hx-ink); letter-spacing: -.01em; }
.hx-pub-main > .hx-pub-lede { margin: 0 0 28px; color: var(--hx-muted); font-size: 16px; max-width: 60ch; }
.hx-pub .hx-pub-foot { padding: 18px 24px; text-align: center; font-size: 13px; color: var(--hx-muted); background: var(--hx-bg); border-top: 1px solid var(--hx-line); }
.hx-pub-card { background: var(--hx-surface); border: 1px solid var(--hx-line); border-radius: var(--hx-r); padding: 28px; }
.hx-pub .hx-btn { height: 44px; padding: 0 20px; }

/* store list */
.hx-pub-stores { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.hx-pub-store { background: var(--hx-surface); border: 1px solid var(--hx-line); border-radius: var(--hx-r); padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.hx-pub-store h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--hx-ink); font-family: var(--hx-font); }
.hx-pub-store p { margin: 0; color: var(--hx-muted); line-height: 1.5; white-space: pre-line; }
.hx-pub-store .hx-pub-acts { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px 16px; padding-top: 6px; }
.hx-pub-store .hx-pub-acts a { font-size: 14px; font-weight: 600; color: var(--hx-primary); text-decoration: none; }
.hx-pub-store .hx-pub-acts a:hover { text-decoration: underline; }

/* contact */
.hx-pub-contact { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: start; }
.hx-pub-contact form .hx-grid { margin-bottom: 18px; }
.hx-pub-contact aside { font-size: 14px; color: var(--hx-muted); line-height: 1.6; }
.hx-pub-contact aside h2 { font-size: 15px; font-weight: 700; color: var(--hx-ink); margin: 0 0 6px; font-family: var(--hx-font); }
.hx-pub-done { text-align: center; padding: 44px 28px; }
.hx-pub-done h2 { margin: 0 0 8px; font-size: 22px; color: var(--hx-ink); }
.hx-pub-done p { margin: 0 auto; max-width: 46ch; color: var(--hx-muted); }

/* payment result: a receipt slip */
.hx-pub-result { max-width: 560px; margin: 0 auto; }
.hx-pub-slip { background: var(--hx-surface); border: 1px solid var(--hx-line); border-radius: var(--hx-r) var(--hx-r) 0 0; padding: 30px 30px 34px; position: relative; }
.hx-pub-slip::after { content: ""; position: absolute; left: -1px; right: -1px; bottom: -10px; height: 10px;
  background: linear-gradient(-45deg, transparent 7px, var(--hx-surface) 0) 0 0 / 14px 10px repeat-x, linear-gradient(45deg, transparent 7px, var(--hx-surface) 0) 0 0 / 14px 10px repeat-x; }
.hx-pub-mark { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 16px; }
.hx-pub-mark svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hx-pub-mark.ok  { background: color-mix(in srgb, var(--hx-back) 14%, var(--hx-surface)); color: var(--hx-back); }
.hx-pub-mark.bad { background: color-mix(in srgb, var(--hx-stop) 12%, var(--hx-surface)); color: var(--hx-stop); }
.hx-pub-slip h1 { margin: 0 0 6px; font-size: 26px; font-weight: 700; color: var(--hx-ink); font-family: var(--hx-font); }
.hx-pub-slip > p { margin: 0 0 22px; color: var(--hx-muted); line-height: 1.55; }
.hx-pub-slip dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; margin: 0; padding-top: 18px; border-top: 1px dashed var(--hx-field); font-variant-numeric: tabular-nums; }
.hx-pub-slip dt { color: var(--hx-muted); }
.hx-pub-slip dd { margin: 0; font-weight: 600; }
.hx-pub-slip dd.hx-pub-big { font-size: 20px; }
.hx-pub-next { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hx-pub-note { margin-top: 26px; font-size: 13px; color: var(--hx-muted); text-align: center; }

@media (max-width: 720px) {
  .hx-pub-top { padding: 12px 16px; flex-wrap: wrap; }
  .hx-pub-top nav { margin-left: 0; width: 100%; gap: 16px; }
  .hx-pub-main { padding: 26px 16px 40px; }
  .hx-pub-contact { grid-template-columns: 1fr; }
  .hx-pub-slip { padding: 24px 20px 28px; }
  .hx-pub-slip dl { grid-template-columns: 110px 1fr; }
}

/* Phase 7n: Settings > Plan & billing (templates/default_am/plan.php) */
.pl .pl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.pl .pl-name { margin: 0 0 4px; font-size: 18px; font-weight: 700; color: var(--hx-ink); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pl .pl-price { margin: 0 0 2px; font-size: 15px; }
.pl .pl-price b { font-size: 22px; color: var(--hx-ink); }
.pl .pl-head .hx-hint { margin: 0; }
.pl .pl-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.pl .pl-danger { color: var(--hx-stop); }
.pl .pl-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 24px; margin: 18px 0 0; }
.pl .pl-facts:first-child { margin-top: 0; }
.pl .pl-facts dt { font-size: 13px; font-weight: 600; color: var(--hx-muted); margin: 0 0 2px; }
.pl .pl-facts dd { margin: 0; font-size: 15px; color: var(--hx-ink); font-variant-numeric: tabular-nums; }
.pl .pl-meter { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; margin-top: 8px; border: 0; border-radius: 99px; background: var(--hx-line-2); overflow: hidden; }
.pl .pl-meter::-webkit-progress-bar { background: var(--hx-line-2); border-radius: 99px; }
.pl .pl-meter::-webkit-progress-value { background: var(--hx-primary); border-radius: 99px; }
.pl .pl-meter::-moz-progress-bar { background: var(--hx-primary); border-radius: 99px; }
.pl .pl-meter.is-over::-webkit-progress-value { background: var(--hx-stop); }
.pl .pl-meter.is-over::-moz-progress-bar { background: var(--hx-stop); }
.pl .hx-panel-body > .hx-hint:last-child { margin-bottom: 0; }
.pl .hx-empty .hx-btn { margin-top: 10px; }
