/* ============================================================================
   LogisticEase — "Graphite + Cobalt" design system
   Technical freight theme: graphite command shell, frost-white canvas,
   cobalt signal accents, Bricolage Grotesque / Instrument Sans / Spline Sans Mono.
   ========================================================================== */

:root {
    /* Graphite shell */
    --le-graphite-950: #101216;
    --le-graphite-900: #15181D;
    --le-graphite-800: #1C2027;
    --le-graphite-700: #272D36;
    --le-canvas: #F7F9FB;
    --le-surface: #FFFFFF;
    --le-surface-2: #FBFCFD;
    --le-surface-raised: #FFFFFF;
    --le-surface-subtle: #F3F6FA;
    --le-surface-inset: #EEF2F7;
    --le-line: #E3E7ED;
    --le-line-soft: #EDF0F4;
    --le-line-strong: #CBD2DC;
    --le-row-line: #F0F2F5;
    --le-text: #20252D;
    --le-text-2: #596575;
    --le-text-3: #687587;
    --le-cobalt: #3158D4;
    --le-cobalt-deep: #2442A5;
    --le-cobalt-text: #2442A5;
    --le-cobalt-ink: #F8FAFF;
    --le-cobalt-soft: #E9EEFF;
    --le-blue: #3158D4;
    --le-teal: #367B9A;
    --le-green: #22774A;
    --le-red: #B3261E;
    --le-violet: #7268B8;
    --le-orange: #B04A12;
    --le-shadow-sm: 0 1px 2px rgba(32, 37, 45, 0.06);
    --le-shadow-md: 0 8px 20px -8px rgba(32, 37, 45, 0.16);
    --le-shadow-lg: 0 18px 48px -12px rgba(32, 37, 45, 0.22);
    --le-focus-ring: 0 0 0 3px rgba(49, 88, 212, 0.22);
    --le-radius: 10px;
    --le-radius-lg: 14px;
    --le-font: 'Instrument Sans', 'Noto Sans Myanmar', 'Noto Sans Thai', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --le-mono: 'Spline Sans Mono', 'Cascadia Mono', 'Consolas', monospace;
    --le-display: 'Bricolage Grotesque', 'Noto Sans Myanmar', 'Noto Sans Thai', 'Segoe UI', sans-serif;
}

/* ----------------------------------------------------------------- base --- */

html, body {
    font-family: var(--le-font);
    background: var(--le-canvas);
    color: var(--le-text);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection { background: rgba(49, 88, 212, 0.32); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: #CBD2DC;
    border-radius: 8px;
    border: 2px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: #9AA6B6; background-clip: content-box; border: 2px solid transparent; }

h1:focus { outline: none; }

/* Typography overrides on MudBlazor typo classes (font ships via index.html). */
.mud-typography,
.mud-typography-body1, .mud-typography-body2 { font-family: var(--le-font); }
.mud-typography-h1, .mud-typography-h2, .mud-typography-h3, .mud-typography-h4, .mud-typography-h5, .mud-typography-h6 { font-family: var(--le-display); }
.mud-typography-h1 { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; }
.mud-typography-h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.015em; }
.mud-typography-h3 { font-size: 1.2rem;  font-weight: 700; letter-spacing: -0.01em; }
.mud-typography-h4 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
.mud-typography-h5 { font-size: 0.95rem; font-weight: 700; }
.mud-typography-h6 { font-size: 0.875rem; font-weight: 700; }
.mud-typography-subtitle1 { font-weight: 600; }
.mud-typography-caption { color: var(--le-text-3); }

.le-mono { font-family: var(--le-mono); font-variant-numeric: tabular-nums; }

/* Animations */
@keyframes le-rise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: none; }
}
@keyframes le-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
@keyframes le-slide {
    0%   { transform: translateX(-110%); }
    100% { transform: translateX(360%); }
}
@keyframes le-dash {
    to { stroke-dashoffset: -220; }
}
@keyframes le-pulse-soft {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.55; }
}

.le-fade { animation: le-rise 0.4s cubic-bezier(0.2, 0.7, 0.3, 1) both; }

/* ------------------------------------------------ workspace control --- */

.le-page-eyebrow { color: var(--le-cobalt-text); font: 700 0.68rem/1 var(--le-mono); letter-spacing: 0.11em; text-transform: uppercase; margin-bottom: 0.48rem; }
.le-tenant-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 1.25rem 0; overflow: hidden; border: 1px solid var(--le-line); border-radius: var(--le-radius-lg); background: var(--le-line); }
.le-tenant-kpi { display: flex; flex-direction: column; gap: 0.24rem; min-height: 88px; padding: 1rem 1.1rem; background: var(--le-surface); color: var(--le-text-2); font-size: 0.76rem; }
.le-tenant-kpi-num { color: var(--le-text); font: 700 1.42rem/1 var(--le-display); letter-spacing: -0.035em; }
.le-section-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.le-section-title { margin: 0; font: 700 1rem/1.2 var(--le-display); }
.le-section-sub { margin: 0.3rem 0 0; color: var(--le-text-2); font-size: 0.8rem; }
.le-tenant-name { font-weight: 700; color: var(--le-text); }
.le-tenant-slug { margin-top: 0.18rem; color: var(--le-text-3); font-size: 0.68rem; }
.le-request-list { display: grid; gap: 0.4rem; }
.le-request-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.72rem 0.15rem; border-bottom: 1px solid var(--le-line-soft); }
.le-request-row:last-child { border-bottom: 0; }
.le-request-mark { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 8px; color: var(--le-cobalt-text); background: var(--le-cobalt-soft); }
.le-request-main { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 0.08rem; }
.le-request-main strong { font-size: 0.85rem; }
.le-request-main span, .le-request-main small { color: var(--le-text-2); font-size: 0.73rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.le-request-actions { display: inline-flex; align-items: center; gap: 0.35rem; }
.le-empty-state { padding: 1.35rem 0.1rem; color: var(--le-text-2); font-size: 0.84rem; }
@media (max-width: 720px) { .le-tenant-kpis { grid-template-columns: 1fr; } .le-tenant-kpi { min-height: 62px; } .le-request-row { align-items: flex-start; } .le-request-actions { flex-direction: column; align-items: flex-end; } }

/* --------------------------------------------------- SaaS plan signal --- */

/* Compact plan/usage readout: an operational signal in the shell, not a billing card. */
.le-plan-signal {
    display: inline-flex;
    align-items: baseline;
    gap: 0.38rem;
    margin-right: 0.55rem;
    padding: 0.31rem 0.52rem 0.31rem 0.62rem;
    border: 1px solid var(--le-line-strong);
    border-radius: 999px;
    background: var(--le-surface-subtle);
    color: var(--le-text);
    font-family: var(--le-mono);
    font-size: 0.67rem;
    letter-spacing: 0.02em;
    line-height: 1;
    white-space: nowrap;
}
.le-plan-signal-name { color: var(--le-cobalt-text); font-weight: 700; }
.le-plan-signal-usage { color: var(--le-text-2); }
@media (max-width: 720px) {
    .le-plan-signal { margin-right: 0.2rem; padding: 0.28rem 0.45rem; }
    .le-plan-signal-usage { display: none; }
}

/* --------------------------------------------------------- error / splash -- */

#blazor-error-ui {
    color-scheme: light only;
    background: #F0F3F7;
    border-top: 2px solid var(--le-cobalt);
    bottom: 0;
    box-shadow: 0 -6px 24px rgba(32, 36, 43, 0.15);
    display: none;
    left: 0;
    padding: 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-size: 0.875rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.38rem;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 1.25rem;
    line-height: 1;
    min-width: 32px;
    min-height: 32px;
}

/* Boot splash: brand mark over the ink shell so first paint matches the app. */
.splash {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(1200px 500px at 15% -10%, rgba(49, 88, 212, 0.07), transparent 60%),
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        var(--le-graphite-800);
    background-size: auto, 44px 44px, 44px 44px, auto;
}
.splash-inner { text-align: center; }
.splash-logo {
    width: 60px; height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, #8FA8FF, var(--le-cobalt) 55%, #1D348B);
    color: var(--le-cobalt-ink);
    display: grid; place-items: center;
    margin: 0 auto;
    box-shadow: 0 12px 32px -8px rgba(49, 88, 212, 0.45);
    animation: le-float 3.2s ease-in-out infinite;
}
.splash-name {
    margin-top: 16px;
    color: #E5EAF3;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}
.splash-bar {
    width: 170px; height: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.12);
    margin: 18px auto 0;
    overflow: hidden;
}
.splash-bar::after {
    content: "";
    display: block; height: 100%; width: 42%;
    background: var(--le-cobalt);
    border-radius: 3px;
    animation: le-slide 1.1s ease-in-out infinite;
}

/* ------------------------------------------------------------ app shell --- */

.le-appbar {
    background: linear-gradient(180deg, #1C2027 0%, var(--le-graphite-800) 100%) !important;
    color: #E5EAF3 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 1px 0 rgba(49, 88, 212, 0.06), 0 6px 24px -12px rgba(16, 18, 22, 0.55);
    gap: 6px;
}

.le-brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.le-brand-mark {
    width: 34px; height: 34px; flex: none;
    border-radius: 9px;
    background: linear-gradient(135deg, #8FA8FF, var(--le-cobalt) 55%, #1D348B);
    color: var(--le-cobalt-ink);
    display: grid; place-items: center;
    box-shadow: 0 4px 14px -4px rgba(49, 88, 212, 0.55);
}
.le-brand-name {
    color: #F4F7FC;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.le-brand-name small {
    display: block;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #7C8A9C;
    margin-top: -2px;
}

.le-user-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 10px 4px 4px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: inherit;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.14s;
}
.le-user-btn:hover { background: rgba(255, 255, 255, 0.08); }
.le-avatar {
    width: 33px; height: 33px; flex: none;
    border-radius: 9px;
    background: linear-gradient(135deg, #8FA8FF, #2E4CB1);
    color: var(--le-cobalt-ink);
    font-weight: 700; font-size: 0.78rem;
    display: grid; place-items: center;
    letter-spacing: 0.02em;
    user-select: none;
}
.le-avatar.ink { background: #272D36; color: #D8E0EB; }
.le-user-name { color: #E4E9F0; font-weight: 600; font-size: 0.87rem; line-height: 1.2; white-space: nowrap; }
.le-user-role { color: #7C8A9C; font-size: 0.72rem; white-space: nowrap; }
.le-user-caret { color: #7C8A9C; }

/* Account menu popover content */
.le-menu-head { padding: 14px 18px 12px; border-bottom: 1px solid var(--le-row-line); }
.le-menu-name { font-weight: 700; font-size: 0.9rem; color: var(--le-text); }
.le-menu-email { color: var(--le-text-2); font-size: 0.78rem; margin-top: 1px; overflow-wrap: anywhere; }

/* Global appbar search */
.le-appbar-search {
    display: flex; align-items: center; gap: 9px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 3px 12px;
    width: 400px;
    max-width: 38vw;
    margin-left: 22px;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.le-appbar-search:focus-within {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(49, 88, 212, 0.55);
    box-shadow: 0 0 0 3px rgba(49, 88, 212, 0.14);
}
.le-appbar-search .mud-icon-root { color: #7C8A9C; }
/* Mud appends .mud-input .mud-input-root (dark text, 16px/600) as a runtime <style>
   after this sheet, so the extra .mud-input class is required to win the cascade. */
.le-appbar-search .mud-input .mud-input-root { color: #E5EAF3; font-size: 0.88rem; font-weight: 400; }
.le-appbar-search .mud-input .mud-input-root::placeholder { color: #7C8A9C; opacity: 1; }
.le-appbar-search .mud-input-underline::before,
.le-appbar-search .mud-input-underline:hover::before,
.le-appbar-search .mud-input-underline::after { display: none; }

.le-search-kbd {
    font-family: var(--le-font);
    font-size: 0.66rem; font-weight: 600;
    color: #93A1B4;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    padding: 2px 7px;
    white-space: nowrap;
}

/* Mobile: search collapses to an icon; brand text hides on the narrowest screens */
.le-search-toggle { display: none !important; }
@media (max-width: 879.95px) {
    .le-appbar-search { display: none; }
    .le-search-toggle { display: inline-flex !important; }
    .le-appbar-search.mobile-open { display: flex; width: 100%; max-width: none; margin-left: 8px; }
}
@media (max-width: 519.95px) {
    .le-brand-name { display: none; }
}

/* Search results dropdown, anchored under the app bar */
.le-search-pop {
    position: absolute;
    top: calc(100% + 10px);
    right: 12px;
    width: min(560px, calc(100% - 24px));
    background: var(--le-surface);
    border: 1px solid var(--le-line);
    border-radius: 12px;
    box-shadow: var(--le-shadow-lg);
    overflow: hidden;
    animation: le-rise 0.18s both;
}
.le-search-message {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 64px;
    padding: 14px 18px;
    color: var(--le-text-2);
    font-size: 0.84rem;
}
.le-search-message.error { color: var(--le-red); }
.le-search-message .mud-button-root { margin-left: auto; }

.le-drawer {
    background: linear-gradient(180deg, #15181D 0%, #101216 100%) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.07) !important;
}
.le-drawer-scroll { overflow-y: auto; height: 100%; display: flex; flex-direction: column; }
.le-drawer-body { flex: 1; padding-top: 10px; }
.le-drawer-footer {
    padding: 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: #7C8A9C;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
}

/* Nav groups & items */
.le-nav-section {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #5D7395;
    padding: 20px 22px 6px;
}
.le-nav .mud-nav-link {
    color: #AAB6C7;
    border-radius: 10px;
    margin: 2px 12px;
    min-height: 42px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.14s, color 0.14s;
}
.le-nav .mud-nav-link .mud-icon-root { color: inherit; }
.le-nav .mud-nav-link:hover { background: rgba(255, 255, 255, 0.055); color: #FFFFFF; }
/* Selected item: solid cobalt pill with white text — far more legible on the graphite
   drawer than Mud's primary-tinted active link. MudBlazor ships
   `.mud-navmenu.mud-navmenu-primary .mud-nav-link.active:not(.mud-nav-link-disabled)`
   at (0,5,0); `.le-nav` is the navmenu element itself, so the compound selector below
   matches today's DOM and wins the cascade via source order. */
.le-nav.mud-navmenu .mud-nav-link.active:not(.mud-nav-link-disabled),
.le-nav .mud-navmenu .mud-nav-link.active:not(.mud-nav-link-disabled) {
    background: var(--le-cobalt);
    color: #FFFFFF;
    font-weight: 600 !important;
    position: relative;
}
.le-nav.mud-navmenu .mud-nav-link.active:not(.mud-nav-link-disabled):hover {
    background: var(--le-cobalt-deep);
    color: #FFFFFF;
}
.le-nav.mud-navmenu .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-icon,
.le-nav.mud-navmenu .mud-nav-link.active:not(.mud-nav-link-disabled) .mud-icon-root {
    color: #FFFFFF;
}
.le-nav .mud-nav-link.active::before {
    content: "";
    position: absolute;
    left: -12px; top: 7px; bottom: 7px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #FFFFFF;
}

/* Collapsed navigation rail (MudBlazor mini drawer): labels stay in the accessibility
   tree but are visually clipped; icons stay visible and centered. */
.le-drawer.mud-drawer--closed .le-nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.le-drawer.mud-drawer--closed .le-nav-section {
    padding: 0;
    margin: 12px 16px;
    height: 1px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.le-drawer.mud-drawer--closed .le-nav .mud-nav-link {
    padding-inline: 0;
    justify-content: center;
}
.le-drawer.mud-drawer--closed .le-nav .mud-nav-link .mud-nav-link-text {
    width: auto;
    margin: 0;
}
.le-drawer.mud-drawer--closed .le-drawer-footer {
    padding: 12px 0;
}

/* Padding-top must clear the fixed app bar (Mud's own offset) before adding page spacing. */
.le-main {
    background: var(--le-canvas);
    padding: calc(var(--mud-appbar-height, 64px) + 26px) 32px 56px;
    min-height: calc(100vh - var(--mud-appbar-height, 64px));
}
.le-main-inner { max-width: 1380px; margin: 0 auto; }

@media (max-width: 600px) {
    .le-main { padding: calc(var(--mud-appbar-height, 64px) + 18px) 16px 48px; }
}

/* ------------------------------------------------------------ page head --- */

.le-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.le-page-title { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.015em; margin: 0; color: var(--le-text); }
.le-page-sub { margin: 3px 0 0; color: var(--le-text-2); font-size: 0.875rem; }
.le-page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Mud ships its color utilities with !important (mud-primary-text), which silently beats
   every normal rule including inline styles. Amber #3158D4 on white is only 2:1 contrast,
   so MudLinks get the AA-checked darker amber instead. */
.mud-link.mud-primary-text { color: var(--le-cobalt-text) !important; }

.mud-link.le-back {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--le-text-2) !important; font-size: 0.83rem; font-weight: 600;
    text-decoration: none; margin-bottom: 10px;
    transition: color 0.14s;
}
.mud-link.le-back:hover { color: var(--le-cobalt-deep) !important; }

/* ---------------------------------------------------------------- cards --- */

.le-card {
    background: var(--le-surface);
    border: 1px solid var(--le-line);
    border-radius: var(--le-radius-lg);
    box-shadow: var(--le-shadow-sm);
}
.le-card-pad { padding: 20px 22px; }
.le-card-title { font-size: 0.95rem; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 14px; }
.le-card-title .mud-icon-root { color: var(--le-text-3); margin-right: 6px; vertical-align: -3px; }

/* Status chips: color + text together, never color alone (accessibility NFR). */
.status-chip {
    display: inline-flex; align-items: center; gap: 7px;
    border-radius: 999px;
    padding: 3px 11px 3px 9px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    border: 1px solid transparent;
    font-family: var(--le-font);
}
.status-chip::before {
    content: "";
    width: 7px; height: 7px; flex: none;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}
.status-chip.created          { color: #536171; background: #E9F0F1; border-color: #D7E3E5; }
.status-chip.scheduled        { color: #7268B8; background: #EFEAF4; border-color: #DFD7EC; }
.status-chip.pickedup         { color: #0F6E7A; background: #E2F1F3; border-color: #CFE6E9; }
.status-chip.intransit        { color: #3158D4; background: #E8EEF7; border-color: #D5E0EF; }
.status-chip.arrived          { color: #5A49A6; background: #ECEAF6; border-color: #DCD8EF; }
.status-chip.outfor           { color: #B4490F; background: #FCEDE2; border-color: #F7DCC8; }
.status-chip.delivered        { color: #137A4B; background: #E2F5EB; border-color: #CDEBD9; }
.status-chip.cancelled        { color: #667384; background: #ECF1F2; border-color: #DCE5E7; }
.status-chip.delayed          { color: #B3261E; background: #FDECEA; border-color: #F6CDC9; }
.status-chip.ontrack          { color: #137A4B; background: #E2F5EB; border-color: #CDEBD9; }

/* Template stage tones (0-7): the same palette the legacy classes use, addressable
   by the tone stored on each template stage. Reserved system statuses above always win. */
.status-chip.tone-0           { color: #536171; background: #E9F0F1; border-color: #D7E3E5; }
.status-chip.tone-1           { color: #7268B8; background: #EFEAF4; border-color: #DFD7EC; }
.status-chip.tone-2           { color: #0F6E7A; background: #E2F1F3; border-color: #CFE6E9; }
.status-chip.tone-3           { color: #3158D4; background: #E8EEF7; border-color: #D5E0EF; }
.status-chip.tone-4           { color: #5A49A6; background: #ECEAF6; border-color: #DCD8EF; }
.status-chip.tone-5           { color: #B4490F; background: #FCEDE2; border-color: #F7DCC8; }
.status-chip.tone-6           { color: #137A4B; background: #E2F5EB; border-color: #CDEBD9; }
.status-chip.tone-7           { color: #B3261E; background: #FDECEA; border-color: #F6CDC9; }

/* Status template editor: one row per stage with order, fields and a tone picker. */
.le-stage-row {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px dashed var(--le-line);
}
.le-stage-row:last-of-type { border-bottom: none; }
.le-stage-ord {
    flex: none; width: 26px; height: 26px; margin-top: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; background: #E8EDF2; color: var(--le-graphite-700);
    font-family: var(--le-mono); font-size: 0.78rem; font-weight: 600;
}
.le-stage-fields { flex: 1; min-width: 0; }
.le-stage-code {
    font-size: 0.75rem; color: var(--le-text-3);
    background: var(--le-surface-2); border: 1px solid var(--le-line); border-radius: 6px;
    padding: 2px 8px;
}
.le-tone-swatch {
    width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid #FFFFFF; background: var(--swatch);
    box-shadow: 0 0 0 1px var(--le-line-strong); cursor: pointer; padding: 0;
}
.le-tone-swatch.on { box-shadow: 0 0 0 2px var(--le-graphite-700); }
.le-tone-swatch:disabled { opacity: 0.55; cursor: default; }
.le-template-name { font-weight: 700; color: var(--le-text); }

/* Neutral tag (customer name, scan code, org scope…) */
.le-tag {
    display: inline-flex; align-items: center; gap: 6px;
    border-radius: 8px;
    padding: 3px 10px;
    font-size: 0.75rem; font-weight: 600;
    color: var(--le-text-2);
    background: var(--le-surface-2);
    border: 1px solid var(--le-line);
    white-space: nowrap;
}
.le-tag.code { font-family: var(--le-mono); letter-spacing: -0.01em; }

/* ----------------------------------------------------------- stat cards --- */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
    gap: 16px;
}

.dash-columns {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 18px;
    align-items: start;
}
/* Ratio override lives in a class (never inline) so the breakpoint below can stack it. */
.dash-columns.scan-columns { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 1100px) { .dash-columns, .dash-columns.scan-columns { grid-template-columns: 1fr; } }
.dashboard-grid > * { animation: le-rise 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.dashboard-grid > *:nth-child(1) { animation-delay: 0.02s; }
.dashboard-grid > *:nth-child(2) { animation-delay: 0.07s; }
.dashboard-grid > *:nth-child(3) { animation-delay: 0.12s; }
.dashboard-grid > *:nth-child(4) { animation-delay: 0.17s; }
.dashboard-grid > *:nth-child(5) { animation-delay: 0.22s; }
.dashboard-grid > *:nth-child(6) { animation-delay: 0.27s; }

.stat-card {
    display: flex; align-items: center; gap: 14px;
    background: var(--le-surface);
    border: 1px solid var(--le-line);
    border-radius: var(--le-radius-lg);
    padding: 18px;
    box-shadow: var(--le-shadow-sm);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    position: relative;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--le-shadow-md); border-color: var(--le-line-strong); }
.stat-icon {
    width: 46px; height: 46px; flex: none;
    border-radius: 13px;
    display: grid; place-items: center;
}
.stat-value {
    font-size: 1.95rem; font-weight: 700; line-height: 1.05;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.025em;
    color: var(--acc-strong, var(--le-text));
}
.stat-value.is-loading { color: var(--le-text-3); animation: le-pulse-soft 1.4s ease-in-out infinite; }
.stat-label {
    font-size: 0.66rem; color: var(--le-text-3); font-weight: 700;
    letter-spacing: 0.09em; text-transform: uppercase; margin-top: 4px;
}
.stat-arrow {
    margin-left: auto; align-self: flex-start;
    color: var(--le-text-3);
    opacity: 0; transform: translateX(-5px);
    transition: opacity 0.16s, transform 0.16s;
}
.stat-card:hover .stat-arrow { opacity: 1; transform: none; }

.stat-card[data-accent="amber"]  { --acc-strong: #2442A5; } .stat-card[data-accent="amber"]  .stat-icon { background: var(--le-cobalt-soft); color: var(--le-cobalt-deep); }
.stat-card[data-accent="blue"]   { --acc-strong: #3158D4; } .stat-card[data-accent="blue"]   .stat-icon { background: #E8EEF7; color: var(--le-blue); }
.stat-card[data-accent="teal"]   { --acc-strong: #0F6E7A; } .stat-card[data-accent="teal"]   .stat-icon { background: #E2F1F3; color: var(--le-teal); }
.stat-card[data-accent="red"]    { --acc-strong: #B3261E; } .stat-card[data-accent="red"]    .stat-icon { background: #FDECEA; color: var(--le-red); }
.stat-card[data-accent="green"]  { --acc-strong: #137A4B; } .stat-card[data-accent="green"]  .stat-icon { background: #E2F5EB; color: var(--le-green); }
.stat-card[data-accent="violet"] { --acc-strong: #7268B8; } .stat-card[data-accent="violet"] .stat-icon { background: #EFEAF4; color: var(--le-violet); }
.stat-card[data-accent="ink"]    { --acc-strong: #272D36; } .stat-card[data-accent="ink"]    .stat-icon { background: #E8EDF2; color: #272D36; }

/* ---------------------------------------------------------- filter pills --- */

.le-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.le-chip-btn {
    border: 1px solid var(--le-line-strong);
    background: var(--le-surface);
    color: var(--le-text-2);
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 0.83rem;
    font-weight: 600;
    font-family: var(--le-font);
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex; align-items: center; gap: 7px;
}
.le-chip-btn::before {
    content: "";
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--le-line-strong);
    transition: background 0.15s;
}
.le-chip-btn:hover { border-color: var(--le-cobalt); color: var(--le-cobalt-deep); }
.le-chip-btn.on {
    background: var(--le-graphite-800);
    border-color: var(--le-graphite-800);
    color: #FFFFFF;
}
.le-chip-btn.on::before { background: var(--le-cobalt); }
.le-chip-btn.warn:hover { border-color: #E58880; color: var(--le-red); }
.le-chip-btn.warn.on {
    background: #FDECEA;
    border-color: #F0BCB6;
    color: var(--le-red);
}
.le-chip-btn.warn.on::before { background: var(--le-red); }

/* ---------------------------------------------------------------- tables --- */

.le-table-wrap {
    background: var(--le-surface);
    border: 1px solid var(--le-line);
    border-radius: var(--le-radius-lg);
    box-shadow: var(--le-shadow-sm);
    overflow-x: auto;
}
.le-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.le-table th, .le-table td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--le-row-line);
    white-space: nowrap;
    vertical-align: middle;
}
.le-table thead th {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--le-text-3);
    background: var(--le-surface-2);
    border-bottom: 1px solid var(--le-line);
}
/* Sortable column header: inherits the th's uppercase look; the arrow tints when active. */
.le-sort-btn { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; font-size: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; }
.le-sort-btn:hover { color: var(--le-text); }
.le-sort-btn .mud-icon-root { font-size: 0.95rem; color: var(--le-text-3); }
.le-sort-btn.on { color: var(--le-text); }
.le-sort-btn.on .mud-icon-root { color: var(--le-cobalt-deep); }
.le-table tbody tr:last-child td { border-bottom: none; }
.le-table tbody tr { transition: background 0.12s; }
.le-table tbody tr:hover { background: #F7F9FB; }
.le-table tbody tr.rowlink { cursor: pointer; }
.le-table .num { font-family: var(--le-mono); font-weight: 600; letter-spacing: -0.02em; }

.le-route { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.le-route .mud-icon-root { color: var(--le-cobalt-deep); font-size: 1.05em; }

/* Truncating cell content — the compressible columns in an auto-width table; full text via the title tooltip. */
.le-cell-truncate { display: block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.le-route.le-cell-truncate { display: flex; }
.le-route .le-cell-truncate { flex: 0 1 auto; min-width: 0; max-width: 150px; }

/* ------------------------------------------------------------------ feed --- */

.update-feed { display: flex; flex-direction: column; }
.update-row {
    display: flex; gap: 13px; align-items: flex-start;
    padding: 13px 20px;
    border-bottom: 1px solid var(--le-row-line);
    cursor: pointer;
    transition: background 0.12s;
    background: none; border-left: none; border-right: none; border-top: none;
    width: 100%; text-align: left; font-family: inherit;
}
.update-row:last-child { border-bottom: none; }
.update-row:hover { background: #F7F9FB; }
.update-ic {
    width: 35px; height: 35px; flex: none;
    border-radius: 10px;
    display: grid; place-items: center;
    margin-top: 1px;
}
.update-main { flex: 1; min-width: 0; }
.update-title { display: block; font-size: 0.875rem; font-weight: 600; color: var(--le-text); }
.update-title .num { font-family: var(--le-mono); letter-spacing: -0.02em; }
.update-sub { display: block; font-size: 0.78rem; color: var(--le-text-3); margin-top: 1px; }
.update-time { font-family: var(--le-mono); font-size: 0.72rem; color: var(--le-text-3); white-space: nowrap; margin-top: 3px; }

.ic-blue   { background: #E8EEF7; color: var(--le-blue); }
.ic-teal   { background: #E2F1F3; color: var(--le-teal); }
.ic-green  { background: #E2F5EB; color: var(--le-green); }
.ic-red    { background: #FDECEA; color: var(--le-red); }
.ic-violet { background: #EFEAF4; color: var(--le-violet); }
.ic-orange { background: #FCEDE2; color: var(--le-orange); }
.ic-amber  { background: var(--le-cobalt-soft); color: var(--le-cobalt-deep); }
.ic-ink    { background: #E8EDF2; color: #272D36; }

/* ------------------------------------------------------- customer cards --- */

.customer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 18px;
    align-items: stretch;
}
.customer-grid > .customer-card { animation: le-rise 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both; }

.customer-card {
    background: var(--le-surface);
    border: 1px solid var(--le-line);
    border-radius: var(--le-radius-lg);
    box-shadow: var(--le-shadow-sm);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.customer-card:hover { transform: translateY(-3px); box-shadow: var(--le-shadow-md); border-color: var(--le-line-strong); }
.customer-card.is-inactive .customer-name,
.customer-card.is-inactive .customer-rows,
.customer-card.is-inactive .customer-prefs { opacity: 0.62; }

.customer-card-head { display: flex; align-items: flex-start; gap: 14px; }
.customer-avatar {
    width: 46px; height: 46px; flex: none;
    border-radius: 13px;
    display: grid; place-items: center;
    font-weight: 700; font-size: 0.85rem; letter-spacing: 0.02em;
    user-select: none;
}
.customer-name { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; color: var(--le-text); }
.customer-contact-name { font-size: 0.8125rem; font-weight: 600; color: var(--le-text); }
.customer-contact-num { font-family: var(--le-mono); font-size: 0.75rem; color: var(--le-text-2); }

.customer-rows { margin: 14px 0 4px 60px; }
.customer-row {
    display: flex; align-items: center; gap: 9px;
    font-size: 0.84rem; color: var(--le-text-2);
    padding: 3px 0;
    overflow-wrap: anywhere;
}
.customer-row .mud-icon-root { color: var(--le-text-3); font-size: 1.05rem; flex: none; }

.customer-prefs { margin: 10px 0 0 60px; }
.customer-prefs-title {
    font-size: 0.66rem; font-weight: 700;
    letter-spacing: 0.13em; text-transform: uppercase;
    color: var(--le-text-3);
    margin-bottom: 8px;
}
.pref-chip {
    display: inline-flex; align-items: center; gap: 6px;
    border-radius: 999px;
    padding: 2px 10px 2px 8px;
    font-size: 0.72rem; font-weight: 600;
    background: #E2F5EB;
    border: 1px solid #CDEBD9;
    color: #137A4B;
    margin: 0 6px 6px 0;
    white-space: nowrap;
}
.pref-chip::before {
    content: "";
    width: 6px; height: 6px; border-radius: 50%;
    background: currentColor;
}
.pref-chip.off { background: var(--le-surface-2); border-color: var(--le-line); color: var(--le-text-3); }

/* Customers table variants */
.pref-chip.mini { padding: 1px 8px; font-size: 0.68rem; margin: 0; }
.le-table-dim { color: var(--le-text-2); }
.pref-chip.off::before { background: var(--le-line-strong); }

@media (max-width: 600px) {
    .customer-rows, .customer-prefs { margin-left: 0; }
}

/* --------------------------------------------------------- glance panel --- */

.glance-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.glance-label { font-size: 0.83rem; color: var(--le-text-2); font-weight: 500; width: 118px; flex: none; }
.glance-bar { flex: 1; height: 8px; border-radius: 6px; background: #E9F0F1; overflow: hidden; }
.glance-fill { height: 100%; border-radius: 6px; min-width: 2px; transition: width 0.6s cubic-bezier(0.2, 0.7, 0.3, 1); }
.glance-count { font-family: var(--le-mono); font-size: 0.85rem; font-weight: 600; width: 26px; text-align: right; flex: none; }

/* --------------------------------------------------------------- search --- */

.le-search { position: relative; }
.le-search-box {
    display: flex; align-items: center; gap: 10px;
    background: var(--le-surface);
    border: 1px solid var(--le-line-strong);
    border-radius: 12px;
    box-shadow: var(--le-shadow-sm);
    padding: 3px 16px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.le-search-box:focus-within {
    border-color: var(--le-cobalt);
    box-shadow: 0 0 0 3px rgba(49, 88, 212, 0.16), var(--le-shadow-sm);
}
.le-search-box .mud-icon-root { color: var(--le-text-3); }
.le-search-box .mud-input { font-size: 0.95rem; }
.le-search-box .mud-input-underline::before,
.le-search-box .mud-input-underline:hover::before,
.le-search-box .mud-input-underline::after { display: none; }

.le-search-results {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: var(--le-surface);
    border: 1px solid var(--le-line);
    border-radius: 12px;
    box-shadow: var(--le-shadow-lg);
    z-index: 40;
    overflow: hidden;
    animation: le-rise 0.2s both;
}

/* ------------------------------------------------------------ attention --- */

.le-attention {
    display: flex; align-items: center; gap: 14px;
    background: linear-gradient(90deg, #FDF0ED, #FDECEA 40%, #FDECEA);
    border: 1px solid #F6CDC9;
    border-radius: var(--le-radius-lg);
    padding: 14px 18px;
    color: #8C1D18;
}
.le-attention .update-ic { background: #FFFFFF; color: var(--le-red); }

/* ------------------------------------------------------------- timeline --- */

.le-timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.le-timeline-item { position: relative; padding: 0 0 24px 36px; }
.le-timeline-item:last-child { padding-bottom: 2px; }
.le-timeline-item::before {
    content: "";
    position: absolute; left: 9px; top: 20px; bottom: 0;
    width: 2px;
    background: var(--le-line);
    border-radius: 2px;
}
.le-timeline-item:last-child::before { display: none; }
.le-dot {
    position: absolute; left: 2px; top: 3px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--dot, var(--le-blue));
    border: 3px solid #FFFFFF;
    box-shadow: 0 0 0 1px var(--le-line);
}
.le-timeline-item:first-child .le-dot { box-shadow: 0 0 0 1px var(--le-line), 0 0 0 5px color-mix(in srgb, var(--dot, #3158D4) 20%, transparent); }
.le-evt-title { font-size: 0.9rem; font-weight: 700; color: var(--le-text); }
.le-evt-time { font-family: var(--le-mono); font-size: 0.72rem; color: var(--le-text-3); margin-top: 1px; }
.le-evt-loc { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--le-text-2); margin-top: 3px; }
.le-evt-loc .mud-icon-root { font-size: 0.95rem; color: var(--le-text-3); }
.le-evt-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
.le-evt-meta .le-meta { font-size: 0.73rem; color: var(--le-text-3); }

/* --------------------------------------------------------------- detail --- */

.detail-grid {
    display: grid;
    grid-template-columns: minmax(300px, 390px) 1fr;
    gap: 18px;
    align-items: start;
}
@media (max-width: 960px) { .detail-grid { grid-template-columns: 1fr; } }

.le-hero-number {
    font-family: var(--le-mono);
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--le-text);
    line-height: 1.1;
}

.le-def { display: flex; flex-direction: column; margin: 0; }
.le-def > div {
    display: grid;
    grid-template-columns: 148px 1fr;
    gap: 4px 18px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--le-row-line);
    align-items: baseline;
}
.le-def > div:last-child { border-bottom: none; }
.le-def dt { color: var(--le-text-3); font-size: 0.78rem; font-weight: 600; }
.le-def dd { margin: 0; font-size: 0.875rem; color: var(--le-text); overflow-wrap: break-word; }
.le-def .le-tag { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 480px) {
    .le-def > div { grid-template-columns: 1fr; gap: 1px; padding: 7px 0; }
    .le-def dt { margin-bottom: 1px; }
}

/* -------------------------------------------------------- delivery cards --- */

.delivery-card {
    display: block;
    background: var(--le-surface);
    border: 1px solid var(--le-line);
    border-radius: var(--le-radius-lg);
    padding: 16px 18px;
    margin-bottom: 12px;
    box-shadow: var(--le-shadow-sm);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    position: relative;
    color: var(--le-text);
}
.delivery-card:hover { transform: translateY(-2px); box-shadow: var(--le-shadow-md); border-color: var(--le-line-strong); }
.delivery-card .num { font-family: var(--le-mono); font-weight: 600; font-size: 0.95rem; letter-spacing: -0.02em; }
.delivery-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.delivery-meta .le-meta { display: inline-flex; align-items: center; gap: 5px; font-size: 0.76rem; color: var(--le-text-3); }
.delivery-meta .le-meta .mud-icon-root { font-size: 0.95rem; }
/* Right-aligned on the meta row's last line; wrapping pushes it to its own line instead of overlapping. */
.delivery-cta { margin-left: auto; align-self: center; white-space: nowrap; font-size: 0.8rem; font-weight: 600; color: var(--le-cobalt-text); }

/* ------------------------------------------------------------- auth flow --- */

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(430px, 1.15fr) 1fr;
    background: var(--le-canvas);
}
.auth-brand {
    position: relative;
    overflow: hidden;
    color: #D8E2F1;
    padding: 52px 56px;
    display: flex; flex-direction: column;
    background:
        radial-gradient(900px 480px at 12% -8%, rgba(49, 88, 212, 0.09), transparent 55%),
        radial-gradient(700px 500px at 110% 110%, rgba(49, 88, 212, 0.16), transparent 60%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(160deg, var(--le-graphite-700), var(--le-graphite-900) 70%);
    background-size: auto, auto, 44px 44px, 44px 44px, auto;
}
.auth-brand-headline {
    font-size: clamp(1.7rem, 2.6vw, 2.3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.18;
    color: #F4F7FC;
    max-width: 15ch;
}
.auth-brand-sub { color: #93A5C0; margin-top: 14px; max-width: 42ch; font-size: 0.95rem; line-height: 1.6; }
.auth-visual {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    padding: 22px;
    position: relative;
    backdrop-filter: blur(2px);
}
.auth-chip {
    position: absolute;
    display: inline-flex; align-items: center; gap: 7px;
    border-radius: 999px;
    padding: 6px 13px;
    font-size: 0.74rem; font-weight: 600;
    background: rgba(32, 36, 43, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 10px 26px -8px rgba(0, 0, 0, 0.5);
    animation: le-float 5s ease-in-out infinite;
    white-space: nowrap;
}
.auth-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.auth-brand-feats { display: flex; gap: 26px; margin-top: 26px; flex-wrap: wrap; }
.auth-feat { display: flex; align-items: center; gap: 9px; font-size: 0.8rem; color: #9FB0C9; font-weight: 500; }
.auth-feat .mud-icon-root { color: var(--le-cobalt); }

.auth-form-side { display: grid; place-items: center; padding: 48px 36px; }
.auth-card { width: min(420px, 100%); }
.auth-title { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.auth-sub { color: var(--le-text-2); margin: 6px 0 26px; font-size: 0.9rem; }

.auth-demo {
    margin-top: 26px;
    border: 1px dashed var(--le-line-strong);
    border-radius: var(--le-radius);
    padding: 14px 16px 10px;
    background: var(--le-surface-2);
}
.auth-demo-title {
    font-size: 0.68rem; font-weight: 700;
    letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--le-text-3);
    margin-bottom: 9px;
    display: flex; align-items: center; gap: 7px;
}
.auth-demo-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.auth-demo-group {
    font-size: 0.62rem; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--le-text-3);
    opacity: 0.85;
    margin: 9px 0 6px;
}
.auth-demo-group:first-of-type { margin-top: 0; }
.auth-demo-btn {
    border: 1px solid var(--le-line-strong);
    background: var(--le-surface);
    border-radius: 8px;
    padding: 6px 11px;
    font-size: 0.76rem; font-weight: 600;
    font-family: var(--le-font);
    color: var(--le-text-2);
    cursor: pointer;
    transition: all 0.14s;
    display: inline-flex; align-items: center; gap: 6px;
}
.auth-demo-btn:hover { border-color: var(--le-cobalt); color: var(--le-cobalt-deep); background: var(--le-cobalt-soft); }
.auth-demo-btn b { color: var(--le-text); font-weight: 600; }

.auth-footer { margin-top: 30px; text-align: center; font-size: 0.75rem; color: var(--le-text-3); }

@media (max-width: 980px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
}

.auth-center {
    min-height: 100vh; display: grid; place-items: center; padding: 36px 20px;
    background:
        radial-gradient(900px 480px at 12% -8%, rgba(49, 88, 212, 0.06), transparent 55%),
        linear-gradient(rgba(32, 37, 45, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(32, 37, 45, 0.03) 1px, transparent 1px),
        var(--le-canvas);
    background-size: auto, 44px 44px, 44px 44px, auto;
}

/* -------------------------------------------------------------- scanning --- */

.scanner-frame {
    background: var(--le-graphite-900);
    border-radius: var(--le-radius-lg);
    border: 1px solid var(--le-line);
    min-height: 280px;
    overflow: hidden;
    position: relative;
}
.scanner-frame video { width: 100%; display: block; border-radius: var(--le-radius-lg); }
.scanner-empty {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    color: #5D7395; font-size: 0.83rem; text-align: center; padding: 20px;
}
.scanner-empty .mud-icon-root { font-size: 44px; color: #39485D; display: block; margin: 0 auto 10px; }
.scanner-status {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    color: var(--le-text-2);
    font-size: 0.8rem;
    line-height: 1.45;
}
.scanner-status > .mud-icon-root { color: var(--le-cobalt-deep); margin-top: 1px; }
.scanner-status strong { color: var(--le-text); font-weight: 700; }
.scanner-status-detail::before { content: " · "; }
.scanner-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.scanner-manual-link { color: var(--le-cobalt-deep); font-size: 0.78rem; font-weight: 600; }
.scanner-manual-link:hover { color: var(--le-cobalt-ink); }
.scan-entry { display: flex; gap: 8px; align-items: center; }
/* Auto-scroll targets: keep the fixed appbar from covering the scrolled element. */
.scan-results, #scan-manual { scroll-margin-top: calc(var(--mud-appbar-height, 64px) + 12px); }
.scan-captured-value {
    font-family: var(--le-mono);
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--le-text);
    background: var(--le-surface-inset);
    border: 1px solid var(--le-line);
    border-radius: var(--le-radius);
    padding: 10px 12px;
    overflow-wrap: anywhere;
    user-select: all;
}
.scan-captured-match {
    display: flex; align-items: center; gap: 6px;
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--le-text-2);
}
@media (max-width: 560px) {
    .scanner-frame { min-height: 200px; }
    .scanner-actions { align-items: flex-start; flex-direction: column; gap: 8px; }
    .scanner-status-detail::before { content: " "; }
    .scanner-status-detail { display: block; }
    .scan-entry { flex-direction: column; align-items: stretch; gap: 10px; }
    .scan-entry .mud-button { width: 100%; }
}

/* ------------------------------------------------------------ empty state -- */

.le-empty { text-align: center; padding: 56px 24px; color: var(--le-text-2); }
.le-empty .mud-icon-root { font-size: 46px; color: #C3CEDF; }
.le-empty h3 { margin: 12px 0 4px; font-size: 1rem; font-weight: 700; color: var(--le-text); }
.le-empty p { margin: 0; font-size: 0.85rem; color: var(--le-text-3); }

/* ------------------------------------------------- MudBlazor refinements --- */

/* Buttons */
.mud-button-root { border-radius: 10px; font-weight: 600; letter-spacing: 0.005em; }
.mud-button-root.mud-button-filled-primary:not(:disabled) {
    background: var(--le-cobalt);
    color: var(--le-cobalt-ink);
    box-shadow: none;
}
.mud-button-root.mud-button-filled-primary:not(:disabled):hover {
    background: #2E4CB1;
    box-shadow: 0 6px 16px -6px rgba(49, 88, 212, 0.6);
}
.mud-button-root.mud-button-filled-warning:not(:disabled) {
    background: var(--le-red);
    color: #FFFFFF;
    box-shadow: none;
}
.mud-button-root.mud-button-filled-success:not(:disabled) { box-shadow: none; }
.mud-button-root.mud-button-outlined-primary:not(:disabled) { color: var(--le-cobalt-deep); border-color: rgba(36, 66, 165, 0.5); }
.mud-button-root.mud-button-outlined-primary:not(:disabled):hover { background: var(--le-cobalt-soft); border-color: var(--le-cobalt-deep); }
.mud-button-root.mud-button-text-primary:not(:disabled) { color: var(--le-cobalt-deep); }

/* Inputs */
.mud-input-outlined { border-radius: 10px; }
.mud-input-outlined .mud-input-outlined-border { border-color: var(--le-line-strong); }
.mud-input-outlined:focus-within { border-radius: 10px; box-shadow: 0 0 0 3px rgba(49, 88, 212, 0.14); }
.mud-input-outlined:focus-within .mud-input-outlined-border { border-color: var(--le-cobalt); }
.mud-input .mud-input-root { font-family: var(--le-font); }

/* Cards / papers keep the system radius; elevation shadows softened */
.mud-paper { border-radius: var(--le-radius-lg); }

/* Dialogs — Graphite + Cobalt dialog language */
.mud-dialog {
    border-radius: 18px;
    border: 1px solid var(--le-line);
    box-shadow: 0 24px 64px -16px rgba(16, 18, 22, 0.32), var(--le-shadow-lg);
    overflow: hidden; /* clip header/actions backgrounds to the radius */
    animation: le-dialog-in 220ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes le-dialog-in { from { opacity: 0; transform: translateY(10px) scale(0.985); } }
.mud-dialog .mud-dialog-title { padding: 22px 26px 18px; border-bottom: 1px solid var(--le-line); align-items: flex-start; }
.mud-dialog .mud-dialog-title .mud-icon-button { color: var(--le-text-3); margin: -4px -8px 0 0; }
.mud-dialog .mud-dialog-content { padding: 22px 26px 8px; }
.mud-dialog .mud-dialog-actions { padding: 16px 26px 22px; border-top: 1px solid var(--le-row-line); gap: 10px; justify-content: flex-end; }

/* Header: icon tile + title + subtitle */
.le-dialog-head { display: flex; align-items: center; gap: 14px; min-width: 0; padding-right: 10px; }
.le-dialog-ic {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--le-cobalt-soft); color: var(--le-cobalt-deep);
    box-shadow: inset 0 0 0 1px rgba(36, 66, 165, 0.18);
}
.le-dialog-ic.warn, .le-dialog-ic.danger { background: #FDECEA; color: var(--le-red); box-shadow: inset 0 0 0 1px rgba(179, 38, 30, 0.16); }
.le-dialog-ic.success { background: #E4F2E7; color: var(--le-green); box-shadow: inset 0 0 0 1px rgba(19, 122, 75, 0.16); }
.le-dialog-title { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; color: var(--le-graphite-800); }
.le-dialog-sub { font-size: 0.8125rem; color: var(--le-text-2); margin-top: 2px; line-height: 1.45; }

/* Form rhythm inside dialogs */
.le-form { display: grid; gap: 18px; }
.le-form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.le-form-label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--le-text-3); margin-bottom: 10px; }
.le-form-hint { font-size: 0.75rem; color: var(--le-text-3); line-height: 1.5; margin-top: 7px; }
.le-form-hint.warn { color: var(--le-cobalt-deep); }
.le-mono-input input, .le-code-input input { font-family: var(--le-mono); letter-spacing: 0.02em; }

/* Structured address block (AddressFields component) */
.le-addr {
    background: linear-gradient(135deg, rgba(32, 36, 43, 0.04), rgba(32, 36, 43, 0.015));
    border: 1px solid var(--le-line);
    border-radius: 12px;
    padding: 14px 16px 16px;
}
.le-addr-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.le-addr-head .le-form-label { margin-bottom: 0; }
.le-addr-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 4px; flex-wrap: wrap; }
.le-addr-disclosure.mud-button { color: var(--le-text); margin-left: -8px; }
.le-addr-provenance {
    display: inline-flex; align-items: center; min-height: 24px;
    padding: 2px 8px; border: 1px solid #D9E0EB; border-radius: 999px;
    background: #F0F3F7; color: var(--le-blue); font-size: 0.69rem; font-weight: 700;
    white-space: nowrap;
}
.le-addr-grid { gap: 10px 12px; }
.le-addr-preview {
    margin-top: 12px;
    padding: 8px 10px;
    border-left: 3px solid var(--le-cobalt);
    background: rgba(49, 88, 212, 0.07);
    border-radius: 0 8px 8px 0;
    font-family: var(--le-mono);
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--le-text-2);
    overflow-wrap: anywhere;
}

/* Delivery context strip (transition / delay dialogs) */
.le-route-strip {
    background: linear-gradient(135deg, rgba(32, 36, 43, 0.055), rgba(32, 36, 43, 0.02));
    border: 1px solid var(--le-line);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.le-route-num { font-family: var(--le-mono); font-size: 0.875rem; font-weight: 600; color: var(--le-graphite-800); }
.le-route-text { font-size: 0.8125rem; color: var(--le-text-2); margin-top: 2px; }
.le-route-arrow { color: var(--le-text-3); }

/* User card (reset password) */
.le-context-inline {
    display: flex; align-items: center; gap: 12px;
    background: var(--le-surface-2);
    border: 1px solid var(--le-line);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 20px;
}
.le-context-ic { color: var(--le-text-3); }
.le-context-title { font-size: 0.875rem; font-weight: 600; color: var(--le-text); }
.le-context-sub { font-size: 0.75rem; color: var(--le-text-3); margin-top: 1px; }

/* Segmented account-type control */
.le-seg.mud-toggle-group {
    display: flex; width: 100%;
    background: var(--le-surface-2);
    border: 1px solid var(--le-line-strong);
    border-radius: 12px;
    padding: 4px;
    box-shadow: none;
}
.le-seg .mud-toggle-item { flex: 1 1 0; justify-content: center; border-radius: 9px; border: none; padding: 10px 14px; color: var(--le-text-2); }
.le-seg .mud-toggle-item:hover { background: rgba(32, 36, 43, 0.05); }
.le-seg .mud-toggle-item-selected { background: var(--le-surface); color: var(--le-graphite-800); font-weight: 600; box-shadow: var(--le-shadow-sm), inset 0 0 0 1px var(--le-line); }
.le-seg-item { display: inline-flex; align-items: center; gap: 8px; }

/* Customer access checklist */
.le-check-list {
    border: 1px solid var(--le-line-strong);
    border-radius: 12px;
    background: var(--le-surface-2);
    max-height: 224px;
    overflow-y: auto;
}
.le-check-row {
    display: flex; align-items: center; gap: 4px;
    padding: 10px 14px; cursor: pointer;
    border-bottom: 1px solid var(--le-row-line);
}
.le-check-row:last-child { border-bottom: none; }
.le-check-row:hover { background: #F0F3F7; }
.le-check-main { display: flex; flex-direction: column; min-width: 0; margin-left: 6px; }
.le-check-title { font-size: 0.875rem; font-weight: 600; color: var(--le-text); }
.le-check-sub { font-family: var(--le-mono); font-size: 0.75rem; color: var(--le-text-3); }
.le-check-empty { padding: 18px 16px; font-size: 0.8125rem; color: var(--le-text-3); }

/* Toggle rows (visibility, active) */
.le-switch-row {
    display: flex; align-items: center; gap: 16px;
    border: 1px solid var(--le-line);
    border-radius: 12px;
    background: var(--le-surface-2);
    padding: 13px 16px;
}
.le-switch-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 0; }
.le-switch-title { font-size: 0.875rem; font-weight: 600; color: var(--le-text); }
.le-switch-sub { font-size: 0.75rem; color: var(--le-text-3); margin-top: 1px; line-height: 1.45; }

/* Quiet cancel button */
.le-btn-ghost.mud-button { color: var(--le-text-2); }
.le-btn-ghost.mud-button:hover { background: rgba(32, 36, 43, 0.05); }

/* Booking: preserve a fast, scan-friendly top-level flow while retaining detailed address snapshots. */
.le-booking-dialog .mud-dialog-content { padding-bottom: 22px; }
.le-booking-content { max-width: 940px; margin: 0 auto; }
.le-booking-section { border-top: 1px solid var(--le-row-line); padding-top: 18px; }
.le-booking-section:first-of-type { border-top: none; padding-top: 0; }
.le-form-validation { margin-bottom: 18px; }
.le-booking-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; width: 100%; }

@media (max-width: 600px) {
    .mud-dialog .mud-dialog-title { padding: 18px 20px 14px; }
    .mud-dialog .mud-dialog-content { padding: 18px 20px 6px; }
    .mud-dialog .mud-dialog-actions { padding: 14px 20px 18px; }
    .le-dialog-head { gap: 12px; }
    .le-dialog-ic { width: 40px; height: 40px; }
}

/* A booking dialog remains usable on a small viewport: content scrolls beneath persistent actions. */
@media (max-width: 700px) {
    .mud-dialog:has(.le-booking-dialog), .mud-dialog.le-booking-dialog {
        width: 100vw !important; max-width: none !important; height: 100dvh; max-height: none !important;
        margin: 0; border-radius: 0; display: flex; flex-direction: column;
    }
    .mud-dialog:has(.le-booking-dialog) .mud-dialog-content, .mud-dialog.le-booking-dialog .mud-dialog-content {
        flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-bottom: 22px;
    }
    .mud-dialog:has(.le-booking-dialog) .mud-dialog-actions, .mud-dialog.le-booking-dialog .mud-dialog-actions {
        position: sticky; bottom: 0; z-index: 2; flex: none; background: var(--le-surface);
        padding-bottom: max(18px, env(safe-area-inset-bottom));
    }
    .le-booking-actions .mud-button { flex: 1 1 0; }
    .le-addr-head { align-items: flex-start; flex-direction: column; }
    .le-addr-head-actions { justify-content: flex-start; }
}
@media (max-width: 560px) {
    .le-form-2 { grid-template-columns: 1fr; }
}

/* Snackbars */
.mud-snackbar { border-radius: 12px; box-shadow: var(--le-shadow-lg); }

/* Alerts */
.mud-alert { border-radius: 12px; }

/* Pagination */
.mud-pagination .mud-pagination-item { border-radius: 9px; }

/* Popover / menus */
.mud-popover { border-radius: 12px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* ------------------------------------------------------------ utilities --- */

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.min-w-0 { min-width: 0; }

/* MudBlazor ships no flex-fill utility; define it for the app (spacer, growing fields). */
.flex-fill { flex: 1 1 0%; min-width: 0; }

/* Filter controls use a fixed grid on desktop and collapse to a task-friendly column on mobile. */
.le-filter-search { min-width: 0; max-width: none; }
.le-filter-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1.5fr) minmax(180px, 1fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) auto;
    gap: 12px;
    align-items: center;
}
.le-filter-field { min-width: 0; }
.le-filter-summary { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-height: 32px; }
.le-filter-summary-label { color: var(--le-text-2); font-size: 0.8rem; font-weight: 600; }
.le-filter-tag {
    display: inline-flex; align-items: center;
    padding: 3px 9px;
    border: 1px solid var(--le-line);
    border-radius: 999px;
    background: var(--le-surface);
    color: var(--le-text-2);
    font-size: 0.75rem;
    font-weight: 600;
}
@media (max-width: 980px) {
    .le-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .le-filter-grid .mud-button-root { justify-self: start; }
}
@media (max-width: 560px) {
    .le-filter-grid { grid-template-columns: 1fr; }
    .le-filter-grid .mud-button-root { width: 100%; }
}

/* =========================================================== ELEVATION === */

/* Dashboard freshness indicator: deliberately static because this is a refreshed snapshot. */
.le-snapshot {
    display: inline-flex; align-items: center; gap: 6px;
    border-radius: 999px;
    background: #E8EEF7;
    border: 1px solid #D5E0EF;
    color: var(--le-blue);
    font-size: 0.68rem; font-weight: 700;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    text-transform: uppercase;
}
.le-snapshot .mud-icon-root { font-size: 0.9rem; }

/* Active pipeline (fleet at a glance) */
.pipeline-track {
    display: flex;
    height: 12px;
    border-radius: 8px;
    overflow: hidden;
    background: #E9F0F1;
    margin: 2px 0 12px;
}
.pipeline-seg { height: 100%; min-width: 2px; }
.pipeline-seg + .pipeline-seg { box-shadow: inset 2px 0 0 #FFFFFF; }
.pipeline-legend { display: flex; flex-direction: column; }
.pl-row {
    display: flex; align-items: center; gap: 10px;
    font-size: 0.84rem; color: var(--le-text-2);
    padding: 6px 0;
    border-bottom: 1px dashed var(--le-row-line);
}
.pl-row:last-child { border-bottom: none; }
.pl-row:focus-visible { outline: 3px solid var(--le-cobalt); outline-offset: 2px; border-radius: 8px; }
.le-fleet-template-select { min-width: 220px; }
@media (max-width: 560px) {
    .le-fleet-template-select { width: 100%; min-width: 0; }
}
.pl-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.pl-count {
    margin-left: auto;
    font-family: var(--le-mono);
    font-size: 0.86rem; font-weight: 600;
    color: var(--le-text);
}
.pl-alert {
    display: flex; align-items: center; gap: 8px;
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 9px;
    background: #FDECEA;
    border: 1px solid #F6CDC9;
    color: #B3261E;
    font-size: 0.8rem; font-weight: 600;
    text-decoration: none;
    transition: transform 0.14s, box-shadow 0.14s;
}
.pl-alert:hover { transform: translateY(-1px); box-shadow: var(--le-shadow-sm); color: #8C1D18; }

/* Milestone stepper (delivery hero) */
.le-hero-divider {
    height: 1px;
    margin: 18px 0 4px;
    background: linear-gradient(90deg, transparent, var(--le-line) 12%, var(--le-line) 88%, transparent);
}
.le-stepper {
    position: relative;
    display: flex;
    justify-content: space-between;
    list-style: none;
    margin: 14px 0 4px;
    padding: 0;
}
.le-track, .le-track-fill {
    position: absolute;
    top: 13px;
    left: 34px; right: 34px;
    height: 3px;
    border-radius: 3px;
}
.le-track { background: var(--le-line); }
.le-track-fill {
    background: linear-gradient(90deg, #7FB08F, #137A4B);
    right: auto;
    max-width: calc(100% - 68px);
    transition: width 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.le-track-fill.none { display: none; }
.le-step {
    position: relative;
    display: flex; flex-direction: column; align-items: center;
    width: 68px;
    z-index: 1;
}
.le-step-dot {
    width: 26px; height: 26px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: #FFFFFF;
    border: 2px solid var(--le-line-strong);
    color: transparent;
    transition: all 0.2s;
}
.le-step-dot .mud-icon-root { font-size: 15px; }
.le-step.done .le-step-dot {
    background: #137A4B;
    border-color: #137A4B;
    color: #FFFFFF;
}
.le-step.current .le-step-dot {
    border-color: var(--le-cobalt);
    border-width: 3px;
    box-shadow: 0 0 0 4px rgba(49, 88, 212, 0.18);
}
.le-step.current.delayed .le-step-dot {
    border-color: #B3261E;
    box-shadow: 0 0 0 4px rgba(179, 38, 30, 0.16);
    animation: le-pulse-soft 1.6s ease-in-out infinite;
}
.le-step-label {
    margin-top: 7px;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--le-text-3);
    text-align: center;
    white-space: nowrap;
}
.le-step.done .le-step-label, .le-step.current .le-step-label { color: var(--le-text); font-weight: 700; }
.le-step-flag {
    margin-top: 3px;
    font-size: 0.6rem; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: #B3261E;
    background: #FDECEA;
    border-radius: 5px;
    padding: 1px 6px;
}
.le-stepper-compact { display: none; }

@media (max-width: 680px) {
    .le-stepper { display: none; }
    .le-stepper-compact {
        display: block;
        margin: 14px 0 4px;
        padding: 13px 14px;
        border: 1px solid var(--le-line);
        border-radius: 12px;
        background: linear-gradient(135deg, var(--le-surface-2), #FFFFFF);
    }
    .le-stepper-compact-head,
    .le-stepper-compact-next {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    .le-stepper-compact-kicker {
        color: var(--le-text-3);
        font-size: 0.64rem;
        font-weight: 700;
        letter-spacing: 0.11em;
        text-transform: uppercase;
    }
    .le-stepper-compact-count {
        color: var(--le-text-2);
        font-family: var(--le-mono);
        font-size: 0.7rem;
        font-weight: 600;
        white-space: nowrap;
    }
    .le-stepper-compact-current {
        margin-top: 5px;
        color: var(--le-text);
        font-size: 1rem;
        font-weight: 700;
    }
    .le-stepper-compact-track {
        height: 6px;
        margin: 11px 0 9px;
        overflow: hidden;
        border-radius: 999px;
        background: var(--le-line);
    }
    .le-stepper-compact-fill {
        display: block;
        height: 100%;
        min-width: 3px;
        border-radius: inherit;
        background: linear-gradient(90deg, #7FB08F, #137A4B);
        transition: width 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
    }
    .le-stepper-compact-fill.none { display: none; }
    .le-stepper-compact-next {
        color: var(--le-text-2);
        font-size: 0.77rem;
    }
    .le-stepper-compact-next strong { color: var(--le-text); }
    .le-stepper-compact-next .le-step-flag { margin: 0 0 0 auto; }
}

/* Delay note (detail hero) */
.le-delay-note {
    display: flex; align-items: flex-start; gap: 10px;
    background: #FDF1EF;
    border: 1px solid #F6CDC9;
    border-left: 4px solid #B3261E;
    border-radius: 10px;
    padding: 10px 14px;
    margin-top: 14px;
    color: #8C1D18;
    font-size: 0.875rem;
}
.le-delay-note .mud-icon-root { color: #B3261E; margin-top: 1px; }

/* Timeline: the newest event stands out */
.le-timeline-item:first-child > div:last-child {
    background: linear-gradient(180deg, #FBFCFD, #F0F3F7);
    border: 1px solid #E7EBF0;
    border-radius: 12px;
    padding: 12px 14px 13px;
    box-shadow: var(--le-shadow-sm);
}
.le-evt-comment {
    background: var(--le-surface-2);
    border-left: 3px solid var(--le-cobalt);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--le-text-2);
    margin-top: 8px;
    font-style: italic;
}

/* Table rows: stronger hover affordance */
.le-table tbody tr:hover {
    background: #F7F9FB;
    box-shadow: inset 3px 0 0 var(--le-cobalt);
}

/* Branded loading bar */
.le-loadbar {
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(90deg, #E8EDF2 25%, #F3F5F8 50%, #E8EDF2 75%);
    background-size: 200% 100%;
    animation: le-shimmer 1.2s ease-in-out infinite;
    margin: 8px 0;
}
@keyframes le-shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

/* Global API progress: thin bar pinned above the app bar whenever a request is in
   flight longer than the flicker delay (see ApiBusyState). */
.le-api-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 10000; /* above the Mud app bar, drawers and dialogs */
    pointer-events: none;
    background: rgba(49, 88, 212, 0.15);
    overflow: hidden;
}
.le-api-progress-bar {
    height: 100%;
    width: 34%;
    border-radius: 3px;
    background: linear-gradient(90deg, transparent, #3158D4 35%, #B9C8FF 50%, #3158D4 65%, transparent);
    animation: le-api-progress-slide 1.1s ease-in-out infinite;
}
@keyframes le-api-progress-slide {
    from { transform: translateX(-120%); }
    to   { transform: translateX(420%); }
}
/* The global reduced-motion rule freezes animations; keep a steady, full-width bar
   so slow requests are still signalled. */
@media (prefers-reduced-motion: reduce) {
    .le-api-progress-bar {
        width: 100%;
        background: #3158D4;
        opacity: 0.85;
    }
}

/* Inline "searching" feedback on the scan page while candidates are probed */
.scan-resolving {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--le-text-2);
    font-size: 0.875rem;
}
.scan-resolving .le-tag {
    max-width: 100%;
    overflow-wrap: anywhere;
}

/* Login form side: same grid texture as the brand panel for cohesion */
.auth-form-side {
    background:
        radial-gradient(700px 400px at 110% -10%, rgba(49, 88, 212, 0.05), transparent 55%),
        linear-gradient(rgba(32, 37, 45, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(32, 37, 45, 0.028) 1px, transparent 1px),
        var(--le-canvas);
    background-size: auto, 44px 44px, 44px 44px, auto;
}

/* Keyboard focus rings on custom controls */
.le-chip-btn:focus-visible,
.update-row:focus-visible,
.le-user-btn:focus-visible,
.auth-demo-btn:focus-visible,
.delivery-card:focus-visible,
.pl-alert:focus-visible {
    outline: 2px solid var(--le-cobalt);
    outline-offset: 2px;
    border-radius: 10px;
}
.stat-card a:focus-visible, .le-back:focus-visible {
    outline: 2px solid var(--le-cobalt);
    outline-offset: 3px;
    border-radius: 12px;
}
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }

/* ==========================================================================
   Delivery label (4x6 print)
   Standard logistics-label layout (GS1-style): brand block, tracking number,
   QR with human-readable interpretation line, FROM/TO blocks, references.
   ========================================================================== */
.le-label-sheet {
    max-width: 720px;
    margin: 0 auto;
    padding: 28px 16px 40px;
}

.le-label-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.le-label-print-warn {
    color: var(--le-cobalt-text);
    font-size: 13px;
    margin: 0 0 12px;
}

.le-label {
    width: 4in;
    min-height: 6in;
    box-sizing: border-box;
    background: var(--le-surface);
    color: var(--le-text);
    border: 1.5px solid var(--le-graphite-800);
    border-radius: 6px;
    box-shadow: var(--le-shadow-md);
    padding: 0.157in;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 9.5pt;
    line-height: 1.35;
}

.le-label-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.le-label-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.le-label-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--le-graphite-800);
    color: var(--le-cobalt);
    font-family: var(--le-mono);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.le-label-brand-name {
    font-weight: 700;
    font-size: 10.5pt;
    letter-spacing: 0.02em;
}

.le-label-doc {
    color: var(--le-cobalt-text);
    font-weight: 700;
    letter-spacing: 0.14em;
    font-size: 8pt;
}

.le-label-qr {
    text-align: center;
    flex-shrink: 0;
}

.le-label-qr-img {
    width: 0.92in;
    height: 0.92in;
}

.le-label-qr-img svg {
    width: 100%;
    height: 100%;
    display: block;
}

.le-label-qr-code {
    font-family: var(--le-mono);
    font-size: 6pt;
    word-break: break-all;
    max-width: 1.05in;
    margin-top: 3px;
    color: var(--le-text-2);
}

.le-label-number {
    border-block: 1.5px solid var(--le-graphite-800);
    padding: 6px 0;
    display: flex;
    flex-direction: column;
}

.le-label-number-label {
    font-size: 6.5pt;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--le-text-3);
}

.le-label-number-value {
    font-family: var(--le-mono);
    font-weight: 700;
    font-size: 15pt;
    letter-spacing: 0.03em;
}

.le-label-addr-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.le-label-addr {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.le-label-addr-kind {
    font-size: 7pt;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--le-text-3);
}

.le-label-addr-name {
    font-weight: 700;
    font-size: 10pt;
}

.le-label-addr-lines {
    color: var(--le-text-2);
    font-size: 8.5pt;
    overflow-wrap: break-word;
}

.le-label-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
    margin: 0;
}

.le-label-meta > div {
    display: flex;
    gap: 6px;
    min-width: 0;
}

.le-label-meta dt {
    color: var(--le-text-3);
    font-size: 8pt;
    min-width: 0.62in;
    flex-shrink: 0;
}

.le-label-meta dd {
    margin: 0;
    font-size: 8.5pt;
    font-weight: 600;
    overflow-wrap: break-word;
}

.le-label-foot {
    margin-top: auto;
    border-top: 1px solid var(--le-line-strong);
    padding-top: 5px;
    color: var(--le-text-3);
    font-size: 7pt;
}

/* Print: only the 4x6 label reaches the paper. The label route uses the empty
   layout, so hiding the toolbar is all that's needed; @page size + the label's
   own 0.157in padding respect printer hardware margins. */
@media print {
    @page {
        size: 4in 6in;
        margin: 0;
    }

    html, body {
        background: #fff !important;
    }

    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .le-label-sheet {
        padding: 0;
        margin: 0;
        max-width: none;
    }

    .le-label-toolbar,
    .le-label-print-warn {
        display: none !important;
    }

    .le-label {
        border-radius: 0;
        box-shadow: none;
    }
}

/* ---------------------------------------------------------------------------
   Attachments (photos & documents) — chips, staged list, in-page camera.
   --------------------------------------------------------------------------- */
.le-evt-block { min-width: 0; }
.le-evt-head { display: flex; align-items: start; justify-content: space-between; gap: 4px; }
.le-evt-head .le-evt-title { flex: 1 1 auto; }
.le-evt-head .mud-icon-button { color: var(--le-text-3); margin: -8px -8px 0 0; }

/* Attachment chip in the timeline: type icon + name + size, opens in a new tab. */
.le-attach-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px 4px 8px; border-radius: 999px;
    border: 1px solid var(--le-line); background: var(--le-surface-2);
    font-size: 0.75rem; color: var(--le-text); text-decoration: none;
    transition: border-color .15s ease, background .15s ease;
}
.le-attach-chip:hover { border-color: var(--le-line-strong); background: var(--le-surface); text-decoration: none; }
.le-attach-chip .mud-icon-default { color: var(--le-teal); }
.le-attach-chip-name {
    max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-weight: 500;
}
.le-attach-chip-size { color: var(--le-text-3); font-family: var(--le-mono); font-size: 0.6875rem; }

/* Staging area inside dialogs */
.le-attach-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.le-attach-section { margin-top: 16px; }
.le-hidden-file {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.le-staged { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.le-staged-item {
    border: 1px dashed var(--le-line-strong); border-radius: 10px;
    padding: 8px 8px 8px 12px; background: var(--le-surface-2);
}
.le-staged-item.error { border-color: var(--le-red); background: #FDF3F2; border-style: solid; }
.le-staged-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.le-staged-row .mud-icon-default { color: var(--le-teal); }
.le-staged-item.error .le-staged-row .mud-icon-default { color: var(--le-red); }
.le-staged-name {
    flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 0.8125rem; font-weight: 500; color: var(--le-text);
}
.le-staged-size { font-family: var(--le-mono); font-size: 0.6875rem; color: var(--le-text-3); white-space: nowrap; }
.le-staged-error { margin-top: 6px; font-size: 0.75rem; color: var(--le-red); font-weight: 500; }

/* In-page camera: viewfinder, status/fallback overlay, shutter, preview */
.le-camera-frame {
    position: relative; border-radius: 12px; overflow: hidden;
    background: var(--le-graphite-900); aspect-ratio: 4 / 3;
}
.le-camera-frame video { width: 100%; height: 100%; object-fit: cover; display: block; }
.le-camera-hidden { visibility: hidden; }
.le-camera-status {
    position: absolute; inset: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 10px;
    color: #E9EDF2; font-size: 0.8125rem; text-align: center; padding: 16px;
}
.le-camera-error { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.le-camera-error .mud-icon-default { font-size: 1.75rem; color: var(--le-cobalt); }
.le-camera-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }
.le-camera-side { color: var(--le-text-2); }
.le-camera-shutter {
    width: 58px; height: 58px; border-radius: 50%; padding: 0; cursor: pointer;
    border: 4px solid var(--le-surface); outline: 3px solid var(--le-graphite-800);
    background: var(--le-cobalt); transition: transform .1s ease;
}
.le-camera-shutter:hover { transform: scale(1.04); }
.le-camera-shutter:active { transform: scale(0.96); }
.le-camera-preview { text-align: center; }
.le-camera-preview img { width: 100%; border-radius: 12px; display: block; }

/* Phones: taller viewfinder for portrait capture, tighter chip text */
@media (max-width: 560px) {
    .le-attach-chip-name { max-width: 130px; }
    .le-camera-frame { aspect-ratio: 3 / 4; max-height: 46vh; }
    .le-camera-shutter { width: 64px; height: 64px; }
}

/* Public tracking page */
.le-mono-input input { font-family: var(--le-mono); }
.le-track-result { margin-top: 22px; text-align: left; }
.le-track-number { font-size: 1.25rem; font-weight: 700; color: var(--le-text); letter-spacing: 0.01em; }

/* ---------------------------------------------------- marketing landing ---
   Public SaaS landing at "/" (anonymous visitors only). Same Graphite + Cobalt
   vocabulary as the app — graphite command surfaces, blueprint grid texture,
   cobalt CTAs, IBM Plex — expressed as a scrolling marketing page. */

.mkt {
    background: var(--le-canvas);
    color: var(--le-text);
    -webkit-font-smoothing: antialiased;
}
.mkt ::selection { background: rgba(49, 88, 212, 0.32); }
.mkt section[id] { scroll-margin-top: 84px; }

/* Command-bar navigation */
.mkt-nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(16, 18, 22, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mkt-nav-inner {
    max-width: 1180px; margin: 0 auto; padding: 0 24px;
    height: 64px; display: flex; align-items: center; gap: 28px;
}
.mkt-brand { padding: 0; text-decoration: none; }
.mkt-nav-links { display: flex; gap: 26px; margin-left: auto; }
.mkt-nav-links a {
    color: #A7B7CE; text-decoration: none; font-size: 0.86rem; font-weight: 500;
    transition: color 0.14s;
}
.mkt-nav-links a:hover { color: #F4F7FC; }
.mkt-nav-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.mkt-nav-links + .mkt-nav-actions { margin-left: 0; }
.mkt-link-quiet {
    color: #A7B7CE; text-decoration: none; font-size: 0.86rem; font-weight: 500;
    transition: color 0.14s;
}
.mkt-link-quiet:hover { color: var(--le-cobalt); }

/* Buttons */
.mkt-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--le-cobalt); color: var(--le-cobalt-ink);
    border: 1px solid transparent; border-radius: var(--le-radius);
    padding: 9px 18px; font-size: 0.86rem; font-weight: 700;
    font-family: var(--le-font); text-decoration: none; cursor: pointer;
    transition: background 0.14s, box-shadow 0.14s, transform 0.14s, border-color 0.14s;
}
.mkt-btn:hover { background: #2E4CB1; box-shadow: 0 8px 22px -8px rgba(49, 88, 212, 0.65); transform: translateY(-1px); }
.mkt-btn--lg { padding: 13px 26px; font-size: 0.95rem; }
.mkt-btn--ghost { background: transparent; color: #F4F7FC; border-color: rgba(255, 255, 255, 0.32); }
.mkt-btn--ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.55); box-shadow: none; }
.mkt-btn--ink { background: var(--le-graphite-800); color: #F4F7FC; }
.mkt-btn--ink:hover { background: var(--le-graphite-700); box-shadow: 0 10px 26px -10px rgba(16, 18, 22, 0.7); }
.mkt-btn--inkghost { background: transparent; color: var(--le-cobalt-ink); border-color: rgba(248, 250, 255, 0.42); }
.mkt-btn--inkghost:hover { background: rgba(248, 250, 255, 0.09); border-color: rgba(248, 250, 255, 0.7); box-shadow: none; }
.mkt-btn--outline { background: transparent; color: var(--le-graphite-800); border-color: var(--le-graphite-800); }
.mkt-btn--outline:hover { background: var(--le-graphite-800); color: #F4F7FC; box-shadow: none; }
.mkt a:focus-visible, .mkt-btn:focus-visible {
    outline: 2px solid var(--le-cobalt); outline-offset: 2px; border-radius: var(--le-radius);
}

/* Hero — full-bleed ink command surface */
.mkt-hero {
    background:
        radial-gradient(1000px 520px at 14% -10%, rgba(49, 88, 212, 0.1), transparent 55%),
        radial-gradient(760px 540px at 108% 112%, rgba(49, 88, 212, 0.18), transparent 60%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(160deg, var(--le-graphite-700), var(--le-graphite-900) 70%);
    background-size: auto, auto, 44px 44px, 44px 44px, auto;
    color: #D8E2F1;
}
.mkt-hero-grid {
    max-width: 1180px; margin: 0 auto; padding: 84px 24px 64px;
    display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
}
.mkt-hero-grid > * { min-width: 0; }
.mkt-eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--le-cobalt); margin: 0 0 18px;
}
.mkt-eyebrow-dot {
    width: 8px; height: 8px; border-radius: 50%; flex: none;
    background: var(--le-cobalt);
    box-shadow: 0 0 0 0 rgba(49, 88, 212, 0.5);
    animation: le-pulse-soft 2.6s ease-out infinite;
}
.mkt-h1 {
    font-size: clamp(2.15rem, 4.4vw, 3.4rem); font-weight: 700;
    letter-spacing: -0.025em; line-height: 1.12; color: #F4F7FC; max-width: 16ch;
    margin: 0 0 18px;
}
.mkt-sub { color: #A7B7CE; font-size: 1.02rem; line-height: 1.68; max-width: 52ch; margin: 0 0 30px; }
.mkt-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.mkt-ctas--center { justify-content: center; }
.mkt-note { color: #7E91AD; font-size: 0.8rem; margin: 18px 0 0; }

/* Hero visual — product-flavored delivery card */
.mkt-hero-visual { position: relative; max-width: 560px; justify-self: end; width: 100%; }
.mkt-mock {
    background: var(--le-surface); border: 1px solid var(--le-line);
    border-radius: 16px; box-shadow: var(--le-shadow-lg); overflow: hidden;
}
.mkt-mock-bar {
    display: flex; align-items: center; gap: 7px;
    background: var(--le-surface-2); border-bottom: 1px solid var(--le-line);
    padding: 10px 14px;
}
.mkt-mock-win { width: 11px; height: 11px; border-radius: 50%; background: var(--le-line-strong); }
.mkt-mock-crumb {
    margin-left: 8px; font-family: var(--le-mono); font-size: 0.66rem;
    color: var(--le-text-3); letter-spacing: 0.04em;
}
.mkt-mock-body { padding: 22px 24px 26px; }
.mkt-mock-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mkt-mock-num {
    font-family: var(--le-mono); font-weight: 600; font-size: 1.04rem;
    letter-spacing: -0.01em; color: var(--le-text); font-variant-numeric: tabular-nums;
}
.mkt-mock-route { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.mkt-mock-loc { font-size: 0.78rem; font-weight: 600; color: var(--le-text-2); white-space: nowrap; }
.mkt-mock-line { flex: 1 1 0; height: 14px; min-width: 60px; display: block; }
.mkt-track-steps { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 24px; }
.mkt-track-step {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--le-text-3);
}
.mkt-track-dot {
    width: 10px; height: 10px; border-radius: 50%; flex: none;
    border: 2px solid var(--le-line-strong); background: var(--le-surface);
}
.mkt-track-step.done .mkt-track-dot { background: var(--le-green); border-color: var(--le-green); }
.mkt-track-step.done { color: var(--le-text-2); }
.mkt-track-step.current .mkt-track-dot {
    background: var(--le-cobalt); border-color: var(--le-cobalt);
    box-shadow: 0 0 0 3px rgba(49, 88, 212, 0.25);
}
.mkt-track-step.current { color: var(--le-cobalt-deep); }
.mkt-mock-meta {
    display: flex; flex-wrap: wrap; margin-top: 20px; padding-top: 16px;
    border-top: 1px dashed var(--le-line-strong);
    font-size: 0.72rem; color: var(--le-text-3);
}
.mkt-mock-meta span + span::before { content: "\00B7"; margin: 0 9px; color: var(--le-line-strong); }
.mkt-chip {
    position: absolute; z-index: 2;
    display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
    border-radius: 999px; padding: 7px 14px;
    font-size: 0.73rem; font-weight: 600; color: #E9EDF2;
    background: rgba(32, 36, 43, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 26px -8px rgba(0, 0, 0, 0.55);
    animation: le-float 5.5s ease-in-out infinite;
}
.mkt-chip-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.mkt-chip--1 { top: -16px; right: 24px; }
.mkt-chip--2 { bottom: -14px; left: 20px; animation-delay: 1.4s; }

/* Lane strip along the hero foot */
.mkt-lanes {
    max-width: 1180px; margin: 0 auto; padding: 0 24px 30px;
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.mkt-lanes-label {
    font-size: 0.66rem; font-weight: 700; letter-spacing: 0.16em;
    text-transform: uppercase; color: #7E91AD;
}
.mkt-lanes-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.mkt-lane-chip {
    font-family: var(--le-mono); font-size: 0.71rem; color: #C6D2E4;
    border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 999px;
    padding: 5px 12px; background: rgba(255, 255, 255, 0.03);
}

/* Sections */
.mkt-sec { padding: 92px 24px; }
.mkt-sec--tint {
    background:
        linear-gradient(rgba(32, 37, 45, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(32, 37, 45, 0.025) 1px, transparent 1px),
        var(--le-surface-2);
    background-size: 44px 44px, 44px 44px, auto;
}
.mkt-sec-inner { max-width: 1180px; margin: 0 auto; }
.mkt-kicker {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--le-cobalt-deep); margin: 0 0 12px;
}
.mkt-h2 {
    font-size: clamp(1.6rem, 2.8vw, 2.25rem); font-weight: 700;
    letter-spacing: -0.02em; line-height: 1.2; color: var(--le-text);
    max-width: 26ch; margin: 0 0 14px;
}
.mkt-lede { color: var(--le-text-2); font-size: 0.98rem; line-height: 1.65; max-width: 62ch; margin: 0 0 40px; }

/* Capability / persona cards */
.mkt-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.mkt-card {
    background: var(--le-surface); border: 1px solid var(--le-line);
    border-radius: var(--le-radius-lg); padding: 26px;
    transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}
.mkt-card:hover { transform: translateY(-4px); box-shadow: var(--le-shadow-md); border-color: var(--le-line-strong); }
.mkt-card h3 { font-size: 1.02rem; font-weight: 700; margin: 18px 0 8px; letter-spacing: -0.01em; }
.mkt-card p { font-size: 0.875rem; line-height: 1.66; color: var(--le-text-2); margin: 0; }
.mkt-card p em { font-style: normal; font-weight: 600; color: var(--le-text); }
.mkt-card-ic {
    width: 46px; height: 46px; border-radius: 12px;
    display: grid; place-items: center;
}
.mkt-card-ic .mud-icon-root { font-size: 1.35rem; }
.mkt-card-ic[data-accent="blue"]   { background: #E8EEF7; color: var(--le-blue); }
.mkt-card-ic[data-accent="teal"]   { background: #E2F1F3; color: var(--le-teal); }
.mkt-card-ic[data-accent="green"]  { background: #E2F5EB; color: var(--le-green); }
.mkt-card-ic[data-accent="red"]    { background: #FDECEA; color: var(--le-red); }
.mkt-card-ic[data-accent="violet"] { background: #EFEAF4; color: var(--le-violet); }
.mkt-card-ic[data-accent="orange"] { background: #FCEDE2; color: var(--le-orange); }
.mkt-card-ic[data-accent="amber"]  { background: var(--le-cobalt-soft); color: var(--le-cobalt-deep); }
.mkt-card-ic[data-accent="ink"]    { background: #E8EDF2; color: var(--le-graphite-800); }

/* How-it-works steps */
.mkt-steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.mkt-steps::before {
    content: ""; position: absolute; top: 30px; left: 11%; right: 11%;
    border-top: 2px dashed var(--le-line-strong);
}
.mkt-step { position: relative; text-align: center; }
.mkt-step-no {
    font-family: var(--le-mono); font-size: 0.72rem; font-weight: 600;
    color: var(--le-cobalt-deep); letter-spacing: 0.14em; margin-bottom: 12px;
}
.mkt-step-ic {
    width: 60px; height: 60px; margin: 0 auto; border-radius: 50%;
    background: var(--le-graphite-800); color: var(--le-surface);
    display: grid; place-items: center;
    box-shadow: 0 10px 24px -10px rgba(32, 36, 43, 0.5);
    border: 3px solid var(--le-surface-2);
}
.mkt-step-ic .mud-icon-root { font-size: 1.5rem; }
.mkt-step h3 { font-size: 0.98rem; font-weight: 700; margin: 16px 0 8px; }
.mkt-step p { font-size: 0.84rem; line-height: 1.62; color: var(--le-text-2); margin: 0; }

/* Product preview window */
.mkt-window {
    background: var(--le-surface); border: 1px solid var(--le-line);
    border-radius: 16px; box-shadow: var(--le-shadow-lg); overflow: hidden;
}
.mkt-window-body { padding: 22px; }
.mkt-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.mkt-stat {
    background: var(--le-surface-2); border: 1px solid var(--le-line);
    border-radius: 12px; padding: 12px 14px;
}
.mkt-stat-n {
    display: block; font-family: var(--le-mono); font-weight: 600;
    font-size: 1.45rem; letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums; color: var(--le-text);
}
.mkt-stat-l {
    display: block; margin-top: 3px; font-size: 0.62rem; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase; color: var(--le-text-3);
}
.mkt-stat[data-accent="blue"]   .mkt-stat-n { color: var(--le-blue); }
.mkt-stat[data-accent="orange"] .mkt-stat-n { color: var(--le-orange); }
.mkt-stat[data-accent="red"]    .mkt-stat-n { color: var(--le-red); }
.mkt-stat[data-accent="green"]  .mkt-stat-n { color: var(--le-green); }
.mkt-pipeline {
    display: flex; gap: 3px; height: 10px; border-radius: 999px;
    overflow: hidden; margin-top: 16px; background: var(--le-surface-2);
}
.mkt-pipeline-seg { display: block; height: 100%; }
.mkt-window-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; margin-top: 18px; }
.mkt-feed, .mkt-list {
    background: var(--le-surface-2); border: 1px solid var(--le-line);
    border-radius: 12px; padding: 16px 18px;
}
.mkt-feed-head {
    font-size: 0.64rem; font-weight: 700; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--le-text-3); margin-bottom: 10px;
}
.mkt-feed-item { display: flex; gap: 11px; padding: 9px 0; }
.mkt-feed-item + .mkt-feed-item { border-top: 1px dashed var(--le-line); }
.mkt-feed-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: 5px; background: var(--dot, var(--le-blue)); }
.mkt-feed-title { font-size: 0.82rem; font-weight: 600; color: var(--le-text); }
.mkt-feed-tag {
    font-family: var(--le-mono); font-size: 0.62rem; font-weight: 500;
    color: var(--le-cobalt-text); background: var(--le-cobalt-soft);
    border-radius: 6px; padding: 2px 7px; margin-left: 8px; white-space: nowrap;
}
.mkt-feed-meta { font-family: var(--le-mono); font-size: 0.68rem; color: var(--le-text-3); margin-top: 2px; }
.mkt-list-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; }
.mkt-list-row + .mkt-list-row { border-top: 1px dashed var(--le-line); }
.mkt-list-num {
    font-family: var(--le-mono); font-weight: 600; font-size: 0.79rem;
    font-variant-numeric: tabular-nums; color: var(--le-text);
}
.mkt-list-route { flex: 1 1 auto; font-family: var(--le-mono); font-size: 0.7rem; color: var(--le-text-3); }

/* Pricing plans */
.mkt-plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 1200px) { .mkt-plans { grid-template-columns: repeat(2, 1fr); } }
.mkt-plan {
    position: relative;
    background: var(--le-surface); border: 1px solid var(--le-line);
    border-radius: var(--le-radius-lg); padding: 28px 26px;
    display: flex; flex-direction: column;
    transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}
.mkt-plan:hover { transform: translateY(-4px); box-shadow: var(--le-shadow-md); border-color: var(--le-line-strong); }
.mkt-plan h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.mkt-plan-for { font-size: 0.8rem; color: var(--le-text-3); margin: 5px 0 0; }
.mkt-plan-price { display: flex; align-items: baseline; gap: 3px; margin-top: 20px; color: var(--le-text); }
.mkt-plan > .mkt-plan-price { margin-bottom: 20px; }
.mkt-plan-cur { font-size: 1.05rem; font-weight: 700; }
.mkt-plan-amt {
    font-size: 2.5rem; font-weight: 700; line-height: 1;
    letter-spacing: -0.03em; font-variant-numeric: tabular-nums;
}
.mkt-plan-per { font-size: 0.8rem; font-weight: 500; color: var(--le-text-3); margin-left: 4px; }
.mkt-plan-amt--custom { font-size: 1.55rem; letter-spacing: -0.01em; }
.mkt-plan-feats { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mkt-plan-feats li {
    position: relative; padding-left: 24px;
    font-size: 0.84rem; line-height: 1.5; color: var(--le-text-2);
}
.mkt-plan-feats li::before {
    content: "\2713"; position: absolute; left: 0; top: 0;
    font-size: 0.82rem; font-weight: 700; color: var(--le-green);
}
.mkt-plan--hero {
    background:
        radial-gradient(420px 220px at 82% -10%, rgba(49, 88, 212, 0.12), transparent 60%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(160deg, var(--le-graphite-700), var(--le-graphite-900) 75%);
    background-size: auto, 44px 44px, 44px 44px, auto;
    border-color: rgba(49, 88, 212, 0.35);
    color: #D8E2F1;
    box-shadow: var(--le-shadow-lg);
}
.mkt-plan--hero:hover { box-shadow: 0 22px 52px -12px rgba(16, 18, 22, 0.5); }
.mkt-plan--hero h3, .mkt-plan--hero .mkt-plan-price { color: #F4F7FC; }
.mkt-plan--hero .mkt-plan-for, .mkt-plan--hero .mkt-plan-per { color: #93A5C0; }
.mkt-plan--hero .mkt-plan-feats li { color: #C6D2E4; }
.mkt-plan--hero .mkt-plan-feats li::before { color: var(--le-cobalt); }
.mkt-plan-badge {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, #8FA8FF, var(--le-cobalt) 55%, #1D348B);
    color: var(--le-cobalt-ink); font-size: 0.64rem; font-weight: 700;
    letter-spacing: 0.12em; text-transform: uppercase;
    padding: 5px 14px; border-radius: 999px; white-space: nowrap;
    box-shadow: 0 6px 16px -6px rgba(49, 88, 212, 0.7);
}
.mkt-plan-note {
    max-width: 76ch; margin: 28px auto 0; text-align: center;
    font-size: 0.8rem; line-height: 1.7; color: var(--le-text-3);
}

/* Final CTA band — full signal */
.mkt-cta {
    background: linear-gradient(120deg, #8FA8FF, var(--le-cobalt) 55%, #1D348B);
    padding: 78px 24px;
}
.mkt-cta-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.mkt-cta-title {
    font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 700;
    letter-spacing: -0.025em; line-height: 1.15; color: var(--le-cobalt-ink);
    margin: 0 0 14px;
}
.mkt-cta-sub { color: rgba(248, 250, 255, 0.78); font-size: 0.98rem; line-height: 1.6; margin: 0 0 30px; }

/* Footer */
.mkt-footer { background: var(--le-graphite-950); color: #93A5C0; padding: 60px 24px 0; }
.mkt-footer-inner {
    max-width: 1180px; margin: 0 auto;
    display: flex; gap: 48px; justify-content: space-between; flex-wrap: wrap;
}
.mkt-footer-tag { color: #7E91AD; font-size: 0.85rem; line-height: 1.6; max-width: 34ch; margin: 16px 0 0; }
.mkt-footer-links { display: flex; gap: 72px; }
.mkt-footer-head {
    font-size: 0.64rem; font-weight: 700; letter-spacing: 0.16em;
    text-transform: uppercase; color: #586C8C; margin-bottom: 12px;
}
.mkt-footer-col a {
    display: block; color: #93A5C0; text-decoration: none;
    font-size: 0.85rem; margin: 9px 0; transition: color 0.14s;
}
.mkt-footer-col a:hover { color: var(--le-cobalt); }
.mkt-footer-base {
    max-width: 1180px; margin: 48px auto 0; padding: 18px 0 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    font-size: 0.75rem; color: #66799A;
}
.mkt-footer-mono { font-family: var(--le-mono); letter-spacing: 0.04em; }

/* Legal pages (terms of service, privacy policy) */
.mkt-legal { padding: 64px 24px 96px; background: var(--le-canvas); }
.mkt-legal-inner { max-width: 760px; margin: 0 auto; }
.mkt-legal h1 {
    font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 700;
    letter-spacing: -0.025em; color: var(--le-text); margin: 0 0 10px;
}
.mkt-legal-updated {
    font-family: var(--le-mono); font-size: 0.76rem; color: var(--le-text-3);
    margin: 0 0 26px; padding-bottom: 26px; border-bottom: 1px solid var(--le-line);
}
.mkt-legal h2 {
    font-size: 1.02rem; font-weight: 700; letter-spacing: -0.01em;
    color: var(--le-text); margin: 42px 0 12px;
}
.mkt-legal p { font-size: 0.9rem; line-height: 1.75; color: var(--le-text-2); margin: 0 0 14px; }
.mkt-legal p strong { color: var(--le-text); font-weight: 600; }
.mkt-legal ul { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.mkt-legal ul li {
    position: relative; padding-left: 22px;
    font-size: 0.9rem; line-height: 1.65; color: var(--le-text-2);
}
.mkt-legal ul li::before {
    content: ""; position: absolute; left: 2px; top: 0.6em;
    width: 7px; height: 7px; border-radius: 2px; background: var(--le-cobalt);
}
.mkt-legal a {
    color: var(--le-cobalt-deep); font-weight: 600; text-decoration: none;
    border-bottom: 1px solid rgba(36, 66, 165, 0.35);
}
.mkt-legal a:hover { color: var(--le-cobalt-ink); border-bottom-color: var(--le-cobalt-ink); }
.mkt-legal-foot {
    padding: 22px 24px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap; font-size: 0.78rem;
}
.mkt-legal-foot-links { display: inline-flex; gap: 22px; }
.mkt-legal-foot-links a { color: #93A5C0; font-weight: 500; border-bottom: none; font-size: 0.78rem; }
.mkt-legal-foot-links a:hover { color: var(--le-cobalt); }

/* Entry animation (staggered) — the global reduced-motion guard applies */
.mkt-rise { animation: le-rise 0.55s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.mkt-rise.d1 { animation-delay: 0.1s; }
.mkt-rise.d2 { animation-delay: 0.2s; }
.mkt-rise.d3 { animation-delay: 0.3s; }

@media (max-width: 1024px) {
    .mkt-hero-grid { grid-template-columns: 1fr; gap: 44px; padding-top: 64px; }
    .mkt-hero-visual { justify-self: center; }
    .mkt-cards { grid-template-columns: repeat(2, 1fr); }
    .mkt-plans { grid-template-columns: 1fr; max-width: 480px; margin-left: auto; margin-right: auto; }
    .mkt-plan--hero { order: -1; }
    .mkt-stats { grid-template-columns: repeat(3, 1fr); }
    .mkt-window-cols { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
    .mkt-nav-links { display: none; }
    .mkt-nav { gap: 16px; }
    .mkt-steps { grid-template-columns: repeat(2, 1fr); gap: 30px 22px; }
    .mkt-steps::before { display: none; }
    .mkt-sec { padding: 72px 20px; }
}

@media (max-width: 640px) {
    .mkt-cards { grid-template-columns: 1fr; }
    .mkt-steps { grid-template-columns: 1fr; }
    .mkt-stats { grid-template-columns: repeat(2, 1fr); }
    .mkt-chip--1, .mkt-chip--2 { font-size: 0.68rem; padding: 6px 11px; }
    .mkt-lanes { gap: 12px; }
    .mkt-footer-inner { gap: 32px; }
    .mkt-footer-links { gap: 44px; }
    .mkt-nav-inner { padding: 0 18px; gap: 12px; }
    .mkt-link-quiet { display: none; }
}



/* ===================================================== refinement layer ===
   Graphite + Cobalt: operational hierarchy over component uniformity. */
.mud-typography-h3, .mud-typography-h4, .mud-typography-h5, .mud-typography-h6 { font-family: var(--le-font); letter-spacing: -0.012em; }
.le-card { background: var(--le-surface-raised); border-color: var(--le-line); border-radius: 12px; box-shadow: none; }
.le-card-pad { padding: 20px 22px; }
.le-card-title { letter-spacing: -0.015em; margin-bottom: 16px; }
.dashboard-grid > * { animation: none; }
.stat-card { border-radius: 12px; border-left: 3px solid var(--acc-strong, var(--le-line-strong)); box-shadow: 0 1px 0 rgba(32, 37, 45, 0.04); padding: 17px 18px 17px 16px; transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease; }
.stat-card:hover { transform: none; border-color: var(--acc-strong, var(--le-line-strong)); box-shadow: 0 5px 14px -10px rgba(32, 37, 45, 0.34); background: var(--le-surface); }
.stat-icon { width: 42px; height: 42px; border-radius: 10px; }
.stat-value { font-family: var(--le-display); font-size: 2.05rem; letter-spacing: -0.035em; }
.stat-label { font-size: 0.7rem; letter-spacing: 0.06em; }
.dash-columns { gap: 20px; }
.dash-columns > .le-card { box-shadow: none; }
.dash-columns > .le-card:first-child { border-top: 2px solid var(--le-cobalt); }
.dash-columns > .le-card:nth-child(2) { background: var(--le-surface-subtle); border-color: var(--le-line-soft); }
.le-attention { border-left: 4px solid var(--le-red); padding: 15px 18px 15px 15px; box-shadow: inset 0 0 0 1px rgba(179, 38, 30, 0.04); }
.le-attention .update-ic { width: 38px; height: 38px; border: 1px solid #F2CCC6; }
.update-row { padding: 14px 20px; border-left: 3px solid transparent; transition: background 0.12s, border-color 0.12s; }
.update-row:hover { background: var(--le-surface-subtle); border-left-color: var(--le-cobalt); }
.update-row:focus-visible { outline: none; background: var(--le-cobalt-soft); border-left-color: var(--le-cobalt); }
.update-title { font-size: 0.9rem; }
.update-sub { font-size: 0.8rem; }
.update-time { font-size: 0.74rem; color: var(--le-text-2); }
.le-table-wrap { border-radius: 12px; box-shadow: none; background: var(--le-surface-raised); }
.le-table { font-size: 0.86rem; }
.le-table th, .le-table td { padding: 11px 16px; }
.le-table thead th { background: var(--le-surface-inset); color: var(--le-text-2); letter-spacing: 0.075em; }
.le-table tbody tr:hover { background: var(--le-surface-subtle); box-shadow: inset 3px 0 0 var(--le-cobalt); }
.le-sort-btn:focus-visible { outline: none; box-shadow: var(--le-focus-ring); border-radius: 4px; }
.delivery-card, .customer-card { border-radius: 12px; box-shadow: none; border-left: 3px solid transparent; transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease; }
.delivery-card:hover, .customer-card:hover { transform: none; border-left-color: var(--le-cobalt); border-color: var(--le-line-strong); box-shadow: 0 6px 16px -12px rgba(32, 37, 45, 0.42); }
.delivery-card:focus-visible, .customer-card:focus-visible { outline: none; box-shadow: var(--le-focus-ring); }
.le-tag { border-radius: 6px; background: var(--le-surface-subtle); }
.le-chip-btn { border-radius: 8px; }
.le-filter-tag { border-radius: 6px; }
.le-page-title { letter-spacing: -0.025em; }
.le-page-sub { line-height: 1.45; }
.le-hero-number { font-size: 1.8rem; letter-spacing: -0.035em; }
.le-route { font-size: 1.02rem; letter-spacing: -0.01em; }
.le-def > div { padding: 10px 0; border-bottom-style: solid; border-bottom-color: var(--le-line-soft); }
.le-delay-note { border-left-width: 5px; padding: 12px 15px; box-shadow: 0 2px 10px -8px rgba(179, 38, 30, 0.45); }
.le-stepper { margin-top: 18px; }
.le-step-label { font-size: 0.68rem; }
.le-step.current .le-step-dot { box-shadow: 0 0 0 4px rgba(49, 88, 212, 0.14); }
.mud-dialog { border-radius: 16px !important; box-shadow: 0 24px 70px -24px rgba(16, 18, 22, 0.48) !important; }
.mud-dialog-title { padding-bottom: 10px !important; }
.mud-dialog-actions { border-top: 1px solid var(--le-line-soft); padding-top: 14px !important; }
.le-drawer .mud-nav-link:focus-visible, .le-appbar button:focus-visible, .le-user-btn:focus-visible { outline: none; box-shadow: var(--le-focus-ring); }
.stat-label, .customer-prefs-title { letter-spacing: 0.055em; }
@media (prefers-reduced-motion: reduce) { .dashboard-grid > *, .customer-grid > .customer-card { animation: none !important; } }

/* ============================ adversarial hardening ======================= */
/* Compatibility aliases for legacy status-* emitters. */
.status-chip.status-created { color: #536171; background: #E9F0F1; border-color: #D7E3E5; }
.status-chip.status-delivered { color: #137A4B; background: #E2F5EB; border-color: #CDEBD9; }
.status-chip.status-delayed { color: #B3261E; background: #FDECEA; border-color: #F6CDC9; }
.status-chip.status-cancelled { color: #586675; background: #ECF1F2; border-color: #DCE5E7; }
.status-chip.scheduled, .status-chip.tone-1 { color: #5A4D9B; }
.status-chip.cancelled, .status-chip.status-cancelled { color: #586675; }

/* Light signal on graphite; deep cobalt remains for text on light surfaces. */
:root { --le-cobalt-on-dark: #8FA8FF; }
.le-nav-section, .le-drawer-footer, .scanner-empty { color: #A8B5C8; }
.mkt-eyebrow, .mkt-footer-head { color: var(--le-cobalt-on-dark); }
.le-label-brand-mark { color: var(--le-cobalt-on-dark); }
.scanner-manual-link:hover, .mkt-legal a:hover { color: var(--le-cobalt-deep) !important; text-decoration: underline; }

/* Never remove the native keyboard affordance without a solid replacement. */
h1:focus { outline: 2px solid transparent; }
:where(button, a, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--le-cobalt-on-dark);
    outline-offset: 2px;
}
:where(button, a, input, select, textarea, [tabindex]):focus-visible:not(.mud-input-root) {
    box-shadow: var(--le-focus-ring);
}
.le-drawer :where(button, a, [tabindex]):focus-visible,
.le-appbar :where(button, a, [tabindex]):focus-visible {
    outline-color: var(--le-cobalt-on-dark);
    box-shadow: 0 0 0 3px rgba(143, 168, 255, 0.28);
}
.le-tone-swatch:focus-visible, .le-camera-shutter:focus-visible, .le-attach-chip:focus-visible {
    outline: 2px solid var(--le-cobalt);
    outline-offset: 3px;
    box-shadow: var(--le-focus-ring);
}

/* Keep the operational stepper readable before the compact mobile mode. */
.le-step-label { white-space: normal; max-width: 92px; line-height: 1.2; }
@media (max-width: 820px) {
    .le-stepper { overflow-x: auto; justify-content: flex-start; gap: 22px; padding: 0 4px 8px; scrollbar-width: thin; }
    .le-step { flex: 0 0 68px; }
    .le-track, .le-track-fill { left: 38px; right: 38px; }
}
.le-hero-actions, .le-detail-actions { min-width: 0; }
.le-def { min-width: 0; }
.le-def dd { min-width: 0; }

/* Responsive data surfaces. */
.le-table-wrap { scrollbar-width: thin; }
.le-table-wrap:focus-visible { outline: 2px solid var(--le-cobalt); outline-offset: 3px; }
.mkt-mock, .mkt-window, .mkt-window-cols { min-width: 0; max-width: 100%; }
.mkt-window-row, .mkt-window-row * { min-width: 0; }
.le-label-sheet { overflow-x: auto; }
@media (max-width: 480px) {
    .le-label-sheet { justify-content: flex-start; padding-inline: 8px; }
    .le-label { margin-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .stat-card:hover, .customer-card:hover, .delivery-card:hover, .mkt-card:hover, .mkt-plan:hover, .le-camera-shutter:hover, .le-camera-shutter:active { transform: none !important; }
}

/* Free plan band above the paid grid (Graphite + Cobalt) */
.mkt-plan-free {
    display: flex; align-items: center; gap: 24px;
    background: var(--le-surface); border: 1px solid var(--le-line);
    border-left: 3px solid var(--le-cobalt);
    border-radius: var(--le-radius-lg); padding: 20px 26px;
    margin: 6px 0 22px; box-shadow: var(--le-shadow-sm);
}
.mkt-plan-free-head { display: flex; align-items: baseline; gap: 14px; flex: none; }
.mkt-plan-free-head h3 { font-family: var(--le-display); font-size: 1.15rem; font-weight: 700; letter-spacing: -0.005em; margin: 0; }
.mkt-plan-free .mkt-plan-price { margin-top: 0; }
.mkt-plan-free .mkt-plan-amt { font-size: 1.9rem; }
.mkt-plan-free-for { flex: none; max-width: 19ch; font-size: 0.8rem; line-height: 1.5; color: var(--le-text-3); margin: 0; }
.mkt-plan-free-feats {
    list-style: none; display: flex; flex-wrap: wrap; justify-content: center;
    gap: 8px; margin: 0; padding: 0; flex: 1 1 auto; min-width: 0;
}
.mkt-plan-free-feats li {
    font-size: 0.75rem; font-weight: 500; color: var(--le-text-2);
    background: var(--le-surface-2); border: 1px solid var(--le-line);
    border-radius: 999px; padding: 4px 12px; white-space: nowrap;
}
.mkt-plan-free-cta { flex: none; }
@media (max-width: 640px) {
    .mkt-plan-free { flex-direction: column; align-items: stretch; gap: 12px; padding: 20px; margin: 4px 0 18px; }
    .mkt-plan-free-head { justify-content: space-between; }
    .mkt-plan-free-for { max-width: none; }
    .mkt-plan-free-feats { justify-content: flex-start; }
    .mkt-plan-free-cta { width: 100%; }
}

/* Display face for hero/section headings and key prices (restored). */
.mkt-h1, .mkt-h2, .mkt-plan h3, .auth-brand-headline, .le-page-title { font-family: var(--le-display); }

/* ------------------------------------------- UI language: Myanmar & Thai ---
   Both scripts stack diacritics above/below the line and (for Myanmar) carry no
   spaces, so text-bearing surfaces get taller line boxes and generous wrapping.
   Font glyphs themselves arrive via the Noto families in the :root font tokens. */
html[lang="my"] body, html[lang="th"] body { line-height: 1.75; }
html[lang="my"] .mud-typography, html[lang="th"] .mud-typography { line-height: 1.7; }
html[lang="my"] .mud-button-root, html[lang="th"] .mud-button-root { line-height: 1.5; }
html[lang="my"] .mud-input-root, html[lang="my"] .mud-input, html[lang="my"] .mud-select,
html[lang="th"] .mud-input-root, html[lang="th"] .mud-input, html[lang="th"] .mud-select { line-height: 1.6; }
html[lang="my"] .status-chip, html[lang="th"] .status-chip { line-height: 1.55; overflow-wrap: break-word; }
html[lang="my"] .le-nav .mud-nav-link, html[lang="th"] .le-nav .mud-nav-link {
    min-height: 46px; line-height: 1.5; overflow-wrap: break-word;
}
html[lang="my"] .le-nav-section, html[lang="th"] .le-nav-section { letter-spacing: 0; }
html[lang="my"] th, html[lang="my"] .mud-table-cell, html[lang="th"] th, html[lang="th"] .mud-table-cell {
    overflow-wrap: break-word; line-height: 1.55;
}
html[lang="my"] .le-form label, html[lang="my"] .mud-input-label,
html[lang="th"] .le-form label, html[lang="th"] .mud-input-label { line-height: 1.5; }
html[lang="my"] .le-dialog-head .mud-dialog-title, html[lang="th"] .le-dialog-head .mud-dialog-title { line-height: 1.5; }
html[lang="my"] .mud-menu .mud-list-item, html[lang="th"] .mud-menu .mud-list-item { min-height: 44px; }
html[lang="my"] .le-attention, html[lang="my"] .le-delay-note, html[lang="my"] .le-empty,
html[lang="th"] .le-attention, html[lang="th"] .le-delay-note, html[lang="th"] .le-empty { line-height: 1.8; }

/* Language switcher (appbar menu button and its public-page variant). */
.le-lang-switch.mud-button-root { text-transform: none; font-weight: 600; font-size: 0.84rem; }
.le-lang-switch .mud-icon-root { font-size: 1.05rem; opacity: 0.85; }
.le-lang-item .mud-icon-root { font-size: 1.1rem; }
.le-lang-current { color: #8FA8FF; }
.auth-form-side { position: relative; }
.auth-center { position: relative; }
.auth-lang { position: absolute; top: 18px; right: 22px; z-index: 5; }

