/* ============================================================
   MyShipment · redesign layer
   Ports the buyer-portal prototype's design system onto the live app.
   Loaded LAST: everything here intentionally wins over base/dashboard/filters.
   ============================================================ */

/* ---------- Base ---------- */
body {
    font-family: var(--font-ui);
    background: var(--paper);
    color: var(--ink);
    font-size: var(--fs);
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { text-wrap: balance; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--indigo-soft); }
.num, .mono { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-code); font-size: 12.5px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* ============================================================
   RAIL (sidebar)
   ============================================================ */
.sidebar {
    background:
        radial-gradient(1200px 600px at -20% -10%, rgba(35, 47, 140,.28), transparent 60%),
        radial-gradient(800px 500px at 120% 110%, rgba(35, 47, 140,.22), transparent 60%),
        linear-gradient(180deg, var(--navy-2) 0%, var(--navy) 100%);
    overflow: hidden;
}
.sidebar::before {
    /* sea-chart grid, very faint */
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .35;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 85%);
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.9), transparent 85%);
}
.sidebar > * { position: relative; }

.sidebar .logo { border-bottom: 1px solid rgba(255,255,255,.10); }
.sidebar .logo h2 {
    font-family: var(--font-voice);
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -.01em;
}
.sidebar .logo .logo-by {
    display: block;
    font-family: var(--font-ui);
    font-size: 9.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--navy-ink);
    margin-top: 3px;
    font-weight: 500;
}
.sidebar.collapsed .logo-by { display: none; }

.nav-menu { padding-top: 4px; }
.nav-item {
    margin: 1px 10px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    color: #C9D4EA;
    gap: 11px;
    position: relative;
    transition: background .18s var(--ease), color .18s var(--ease);
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item:focus,
.nav-item:focus-visible { outline: none; }
.nav-item.active {
    background: rgba(255,255,255,.10);
    color: #fff;
    border-left: 0;
}
.nav-item.active::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--brand-line);
}

.nav-section-label {
    padding: 15px 22px 6px;
    color: rgba(143,163,201,.75);
    font-size: 10.5px;
    letter-spacing: .14em;
}
.sidebar.collapsed .nav-item { margin: 1px 8px; justify-content: center; }
.sidebar.collapsed .nav-item.active::before { left: -8px; }

/* Counts / soon tags on nav rows */

/* Rail footer: who you are and what you can see */
.rail-foot {
    margin-top: auto;
    padding: 13px 20px 16px;
    border-top: 1px solid rgba(255,255,255,.10);
}
.rail-foot .rf-buyer { font-weight: 600; font-size: 13px; color: #fff; }
.rail-foot .rf-scope { font-size: 11.5px; color: var(--navy-ink); margin-top: 2px; }
.sidebar.collapsed .rail-foot { display: none; }

/* ============================================================
   TOPBAR
   ============================================================ */
.top-bar {
    background: rgba(245,247,250,.86);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line-soft);
    gap: 14px;
}
.top-bar-left { gap: 14px; flex: 0 1 auto; }
.topbar-crumb-item.root { color: var(--muted); }
.topbar-crumb-item.root i { color: var(--indigo); }
.topbar-crumb-item.active { color: var(--ink); font-weight: 600; }
.topbar-crumb-divider { color: var(--faint); }
.topbar-crumb-item.link { cursor: pointer; }
.topbar-crumb-item.link:hover { color: var(--indigo); text-decoration: underline; }
.topbar-live-tag {
    color: var(--muted);
    background: #fff;
    border-color: var(--line-soft);
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px;
}
.topbar-live-tag .pulse-dot { background: var(--ok); }

/* Global search */
.topbar-search {
    position: relative;
    flex: 1 1 340px;
    max-width: 520px;
    min-width: 0;
}
.topbar-search input {
    width: 100%;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    padding: 0 44px 0 38px;
    font: inherit;
    font-size: 13.5px;
    color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
.topbar-search input::placeholder { color: var(--faint); }
.topbar-search input:focus {
    outline: none;
    border-color: var(--indigo-line);
    box-shadow: 0 0 0 4px var(--indigo-soft);
}
.topbar-search .ts-ico {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 13px;
    pointer-events: none;
}
.topbar-search .ts-kbd {
    position: absolute;
    right: 9px;
    top: 9px;
    height: 20px;
    min-width: 20px;
    padding: 0 6px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: var(--paper);
    font-family: var(--font-code);
    font-size: 11px;
    color: var(--muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.search-pop {
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow-pop);
    padding: 8px;
    display: none;
    z-index: 120;
    max-height: 60vh;
    overflow: auto;
}
.search-pop.open { display: block; animation: pop .16s var(--ease); }
.search-pop .sp-grp {
    font-size: 10.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--faint);
    padding: 8px 10px 4px;
    font-weight: 700;
}
.search-pop .sp-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 9px;
    color: var(--ink);
    cursor: pointer;
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    font: inherit;
}
.search-pop .sp-item:hover,
.search-pop .sp-item.sel { background: var(--indigo-soft); }
.search-pop .sp-item .t { font-weight: 600; font-size: 13px; }
.search-pop .sp-item .s { color: var(--muted); font-size: 12px; }
.search-pop .sp-item .k { margin-left: auto; font-size: 11px; color: var(--faint); white-space: nowrap; }
.search-pop .sp-empty { padding: 14px 10px; color: var(--muted); font-size: 13px; }

/* Topbar buttons */
.topbar-iconbtn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--ink-soft);
    transition: background .15s, border-color .15s;
    flex: none;
}
.topbar-iconbtn:hover { background: var(--indigo-soft); border-color: var(--indigo-line); }
.topbar-sync-btn { width: auto; gap: 7px; padding: 0 14px; font-weight: 600; font-size: 13px; }
@media (max-width: 1180px) {
    .topbar-sync-btn span { display: none; }
    .topbar-sync-btn { padding: 0 12px; }
}

.topbar-ask-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 38px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--indigo);
    background: var(--indigo);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 8px 18px -10px rgba(35, 47, 140,.8);
    transition: background .15s, border-color .15s;
    flex: none;
}
.topbar-ask-btn:hover { background: var(--indigo-deep); border-color: var(--indigo-deep); }
@media (max-width: 1180px) {
    .topbar-ask-btn span { display: none; }
    .topbar-ask-btn { padding: 0 12px; }
}
@media (max-width: 1000px) {
    .topbar-search { display: none; }
}

.user-controls { gap: 9px; }

/* ============================================================
   PAGE FRAME
   ============================================================ */
.content-wrapper { padding: 22px var(--content-pad-x) 56px; }
.view-section.active { gap: 16px; }

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.page-head .titles { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.page-head .actions { display: flex; gap: 8px; align-items: center; flex: none; flex-wrap: wrap; }

.h1 {
    font-family: var(--font-voice);
    font-weight: 600;
    font-size: 32px;
    letter-spacing: -.012em;
    line-height: 1.12;
    color: var(--ink);
    margin: 0;
}
.h1.sm { font-size: 25px; }
.h2 { font-size: 19px; font-weight: 600; letter-spacing: -.005em; margin: 0; }
.h3 { font-size: 15px; font-weight: 600; margin: 0; }
.kicker {
    font-size: 11px;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}
.kicker.indigo { color: var(--indigo); }
.lead { color: var(--ink-soft); font-size: 14.5px; margin: 0; }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.muted-t { color: var(--muted); }

.ok-t { color: var(--ok); }

.b { font-weight: 600; }
.nowrap { white-space: nowrap; }

.crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--muted);
    flex-wrap: wrap;
}
.crumbs a, .crumbs button.link {
    color: var(--muted);
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
}
.crumbs a:hover, .crumbs button.link:hover { color: var(--indigo); text-decoration: underline; }
.crumbs .sep { color: var(--faint); }

/* reveal */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ============================================================
   ATOMS
   ============================================================ */
.ui-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, transform .15s var(--ease);
}
.ui-btn:hover { background: var(--indigo-soft); border-color: var(--indigo-line); text-decoration: none; }
.ui-btn:active { transform: translateY(1px); }
.ui-btn:disabled { opacity: .5; cursor: not-allowed; }
.ui-btn.primary {
    background: var(--indigo);
    border-color: var(--indigo);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 8px 18px -10px rgba(35, 47, 140,.8);
}
.ui-btn.primary:hover { background: var(--indigo-deep); border-color: var(--indigo-deep); }

.ui-btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.ui-btn.xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 7px; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 9px 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1;
    border: 1px solid transparent;
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.ok { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-line); }
.chip.warn { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-line); }
.chip.bad { color: var(--bad); background: var(--bad-soft); border-color: var(--bad-line); }
.chip.info { color: var(--indigo-deep); background: var(--indigo-soft); border-color: var(--indigo-line); }
.chip.neutral { color: var(--ink-soft); background: var(--paper-deep); border-color: var(--line); }
.chip.neutral::before { background: var(--faint); }
.chip.nodot::before { display: none; }

.pill-tag {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 6px;
    border: 1px solid var(--line);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ink-soft);
    white-space: nowrap;
    background: #fff;
}
.pill-tag.mono { font-family: var(--font-code); font-weight: 500; }
.pill-tag.cur { background: var(--indigo-soft); border-color: var(--indigo-line); color: var(--indigo-deep); }

.tag-soft {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 20px;
    padding: 0 7px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    background: var(--paper-deep);
    color: var(--ink-soft);
}
.tag-soft.ai { background: var(--ai-soft); color: var(--ai); }
.tag-soft.live { background: var(--ok-soft); color: var(--ok); }

/* Badges (existing markup) restyled to the chip family */
.badge {
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    border: 1px solid transparent;
    line-height: 1.5;
}
.badge.transit { background: var(--indigo-soft); color: var(--indigo-deep); border-color: var(--indigo-line); }
.badge.delivered { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.badge.exception { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.badge.open { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }

/* ============================================================
   CARDS / PANELS (existing markup)
   ============================================================ */
.panel,
.ui-card {
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}
.po-panel { border-color: var(--line-soft); box-shadow: var(--shadow-card); }

.ui-card.ai-tint { background: var(--brand-soft); border-color: var(--ai-line); }

.card-h {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px 12px;
}
.card-h .h2, .card-h .h3 { display: flex; align-items: center; gap: 10px; }
.card-h .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.card-b { padding: 0 20px 18px; }

.ui-grid { display: grid; gap: 16px; }
.ui-grid.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.ui-grid.g21 { grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr); align-items: start; }
.ui-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.row-flex { display: flex; align-items: center; gap: 10px; }
.row-flex.wrap { flex-wrap: wrap; }
.flex-sp { flex: 1; }
 .mt-12 { margin-top: 12px; }

/* List-page headers read as the prototype's page-head: no card chrome, a
   Fraunces title, and the tools pushed to the right. The markup and its
   bindings (search, refresh) are untouched. */
.po-panel.tab-dark-header {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0;
    overflow: visible;
}
.tab-dark-header .po-toolbar {
    border-bottom: 0;
    padding: 0 2px;
    align-items: flex-end;
    gap: 20px;
}
.tab-dark-header .po-heading h2 {
    font-family: var(--font-voice);
    font-weight: 600;
    font-size: 32px;
    letter-spacing: -.012em;
    line-height: 1.12;
    color: var(--ink);
}
.tab-dark-header .po-heading p {
    color: var(--ink-soft);
    font-size: 14.5px;
    margin-top: 6px;
}
.tab-dark-header .po-search {
    background: #fff;
    border-color: var(--line);
    border-radius: 10px;
}
.tab-dark-header .po-refresh-button.compact {
    background: #fff;
    border-color: var(--line);
    color: var(--ink-soft);
    border-radius: 10px;
}
.tab-dark-header .po-refresh-button.compact:hover {
    background: var(--indigo-soft);
    border-color: var(--indigo-line);
    color: var(--indigo);
}
@media (max-width: 900px) {
    .tab-dark-header .po-heading h2 { font-size: 26px; }
}

/* ============================================================
   TILES (clickable KPI cards)
   ============================================================ */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }

/* Existing KPI cards inherit the tile look */
.dash-kpi-card {
    border-color: var(--line-soft) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-card) !important;
}
.dash-kpi-card.is-clickable { cursor: pointer; }
.dash-kpi-card.is-clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover) !important; }

.shipment-stat-bar { border-radius: var(--radius-lg); }
.shipment-stat-item.is-clickable { cursor: pointer; }
.shipment-stat-item.is-clickable:hover { background: var(--indigo-soft); }

/* ============================================================
   TABS  (in-page pill group — the prototype's Analytics pattern)
   ============================================================ */
.ui-tabs {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    border-radius: 11px;
    background: var(--paper-deep);
    flex-wrap: wrap;
    max-width: 100%;
}
.ui-tabs button {
    height: 30px;
    padding: 0 12px;
    border-radius: 8px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-weight: 600;
    font-size: 12.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
.ui-tabs button:hover { color: var(--ink); }
.ui-tabs button.on {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 1px 3px rgba(16,32,74,.12);
}
.ui-tabs button .cnt { font-weight: 500; color: var(--faint); }
.ui-tabs button .soon {
    white-space: nowrap;
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--faint);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 1px 4px;
}
.ui-tabs button.on .soon { background: var(--paper-deep); }

/* The old full-width tab bar keeps working but reads as pills */

/* ============================================================
   FILTER BAR
   ============================================================ */
.filterbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.filterbar .flex-sp { flex: 1; }

.shipment-filter-pill {
    border-radius: 9px;
    border-color: var(--line);
    font-size: 12.5px;
    color: var(--ink-soft);
}
.shipment-filter-pill:hover { border-color: var(--indigo-line); background: var(--indigo-soft); }

.shipment-filter-dropdown {
    border-radius: 14px;
    border-color: var(--line);
    box-shadow: var(--shadow-pop);
}
.dash-scope-btn.is-active { color: var(--ink); }
.dash-filter-toggle-btn { border-radius: 9px; }

/* ============================================================
   TABLES
   ============================================================ */
.data-table th {
    background: #fff;
    font-size: 10.5px;
    letter-spacing: .1em;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 var(--line);
}
.data-table th, .data-table td { padding: 10px 12px; font-size: 12.8px; }
.data-table td { border-bottom: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
.data-table tbody tr:hover { background: var(--bg); }
.data-table tbody tr.is-clickable { cursor: pointer; }

.ui-tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.ui-tbl th {
    font-size: 10.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
    text-align: left;
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
    background: #fff;
}
.ui-tbl td {
    padding: 11px 10px;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
    font-size: 13px;
}
.ui-tbl tr:last-child td { border-bottom: 0; }
.ui-tbl tbody tr.click { cursor: pointer; }
.ui-tbl tbody tr.click:hover td { background: var(--bg); }
.ui-tbl .r { text-align: right; }
.ui-tbl .first { font-weight: 600; }
.ui-tbl .sub { display: block; color: var(--muted); font-size: 11.5px; font-weight: 400; margin-top: 2px; }
.ui-tbl .date { font-family: var(--font-code); font-size: 12.5px; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

.route-cell { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.route-cell .arr { color: var(--faint); }

/* Row action buttons */

.row-menu { border-radius: 12px; border-color: var(--line); box-shadow: var(--shadow-pop); }

/* Open-detail affordance on list rows */

/* ============================================================
   DETAIL PAGES
   ============================================================ */
.detail-page { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Journey strip */
.journey {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 0;
    padding: 20px 22px 18px;
    overflow-x: auto;
}
.jstep { position: relative; padding-top: 26px; min-width: 120px; }
.jstep::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 7px;
    height: 3px;
    background: var(--line);
}
.jstep.done::before { background: var(--indigo); }
.jstep:first-child::before { left: 50%; }
.jstep:last-child::before { right: 50%; }
.jstep .jdot {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--faint);
    z-index: 1;
}
.jstep.done .jdot { background: var(--indigo); border-color: #fff; box-shadow: 0 0 0 2px var(--indigo); }
.jstep.now .jdot { background: #fff; border-color: var(--indigo); border-width: 3px; box-shadow: 0 0 0 4px var(--indigo-soft); }
.jstep.bad .jdot { background: var(--bad); border-color: #fff; box-shadow: 0 0 0 2px var(--bad); }
.jstep .jlbl { font-size: 12.5px; font-weight: 600; color: var(--ink); text-align: center; padding: 0 6px; }
.jstep.fut .jlbl { color: var(--muted); font-weight: 500; }
.jstep .jsub {
    font-family: var(--font-code);
    font-size: 11px;
    color: var(--muted);
    text-align: center;
    margin-top: 3px;
}
.jstep .jsub.bad { color: var(--bad); font-weight: 600; }
.jstep .jsub.ok { color: var(--ok); }

@keyframes pulse2 {
    0% { box-shadow: 0 0 0 0 rgba(35, 47, 140,.45); }
    70% { box-shadow: 0 0 0 9px rgba(35, 47, 140,0); }
    100% { box-shadow: 0 0 0 0 rgba(35, 47, 140,0); }
}

/* Date pair */
.datepair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.datecard {
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid var(--line-soft);
    background: #fff;
}
.datecard .k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.datecard .d { font-size: 26px; font-weight: 600; letter-spacing: -.015em; margin-top: 6px; line-height: 1.1; }
.datecard .d small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.datecard .s { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.datecard.late { background: linear-gradient(180deg, #FFF8F7, #FDF0EE); border-color: var(--bad-line); }
.datecard.late .d { color: var(--bad); }
.datecard.early { background: linear-gradient(180deg, #F7FCF9, #E8F5EE); border-color: var(--ok-line); }
.datecard.early .d { color: var(--ok); }

/* Key/value list */
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 16px; font-size: 13px; }
.kv .k { color: var(--muted); }
.kv .v { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; word-break: break-word; }
.kv .v.mono { font-family: var(--font-code); font-size: 12.5px; font-weight: 500; }

/* Timeline */
.ui-timeline { display: flex; flex-direction: column; }
.tl {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 0 12px;
    position: relative;
    padding: 0 0 18px;
}
.tl:last-child { padding-bottom: 0; }
.tl::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 26px;
    bottom: -2px;
    width: 2px;
    background: var(--line);
}
.tl:last-child::before { display: none; }
.tl.done::before { background: var(--indigo-line); }
.tl .mk {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid var(--line);
    color: var(--faint);
    z-index: 1;
    font-size: 11px;
}
.tl.done .mk { background: var(--indigo); border-color: var(--indigo); color: #fff; }

.tl.bad .mk { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.tl.now .mk { background: #fff; border-color: var(--indigo); color: var(--indigo); box-shadow: 0 0 0 4px var(--indigo-soft); }
.tl .t { font-weight: 600; font-size: 13.5px; padding-top: 4px; }
.tl.fut .t { color: var(--muted); font-weight: 500; }
.tl .s { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.tl .d { font-family: var(--font-code); font-size: 12.5px; text-align: right; padding-top: 5px; white-space: nowrap; }
.tl .d .note { display: block; font-family: var(--font-ui); font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* Documents checklist */
.doclist { display: flex; flex-direction: column; }
.doclist .dr {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 9px 0;
    border-top: 1px solid var(--line-soft);
    font-size: 13px;
}
.doclist .dr:first-child { border-top: 0; }
.doclist .bx {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}
.doclist .bx.yes { background: var(--ok); color: #fff; }
.doclist .bx.no { border: 2px dashed var(--warn); }
.doclist .fn { font-family: var(--font-code); font-size: 11.5px; color: var(--muted); }

/* Progress bars used in pipelines / rankings */
.pbar {
    height: 10px;
    border-radius: 6px;
    background: var(--paper-deep);
    overflow: hidden;
    position: relative;
}
.pbar i {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: 6px;
    background: linear-gradient(90deg, #7B84D6, #232F8C);
    transform-origin: left;
    animation: grow .8s var(--ease) both;
}
.pbar i.ok { background: linear-gradient(90deg, #4CAE7C, #1B7A4C); }
.pbar i.warn { background: linear-gradient(90deg, #E3B24A, #A16207); }
.pbar i.bad { background: linear-gradient(90deg, #D9776B, #B23A2E); }

/* ============================================================
   COMING SOON
   ============================================================ */
.soon-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding: 56px 28px 60px;
    background: var(--card);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}
.soon-page .soon-mark {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--indigo-soft);
    color: var(--indigo);
    border: 1px solid var(--indigo-line);
}
.soon-page h2 {
    font-family: var(--font-voice);
    font-weight: 600;
    font-size: 26px;
    letter-spacing: -.012em;
    margin: 0;
}
.soon-page p { color: var(--muted); max-width: 62ch; font-size: 14px; }
.soon-page .soon-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 6px;
}
.soon-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--indigo-deep);
    background: var(--indigo-soft);
    border: 1px solid var(--indigo-line);
    border-radius: 999px;
    padding: 3px 10px;
}

/* Inline "coming soon" state inside an otherwise live card */
.soon-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 28px 18px;
    text-align: center;
    color: var(--muted);
    font-size: 12.5px;
    background: repeating-linear-gradient(135deg, var(--bg) 0 10px, var(--surface-2) 10px 20px);
    border: 1px dashed var(--line);
    border-radius: 12px;
}
.soon-inline i { font-size: 18px; color: var(--faint); }
.soon-inline b { color: var(--ink-soft); font-size: 13px; }

.analytics-chart-tag.cs-tag {
    background: var(--indigo-soft);
    color: var(--indigo-deep);
    border: 1px solid var(--indigo-line);
}

/* Nav rows that are placeholders */

/* ============================================================
   NOTIFICATION PANEL / DRAWER / TOAST
   ============================================================ */
.ui-scrim {
    position: fixed;
    inset: 0;
    background: rgba(14,27,58,.36);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 300;
    display: none;
}
.ui-scrim.open { display: block; animation: fade .2s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.ui-panel {
    position: fixed;
    top: calc(var(--shell-header-height) + 6px);
    right: 24px;
    width: 370px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-pop);
    z-index: 310;
    display: none;
    overflow: hidden;
}
.ui-panel.open { display: block; animation: pop .18s var(--ease); }
.ui-panel .ph {
    padding: 14px 16px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line-soft);
    font-weight: 600;
}
.ui-panel .pb { max-height: 60vh; overflow: auto; }
.ui-panel .pi {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid var(--line-soft);
    align-items: start;
    cursor: pointer;
    width: 100%;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    background: transparent;
    text-align: left;
    font: inherit;
}
.ui-panel .pi:first-child { border-top: 0; }
.ui-panel .pi:hover { background: var(--bg); }
.ui-panel .pi .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; }
.ui-panel .pi .dot.bad { background: var(--bad); }
.ui-panel .pi .dot.warn { background: var(--warn); }
.ui-panel .pi .dot.ok { background: var(--ok); }
.ui-panel .pi .dot.info { background: var(--indigo); }
.ui-panel .pi .t { font-weight: 600; font-size: 13px; }
.ui-panel .pi .s { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ui-panel .pi .w { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.ui-panel .pf { padding: 10px 16px; border-top: 1px solid var(--line-soft); font-size: 12.5px; }

/* Existing slide-over panels adopt the drawer shape */
.shipment-detail-panel,
.detail-panel { box-shadow: var(--shadow-pop); }

.app-toast {
    border-radius: 12px;
    box-shadow: var(--shadow-pop);
    font-size: 13.5px;
}

/* ============================================================
   MAP / CHART CARDS
   ============================================================ */
.ship-map-panel { border-radius: 18px; border-color: var(--line-soft); box-shadow: var(--shadow-card); }
.ship-map-title { font-family: var(--font-voice); font-weight: 600; letter-spacing: -.01em; }
.analytics-chart-card { border-radius: var(--radius-lg); border-color: var(--line-soft); box-shadow: var(--shadow-card); }
.analytics-chart-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.analytics-chart-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--paper-deep);
    border-radius: 5px;
    padding: 2px 7px;
}

/* ============================================================
   HOME welcome hero
   ============================================================ */
.home-profile-card { border-radius: var(--radius-lg); border-color: var(--line-soft); }
.home-profile-identity h1 { font-family: var(--font-voice); font-weight: 600; letter-spacing: -.012em; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1380px) {
    .ui-grid.g4, .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }

}
/* The 2-up detail split survives to 1180px, matching the prototype: on a
   1280px laptop the side column is still worth having. */
@media (max-width: 1180px) {
    .ui-grid.g21, .ui-grid.g3 { grid-template-columns: minmax(0, 1fr); }
    .journey { padding: 18px 16px 16px; }
}
@media (max-width: 900px) {
    .ui-grid.g2, .tiles, .tiles.g5, .datepair { grid-template-columns: minmax(0, 1fr); }
    .h1 { font-size: 26px; }
    .ui-panel { right: 12px; left: 12px; width: auto; }
}
@media print {
    .sidebar, .top-bar, .ui-scrim, .ui-panel { display: none !important; }
}

/* ============================================================
   TODAY · needs-a-look rows and arrivals rows
   ============================================================ */
.mini-need {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto 16px;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 13px 20px;
    border: 0;
    border-top: 1px solid var(--line-soft);
    background: transparent;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: background .15s;
}
.mini-need:first-child { border-top: 0; }
.mini-need:hover { background: var(--bg); }
.mini-need .sq {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.mini-need .sq.bad { background: var(--bad-soft); color: var(--bad); }
.mini-need .sq.warn { background: var(--warn-soft); color: var(--warn); }
.mini-need .sq.info { background: var(--indigo-soft); color: var(--indigo); }
.mini-need .sq.ok { background: var(--ok-soft); color: var(--ok); }
.mini-need .nt { display: flex; flex-direction: column; min-width: 0; }
.mini-need .nt .t { font-weight: 600; font-size: 13.5px; }
.mini-need .nt .s { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.mini-need .n {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}
.mini-need .n.bad { color: var(--bad); }
.mini-need .n.warn { color: var(--warn); }
.mini-need .n.info { color: var(--indigo); }
.mini-need .chev { color: var(--faint); font-size: 12px; }

.arr-row-btn {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 20px;
    border: 0;
    border-top: 1px solid var(--line-soft);
    background: transparent;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: background .15s;
}
.arr-row-btn:first-child { border-top: 0; }
.arr-row-btn:hover { background: var(--bg); }
.arr-row-btn .day { font-family: var(--font-code); font-size: 11.5px; color: var(--ink-soft); font-weight: 500; }
.arr-row-btn .nt { display: flex; flex-direction: column; min-width: 0; }
.arr-row-btn .nt .t { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arr-row-btn .nt .s { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arr-row-btn .rel { font-size: 11.5px; color: var(--faint); white-space: nowrap; }

/* Grouped "coming soon" list used on the detail pages */
.soon-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.soon-items li {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding-left: 18px;
    position: relative;
    font-size: 13px;
}
.soon-items li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--brand-ink);
    transform: rotate(45deg);
}
.soon-items li b { font-weight: 600; color: var(--ink); }
.soon-items li span { color: var(--brand-ink); font-size: 12px; }

/* List rows open their detail page, so they read as clickable. The action
   buttons inside them keep their own cursor. */
#shipment-table tbody tr[data-shipment-id],
#purchase-order-table tbody tr[data-po-id] { cursor: pointer; }
#shipment-table tbody tr[data-shipment-id]:hover,
#purchase-order-table tbody tr[data-po-id]:hover { background: var(--bg); }
#shipment-table tbody tr .row-actions,
#purchase-order-table tbody tr .row-actions { cursor: default; }

/* Analytics tabs that only apply to one freight scope stay in place under the
   other scopes and read as inactive, matching how the rail used to show them. */
.ui-tabs button.is-scope-na { opacity: .55; }
.ui-tabs button.is-scope-na::after {
    content: attr(data-scope-na);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--faint);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 1px 4px;
}

/* ============================================================
   SUSTAINABILITY (CO2e)
   A green accent used only here, so emissions never read as an
   ordinary volume metric elsewhere in Analytics.
   ============================================================ */
.co2-kpi-row { display: block; }
.co2-hero {
    display: grid;
    grid-template-columns: minmax(240px, 0.9fr) minmax(0, 2fr);
    gap: 22px;
    align-items: center;
    padding: 22px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--ok-line);
    background:
        radial-gradient(900px 400px at 0% 0%, rgba(27,122,76,.09), transparent 60%),
        linear-gradient(180deg, #F7FCF9, #EDF7F1);
    box-shadow: var(--shadow-card);
}
.co2-hero-main .kicker { color: var(--ok); }
.co2-hero-n {
    font-size: 46px;
    font-weight: 600;
    letter-spacing: -.025em;
    line-height: 1;
    margin-top: 8px;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.co2-hero-n small {
    font-size: 16px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0;
    margin-left: 7px;
}
.co2-hero-sub { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

.co2-hero-side { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.co2-side-stat {
    background: rgba(255,255,255,.78);
    border: 1px solid var(--ok-line);
    border-radius: 13px;
    padding: 13px 15px;
    min-width: 0;
}
.co2-side-stat .l {
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.co2-side-stat .v {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -.015em;
    margin-top: 5px;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}
.co2-side-stat .v small { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.co2-side-stat .d { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* "What flying cost you" */
.co2-choice { border-color: var(--warn-line); }
.co2-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.co2-choice-cell {
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--paper);
    border: 1px solid var(--line-soft);
    min-width: 0;
}
.co2-choice-cell.wide { grid-column: 1 / -1; background: linear-gradient(180deg, #FFFCF5, #FBF3DF); border-color: var(--warn-line); }
.co2-choice-cell .l { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.co2-choice-cell .v {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: -.015em;
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}
.co2-choice-cell .v.big { font-size: 32px; }
.co2-choice-cell .v.bad { color: var(--bad); }
.co2-choice-cell .v.ok { color: var(--ok); }
.co2-choice-cell .d { font-size: 12px; color: var(--muted); margin-top: 6px; }
.co2-choice-bar {
    height: 10px;
    border-radius: 6px;
    background: var(--ok-soft);
    border: 1px solid var(--ok-line);
    overflow: hidden;
    margin-top: 10px;
    position: relative;
}
.co2-choice-bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #E3B24A, #B23A2E);
    transform-origin: left;
    animation: grow .8s var(--ease) both;
}

.co2-tables .ui-tbl tbody tr.click:hover td { background: #F7FCF9; }
.co2-empty { padding: 20px 10px; color: var(--muted); text-align: center; font-size: 12.5px; }
.co2-kg { font-variant-numeric: tabular-nums; font-weight: 600; }
.co2-lane {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-code);
    font-size: 12.5px;
    white-space: nowrap;
}
.co2-lane .arr { color: var(--faint); }
.co2-foot {
    font-size: 12px;
    color: var(--muted);
    display: flex;
    gap: 8px;
    align-items: flex-start;
    padding: 2px 4px 0;
    max-width: 96ch;
}
.co2-foot i { color: var(--faint); margin-top: 2px; }

@media (max-width: 1180px) {
    .co2-hero { grid-template-columns: minmax(0, 1fr); }
    .co2-tables { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
    .co2-hero-side { grid-template-columns: minmax(0, 1fr); }
    .co2-choice-grid { grid-template-columns: minmax(0, 1fr); }
    .co2-hero-n { font-size: 36px; }
}

/* Home "This week" tab bar sits inside the card, above its list */
.home-week-tabbar { padding: 0 20px 12px; }
.home-week-tabbar .ui-tabs { width: 100%; }
.home-week-tabbar .ui-tabs button { flex: 1; justify-content: center; padding: 0 8px; }

/* Map header counters: real aggregates, so they carry a tone and a share */
.ship-map-stat em { font-style: normal; opacity: .7; margin-left: 4px; font-size: .82em; }
.ship-map-stat.ok strong { color: #7CD0A0; }
.ship-map-stat.bad strong { color: #FF9B8F; }
.ship-map-stat.info strong { color: var(--brand-line); }

/* Order pipeline: ordered -> booked -> received -> shipped -> arrived -> delivered */
.piperows { display: flex; flex-direction: column; gap: 10px; }
.piperow {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) 74px 46px;
    align-items: center;
    gap: 12px;
}
.piperow .l { font-weight: 500; color: var(--ink-soft); font-size: 13px; }
.piperow .l small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 400; }
.piperow .pbar { height: 12px; }
.piperow .q { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 13px; }
.piperow .p { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
@media (max-width: 700px) {
    .piperow { grid-template-columns: minmax(0, 1fr) 70px; }
    .piperow .pbar { grid-column: 1 / -1; }
    .piperow .p { display: none; }
}

/* This-week pager: no total count, so it reads Page N with a live Next */
.week-pager {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 10px 18px 14px;
    border-top: 1px solid var(--line-soft);
    font-size: 12px;
    color: var(--muted);
}
.week-pager .ui-btn { padding: 0 8px; }

/* Per-shipment carbon footprint card */
.ship-co2 { border-color: var(--ok-line); }
.ship-co2 .card-h { background: linear-gradient(180deg, #F7FCF9, transparent); }
.ship-co2-n {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}
.ship-co2-cmp { margin: 12px 0 14px; }
.ship-co2-cmp .pbar { height: 8px; position: relative; }
/* the tick marks where the mode average sits */
.ship-co2-cmp .pbar::after {
    content: "";
    position: absolute;
    left: 50%;
    top: -3px;
    bottom: -3px;
    width: 2px;
    background: var(--faint);
    border-radius: 2px;
}
.ship-co2-note { font-size: 12.5px; color: var(--muted); margin-top: 7px; }
.ship-co2-note.ok { color: var(--ok); font-weight: 600; }
.ship-co2-note.bad { color: var(--bad); font-weight: 600; }
.ship-co2-air {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--warn-soft);
    border: 1px solid var(--warn-line);
    font-size: 12.5px;
    color: var(--ink-soft);
}
.ship-co2-air i { color: var(--warn); margin-top: 2px; }

/* ============================================================
   QUICK DATE RANGE
   Lives in the always-visible scope bar, not the filter panel: it is a
   lookup you reach for constantly, and it commits on the spot.
   ============================================================ */
.quick-range { position: relative; flex: 0 0 auto; }
.quick-range-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 34px;
    padding: 0 11px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-soft);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}
.quick-range-btn:hover { background: var(--indigo-soft); border-color: var(--indigo-line); color: var(--indigo-deep); }
.quick-range-btn.is-set {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
    font-weight: 600;
}
.quick-range-btn.is-set .quick-range-chevron { opacity: .8; }
.quick-range-chevron { font-size: 9px; opacity: .55; }
.quick-range-label { font-variant-numeric: tabular-nums; }

.quick-range-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 60;
    min-width: 178px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-pop);
    animation: pop .14s var(--ease);
}
.quick-range-menu[hidden] { display: none; }
.quick-range-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 7px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}
.quick-range-item:hover { background: var(--indigo-soft); }
.quick-range-item.on { color: var(--indigo-deep); font-weight: 600; }
.quick-range-item.on::after {
    content: "00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 10px;
}
.quick-range-sep { height: 1px; background: var(--line-soft); margin: 5px 6px; }

@media (max-width: 700px) {
    .quick-range-btn .quick-range-label { max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
}

/* The time window belongs to Home. Home is the page that reads through it -
   its cards, its lists and its map all move with it - so it is the only page
   that offers it. Analytics and Exceptions answer over the whole book, and a
   control they would then ignore is worse than no control at all. */
.dash-filter-bar[data-filter-mode="analytical"] .date-range-only { display: none !important; }

/* Groups inside the quick-range menu: the window can point either way, so the
   two directions are named rather than left for the reader to infer. */
.quick-range-group {
    padding: 6px 10px 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-3, var(--faint));
}

.shipment-filter-bar-scroll .dash-date-range { gap: 0.5rem; }

/* ============================================================
   PORT DRILL-THROUGH panel
   Opened by clicking any port on the home map: a table of the shipments due
   through that port inside the rolling window. Lives here rather than in
   map.css because it reuses .chip, .ui-tabs and .ui-tbl, which this sheet
   defines.
   ============================================================ */

/* Wider than the other panels - it carries a ten-column table. */
.side-panel.port-drill { max-width: 1120px; }
.port-drill .side-panel-body { display: flex; flex-direction: column; gap: 0.85rem; }

.pd-sub {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pd-sub > span + span::before {
    content: "·";
    margin-right: 0.5rem;
    color: var(--faint);
}

.pd-sub .pd-code {
    font-family: var(--font-code);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--indigo-deep);
    background: var(--indigo-soft);
    border: 1px solid var(--indigo-line);
    border-radius: 6px;
    padding: 1px 6px;
}

.pd-sub .pd-code + span::before { content: none; margin-right: 0; }

.pd-tabs { align-self: flex-start; }

.pd-list .table-wrap {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

/* Tighter than the page tables: ten columns have to sit inside a panel. */
.pd-tbl th, .pd-tbl td { padding: 9px 8px; }
.pd-tbl td { vertical-align: top; }
.pd-tbl .sub { white-space: nowrap; }
.pd-dash { color: var(--faint); }

/* Free-text columns wrap instead of stretching the table off-screen. */
.pd-tbl .pd-wrap {
    min-width: 110px;
    max-width: 150px;
    white-space: normal;
    word-break: break-word;
}

.pd-dir {
    display: inline-flex;
    align-items: center;
    height: 21px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.pd-dir.dep { color: var(--indigo-deep); background: var(--indigo-soft); border: 1px solid var(--indigo-line); }
.pd-dir.arr { color: var(--ok); background: var(--ok-soft); border: 1px solid var(--ok-line); }

.pd-ref { font-family: var(--font-code); font-size: 12.5px; font-weight: 600; color: var(--ink); }

.pd-lane {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.pd-lane b { font-family: var(--font-code); font-weight: 600; color: var(--ink-soft); }

/* The port the panel is about anchors every row, so it is the one token that
   gets highlighted - the other end is what varies. */
.pd-lane b.is-here {
    color: var(--indigo-deep);
    background: var(--indigo-soft);
    border-radius: 5px;
    padding: 0 4px;
}

.pd-lane i { font-size: 11px; color: var(--faint); }
.pd-lane .trk-mode { transform: scale(.85); }

.pd-status { height: 21px; font-size: 11.5px; padding: 0 8px 0 7px; }
.pd-status::before { width: 6px; height: 6px; }

.pd-more { align-self: center; margin-top: 0.6rem; }

.pd-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 2.4rem 1rem;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.5;
    text-align: center;
}

.pd-state i { color: var(--faint); font-size: 1rem; }

.pd-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
    .pd-tbl .pd-wrap { min-width: 120px; max-width: 160px; }
}

/* ==== common components (inditex's report page) ==== */
/* The apps' shared components in this page's markup: dialogs with the filled --brand header, buttons, the avatar and account menu, the toast,
   the confirm / "API requests failed" dialog, and the account dialog (My profile, Login details, User management). Loaded after the sheets above, so these win. */
.hidden{display:none!important}
.modal{background:var(--backdrop);backdrop-filter:none;padding:18px}
.modal-content{border:0;border-radius:var(--radius-lg);box-shadow:var(--shadow-lg);background:var(--surface)}
.modal-header{min-height:58px;padding:11px 18px;gap:10px;background:var(--brand);color:var(--on-brand);border-bottom:1px solid var(--brand)}
.modal-header h3{margin:0;color:var(--on-brand);font-size:16px;line-height:1.2;font-weight:700}
.modal-header .modal-subtitle{margin:2px 0 0;color:rgba(255,255,255,.8);font-size:var(--fs-xs)}
.modal-header .modal-heading-icon{width:32px;height:32px;flex:0 0 32px;border:1px solid var(--on-brand-line);border-radius:var(--radius);background:var(--on-brand-hover);color:var(--on-brand)}
.modal-header .close-modal,.modal-header .side-panel-close{width:32px;height:32px;flex:0 0 32px;border:1px solid var(--on-brand-line);border-radius:var(--radius);background:transparent;color:var(--on-brand)}
.modal-header .close-modal:hover,.modal-header .side-panel-close:hover{background:var(--on-brand-hover);border-color:var(--on-brand-line);color:var(--on-brand)}
.modal-header .modal-refresh-btn{min-height:32px;border-color:var(--on-brand-line);border-radius:var(--radius);background:transparent;color:var(--on-brand)}
.modal-header .modal-refresh-btn:hover{background:var(--on-brand-hover);border-color:var(--on-brand-line)}
.modal-body{padding:var(--dialog-pad)}
.modal-footer{gap:8px;padding:14px 20px;background:var(--surface);border-top:1px solid var(--line)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:var(--btn-h);padding:var(--btn-pad);border:1px solid transparent;border-radius:var(--radius);white-space:nowrap;font-size:var(--fs);font-weight:600}
.btn-sm{min-height:var(--btn-sm-h);padding:0 10px;font-size:var(--fs-sm)}
.btn-primary{background:var(--brand);border-color:var(--brand);color:var(--on-brand)}
.btn-primary:hover:not(:disabled){background:var(--brand-hover);border-color:var(--brand-hover)}
.btn-secondary{background:var(--surface);border-color:var(--line-strong);color:var(--ink)}
.btn-secondary:hover:not(:disabled){background:var(--surface-2);border-color:var(--line-strong);color:var(--ink)}
.btn-danger{background:var(--danger);border-color:var(--danger);color:#fff}
.btn-danger:hover:not(:disabled){background:#a51f1f;border-color:#a51f1f}
.input{width:100%;height:var(--control-h);border:1px solid var(--line-strong);border-radius:var(--radius);background-color:var(--surface);color:var(--ink);padding:var(--control-pad);font:inherit;font-size:var(--fs);outline:none;box-sizing:border-box}
.input:focus{border-color:var(--brand);box-shadow:var(--ring)}
select.input{-webkit-appearance:none;appearance:none;padding-right:32px;background:var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='M3 5l4 4 4-4' fill='none' stroke='%235f6b7a' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center/14px}
.field{display:grid;gap:6px;margin-bottom:14px}
.field label{font-size:var(--fs-xs);font-weight:700;color:var(--muted)}

/* header: the avatar and the account menu (My profile, Login details, User management, Sync, Logout) */
.avatar,.pm-avatar{display:grid;place-items:center;width:var(--avatar);height:var(--avatar);border-radius:50%;background:var(--brand);color:var(--on-brand);font-size:13px;font-weight:700}
.pm-avatar{width:32px;height:32px;font-size:12px}
.profile-menu{min-width:220px;padding:6px;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-lg)}
.profile-menu-header{padding:8px 11px 10px;margin-bottom:4px;border-bottom:1px solid var(--line)}
.profile-menu button{display:flex;align-items:center;gap:9px;height:36px;padding:0 18px 0 11px;border-radius:var(--radius);color:var(--ink);font-size:var(--fs)}
.profile-menu button[hidden]{display:none}
.profile-menu button:hover{background:var(--surface-2)}
.profile-menu button.danger{color:var(--danger)}
.profile-menu button.danger:hover{background:var(--danger-soft)}

/* toast: bottom right (centred on a phone), the theme's dark toast */
.app-toast{background:var(--toast-bg);border-radius:10px;box-shadow:var(--shadow-lg);font-size:var(--fs);font-weight:500}
.app-toast.error{background:#8f3030}
.app-toast.success i{color:#7fd6a2}
.app-toast.info i{color:var(--brand-line)}
@media(max-width:760px){.app-toast-container{left:50%;right:auto;transform:translateX(-50%)}}

/* confirm and API errors (#app-message-modal) */
#app-message-modal{z-index:1200}
#app-message-modal .modal-content{width:min(460px,100%)}
#app-message-modal.api-error-modal .modal-content{width:min(740px,100%)}
#app-message-modal .logout-confirmation p{margin:0;color:var(--muted);white-space:pre-line}
.api-error-table{width:100%;margin-top:14px;table-layout:fixed;border-collapse:separate;border-spacing:0;border:1px solid var(--line);border-radius:6px;overflow:hidden;font-size:12px}
.logout-confirmation.hidden+.api-error-table{margin-top:0}
.api-error-table th,.api-error-table td{padding:12px 16px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}
.api-error-table th{background:var(--surface-2);font-weight:700}
.api-error-table th+th,.api-error-table td+td{border-left:1px solid var(--line)}
.api-error-table tbody tr:last-child td{border-bottom:0}
.api-error-table th:first-child,.api-error-table td:first-child{width:56px;text-align:center}
.api-error-table th:nth-child(3),.api-error-table td:nth-child(3){width:220px;overflow-wrap:anywhere}
.api-path-button{display:block;width:100%;border:0;padding:0;background:transparent;color:var(--brand-ink);font:inherit;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
.api-path-button:hover{text-decoration:underline}
.api-path-button.expanded{white-space:normal;overflow-wrap:anywhere}

/* account dialog: My profile, Login details, User management */
#account-modal .modal-content.account-modal{width:min(520px,100%)}
#account-modal .modal-content.account-modal.users-modal{width:min(1040px,100%)}
#account-modal .modal-footer .btn:first-child:not(:last-child){margin-right:auto}
.form-error{margin:12px 0 0;color:var(--danger);font-size:var(--fs)}
.field-help{margin:0 0 4px;color:var(--muted);font-size:var(--fs-sm)}
.account-form .field{margin-bottom:12px}
.kv-list{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface-2);font-size:var(--fs)}
.kv-row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:42px;padding:6px 12px;border-top:1px solid var(--line)}
.kv-row:first-child{border-top:0}
.kv-label{display:flex;flex:none;align-items:center;gap:8px;color:var(--muted);font-size:var(--fs-sm);font-weight:600}
.kv-label svg,.kv-btn svg,.users-menu svg,.search-box svg,.pager-btn svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.kv-label svg{flex:none;width:16px;height:16px}
.kv-value{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;color:var(--ink);text-align:right;overflow-wrap:anywhere}
.kv-value:has(.kv-input){flex:1 1 auto}
.kv-input{width:100%;max-width:260px;height:var(--control-h);margin:0;padding:0 10px;border:1px solid var(--line-strong);border-radius:var(--radius);background:var(--surface);color:var(--ink);font:inherit;font-size:var(--fs);text-align:left;outline:0;box-sizing:border-box}
textarea.kv-input{height:auto;padding:8px 10px;resize:vertical}
.kv-input:focus{border-color:var(--brand);box-shadow:var(--ring)}
.kv-btn{display:grid;place-items:center;width:28px;height:28px;padding:0;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--brand-ink);cursor:pointer}
.kv-btn:hover{background:var(--brand-soft)}
.kv-btn svg{width:14px;height:14px}
.kv-secret{letter-spacing:2px}
.users-manage{position:relative}
.users-tools{display:flex;gap:8px;margin-bottom:12px}
.users-tools .search-box{flex:1}
.users-tools .users-status-filter{flex:0 0 120px;width:120px}
.users-tools .users-refresh{flex:none;width:var(--btn-h);padding:0}
.users-table-wrap{height:min(440px,55vh);overflow:auto;border:1px solid var(--line);border-radius:var(--radius)}
.users-table-wrap[aria-busy="true"] tbody{opacity:.55}
.users-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:var(--fs-sm)}
.users-table th,.users-table td{padding:var(--cell-pad);text-align:left;white-space:nowrap;border-bottom:1px solid var(--line)}
.users-table td{overflow:hidden;text-overflow:ellipsis}
.users-table td.is-open{white-space:normal;overflow-wrap:anywhere}
.users-table td.is-cut{cursor:pointer}
.users-table th{position:sticky;top:0;z-index:1;background:var(--brand-tint);color:var(--ink);font-weight:600}
.users-table th:nth-child(1){width:96px}.users-table th:nth-child(2){width:64px}.users-table th:nth-child(4){width:24%}.users-table th:nth-child(5){width:110px}.users-table th:nth-child(6){width:12%}.users-table th:nth-child(7){width:84px}.users-table th:nth-child(8){width:64px}
.users-table tbody tr:last-child td{border-bottom:0}
.users-table .users-note{text-align:center;color:var(--muted)}
.users-table .users-note.error{color:var(--danger)}
.users-status{display:inline-block;padding:1px 8px;border-radius:999px;font-size:var(--fs-sm);font-weight:600}
.users-status.is-active{background:var(--success-soft);color:var(--success)}
.users-status.is-inactive{background:var(--surface-2);color:var(--muted)}
.users-table td.users-row-action{padding-top:0;padding-bottom:0;text-align:center}
.users-table .users-action{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;padding:0;border:0;border-radius:var(--radius);background:transparent;color:var(--muted);cursor:pointer}
.users-table .users-action[aria-expanded="true"],.users-table .users-action:hover{background:var(--surface-2);color:var(--ink)}
.users-table .users-action svg{width:16px;height:16px;fill:currentColor;stroke:none}
.users-menu{position:absolute;z-index:5;width:max-content;min-width:180px;padding:6px;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow-lg)}
.users-menu .menu-item{display:flex;align-items:center;gap:9px;width:100%;height:36px;padding:0 18px 0 11px;border:0;border-radius:var(--radius);background:transparent;color:var(--ink);font:inherit;font-size:var(--fs);text-align:left;white-space:nowrap;cursor:pointer}
.users-menu .menu-item svg{width:17px;height:17px;flex:none}
.users-menu .menu-item:hover{background:var(--surface-2)}
.users-menu .menu-item.danger-text{color:var(--danger)}
.users-menu .menu-item.danger-text:hover{background:var(--danger-soft)}
.users-pager{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:12px}
.pager-btn{width:36px;height:36px;display:grid;place-items:center;padding:0;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:10px;cursor:pointer}
.pager-btn svg{width:16px;height:16px;stroke-width:2}
.pager-btn:hover:not(:disabled){background:var(--surface-2);border-color:var(--line-strong)}
.pager-btn:disabled{background:var(--bg);color:var(--line-strong);cursor:not-allowed}
.page-label{min-width:54px;text-align:center;font-weight:600;font-size:12px}
.clear-filters,.clear-filters:hover:not(:disabled){flex:none;border-color:var(--danger);background:var(--danger-soft);color:var(--danger);padding:0 12px}
.clear-filters:disabled{border-color:var(--line);background:var(--bg);color:var(--faint);opacity:1;cursor:not-allowed}
/* the search box, the same in every app (select.search-field + input.search-input + × + →) */
.search-box{display:flex;align-items:center;width:100%;min-width:0;height:var(--control-h);border:1px solid var(--line-strong);border-radius:var(--radius);background:var(--surface);box-sizing:border-box}
.search-box:focus-within{border-color:var(--brand);box-shadow:var(--ring)}
.search-box select.search-field{flex:none;width:auto;max-width:45%;height:100%;margin:0;padding:0 22px 0 10px;border:0;border-right:1px solid var(--line);border-radius:var(--radius) 0 0 var(--radius);appearance:none;-webkit-appearance:none;background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 14 14'%3E%3Cpath d='M3 5l4 4 4-4' fill='none' stroke='%235f6b7a' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 7px center;color:var(--muted);font:inherit;font-size:var(--fs-sm);font-weight:600;outline:none;cursor:pointer}
.search-box input.search-input{flex:1;width:0;min-width:0;height:100%;margin:0;padding:0 8px;border:0;background:transparent;color:var(--ink);font:inherit;font-size:var(--fs);outline:none}
.search-box .search-submit{display:grid;flex:none;place-items:center;width:30px;height:28px;margin:0 3px 0 0;padding:0;border:0;border-radius:6px;background:transparent;color:var(--brand-ink);cursor:pointer}
.search-box .search-submit:hover{background:var(--brand-soft)}
.search-box .search-submit svg{width:16px;height:16px;stroke-width:2}
.search-box .search-clear{display:grid;flex:none;place-items:center;width:26px;height:26px;padding:0;border:0;border-radius:6px;background:transparent;color:var(--muted);cursor:pointer}
.search-box .search-clear:hover{background:var(--surface-2);color:var(--ink)}
.search-box .search-clear svg{width:14px;height:14px;stroke-width:2}
.search-box input:placeholder-shown+.search-clear,.search-box input:placeholder-shown~.search-submit{display:none!important}
@media(max-width:760px){.users-tools{flex-wrap:wrap}.users-tools .search-box{flex:1 0 100%}.modal{padding:8px}}

/* header as inditex's: a white bar with a line under it; buttons 36px with the 8px radius */
.top-bar{background:var(--surface);backdrop-filter:none;-webkit-backdrop-filter:none;border-bottom:1px solid var(--line)}
.topbar-iconbtn{width:var(--btn-h);height:var(--btn-h);border-radius:var(--radius);border-color:var(--line);background:var(--surface);color:var(--ink)}
.topbar-iconbtn:hover{background:var(--surface-2);border-color:var(--line)}
.topbar-ask-btn{height:var(--btn-h);border-radius:var(--radius);box-shadow:none;background:var(--brand);border-color:var(--brand)}
.topbar-ask-btn:hover{background:var(--brand-hover);border-color:var(--brand-hover)}
.topbar-search input{border-radius:var(--radius)}

/* ==== amazon's page look: the deep navy sidebar and the avatar-only account button ====
   The rail is TradeLane's deep navy in both themes (amazon's --nav-* colours); the active tab a lighter navy pill with a thin white outline;
   the brand is a navy square mark then the name. The header's account button is just the round avatar, its menu opens with the name and the role on top. */
:root {
    --nav-bg: #0b1629;
    --nav-text: #a8b3c7;
    --nav-text-active: #fff;
    --nav-hover: #13213a;
    --nav-active: #1a2b4a;
    --nav-active-line: rgba(255, 255, 255, .85);
    --nav-line: rgba(255, 255, 255, .08);
    --sidebar-bg: var(--nav-bg);
    --sidebar-text: var(--nav-text);
    --sidebar-text-active: var(--nav-text-active);
    --sidebar-active-bg: var(--nav-active);
    --navy-ink: #8b96ab;
}
:root[data-theme="dark"] {
    --nav-bg: #070f1f;
    --nav-hover: #111d33;
    --nav-active: #1a2b4a;
    --nav-line: rgba(255, 255, 255, .06);
}
.sidebar { background: var(--nav-bg); color: var(--nav-text); border-right: 0; }
.sidebar::before { content: none; }
.sidebar .logo { border-bottom-color: var(--nav-line); }
.sidebar .logo-brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--nav-text-active); text-decoration: none; }
.sidebar .logo h2 { color: var(--nav-text-active); font-size: 1.05rem; font-weight: 700; }
.sidebar .logo .logo-by { color: var(--navy-ink); font-size: 9px; }
.sidebar .mark { width: 32px; height: 32px; display: grid; place-items: center; flex: none; border-radius: var(--radius); background: var(--brand); color: var(--on-brand); font-size: 16px; font-weight: 700; letter-spacing: 0; }
.sidebar .logo-short.mark { display: none; }
.sidebar-toggle-btn { color: var(--nav-text); }
.sidebar-toggle-btn:hover { color: var(--nav-text-active); background: var(--nav-hover); }
.nav-menu { padding: 12px 0; gap: 4px; }
.nav-item { margin: 0 10px; height: 40px; padding: 0 13px; border-radius: 6px; color: var(--nav-text); font-size: 13.5px; font-weight: 500; }
.nav-item i { width: 18px; font-size: 15px; }
.nav-item:hover { color: var(--nav-text-active); background: var(--nav-hover); }
.nav-item.active { color: var(--nav-text-active); background: var(--nav-active); box-shadow: inset 0 0 0 1px var(--nav-active-line); border-left: 0; font-weight: 600; }
.nav-item.active::before { content: none; }
.nav-section-label { padding: 14px 23px 4px; color: #6b7689; }
.rail-foot { border-top-color: var(--nav-line); }
.rail-foot .rf-scope { color: var(--navy-ink); }
@media (min-width: 901px) {
    .sidebar.collapsed .logo-brand { display: none; }
    .sidebar.collapsed .logo-short.mark { display: grid; }
    .sidebar.collapsed .nav-item { margin: 0 10px; padding: 0; justify-content: center; }
}
.user-profile-btn { padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: none; }
.user-profile-btn:hover { background: none; border-color: transparent; box-shadow: none; }
.user-profile-btn .avatar { width: var(--avatar); height: var(--avatar); border-radius: 50%; background: var(--brand); color: var(--on-brand); font-size: 13px; }
.user-profile-btn:hover .avatar, .user-profile-btn[aria-expanded="true"] .avatar { background: var(--brand-hover); }
.user-profile-btn:focus-visible { outline: none; box-shadow: var(--ring); }
.profile-menu-header { display: block; }
.pm-name { font-weight: 700; color: var(--ink); }
.pm-role { color: var(--muted); font-size: var(--fs-xs); }
