/* Logistics24 workspace. Presentation layer; shared operational styles remain in portal.css. */
:root, html[data-theme="light"] {
  --bg: #f5f6f3; --bg2: #f2f4ef; --card: #fff; --card-hover: #f8faf5;
  --line: #e1e6df; --text: #202e29; --muted: #6b7770;
  --accent: #34694c; --accent-soft: #edf4e9; --accent-hover: #214f34;
  --brand: #3f6c35; --brand-soft: #eef6e5; --brand-border: #d2e5bc; --brand-hover: #b6de73;
  --ok: #2d7a57; --ok-soft: #eaf5ed; --warn: #946318; --warn-soft: #fff4de; --warn-fg: #805311;
  --bad: #b94f4a; --bad-soft: #fcf0ed; --bad-fg: #a63d38;
  --top-bg: #ffffffed; --table-hover: #f7f9f4; --badge-default-bg: #eef1ed;
  --card-shadow: 0 2px 4px #1b342204; --shadow: 0 16px 48px #102d2014;
  --radius: 16px; --radius-sm: 10px; --radius-xs: 7px; --max: 1600px;
  --font: "Inter", "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --btn-on-brand: #20341f; --theme-color: #f5f6f3;
}
html[data-theme="dark"] {
  --bg: #101a18; --bg2: #1d2b25; --card: #17231e; --card-hover: #202f27;
  --line: #304137; --text: #edf2e9; --muted: #a4b2a6;
  --accent: #b4d897; --accent-soft: #263a29; --accent-hover: #d0edb5;
  --brand: #c6ed83; --brand-soft: #2a3c25; --brand-border: #486039; --brand-hover: #d7f7a3;
  --ok: #84cba1; --ok-soft: #1e382b; --warn: #e3bf75; --warn-soft: #3a3020; --warn-fg: #f0cd87;
  --bad: #ec9890; --bad-soft: #3c2826; --bad-fg: #f3aea5;
  --top-bg: #17231ef2; --table-hover: #203227; --badge-default-bg: #2b3a30;
  --card-shadow: none; --shadow: 0 16px 48px #0004; --theme-color: #101a18;
}
body { background: var(--bg); font-size: 14px; }
.ui-icon { width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 200; padding: 12px 20px; background: var(--card); border: 2px solid var(--accent); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.workspace-sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; z-index: 60; display: flex; flex-direction: column; padding: 32px 18px 18px; color: #e9f0e9; background: #142922; }
.workspace-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 38px; color: #f4f7f0; font-size: 22px; font-weight: 650; letter-spacing: -1px; }
.workspace-brand:hover { color: #fff; }
.workspace-brand small { display: block; margin-top: 5px; font-size: 7.4px; font-weight: 550; letter-spacing: 1.1px; color: #9caea3; }
.workspace-monogram { width: 40px; height: 42px; border: 1px solid #587b56; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 23px; font-weight: 700; color: #c6ed83; transform: skew(-6deg); }
.workspace-monogram span { font-size: 11px; margin-top: 12px; }
.brand-number { color: #c6ed83; }
.workspace-label { color: #8fa597; text-transform: uppercase; font-size: 9px; letter-spacing: 1.8px; padding: 0 16px 14px; font-weight: 600; }
.sidebar-navigation { min-height: 0; overflow-y: auto; }
.workspace-nav { display: flex; flex-direction: column; gap: 5px; }
.workspace-nav a { display: flex; align-items: center; gap: 13px; color: #b6c5bb; padding: 11px 15px; border-radius: 9px; font-size: 13px; font-weight: 500; transition: background .18s, color .18s; }
.workspace-nav a:hover { background: #ffffff0c; color: #fff; }
.workspace-nav a.active { background: #c6ed83; color: #1b3424; font-weight: 650; }
.workspace-nav a.active::after { content: ''; width: 5px; height: 5px; margin-left: auto; border-radius: 50%; background: currentColor; }
.sidebar-bottom { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 22px 6px 2px; border-top: 1px solid #ffffff16; }
.sidebar-bottom > div { min-width: 0; flex: 1; }
.sidebar-bottom strong { display: block; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.sidebar-bottom small { display: block; color: #94aa9a; font-size: 10px; margin-top: 3px; }
.sidebar-bottom a { padding: 8px; color: #b3c8b7; font-size: 20px; }
.sidebar-avatar { display: grid; place-items: center; background: #334b37; color: #d9edb9; width: 36px; height: 36px; border-radius: 50%; font-size: 13px; }
body[data-workspace="true"] { padding-left: 248px; }
.top { min-height: 80px; padding: 16px 36px; box-shadow: none; backdrop-filter: blur(14px); }
body[data-workspace="true"] .top > .brand { display: none; }
.workspace-context { font-size: 12px; color: var(--muted); }
.workspace-context span { padding: 0 13px; color: var(--line); }
.workspace-context strong { color: var(--text); font-weight: 550; }
.top nav { gap: 10px; flex-wrap: nowrap; }
.top .who { background: none; border: none; font-size: 12px; max-width: 220px; }
.top .role-pill { display: none; }
.top .btn.ghost[href="/logout"] { display: none; }
.top .btn.primary { padding: 10px 16px; }
.top .theme-toggle, .notif-bell { background: transparent; border: 1px solid var(--line); border-radius: 10px; width: 38px; height: 38px; min-height: 38px; }
.mobile-menu { display: none; }
.wrap { width: min(var(--max), calc(100% - 72px)); padding-top: 34px; padding-bottom: 48px; min-height: calc(100vh - 175px); }
h1 { font-size: clamp(26px, 2.6vw, 36px); letter-spacing: -1.3px; font-weight: 600; line-height: 1.2; }
h2 { font-size: 16px; font-weight: 600; letter-spacing: -.35px; }
p { line-height: 1.65; }
.head-row { align-items: center; margin-bottom: 26px; gap: 18px; }
.head-row p { font-size: 13px; margin: 8px 0 0; }
.crumb, .eyebrow { color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: 1.6px; text-transform: uppercase; margin: 0 0 12px; }
.card { padding: 24px; margin-bottom: 20px; }
.section-title { margin-bottom: 18px; }
.section-title h2 { margin-bottom: 0; }
.section-lead { font-size: 13px; }
.kpi-row, .stats { gap: 16px; margin-bottom: 26px; }
.kpi, .stat { position: relative; padding: 22px; border-radius: 13px; min-height: 136px; box-shadow: var(--card-shadow); }
.kpi::after, .stat::after { content: ''; position: absolute; top: 24px; right: 20px; width: 7px; height: 7px; border-radius: 50%; background: #a8be94; }
.kpi .kpi-label, .stat .label { font-size: 11px; text-transform: none; letter-spacing: 0; font-weight: 500; margin-bottom: 18px; padding-right: 14px; }
.kpi .kpi-value, .stat .value { font-size: 32px; font-weight: 550; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.kpi .kpi-sub { font-size: 10px; margin-top: 9px; }
.driver-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.overview-hero { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 30px 34px; margin-bottom: 26px; border-radius: 16px; background: #e9efdf; color: #203825; overflow: hidden; }
.overview-hero > div:first-child { position: relative; z-index: 1; max-width: 610px; }
.overview-hero .eyebrow { color: #63745b; }
.overview-hero h2 { font-size: 25px; letter-spacing: -.8px; margin-bottom: 8px; }
.overview-hero p { color: #63745b; font-size: 12px; max-width: 520px; }
.overview-hero .btn { background: #fff8; color: #26492d; border-color: #c8d5bd; font-size: 12px; }
.overview-hero .btn.primary { background: #233d29; color: #f1f7e7; border-color: #233d29; }
.hero-network { position: relative; flex: 0 0 200px; height: 150px; }
.network-orbit { position: absolute; border: 1px solid #b7cba5; border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 135px; height: 135px; }
.network-orbit.orbit-two { width: 215px; height: 215px; border-style: dashed; }
.network-core { position: absolute; inset: 40px 65px; display: grid; place-items: center; background: #233d29; color: #d7f3b2; border-radius: 22px; font-size: 29px; font-weight: 650; transform: rotate(-9deg); box-shadow: 0 12px 20px #2038251f; }
.network-node { width: 12px; height: 12px; border: 3px solid #e9efdf; border-radius: 50%; background: #4a7840; position: absolute; left: 27px; top: 52px; box-shadow: 0 0 0 1px #94ac7f; }
.node-two { left: 143px; top: 118px; }.node-three { left: 179px; top: 13px; }
html[data-theme="dark"] .overview-hero { background: #2a3b29; color: #edf4e4; }
html[data-theme="dark"] .overview-hero p, html[data-theme="dark"] .overview-hero .eyebrow { color: #b7c8aa; }
.btn { min-height: 38px; padding: 9px 15px; font-size: 12px; border-radius: 8px; font-weight: 550; background: var(--card); }
.btn.primary { background: #c6ed83; border-color: #bddf89; color: #213421; box-shadow: 0 1px 2px #273e1010; }
.btn.primary:hover { background: #b6de73; color: #213421; }
.form { gap: 18px; }
.form.grid2 { gap: 22px 24px; }
.form label { font-size: 12px; color: var(--text); font-weight: 550; gap: 8px; }
.form input, .form textarea, .form select, .driver-toolbar input, .driver-toolbar select, .filter-bar input, .filter-bar select { background: var(--card); padding: 11px 13px; border-radius: 8px; font-size: 13px; min-height: 42px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); }
.form input[type="checkbox"], .form input[type="radio"] { min-height: auto; }
.table-wrap { border-radius: 12px; }
.table th { background: var(--bg2); font-size: 9px; letter-spacing: .7px; padding: 13px 16px; }
.table td { padding: 17px 16px; font-size: 12px; }
.table .id-cell { color: var(--text); font-size: 12px; }
.table .price-cell { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.table td .btn { font-size: 11px; min-height: 30px; padding: 6px 10px; }
.badge, .chip { font-size: 10px; padding: 5px 9px; font-weight: 550; border-radius: 6px; letter-spacing: 0; }
.badge[class*="s-"]::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; margin-right: 5px; vertical-align: 1px; }
.subtabs, .status-tabs { gap: 6px; margin: 0 0 22px; border-bottom: 1px solid var(--line); padding: 0; }
.subtabs a, .status-tabs a { padding: 13px 16px; font-size: 12px; font-weight: 550; }
.subtabs a.active { color: var(--text); border-bottom-color: var(--brand); }
.status-tabs a.active { background: var(--brand-soft); color: var(--brand); }
.driver-toolbar, .filter-bar { margin-bottom: 20px; gap: 10px; }
.empty { padding: 64px 24px; background: var(--card); border: 1px dashed var(--line); border-radius: 14px; }
.empty strong { font-size: 17px; font-weight: 550; }.empty span { font-size: 12px; }
.empty-icon { background: var(--brand-soft); border-radius: 16px; }
.delivery-card { border-radius: 14px; box-shadow: var(--card-shadow); }
.delivery-card .dc-head { background: var(--card); padding: 18px 22px; }
.delivery-card .dc-body { padding: 22px; gap: 20px; }
.delivery-card .dc-foot { padding: 16px 22px; background: var(--bg2); }
.delivery-card .dc-field .lbl { font-size: 9px; letter-spacing: .7px; }
.grid-detail > *, .support-layout > *, .kpi-row > * { min-width: 0; }
.site-foot { margin-top: 0; padding: 20px 36px; font-size: 10px; }
.site-foot-inner { max-width: none; }
.portal-banner-wrap { max-width: none; margin: 0 36px; padding: 16px 0 0; }
.notif-panel { border-radius: 12px; box-shadow: var(--shadow); }
@media (min-width: 1600px) { .wrap { padding-top: 42px; } }
@media (max-width: 1200px) {
  .workspace-sidebar { width: 220px; padding-left: 12px; padding-right: 12px; }
  body[data-workspace="true"] { padding-left: 220px; }
  .workspace-brand { font-size: 20px; gap: 8px; }
  .top { padding-left: 24px; padding-right: 24px; }.wrap { width: calc(100% - 48px); }
  .top .who { display: none; }.kpi { padding: 18px; }
  .hero-network { flex-basis: 140px; }.network-core { inset: 40px 35px; }
}
@media (max-width: 960px) {
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }.driver-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-detail { grid-template-columns: 1fr; }.hero-network { display: none; }
}
@media (max-width: 800px) {
  body[data-workspace="true"] { padding-left: 0; }
  .workspace-sidebar { display: none; top: 70px; width: min(300px, 88vw); padding-top: 24px; box-shadow: 16px 0 40px #0004; }
  body.nav-open .workspace-sidebar { display: flex; }
  .top { min-height: 70px; padding: 14px 18px; flex-wrap: nowrap; gap: 12px; }
  .top nav { margin-left: auto; gap: 7px; }.mobile-menu { display: inline-flex; padding: 6px 10px; }
  .workspace-context { font-size: 11px; }.workspace-context > span { padding: 0 6px; }
  .wrap { width: calc(100% - 36px); padding-top: 26px; }
  h1 { font-size: 28px; }.head-row { margin-bottom: 22px; }.card { padding: 20px; }
  .overview-hero { padding: 25px; }.overview-hero h2 { font-size: 23px; }
  .kpi-row { gap: 12px; }.kpi { min-height: 122px; }.kpi .kpi-value { font-size: 27px; }
  .site-foot { padding: 20px 18px; }.portal-banner-wrap { margin: 0 18px; }
  .subtabs, .status-tabs { flex-wrap: nowrap; overflow-x: auto; }.subtabs a, .status-tabs a { white-space: nowrap; padding-left: 12px; padding-right: 12px; }
  .notif-panel { position: fixed; right: 12px; top: 65px; width: min(360px, calc(100vw - 24px)); }
}
@media (max-width: 520px) {
  .workspace-context { display: none; }.top .btn.primary { padding: 9px 12px; }.top .brand a { font-size: 13px; }
  .kpi-row, .driver-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }.driver-kpis .kpi:last-child { grid-column: 1 / -1; }
  .kpi, .stat { padding: 17px; }.kpi::after { right: 15px; top: 21px; }.kpi .kpi-label { font-size: 10px; }
  .card { padding: 17px; }.head-row .actions { width: 100%; }.head-row .actions .btn { flex: 1; }
  .overview-hero { padding: 22px; }.overview-hero .actions { flex-wrap: wrap; }
  .driver-toolbar, .filter-bar { flex-wrap: wrap; }.driver-toolbar input { min-width: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print { .workspace-sidebar, .top, .site-foot, .skip-link { display: none !important; } body[data-workspace="true"] { padding-left: 0; }.wrap { width: 100%; }.card, .kpi { box-shadow: none; } }

/* Overview tables have four compact columns, unlike the full order directory. */
.overview-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.overview-grid .table { min-width: 0; }
.overview-grid .table td { overflow-wrap: anywhere; }
.overview-grid .table .small { font-size: 10px; font-weight: 450; }
.overview-grid .empty { padding: 44px 18px; }
@media (max-width: 1200px) { .overview-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .overview-grid .table { min-width: 430px; } }
