/* Final workspace layer, loaded only by SHYNE Head and its local review.
   Shared Tickets rules must not determine Head's controls or navigation. */
.head-portal {
  --head-ink: #202228;
  --head-muted: #68707d;
  --head-soft: #8a909a;
  --head-line: #e5e7eb;
  --head-quiet: #f6f7f9;
  --head-blue: #e92336;
  --head-blue-soft: #fff0f2;
  --head-green: #16805b;
  --signal: #e92336;
  --signal-strong: #cc1729;
  --signal-pale: #fff0f2;
  --focus: #b61b2b;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100dvh;
  color: var(--head-ink);
  background: #fafafb;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
}
.head-portal :is(h1,h2,h3,h4,button,input,select,textarea) { font-family: var(--font) !important; }
.head-portal :is(h1,h2,h3,h4) { color: var(--head-ink); letter-spacing: -.025em; }
.head-portal :is(button,a,input,select,textarea,summary):focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.head-portal :is(button,a) { -webkit-tap-highlight-color: transparent; }
.head-portal :is(button,a,input,select,textarea) { touch-action: manipulation; }
.head-portal .head-content { min-width: 0; padding: 28px 32px 48px; background: #fafafb; }
.head-portal .head-panel--overview { display: block; }
.head-portal :is(.head-panel,.organizer-panel) { min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
/* Legacy catalogue's mobile organizer rules are important; reset only their
   presentation at the Head boundary, leaving the consumer workspace intact. */
.head-portal .organizer-panel { padding: 0 !important; border-radius: 0 !important; background: transparent !important; }
.head-portal .organizer-panel .section-heading { margin-bottom: 20px !important; }
.head-portal .section-heading h2 { font-weight: 650 !important; }
.head-portal :is(.section-heading,.head-topbar) { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 20px; padding: 0 0 16px; border-bottom: 1px solid var(--head-line); }
.head-portal :is(.section-heading h2,.head-topbar h1,.finance-workspace h1,.finance-topup h1) { margin: 0; font-size: 25px; line-height: 1.2; font-weight: 650; }
.head-portal :is(.section-heading p,.head-topbar p) { margin: 6px 0 0; color: var(--head-muted); font-size: 13px; line-height: 1.5; }
.head-portal .form-note { grid-column: 1 / -1; margin: 8px 0 0; color: var(--head-muted); font-size: 12px; line-height: 1.6; }

/* The navigation owns its height; the exit control never covers its links. */
.head-portal .head-sidebar { position: sticky; top: 0; height: 100dvh; min-height: 0; display: flex; flex-direction: column; gap: 0; padding: 20px 14px 12px; overflow: hidden; border: 0; border-right: 1px solid var(--head-line); border-radius: 0; background: #fff; }
.head-portal .head-sidebar__brand { flex: 0 0 auto; padding: 0 10px 18px; }
.head-portal .head-sidebar__brand-surface { padding: 0; width: 132px; height: 40px; background: transparent; }
.head-portal .head-sidebar__brand-surface img { width: 124px; height: 40px; object-fit: contain; object-position: left center; }
.head-portal .head-account-switcher { flex: 0 0 auto; margin: 0 0 12px; padding: 0 0 12px; border-bottom: 1px solid var(--head-line); }
.head-portal .head-sidebar__org { min-height: 56px; padding: 8px; gap: 9px; grid-template-columns: 34px minmax(0,1fr) 16px; border: 0; border-radius: 8px; }
.head-portal .head-sidebar__avatar { width: 34px; height: 34px; border: 0; background: #f0f1f3; color: #343943; font-size: 12px; font-weight: 600; }
.head-portal .head-sidebar__org-copy strong { font-size: 12px; font-weight: 600; }
.head-portal .head-sidebar__org-copy small { font-size: 11px; font-weight: 400; }
.head-portal .head-account-roles { max-height: 220px; overflow-y: auto; }
.head-portal .head-sidebar .head-navigation-desktop { display: flex; flex: 1 1 auto; min-height: 0; flex-direction: column; gap: 3px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #d6d8de transparent; padding: 0 3px 8px 0; }
.head-portal .head-sidebar .head-navigation-mobile { display: none; }
.head-portal .head-sidebar__item { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; min-height: 40px; padding: 9px 11px; border-radius: 8px; color: #59616e; font-size: 12px; font-weight: 500; box-shadow: none; }
.head-portal .head-sidebar__item > .icon { width: 18px; height: 18px; flex: 0 0 18px; color: inherit; }
.head-portal .head-sidebar__item.is-active { background: var(--head-blue-soft); color: #c91e30; box-shadow: none; font-weight: 600; }
.head-portal .head-sidebar__logout { position: static; flex: 0 0 auto; width: 100%; margin: 8px 0 0; min-height: 40px; padding: 10px 11px; border: 0; border-top: 1px solid var(--head-line); border-radius: 0; color: var(--head-muted); background: #fff; font-size: 12px; }

/* Controls: one height, weight, spacing and accent across all Head workflows. */
.head-portal .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 14px; border: 1px solid transparent; border-radius: 9px; font-size: 13px; font-weight: 600; line-height: 1.35; text-align: center; text-decoration: none; white-space: normal; box-shadow: none; }
.head-portal .button .icon { width: 18px; height: 18px; flex: 0 0 18px; }
.head-portal .button--signal { background: var(--head-blue); border-color: var(--head-blue); color: #fff; }
.head-portal .button--quiet { background: #fff; border-color: #dce0e5; color: #414854; }
.head-portal .button:disabled { opacity: .48; cursor: not-allowed; box-shadow: none; }
.head-portal .text-action { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 10px; border: 1px solid var(--head-line); border-radius: 8px; background: #fff; color: #414854; font-size: 12px; font-weight: 500; line-height: 1.4; text-decoration: none; white-space: normal; }
.head-portal .icon-button { width: 40px; height: 40px; min-width: 40px; padding: 10px; border: 1px solid var(--head-line); border-radius: 9px; color: #59616e; background: #fff; box-shadow: none; }
.head-portal .icon-button .icon { width: 18px; height: 18px; }
.head-portal label { min-width: 0; }
.head-portal label > span { margin-bottom: 6px; color: #565e6a; font-size: 12px; font-weight: 500; line-height: 1.4; letter-spacing: 0; text-transform: none; }
.head-portal :is(input,select,textarea) { min-width: 0; width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid #dce0e6; border-radius: 9px; background: #fff; color: var(--head-ink); font-size: 14px; font-weight: 400; line-height: 1.4; box-shadow: none; }
.head-portal :is(input,textarea)::placeholder { color: #8b919b; opacity: 1; }
.head-portal :is(input,select,textarea):focus { border-color: #cc6d79; outline: 2px solid #f7dce0; outline-offset: 1px; box-shadow: none; }
.head-portal textarea { resize: vertical; }
.head-portal input:is([type="checkbox"],[type="radio"]) { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; margin: 0; padding: 0; accent-color: var(--head-blue); }
.head-portal input[type="file"] { padding: 7px; font-size: 12px; }
.head-portal input[type="file"]::file-selector-button { margin-right: 8px; padding: 6px 10px; border: 0; border-radius: 5px; background: var(--head-quiet); color: #414854; font: inherit; }
.head-portal .head-toggle-label { display: flex; gap: 8px; align-items: center; }
.head-portal .head-toggle-label > span { margin: 0; }
.head-portal :is(.org-team-form,.org-refund-form,.head-inline-form,.head-settings-form) { gap: 12px; padding: 16px; border: 1px solid var(--head-line); border-radius: 12px; background: #fff; }
.head-portal .head-settings-form--scheme { grid-template-columns: minmax(0,1fr); }
.head-portal .head-scheme-meta { grid-template-columns: minmax(0,1fr) 120px minmax(0,1.3fr); }
.head-portal .head-scheme-category { padding: 16px; border-color: var(--head-line); border-radius: 10px; background: #fafafb; box-shadow: none; }
.head-portal details.head-scheme-category { display: block; }
.head-portal .head-scheme-category__summary { display: flex; align-items: center; gap: 12px; justify-content: space-between; min-height: 30px; cursor: pointer; list-style: none; }
.head-portal .head-scheme-category__summary::-webkit-details-marker { display: none; }
.head-portal .head-scheme-category__summary::after { content: "+"; color: var(--head-muted); font-size: 22px; line-height: 1; }
.head-portal .head-scheme-category[open] > summary::after { content: "−"; }
.head-portal .head-scheme-category__summary strong { font-size: 14px; font-weight: 600; }
.head-portal .head-scheme-category__summary span { margin-left: auto; color: var(--head-muted); font-size: 12px; }
.head-portal .head-scheme-category[open] > summary { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--head-line); }
.head-portal .head-scheme-category > .head-scheme-category__enabled { margin-bottom: 12px; }
.head-portal .head-scheme-category__main { margin-bottom: 12px; }
.head-portal .head-scheme-category__main { grid-template-columns: repeat(4,minmax(0,1fr)); }
.head-portal .head-scheme-category__details { grid-template-columns: repeat(3,minmax(0,1fr)); }
.head-portal .head-scheme-hint { margin: 0; background: var(--head-quiet); border-color: var(--head-line); font-weight: 400; }
.head-portal .head-settings-card__title > .asset-icon { width: 24px; height: 24px; background-color: #68707d; border: 0; border-radius: 0; }
.head-portal .head-settings-card__title h2 { font-size: 17px; font-weight: 600; }
.head-portal .head-settings-card__title p { font-weight: 400; }
.head-portal .head-events-toolbar { gap: 10px; }
.head-portal .head-events-toolbar > label { min-height: 42px; border-radius: 9px; }
.head-portal .head-events-toolbar > label input { min-height: 40px; }
.head-portal :is(.head-card-title,.support-history > header) { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
.head-portal .head-card-title :is(h1,h2) { margin: 0; }
.head-portal .head-card-title h2 { font-size: 16px; font-weight: 600; }

/* Overview has the same density as the operational screens. */
.head-portal .head-overview-hero { margin: 0 0 20px; padding: 0; gap: 20px; align-items: center; }
.head-portal .head-welcome-card h1 { margin: 0; font-size: clamp(22px,2vw,28px); font-weight: 650; line-height: 1.25; }
.head-portal .head-welcome-card p { margin: 6px 0 0; color: var(--head-muted); font-size: 12px; }
.head-portal .head-header-actions { gap: 8px; }
.head-portal .head-date-select { min-height: 42px; border: 0; padding: 0; gap: 8px; }
.head-portal .head-date-select > .icon { display: none; }
.head-portal .head-date-select select { min-height: 42px; font-size: 12px; }
.head-portal .head-notification { min-width: 40px; height: 40px; border: 1px solid var(--head-line); border-radius: 9px; }
.head-portal .head-user-chip { min-height: 40px; }
.head-portal .head-kpis--overview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin: 0 0 20px; }
.head-portal .head-kpis--overview article { min-height: 112px; display: flex; align-items: flex-start; gap: 12px; padding: 18px; border: 1px solid var(--head-line); border-radius: 12px; background: #fff; }
.head-portal .head-kpi-icon { flex: 0 0 34px; width: 34px; height: 34px; background: #f5f6f8; color: #747b86; border-radius: 10px; }
.head-portal .head-kpi-icon .icon { width: 18px; height: 18px; }
.head-portal .head-kpis--overview article > div { min-width: 0; }
.head-portal .head-kpis--overview article > div > span { font-size: 12px; color: var(--head-muted); font-weight: 400; }
.head-portal .head-kpis--overview article > div > strong { margin: 4px 0; font-size: 25px; line-height: 1.25; font-weight: 600; font-variant-numeric: tabular-nums; }
.head-portal .head-kpis--overview article > div > p { margin: 5px 0 0; font-size: 11px; }
.head-portal .head-kpis--overview article > div > p.is-positive { color: #16805b; }
.head-portal .head-kpis--overview article > div > p.is-negative { color: #bf3344; }
.head-portal .head-kpis--overview article > div > p small { font-size: 10px; font-weight: 400; }
.head-portal .head-dashboard-grid--overview { gap: 16px; margin-bottom: 20px; }
.head-portal :is(.head-chart-card,.head-source-card,.head-orders-card) { padding: 20px; border: 1px solid var(--head-line); border-radius: 12px; background: #fff; }
.head-portal :is(.head-chart-card--sales,.head-source-card--traffic) { min-height: 280px; }
.head-portal .head-chart-card--sales .head-sales-chart { height: auto; min-height: 0; margin-top: 16px; aspect-ratio: 720 / 260; }
.head-portal .head-sales-chart svg { width: 100%; height: 100%; }
.head-portal .head-traffic-layout { min-height: 200px; gap: 20px; }
.head-portal .head-donut { width: 112px; height: 112px; }
.head-portal .head-source-card h2 { margin: 0; font-size: 16px; font-weight: 600; }
.head-portal .head-chart-card--sales .head-card-title i { background: var(--head-blue); }
.head-portal .head-chart-card--sales .head-card-title span:nth-child(2) i { background: #c4c9d2; }
.head-portal .head-traffic-layout li:nth-child(1) i { background: #e92336; }
.head-portal .head-traffic-layout li:nth-child(2) i { background: #e87985; }
.head-portal .head-traffic-layout li:nth-child(3) i { background: #a74b57; }
.head-portal .head-traffic-layout li:nth-child(4) i { background: #cbd0d8; }
.head-portal .head-orders-empty { margin-top: 16px; padding: 24px; border: 1px dashed #dce0e6; border-radius: 9px; background: #fafafb; }
.head-portal .head-orders-empty p { margin: 6px 0 0; font-size: 13px; }
.head-portal .head-orders-table { width: 100%; overflow-x: auto; }
.head-portal .head-orders-table table { min-width: 650px; }

/* Lists, settings, roles and empty states use a shared quiet surface. */
.head-portal :is(.org-requisites-grid,.org-team-grid,.head-role-grid) { gap: 12px; }
.head-portal :is(.org-requisites-grid article,.org-team-grid > article,.head-role-grid article,.head-settings-card,.head-tool-card,.head-record-row,.organizer-row,.order-row) { border: 1px solid var(--head-line); border-radius: 12px; padding: 16px; background: #fff; box-shadow: none; }
.head-portal .org-requisites-grid article { display: grid; align-content: start; gap: 6px; }
.head-portal .org-requisites-grid article span { margin: 0; font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.head-portal .org-requisites-grid article strong { font-size: 15px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.head-portal .org-requisites-grid small { font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.head-portal .head-role-grid small { display: none; }
.head-portal .head-role-grid strong { font-weight: 600; }
.head-portal .head-role-grid span { font-size: 12px; line-height: 1.5; }
.head-portal .organizer-row h3 { font-size: 15px !important; font-weight: 600 !important; line-height: 1.35; }
.head-portal .organizer-row__actions .button { min-height: 40px !important; font-size: 12px !important; padding: 9px 12px; }
.head-portal .org-team-grid > article > p { display: grid; gap: 4px; }
.head-portal .state-sheet { min-height: 0; padding: 28px 20px; border: 0; background: transparent; box-shadow: none; }
.head-portal .state-sheet.state-sheet--illustrated { gap: 8px; min-height: 0; }
.head-portal .state-sheet .empty-state__illustration { width: 116px; height: 96px; max-width: 116px; margin: 0 auto 10px; object-fit: contain; }
.head-portal .state-sheet :is(h2,h3) { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.35; }
.head-portal .organizer-panel .state-sheet h2 { font-size: 17px !important; line-height: 1.35 !important; }
.head-portal .state-sheet.state-sheet--illustrated { display: grid; justify-items: center; align-content: center; }
.head-portal .state-sheet p { max-width: 400px; margin: 5px auto 0; color: var(--head-muted); font-size: 13px; line-height: 1.5; }
.head-portal .head-tool-card { display: grid; grid-template-columns: 36px minmax(0,1fr) 18px; gap: 12px; align-items: center; }
.head-portal .head-tool-card > .icon:first-child { width: 24px; height: 24px; justify-self: center; color: #68707d; border: 0; border-radius: 0; }
.head-portal .head-tool-card > .asset-icon:first-child { background-color: #68707d; }
.head-portal .head-tool-card strong { font-size: 14px; font-weight: 600; }
.head-portal .head-tool-card small { font-size: 12px; line-height: 1.5; }
.head-portal .head-more-actions { margin-top: 20px; }

/* Financial alerts retain semantic amber; routine actions use Head's palette. */
.head-portal .finance-debt-banner { margin: 0 0 24px; padding: 18px; gap: 16px; border-color: #eed5a5; border-radius: 12px; color: #775019; background: #fff8ea; }
.head-portal .finance-debt-banner strong { font-size: 16px; }
.head-portal .finance-debt-banner p { font-size: 13px; }
.head-portal .finance-debt-actions { gap: 8px; }
.head-portal .finance-debt-actions .text-action { border-color: #e6d4b7; color: #775019; background: transparent; }
.head-portal .finance-kpis { grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 12px; }
.head-portal .finance-kpis article { padding: 16px; border-radius: 12px; border-color: var(--head-line); }
.head-portal .finance-kpis .has-debt { border-color: #eed5a5; }
.head-portal .finance-kpis strong { font-size: 23px; font-variant-numeric: tabular-nums; }
.head-portal .finance-kpis .finance-kpi-date { font-size: 15px; }
.head-portal .finance-filters button { min-height: 38px; border-radius: 8px; padding: 8px 12px; font-size: 12px; }
.head-portal .finance-filters button.is-active { background: var(--head-blue-soft); border-color: #f1c8cd; color: #bd2333; }
.head-portal :is(.finance-debts,.finance-operations) summary { gap: 12px; }
.head-portal :is(.finance-debts,.finance-operations) summary > span { min-width: 0; overflow-wrap: anywhere; }
.head-portal :is(.finance-debts,.finance-operations) summary > b { flex-shrink: 0; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.head-portal .finance-payment-status { background: var(--head-quiet); }

/* Support is a Head workflow, including its messages and compose controls. */
.head-portal .support-centre--embedded { width: 100%; max-width: 960px; margin: 0; }
.head-portal .support-centre__landing { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 20px; }
.head-portal .support-centre__intro { grid-column: 1 / -1; padding: 0 0 16px; border-bottom: 1px solid var(--head-line); }
.head-portal .support-centre__intro h1 { font-size: 25px; line-height: 1.2; font-weight: 650 !important; }
.head-portal .support-centre__intro p { font-size: 13px; line-height: 1.5; }
.head-portal .support-new-form { align-self: start; padding: 18px; border-radius: 12px; border-color: var(--head-line); background: #fff; box-shadow: none; }
.head-portal .support-new-form__title > span { width: 36px; height: 36px; flex-basis: 36px; background: var(--head-blue-soft); color: #ce2437; border-radius: 9px; }
.head-portal .support-new-form__title strong { font-size: 15px; font-weight: 600; }
.head-portal .support-new-form__title small { line-height: 1.5; }
.head-portal .support-history { display: block; min-width: 0; margin: 0; align-self: start; }
.head-portal .support-history > header { min-height: 42px; margin: 0 0 14px; padding: 0; }
.head-portal .support-history h2 { margin: 0; font-size: 16px; font-weight: 600; }
.head-portal .support-history__empty { padding: 32px 20px; border-radius: 12px; background: #fff; }
.head-portal .support-history__empty .icon { color: #8b929e; }
.head-portal .support-centre__thread { min-height: min(720px,calc(100dvh - 64px)); border-radius: 12px; }
.head-portal .support-thread-header h1 { font-size: 17px; line-height: 1.3; }
.head-portal .support-thread-status { padding: 12px 16px; }
.head-portal .support-thread-status { background: #f6f7f9; }
.head-portal .support-thread-status strong { color: #535d6b; }
.head-portal .support-thread-status .button { color: #414854; border-color: var(--head-line); }
.head-portal .support-status--waiting_support,.head-portal .support-status--open { background: #f0f1f4; color: #535d6b; }
.head-portal .support-status-dot { background: #e92336; }
.head-portal .support-bubble--customer { background: #fff0f2; }
.head-portal .support-bubble time > span { color: #c7293c; }
.head-portal .support-send { background: var(--head-blue); width: 42px; height: 42px; border-radius: 50%; }

/* In Head, the editor actions occupy their own row outside the scroll area. */
.head-portal .org-editor--head[open] { display: grid !important; grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr) auto; background: #fff; }
.head-portal .org-editor--head > :is(.org-editor__head,.org-editor__body,.org-editor__actions) { min-width: 0; }
.head-portal .org-editor--head > .org-editor__head { background: #fff; border-color: var(--head-line); }
.head-portal .org-editor--head .eyebrow { color: var(--head-muted); font-size: 11px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.head-portal .org-editor--head .org-tabs { scrollbar-width: thin; }
.head-portal .org-editor--head .org-tab { color: var(--head-muted); font-size: 12px; font-weight: 500; }
.head-portal .org-editor--head .org-tab.is-active { color: #c91e30; border-bottom-color: var(--head-blue); }
.head-portal .org-editor--head > .org-editor__body { padding: 20px !important; background: #fafafb; }
.head-portal .org-editor--head > .org-editor__actions { position: static !important; display: flex !important; flex-wrap: wrap; justify-content: flex-end; gap: 8px !important; height: auto; min-height: 0; overflow: visible; margin: 0 !important; padding: 12px 20px !important; background: #fff !important; border-color: var(--head-line); }
.head-portal .org-editor--head > .org-editor__actions .button { font-size: 12px !important; min-height: 40px !important; padding: 9px 12px !important; }
.head-portal .org-editor--head .org-editor__section { border-color: var(--head-line); background: #fff; }
.head-portal .org-editor--head .org-editor__section h3 { margin: 0 0 14px; font-size: 17px; line-height: 1.3; font-weight: 600; }
.head-portal .org-editor--head .org-event-tools { grid-template-columns: repeat(2,minmax(0,1fr)); }
.head-portal .org-editor--head .org-event-tools > button > span { min-width: 0; }
.head-portal .org-editor--head .org-event-tools > button { border-color: var(--head-line); border-radius: 10px; background: #fff; padding: 14px; }
.head-portal .org-editor--head .org-event-tools > button > .icon:first-child { width: 24px; height: 24px; padding: 0; color: #68707d; background: transparent; border-radius: 0; }
.head-portal .org-editor--head .org-event-tools > button > .asset-icon:first-child { background-color: #68707d; }
.head-portal .org-editor--head .org-event-tools strong { font-size: 13px; font-weight: 600; }
.head-portal .org-editor--head .org-event-tools small { font-size: 12px; font-weight: 400; }
.head-portal .org-editor--head .org-cat.is-active { border-color: #ecc7cd; background: var(--head-blue-soft); color: #c91e30; }

@media (hover:hover) {
  .head-portal .button--signal:not(:disabled):hover { background: var(--signal-strong); border-color: var(--signal-strong); }
  .head-portal :is(.button--quiet,.text-action,.icon-button,.head-sidebar__org):hover { background: #f2f3f6; }
  .head-portal .head-sidebar__item:not(.is-active):hover { background: #f5f6f8; color: var(--head-ink); }
}
.head-portal :is(.button,.icon-button,.text-action):not(:disabled):active { transform: translateY(1px); }
@media (max-width:1200px) {
  .head-portal .head-content { padding: 24px; }
  .head-portal .head-kpis--overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .head-portal .org-team-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .head-portal .head-overview-hero { display: grid; }
  .head-portal .head-header-actions { justify-content: flex-start; }
}
@media (max-width:920px) {
  .head-portal { display: block; }
  .head-portal .head-sidebar { position: static; height: auto; padding: 8px 16px 0; overflow: visible; border-right: 0; border-bottom: 1px solid var(--head-line); }
  .head-portal .head-sidebar__brand { display: none; }
  .head-portal .head-account-switcher { display: block; margin: 0; padding: 0 0 6px; }
  .head-portal .head-sidebar__org { min-height: 48px; padding: 4px 0; }
  .head-portal .head-sidebar .head-navigation-desktop { display: none; }
  .head-portal .head-sidebar .head-navigation-mobile { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 3px; padding: 6px 0; overflow: visible; }
  .head-portal .head-navigation-mobile .head-sidebar__item { min-width: 0; min-height: 54px; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 7px 2px; border-radius: 8px; font-size: 11px; line-height: 1.2; }
  .head-portal .head-sidebar__logout { display: none; }
  .head-portal .head-sidebar--scanner .head-navigation-mobile { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .head-portal .head-sidebar--scanner .head-sidebar__logout { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; }
  .head-portal .head-content { padding: 24px; }
  .head-portal .head-dashboard-grid--overview { grid-template-columns: minmax(0,1fr); }
  .head-portal .head-traffic-layout { grid-template-columns: 112px minmax(0,1fr); min-height: 160px; }
  .head-portal .head-scheme-meta { grid-template-columns: minmax(0,1fr) 120px; }
  .head-portal .head-scheme-meta__wide { grid-column: 1 / -1; }
  .head-portal .head-scheme-category__main { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .head-portal .head-source-card--traffic { min-height: 0; }
  .head-portal .support-centre__landing { grid-template-columns: minmax(0,1fr); }
  .head-portal .support-centre__thread { min-height: min(700px,calc(100dvh - 168px)); }
}
@media (max-width:640px) {
  .head-portal .org-editor--head .org-event-tools { grid-template-columns: minmax(0,1fr); }
  .head-portal .head-content { padding: 20px 16px 36px; }
  .head-portal .org-editor--head > .org-editor__body { padding: 14px !important; }
  .head-portal .org-editor--head > .org-editor__actions { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 10px 14px max(10px,env(safe-area-inset-bottom)) !important; }
  .head-portal .org-editor--head > .org-editor__actions .button:last-child { grid-column: 1 / -1; }
  .head-portal .head-tools-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; }
  .head-portal :is(.section-heading h2,.head-topbar h1,.finance-workspace h1,.finance-topup h1,.support-centre__intro h1) { font-size: 23px; }
  .head-portal .head-welcome-card h1 { font-size: 23px; }
  .head-portal .head-overview-hero { gap: 14px; margin-bottom: 16px; }
  .head-portal .head-kpis--overview { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .head-portal .head-kpis--overview article { min-height: 115px; padding: 14px 12px; gap: 0; }
  .head-portal .head-kpi-icon { display: none; }
  .head-portal .head-kpis--overview article > div > span { font-size: 11px; }
  .head-portal .head-kpis--overview article > div > strong { font-size: 24px; }
  .head-portal .head-kpis--overview article > div > p small { display: block; margin: 2px 0 0; }
  .head-portal :is(.head-chart-card,.head-source-card,.head-orders-card) { padding: 16px; }
  .head-portal .head-chart-card--sales { min-height: 0; }
  .head-portal .head-traffic-layout { gap: 18px; }
  .head-portal .head-card-title { align-items: center; }
  .head-portal .finance-event-filter { width: 100%; }
  .head-portal .finance-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .head-portal .finance-kpis article { padding: 14px 12px; }
  .head-portal .finance-kpis article > span { font-size: 12px; min-height: 36px; }
  .head-portal .finance-kpis strong { font-size: 22px; }
  .head-portal .finance-kpis article:last-child { grid-column: 1 / -1; }
  .head-portal .finance-kpis article:last-child > span { min-height: 0; }
  .head-portal .finance-debt-banner { padding: 16px; }
  .head-portal .finance-debt-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .head-portal .finance-debt-actions .button { grid-column: 1 / -1; }
  .head-portal :is(.org-team-form,.org-refund-form,.head-inline-form,.head-settings-form) { grid-template-columns: minmax(0,1fr); padding: 14px; }
  .head-portal :is(.head-scheme-meta,.head-scheme-category__details) { grid-template-columns: minmax(0,1fr); }
  .head-portal .head-scheme-category { padding: 12px; }
  .head-portal :is(input,select,textarea) { font-size: 16px; }
  .head-portal .head-date-select select { font-size: 16px; }
  .head-portal .head-events-toolbar > .button { width: 100%; }
  .head-portal .support-new-form { padding: 16px; }
  .head-portal .support-centre__intro { padding-bottom: 16px; }
  .head-portal .support-thread-header { padding: 12px; gap: 8px; }
  .head-portal .support-thread-header > div { min-width: 0; }
  .head-portal .support-thread-header h1 { font-size: 15px; }
  .head-portal .support-thread-status { flex-wrap: wrap; gap: 10px; }
  .head-portal .support-thread-status .button { min-height: 36px; padding: 7px 10px; font-size: 12px; }
  .head-portal .support-centre__messages { padding: 14px; }
  .head-portal .head-scheme-category__wide { grid-column: auto; }
}
@media (prefers-reduced-motion:reduce) {
  .head-portal *, .head-portal *::before, .head-portal *::after { scroll-behavior: auto; transition-duration: 0s; animation-duration: 0s; }
}
/* Continuous admission camera, isolated from customer pages. */
.scan-workspace [hidden] { display: none !important; }
.head-portal .scan-workspace { grid-template-columns: minmax(0,1fr); }
.head-portal .scan-workspace > * { min-width: 0; grid-column: 1 / -1; }
.scan-camera { position: relative; aspect-ratio: 1; max-height: 390px; overflow: hidden; background: #111318; border-radius: 22px; }
.scan-camera video { width: 100%; height: 100%; object-fit: cover; }
.scan-target { position: absolute; inset: 20%; border: 3px solid rgba(255,255,255,.9); border-radius: 18px; box-shadow: 0 0 0 100px rgba(0,0,0,.22); }
.scan-camera-caption { position: absolute; bottom: 18px; left: 0; right: 0; color: white; text-align: center; font-size: 13px; }
.scan-counter { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.scan-feedback { display: grid; grid-template-columns: 40px 1fr; gap: 4px 12px; padding: 16px; border-radius: 16px; background: #f0f1f4; }
.scan-feedback strong { font-size: 17px; align-self: end; }
.scan-feedback span { grid-column: 2; font-size: 13px; line-height: 1.45; }
.scan-feedback i { grid-row: span 2; display: grid; place-items: center; font-style: normal; font-size: 29px; }
.scan-feedback i::before { content: '…'; }
.scan-feedback[data-kind=success] { background: #e8f7ee; color: #14663d; }
.scan-feedback[data-kind=success] i::before { content: '✓'; }
.scan-feedback[data-kind=error] { background: #fff0ef; color: #9d252d; }
.scan-feedback[data-kind=error] i::before { content: '!'; }
.scan-manual { border-top: 1px solid #e6e7eb; padding-top: 14px; }
.scan-manual summary { cursor: pointer; font-size: 14px; margin-bottom: 12px; }
.scan-help { font-size: 12px; color: #757b87; line-height: 1.5; margin: 0; }
