/* HalNora V21 | approved V20-inspired presentation. No workflow changes. */
body.hn-release-login {
  background: linear-gradient(180deg,#061d35 0%,#112f4b 36%,#dce5eb 78%,#f3f6f8 100%);
  color:#0b2d46;
}
body.hn-release-login .login-wrap {min-height:100svh;padding:24px;}
body.hn-release-login .login-card {
  width:min(462px,calc(100vw - 32px));max-width:100%;padding:34px 36px 36px;
  border:0;border-radius:21px;background:#fff;color:#092b47;
  box-shadow:0 25px 54px rgba(0,15,30,.26);
}
body.hn-release-login .hn-login-brand{text-align:center;margin:0 0 30px;}
body.hn-release-login .hn-login-brand img{display:block;width:min(238px,100%);height:auto;max-height:145px;object-fit:contain;margin:0 auto 12px;}
body.hn-release-login .hn-login-brand strong{display:block;font-size:18px;color:#06243d;}
body.hn-release-login .hn-login-brand small{display:block;font-size:13px;color:#70819b;margin-top:3px;}
body.hn-release-login .login-card h1{margin:0 0 12px;font-size:34px;font-weight:800;line-height:1.15;color:#092c49;}
body.hn-release-login .hn-login-intro{font-size:16px;color:#607a91;margin:0 0 23px;}
body.hn-release-login .login-card label{font-size:13px;color:#112f4c;font-weight:750;margin:15px 0;}
body.hn-release-login .login-card input{margin-top:5px;min-height:43px;background:#edf2f8;color:#102a42;border:1px solid #c7d2df;border-radius:8px;}
body.hn-release-login .login-card input:focus-visible{outline:3px solid #5caff6;outline-offset:1px;}
body.hn-release-login .login-card .primary{display:block;width:100%;background:#097ac5;min-height:47px;margin-top:13px;border-radius:9px;}
body.hn-release-login .login-card .alert.error{background:#fff0f0;color:#8d1728;border-color:#dc9aa4;}
:root[data-theme="light"] body.hn-release-login{background:linear-gradient(180deg,#123c5d 0%,#d6e5f0 60%,#f6f8fb 100%);}
@media(max-width:540px){body.hn-release-login .login-card{padding:25px 22px;}body.hn-release-login .login-card h1{font-size:29px;}}

/* V20-inspired Dispatch appearance; respects existing V21 variables and theme toggle. */
:root {--hn-dashboard-accent:#168af0;}
body.hn-v20-release {--bg:#061b2d;--surface:#09253b;--surface2:#0d2e46;--text:#eaf5ff;--muted:#9eb8cf;--line:#204866;--shadow:none;}
:root[data-theme="light"] body.hn-v20-release {--bg:#edf3f8;--surface:#fff;--surface2:#f4f8fc;--text:#15354d;--muted:#60778c;--line:#cddbe7;--shadow:none;}
body.hn-v20-release .sidebar{background:#061a2c;border-right:1px solid #174063;}
body.hn-v20-release .sidebar .brand{padding:7px 5px 16px;color:#fff;}
body.hn-v20-release .sidebar .brand .business-logo{max-height:100px;object-fit:contain;}
body.hn-v20-release .sidebar .nav a{color:#c4d8e9;border-radius:5px;padding:10px 12px;}
body.hn-v20-release .sidebar .nav a.active,body.hn-v20-release .sidebar .nav a:hover{background:#1288e9;color:#fff;}
body.hn-v20-release .side-bottom{color:#b5d0e5;}
body.hn-v20-release .main{background:var(--bg);padding:20px;min-width:0;}
body.hn-v20-release .top{background:transparent;margin-bottom:16px;}
body.hn-v20-release .top h1{color:var(--text);font-size:25px;}
body.hn-v20-release .card,body.hn-v20-release .panel{border-radius:8px;border:1px solid var(--line);background:var(--surface);box-shadow:none;}
body.hn-v20-release .kpi.card{background:linear-gradient(120deg,var(--surface),var(--surface2));}
body.hn-v20-release .kpi strong{color:var(--text);}
body.hn-v20-release .panel h2,body.hn-v20-release .panel h3{color:var(--text);}
body.hn-v20-release .ops-grid{grid-template-columns:minmax(280px,1.35fr) minmax(310px,1fr) minmax(210px,.48fr);gap:12px;}
body.hn-v20-release .ops-grid .map-panel,body.hn-v20-release .ops-grid .active-panel,body.hn-v20-release .ops-grid .side-stack{margin-top:12px;}
body.hn-v20-release .ops-grid .side-stack{padding:12px;display:flex;flex-direction:column;gap:12px;}
body.hn-v20-release .hn-actions-first{order:0;background:var(--surface2);border:1px solid var(--line);border-radius:7px;padding:12px;}
body.hn-v20-release .hn-drivers-second{order:1;background:var(--surface2);border:1px solid var(--line);border-radius:7px;padding:12px;min-height:90px;}
body.hn-v20-release .hn-actions-first h2,body.hn-v20-release .hn-drivers-second h2{font-size:15px;margin:0 0 10px;}
body.hn-v20-release .hn-actions-first .choice{display:block;text-align:center;border-radius:6px;padding:9px 10px;margin:8px 0;}
body.hn-v20-release .hn-actions-first .quick-action{background:#0988e8;color:white;border-color:#0988e8;}
body.hn-v20-release .dashboard-bottom{gap:12px;}
body.hn-v20-release .map-stage{min-height:285px;}
body.hn-v20-release .main .primary{background:#0b85dc;}
:root[data-theme="light"] body.hn-v20-release .sidebar{background:#e8f1f8;border-right-color:#c4d8e8;}
:root[data-theme="light"] body.hn-v20-release .sidebar .nav a{color:#153e5b;}
:root[data-theme="light"] body.hn-v20-release .sidebar .nav a.active,:root[data-theme="light"] body.hn-v20-release .sidebar .nav a:hover{background:#137ed0;color:#fff;}
:root[data-theme="light"] body.hn-v20-release .sidebar .brand{color:#173d57;}
@media(max-width:1250px){body.hn-v20-release .ops-grid{grid-template-columns:repeat(2,minmax(0,1fr));}body.hn-v20-release .ops-grid .side-stack{grid-column:1/-1;}}
@media(max-width:850px){body.hn-v20-release .ops-grid{grid-template-columns:1fr;}body.hn-v20-release .ops-grid .side-stack{grid-column:auto;}}

/* HN V20 COMPACT DASHBOARD 20261026 */
/* HalNora V21 — V20 compact dashboard proportions, approved presentation only.
   Applies ONLY to authenticated V21 dashboard elements; login untouched. */
@media (min-width: 1080px) {
 body.hn-v20-release .shell { grid-template-columns: 176px minmax(0,1fr); }
 body.hn-v20-release .sidebar {padding: 9px 8px 12px; min-width:0;}
 body.hn-v20-release .sidebar .brand {font-size:14px; padding:4px 5px 10px;}
 body.hn-v20-release .sidebar .brand .business-logo {max-height:65px; max-width:100%;}
 body.hn-v20-release .sidebar .nav {margin-top:13px; gap:3px;}
 body.hn-v20-release .sidebar .nav a {padding:8px 9px; font-size:12px; line-height:1.25;}
 body.hn-v20-release .main {padding:13px 15px;}
 body.hn-v20-release .top {margin-bottom:10px; min-height:48px;}
 body.hn-v20-release .top h1 {font-size:22px;}
 body.hn-v20-release .kpi-grid {gap:8px;}
 body.hn-v20-release .kpi.card {padding:11px 13px; min-height:78px;}
 body.hn-v20-release .kpi span, body.hn-v20-release .kpi small {font-size:11px;}
 body.hn-v20-release .kpi strong {font-size:23px; margin:4px 0;}
 body.hn-v20-release .ops-grid {grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) minmax(170px,.39fr); gap:8px; align-items:start;}
 body.hn-v20-release .ops-grid > .panel {margin-top:8px; padding:11px; min-width:0;}
 body.hn-v20-release .ops-grid .map-stage {min-height:190px; height:215px; padding:0; overflow:hidden;}
 body.hn-v20-release .ops-grid .map-stage > div:not(.map-placeholder) {min-height:0; height:100%;}
 body.hn-v20-release .ops-grid .section-head {margin-bottom:7px;}
 body.hn-v20-release .ops-grid .section-head h2 {font-size:14px;}
 body.hn-v20-release .ops-grid .section-head p {font-size:11px; margin:3px 0 0;}
 body.hn-v20-release .ops-grid .active-panel #liveDashboardOrders {max-height:235px; overflow:auto;}
 body.hn-v20-release .ops-grid .active-panel table {font-size:11px;}
 body.hn-v20-release .ops-grid .active-panel th, body.hn-v20-release .ops-grid .active-panel td {padding:6px 5px;}
 body.hn-v20-release .ops-grid .side-stack {gap:8px; padding:8px;}
 body.hn-v20-release .ops-grid .hn-actions-first,body.hn-v20-release .ops-grid .hn-drivers-second {padding:9px; min-height:0;}
 body.hn-v20-release .ops-grid .hn-actions-first h2,body.hn-v20-release .ops-grid .hn-drivers-second h2 {font-size:12px; margin-bottom:7px;}
 body.hn-v20-release .ops-grid .hn-actions-first .choice {padding:7px 4px; margin:5px 0; font-size:11px;}
 body.hn-v20-release .ops-grid .hn-drivers-second {min-height:85px;}
 body.hn-v20-release .attention-wrap {margin-top:8px;}
 body.hn-v20-release .attention-panel {padding:8px 11px; border-left-width:3px;}
 body.hn-v20-release .attention-panel .section-head {margin:0; gap:8px;}
 body.hn-v20-release .attention-panel .section-head h2 {font-size:13px; margin:0;}
 body.hn-v20-release .attention-panel .section-head p {font-size:11px; margin:3px 0;}
 body.hn-v20-release .attention-total {min-width:27px; height:27px; font-size:14px;}
 body.hn-v20-release .attention-chips {margin-top:6px; gap:5px;}
 body.hn-v20-release .attention-chips span {font-size:10px; padding:4px 7px;}
 body.hn-v20-release .dashboard-bottom {gap:8px; grid-template-columns:1.2fr .8fr .8fr;}
 body.hn-v20-release .dashboard-bottom > .panel {margin-top:8px; min-width:0; padding:12px;}
 body.hn-v20-release .dashboard-bottom h2 {font-size:15px; margin:0 0 9px;}
 body.hn-v20-release .dashboard-bottom .activity-row,body.hn-v20-release .dashboard-bottom .status-row,body.hn-v20-release .dashboard-bottom .summary-row {padding:6px 0; font-size:11px;}
 body.hn-v20-release .dashboard-bottom .activity-row small {font-size:10px;}
 body.hn-v20-release .dashboard-bottom .activity-row time {font-size:10px;}
}
/* Keep V21 light theme usable, with the identical compact panel placement. */
:root[data-theme="light"] body.hn-v20-release .hn-actions-first,
:root[data-theme="light"] body.hn-v20-release .hn-drivers-second {background:#f1f7fb;}
@media (min-width:1080px) and (max-width:1320px) {
 body.hn-v20-release .ops-grid {grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(155px,.4fr);}
 body.hn-v20-release .sidebar .nav a {font-size:11px;}
}

/* HN V20 DASHBOARD FINISH 20261026 -- presentation only */
/* Compact navigation icons, no external icon package. */
body.hn-v20-release .sidebar .nav a {display:flex;align-items:center;gap:9px;}
body.hn-v20-release .sidebar .nav a::before {content:'•';display:inline-flex;flex:0 0 16px;width:16px;justify-content:center;font-size:13px;line-height:1;opacity:.9;}
body.hn-v20-release .sidebar .nav a[href*="view=dashboard"]::before {content:'▦';}
body.hn-v20-release .sidebar .nav a[href*="view=orders"]::before {content:'▤';}
body.hn-v20-release .sidebar .nav a[href*="view=scheduled"]::before {content:'▣';}
body.hn-v20-release .sidebar .nav a[href*="view=messages"]::before {content:'✉';}
body.hn-v20-release .sidebar .nav a[href*="view=map"]::before {content:'⌖';}
body.hn-v20-release .sidebar .nav a[href*="view=users"]::before {content:'♙';}
body.hn-v20-release .sidebar .nav a[href*="view=customers"]::before {content:'♧';}
body.hn-v20-release .sidebar .nav a[href*="view=merchants"]::before {content:'▥';}
body.hn-v20-release .sidebar .nav a[href*="view=invoicing"]::before {content:'▧';}
body.hn-v20-release .sidebar .nav a[href*="view=settlement"]::before {content:'＄';}
body.hn-v20-release .sidebar .nav a[href*="view=integrations"]::before {content:'⇄';}
body.hn-v20-release .sidebar .nav a[href*="view=shipping_calculator"]::before {content:'▦';}
body.hn-v20-release .sidebar .nav a[href*="view=settings"]::before {content:'⚙';}
body.hn-v20-release .sidebar .nav a[href*="view=reports"]::before {content:'▥';}
body.hn-v20-release .sidebar .nav a[href*="view=forms"]::before {content:'▤';}
body.hn-v20-release .sidebar .nav a[href*="view=completed"]::before {content:'✓';}
/* Four KPI icons without changing their counts or semantics. */
body.hn-v20-release .kpi.card {position:relative;padding-left:54px!important;}
body.hn-v20-release .kpi.card::before {content:'▣';position:absolute;left:12px;top:15px;width:31px;height:31px;display:grid;place-items:center;border-radius:50%;background:#1087e5;color:#fff;font-size:15px;}
body.hn-v20-release .kpi.card:nth-child(2)::before {content:'▶';}
body.hn-v20-release .kpi.card:nth-child(3)::before {content:'✓';}
body.hn-v20-release .kpi.card:nth-child(4)::before {content:'◉';}
body.hn-v20-release .top .hn-dashboard-greeting {font-weight:750;letter-spacing:-.02em;}
body.hn-v20-release .top .hn-dashboard-subtitle {display:block;color:var(--muted);font-size:11px;margin-top:3px;}
body.hn-v20-release .ops-grid .side-stack .hn-actions-first{order:0;}
body.hn-v20-release .ops-grid .side-stack .hn-drivers-second{order:1;}
:root[data-theme="light"] body.hn-v20-release .kpi.card::before{background:#1684db;color:#fff;}
@media (max-width:1079px){body.hn-v20-release .kpi.card{padding-left:50px!important;}}

/* V21 Essentials: slightly larger dashboard text only. */
body.hn-dashboard-readable .ops-grid,
body.hn-dashboard-readable .dashboard-bottom,
body.hn-dashboard-readable .kpis {
  font-size:1.08em;
}
body.hn-dashboard-readable .hn-actions-first h2,
body.hn-dashboard-readable .hn-drivers-second h2 {
  font-size:16px;
}
.hn-task-sort {
  display:flex;
  align-items:end;
  flex-wrap:wrap;
  gap:8px;
  margin:12px 0;
}
.hn-task-sort label {
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size:13px;
}
.hn-task-sort select {min-width:120px;}


/* Compact V21 Tasks layout */
body.hn-v20-release .hn-task-workspace .hn-task-tabs {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:3px;
  margin:8px 0 12px;
  border-bottom:1px solid var(--line);
}
body.hn-v20-release .hn-task-workspace .hn-task-tab {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:auto;
  min-width:0;
  height:auto;
  padding:9px 12px;
  margin:0;
  border:0;
  border-bottom:3px solid transparent;
  border-radius:0;
  background:transparent;
  color:var(--text);
  font-size:13px;
  line-height:1.35;
}
body.hn-v20-release .hn-task-workspace .hn-task-tab.active {
  background:transparent;
  border-bottom-color:#179346;
  color:#13833c;
  font-weight:700;
}
.hn-sort-enhanced .hn-task-sort {display:none}
.hn-column-sort {
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  font-weight:inherit;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:space-between;
  gap:9px;
  width:100%;
  padding:2px 0;
  text-align:left;
}
.hn-column-sort .hn-arrows {
  color:#8c9ca9;
  font-size:11px;
}
.hn-column-sort[aria-pressed="true"] .hn-arrows {
  color:#16854a;
}
.hn-column-sort:focus-visible {
  outline:2px solid #168af0;
  outline-offset:3px;
}


/* Compact Tasks toolbar and column settings */
.hn-table-toolbar{
  display:flex;align-items:center;gap:12px;
  padding:8px 0 12px;
}
.hn-table-toolbar button{
  border:0;background:transparent;color:var(--text);
  font-size:19px;cursor:pointer;padding:5px 9px;
}
.hn-table-toolbar button:hover{
  background:var(--surface2);border-radius:5px;
}
.hn-table-toolbar a{font-size:12px;margin-left:6px}
#hn-task-settings{
  width:min(600px,94vw);max-height:85vh;
  border:1px solid #aebfcc;border-radius:10px;padding:0;
}
#hn-task-settings::backdrop{background:rgba(0,0,0,.45)}
.hn-settings-body{padding:20px}
.hn-column-setting{
  display:flex;justify-content:space-between;align-items:center;
  padding:9px 0;border-bottom:1px solid #d8e0e7;
}
.hn-column-setting span{display:flex;gap:6px}
.hn-column-setting button{padding:4px 9px}
.hn-settings-actions{
  display:flex;justify-content:flex-end;
  flex-wrap:wrap;gap:8px;margin-top:18px;
}
.hn-task-workspace th[hidden],
.hn-task-workspace td[hidden],
.main .table-wrap th[hidden],
.main .table-wrap td[hidden]{display:none!important}


/* V21 QA - compact and readable Table Settings dialog */
#hn-task-settings {
  box-sizing:border-box !important;
  width:min(650px,94vw) !important;
  max-width:94vw !important;
  max-height:85vh !important;
  margin:auto !important;
  padding:0 !important;
  color:#18334a !important;
  background:#ffffff !important;
  border:1px solid #cbd7e2 !important;
  border-radius:12px !important;
  box-shadow:0 18px 55px rgba(0,0,0,.25) !important;
  overflow:hidden !important;
}
#hn-task-settings::backdrop {
  background:rgba(0,0,0,.48) !important;
}
#hn-task-settings .hn-settings-body {
  display:flex !important;
  flex-direction:column !important;
  gap:10px !important;
  padding:20px !important;
  max-height:85vh !important;
  background:#ffffff !important;
  color:#18334a !important;
  box-sizing:border-box !important;
}
#hn-task-settings h2 {
  margin:0 !important;
  color:#18334a !important;
  font-size:21px !important;
}
#hn-task-settings p {
  margin:0 0 5px !important;
  font-size:13px !important;
}
#hn-task-settings .hn-column-list {
  overflow-y:auto !important;
  min-height:0 !important;
  flex:1 1 auto !important;
}
#hn-task-settings .hn-column-setting {
  display:flex !important;
  flex-direction:row !important;
  justify-content:space-between !important;
  align-items:center !important;
  gap:12px !important;
  padding:9px 2px !important;
  border-bottom:1px solid #e1e7ee !important;
}
#hn-task-settings .hn-column-setting label {
  display:inline-flex !important;
  flex-direction:row !important;
  align-items:center !important;
  gap:10px !important;
  margin:0 !important;
  font-size:14px !important;
  font-weight:500 !important;
  color:#18334a !important;
}
#hn-task-settings input[type=checkbox] {
  position:static !important;
  display:inline-block !important;
  width:16px !important;
  height:16px !important;
  margin:0 !important;
  flex:0 0 auto !important;
}
#hn-task-settings .hn-column-setting span {
  display:inline-flex !important;
  flex-direction:row !important;
  gap:6px !important;
  flex:0 0 auto !important;
}
#hn-task-settings button {
  width:auto !important;
  min-width:35px !important;
  height:auto !important;
  margin:0 !important;
  padding:7px 11px !important;
  border:1px solid #cedae5 !important;
  border-radius:6px !important;
  background:#f5f8fb !important;
  color:#18334a !important;
  cursor:pointer !important;
}
#hn-task-settings .hn-settings-actions {
  display:flex !important;
  flex-direction:row !important;
  justify-content:flex-end !important;
  align-items:center !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  margin:5px 0 0 !important;
  padding-top:12px !important;
  border-top:1px solid #e1e7ee !important;
}
#hn-task-settings .hn-settings-actions [data-apply] {
  background:#168451 !important;
  border-color:#168451 !important;
  color:white !important;
}
:root[data-theme=dark] #hn-task-settings,
:root[data-theme=dark] #hn-task-settings .hn-settings-body {
  background:#122638 !important;
  color:#f1f5f9 !important;
}
:root[data-theme=dark] #hn-task-settings h2,
:root[data-theme=dark] #hn-task-settings .hn-column-setting label {
  color:#f1f5f9 !important;
}


/* V21 Essentials - aligned header account controls */
body.hn-v20-release .top .userbox {
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:nowrap;
  gap:10px;
  min-width:0;
}

body.hn-v20-release .top .userbox > button,
body.hn-v20-release .top .userbox > form > button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:8px 13px;
  border-radius:7px;
  white-space:nowrap;
  line-height:1.2;
  flex-shrink:0;
}

body.hn-v20-release .top .userbox > span {
  display:inline-flex;
  align-items:center;
  white-space:nowrap;
  font-weight:600;
  font-size:14px;
  padding:0 6px;
}

body.hn-v20-release .top .userbox > form {
  display:inline-flex;
  align-items:center;
  margin:0;
  flex-shrink:0;
}

@media(max-width:900px) {
  body.hn-v20-release .top .userbox {
    flex-wrap:wrap;
    gap:6px;
  }
}


/* V21 QA - compact header control widths */
body.hn-v20-release .top .userbox {
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:10px !important;
  width:auto !important;
  flex:0 0 auto !important;
}

body.hn-v20-release .top .userbox > button {
  width:auto !important;
  min-width:0 !important;
  max-width:none !important;
  flex:0 0 auto !important;
  padding:8px 13px !important;
}

body.hn-v20-release .top .userbox > button.theme {
  width:auto !important;
  min-width:105px !important;
  max-width:135px !important;
}

body.hn-v20-release .top .userbox > span {
  width:auto !important;
  flex:0 0 auto !important;
  white-space:nowrap !important;
}

body.hn-v20-release .top .userbox > form {
  width:auto !important;
  flex:0 0 auto !important;
}

body.hn-v20-release .top .userbox > form > button {
  width:auto !important;
  white-space:nowrap !important;
}
