/* ==========================================================================
   EMAROX family look for the app itself (STYL-EMAROX.md), 2026-09-30.
   Loaded after every other app stylesheet, so it wins without touching
   their rules. The landing is untouched (all of it lives under
   #landing-overlay with its own tokens). To go back to the old look:
   drop the <link> to this file and restore the CSS files from
   _backup_pre_emx_style_2026-09-30/.

   Neutral black base, the Map accent as enamel cyan (amber in TIR mode),
   Plus Jakarta headings ending in the accent dot, metal pill for the one
   main action, glass pill for the rest, no glow.
   ========================================================================== */

:root {
    /* soft graphite, not pure black: easier on the eyes for a whole workday */
    --emx-bg: #121215;
    --emx-bg-2: #16161a;
    --emx-surface: #1b1b1f;
    --emx-surface-2: #232328;
    --emx-line: rgba(255, 255, 255, .08);
    --emx-line-2: rgba(255, 255, 255, .14);
    --emx-text: #f4f3f0;
    --emx-text-2: #a3a3a7;
    --emx-text-3: #8a8a90;

    --emx-accent: #3cbfda;
    --emx-accent-base: #1fa4c2;
    --emx-accent-ink: #02151b;
    --emx-tint: rgba(31, 164, 194, .08);
    --emx-tint-2: rgba(31, 164, 194, .14);
    --emx-metal: linear-gradient(180deg, #a4ecf4 0%, #4cc9e0 38%, #1c97b5 68%, #0d5f77 100%);
    --emx-btn-fill: linear-gradient(180deg, #63d4e7 0%, #27abc8 55%, #1689a7 100%);
    --emx-btn-shine: rgba(225, 250, 255, .55);
    --emx-btn-shadow: rgba(31, 164, 194, .5);
    --emx-sheen: rgba(235, 252, 255, .55);

    --emx-good: #34d399;
    --emx-bad: #f87171;
    --emx-warn: #e8a33d;

    --emx-glass: rgba(30, 30, 35, .8);
    --emx-overlay: rgba(10, 10, 12, .6);
    --emx-shadow: 0 30px 80px rgba(0, 0, 0, .55);
    --emx-shadow-sm: 0 12px 34px rgba(0, 0, 0, .42);

    --emx-ease: cubic-bezier(.22, 1, .36, 1);
    /* Headings inside the app stay in Inter (the user preferred it over
       Jakarta here); Jakarta is kept for the Emarox Map wordmark only. */
    --emx-font-head: 'EMX Inter', 'Inter', system-ui, 'Segoe UI', Arial, sans-serif;
    --emx-font-brand: 'EMX Jakarta', 'Plus Jakarta Sans', system-ui, sans-serif;
    --emx-font-body: 'EMX Inter', 'Inter', system-ui, 'Segoe UI', Arial, sans-serif;
    --emx-font-num: 'EMX Inter', 'Inter', system-ui, 'Segoe UI', Arial, sans-serif;

    /* the old names, pointed at the family palette */
    --bg-deep: var(--emx-bg);
    --glass-bg: rgba(20, 20, 23, .86);
    --glass-border: var(--emx-line);
    --text-main: var(--emx-text);
    --text-muted: var(--emx-text-2);
    --neon-green: var(--emx-good);
    --neon-red: var(--emx-bad);
}

/* TIR: the second colour of the product, only because VAN and TIR differ */
body.tir-mode {
    --emx-accent: #eea24a;
    --emx-accent-base: #e8922a;
    --emx-accent-ink: #1c0f02;
    --emx-tint: rgba(232, 146, 42, .08);
    --emx-tint-2: rgba(232, 146, 42, .15);
    --emx-metal: linear-gradient(180deg, #f7c378 0%, #ec9a36 40%, #c9731a 72%, #8c4b0c 100%);
    --emx-btn-fill: linear-gradient(180deg, #f5bd6a 0%, #e8922a 55%, #c47016 100%);
    --emx-btn-shine: rgba(255, 240, 214, .55);
    --emx-btn-shadow: rgba(232, 146, 42, .5);
    --emx-sheen: rgba(255, 244, 222, .6);
    --neon-cyan: var(--emx-accent-base);
}

body.light-theme {
    --emx-bg: #f5f5f3;
    --emx-bg-2: #eeeeeb;
    --emx-surface: #ffffff;
    --emx-surface-2: #f1f1ee;
    --emx-line: rgba(12, 12, 14, .09);
    --emx-line-2: rgba(12, 12, 14, .17);
    --emx-text: #0e0e10;
    --emx-text-2: #55555a;
    --emx-text-3: #68686d;
    --emx-accent: #0a6479;
    --emx-accent-base: #13849f;
    --emx-tint: rgba(19, 132, 159, .08);
    --emx-tint-2: rgba(19, 132, 159, .15);
    --emx-metal: linear-gradient(180deg, #2eaecb 0%, #14879f 42%, #0d6a82 74%, #0a4a5c 100%);
    --emx-btn-fill: linear-gradient(180deg, #3fc2dc 0%, #1c9bb9 55%, #11809c 100%);
    --emx-btn-shine: rgba(225, 250, 255, .6);
    --emx-btn-shadow: rgba(19, 132, 159, .45);
    --emx-good: #0f8a5f;
    --emx-bad: #c62828;
    --emx-warn: #a86406;
    --emx-glass: rgba(255, 255, 255, .78);
    --emx-overlay: rgba(20, 20, 24, .38);
    --emx-shadow: 0 30px 70px rgba(20, 20, 24, .16), 0 4px 14px rgba(20, 20, 24, .06);
    --emx-shadow-sm: 0 10px 28px rgba(20, 20, 24, .12);
    --bg-deep: var(--emx-bg);
    --glass-bg: rgba(255, 255, 255, .9);
    --text-main: var(--emx-text);
    --text-muted: var(--emx-text-2);
}

body.light-theme.tir-mode {
    --emx-accent: #9a5308;
    --emx-accent-base: #b3620c;
    --emx-accent-ink: #fff8ef;
    --emx-tint: rgba(179, 98, 12, .08);
    --emx-tint-2: rgba(179, 98, 12, .15);
    --emx-metal: linear-gradient(180deg, #e0923a 0%, #c26f14 42%, #9c5409 74%, #6e3a05 100%);
    --emx-btn-fill: linear-gradient(180deg, #e39a45 0%, #c26f14 55%, #9c5409 100%);
    --emx-btn-shadow: rgba(179, 98, 12, .45);
}

/* ─────────────────────────── base ─────────────────────────── */

body {
    font-family: var(--emx-font-body);
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body button,
body input,
body select,
body textarea {
    font-family: inherit;
}

#emarox-bg { background-color: var(--emx-bg) !important; }

body ::selection { background: var(--emx-accent-base); color: var(--emx-accent-ink); }

/* Keyboard focus ring on things you press. Fields draw their own focus
   (border + soft ring), and inside clipped boxes (the AI scanner) an outline
   survived only as a hard cyan line under the text. */
body :is(button, a, [role="button"], [tabindex]:not(textarea):not(input)):focus-visible { outline: 2px solid var(--emx-accent); outline-offset: 2px; }
body :is(input, textarea, select):focus-visible { outline: none; }

/* thin neutral scrollbars; the accent only while you hold one */
body *::-webkit-scrollbar { width: 8px; height: 8px; }
body *::-webkit-scrollbar-track { background: transparent; }
body *::-webkit-scrollbar-thumb {
    background: var(--emx-line-2); border-radius: 999px;
    border: 2px solid transparent; background-clip: padding-box;
}
body *::-webkit-scrollbar-thumb:hover { background: var(--emx-text-3); background-clip: padding-box; }
body *::-webkit-scrollbar-thumb:active { background: var(--emx-accent-base); background-clip: padding-box; }

/* ───────────────────── header pill (navbar) ───────────────────── */

body .header-controls {
    gap: 4px;
    padding: 6px;
    background: rgba(30, 30, 35, .92);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid var(--emx-line-2);
    border-radius: 999px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
}
body.light-theme .header-controls { background: rgba(255, 255, 255, .9); }
/* PROFIT without the add-on stays grey (js/addons.js, profit.css) */
body.addon-profit-locked .header-controls .nav-btn-profit,
body.addon-profit-locked .header-controls .nav-btn-profit > i { color: var(--emx-text-3); }
body.addon-profit-locked .header-controls .nav-btn-profit:hover { color: var(--emx-text-2); background: rgba(255, 255, 255, .05); }
body .header-controls:hover { background: rgba(30, 30, 35, .92); border-color: var(--emx-line-2); }

body .header-controls .nav-btn,
body .header-controls .login-ghost-btn {
    display: inline-flex; align-items: center; gap: 9px;
    height: 42px; padding: 0 18px; margin: 0;
    border: 0; border-radius: 999px; clip-path: none;
    background: transparent; box-shadow: none;
    /* sentence case, medium weight and a slightly softened white: calm to
       read for a whole working day (uppercase + tracking read as "sharp") */
    color: rgba(244, 243, 240, .88);
    font-family: var(--emx-font-body); font-size: 14.5px; font-weight: 500;
    letter-spacing: 0; text-transform: none;
    transition: background-color .2s, color .2s;
}
body .header-controls .nav-btn::before,
body .header-controls .login-ghost-btn::before,
body .header-controls .login-ghost-btn::after { display: none; }
body .header-controls .nav-btn i,
body .header-controls .login-ghost-btn i { font-size: 14px; color: var(--emx-accent); opacity: .9; }
body .header-controls .nav-btn:hover,
body .header-controls .login-ghost-btn:hover {
    background: var(--emx-tint-2); color: var(--emx-text); transform: none; box-shadow: none;
}
body.light-theme .header-controls .nav-btn:hover,
body.light-theme .header-controls .login-ghost-btn:hover { color: var(--emx-text); }
/* the account sits last, split from the links by a hairline, like the family navbar */
body .header-controls .login-ghost-btn {
    position: relative; margin-left: 6px; color: var(--emx-text);
    background: rgba(255, 255, 255, .04); border: 1px solid var(--emx-line-2);
}
body .header-controls .login-ghost-btn:hover { border-color: var(--emx-accent-base); color: var(--emx-accent); }

body .controls-toggle-btn {
    background: var(--emx-glass);
    -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid var(--emx-line-2); border-radius: 999px;
    color: var(--emx-text);
}

/* phone: the sidebar toggle matches the header toggle (glass circle) */
body .mobile-toggle-btn {
    border-radius: 999px !important;
    background: var(--emx-glass) !important;
    -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid var(--emx-line-2) !important;
    color: var(--emx-text) !important;
    box-shadow: var(--emx-shadow-sm) !important;
}

/* ───────────────────────── sidebar ───────────────────────── */

body .sidebar {
    background: var(--emx-bg-2);
    border-right: 1px solid var(--emx-line);
}

body .sidebar .label-title,
body .sidebar .input-group label,
body .sidebar .row label {
    font-family: var(--emx-font-body);
    font-size: 11.5px; font-weight: 600; letter-spacing: .12em;
    color: var(--emx-text-3);
}

/* section heading (FINANSE): Jakarta, not a spaced-out neon label */
body .sidebar .section-header {
    margin: 26px 0 14px; padding: 0;
    font-family: var(--emx-font-head); font-weight: 700;
    font-size: 1.2rem; letter-spacing: -.02em; line-height: 1.1;
    text-transform: none; text-align: left;
    color: var(--emx-text);
    border: 0;
}
body .sidebar .section-header::first-letter { text-transform: uppercase; }

/* brand lockup instead of the neon logo picture */
body .sidebar .brand { padding: 28px 0 22px !important; align-items: flex-start !important; }
body .sidebar .brand .header-logo { display: none; }
body .emx-side-brand { display: flex; align-items: center; gap: 12px; }
body .emx-side-mark {
    display: block; height: 36px; aspect-ratio: 108 / 64; flex-shrink: 0;
    background: var(--emx-metal);
    -webkit-mask: url("landing/assets/img/logo-mark.webp") center / contain no-repeat;
    mask: url("landing/assets/img/logo-mark.webp") center / contain no-repeat;
}
body .emx-side-name {
    font-family: var(--emx-font-brand); font-weight: 700; font-size: 1.6rem;
    letter-spacing: -.025em; line-height: 1.15; white-space: nowrap;
    background: var(--emx-metal); -webkit-background-clip: text; background-clip: text; color: transparent;
    padding-bottom: .08em;
}

/* phone: the round menu toggle sits at 15px/15px over the sidebar */
@media (max-width: 768px) {
    body .sidebar .brand { padding: 24px 0 18px 62px !important; }
    body .emx-side-name { font-size: 1.4rem; }
}

/* VAN / TIR switch */
body .premium-mode-toggle {
    background: var(--emx-surface);
    border: 1px solid var(--emx-line);
    border-radius: 999px;
    box-shadow: none;
}
body .premium-mode-toggle::after { display: none; }
body .premium-mode-toggle .toggle-slider {
    border-radius: 999px;
    background: var(--emx-surface-2);
    border: 1px solid var(--emx-line-2);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}
body .premium-mode-toggle .toggle-option {
    font-family: var(--emx-font-body); font-weight: 600; letter-spacing: .12em;
    color: var(--emx-text-3);
}
body .premium-mode-toggle .toggle-option.active,
body .premium-mode-toggle .toggle-option.active i { color: var(--emx-accent); text-shadow: none; }

/* route stops: quiet cards, dates in plain text colour */
body .location-row {
    background: var(--emx-surface);
    border: 1px solid var(--emx-line);
    border-radius: 14px;
    padding: 6px 10px 6px 2px;
}
body .location-row:hover { border-color: var(--emx-line-2); background: var(--emx-surface); }
body .date-input,
body .waypoint-date,
body .input-group-main .date-input,
body .input-group-main .waypoint-date {
    background: transparent;
    border: 1px solid var(--emx-line);
    border-radius: 8px;
    color: var(--emx-text-2);
    font-family: var(--emx-font-body);
    font-size: 12.5px;
}
body .date-input:focus,
body .waypoint-date:focus,
body .input-group-main .date-input:focus,
body .input-group-main .waypoint-date:focus { border-color: var(--emx-accent-base); color: var(--emx-text); }
body .deadhead-btn {
    border-radius: 10px;
    background: transparent;
    border: 1px solid var(--emx-line-2);
    color: var(--emx-text-2);
    font-family: var(--emx-font-body); font-size: 10px; font-weight: 600; letter-spacing: .06em;
}
body .deadhead-btn:hover { background: var(--emx-tint); border-color: var(--emx-accent-base); color: var(--emx-accent); }
body .drag-handle { color: var(--emx-text-3); }

/* avoid-countries: a plain collapsible row, not a cyan box */
body .avoid-countries-panel {
    background: var(--emx-surface);
    border: 1px solid var(--emx-line);
    border-radius: 14px;
}
body .avoid-title { color: var(--emx-text); font-size: 12.5px; font-weight: 600; letter-spacing: .06em; }
body .avoid-title i { color: var(--emx-text-3); }

/* route variants under the stops */
body .mode-btn {
    background: var(--emx-surface);
    border: 1px solid var(--emx-line);
    border-radius: 14px;
    color: var(--emx-text-2);
    box-shadow: none;
    transition: border-color .2s, background-color .2s, color .2s, transform .4s var(--emx-ease);
}
body .mode-btn:hover { background: var(--emx-surface); border-color: var(--emx-line-2); color: var(--emx-text); transform: translateY(-2px); }
body .mode-btn span { font-size: 11px; font-weight: 600; letter-spacing: .08em; }
body .mode-btn.fast.active,
body .mode-btn.eco.active,
body .mode-btn.short.active {
    background: var(--emx-tint-2);
    border-color: var(--emx-accent-base);
    color: var(--emx-text);
}
body .mode-btn.fast.active i,
body .mode-btn.eco.active i,
body .mode-btn.short.active i { color: var(--emx-accent); }

/* ───────────────────── route HUD (mission bar) ───────────────────── */

body .mission-bar {
    background: var(--emx-glass);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid var(--emx-line);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .05);
    transition: transform .8s var(--emx-ease), border-radius .3s var(--emx-ease);
}
body .route-compare-panel {
    background: var(--emx-glass);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    backdrop-filter: blur(20px) saturate(1.5);
    border-color: var(--emx-line);
    transition: opacity .4s var(--emx-ease), transform .5s var(--emx-ease), visibility .4s;
}
body .hud-label {
    font-family: var(--emx-font-body);
    font-size: 11.5px; font-weight: 600; letter-spacing: .08em;
    color: var(--emx-text-3);
    margin-bottom: 3px;
}
body .hud-value {
    font-family: var(--emx-font-num); font-weight: 700; font-size: 17px;
    letter-spacing: -.01em; color: var(--emx-text);
}
body .hud-value.highlight { color: var(--emx-text); font-size: 19px; }
body .hud-value.profit { color: var(--emx-good); font-size: 19px; }
body .hud-value.loss { color: var(--emx-bad); font-size: 19px; }
body .hud-sub { font-size: 11.5px; font-weight: 600; color: var(--emx-text-3); }
body .hud-sub.pos { color: var(--emx-good); }
body .hud-sub.neg { color: var(--emx-bad); }
body .compare-toggle-container { color: var(--emx-text-2); }
body .compare-toggle-container:hover,
body .mission-bar.panel-open .compare-toggle-container { background: rgba(255, 255, 255, .06); color: var(--emx-text); }
body .rc-row { background: var(--emx-surface); border-color: var(--emx-line); border-radius: 12px; }
body .rc-row i.fa-leaf { color: var(--emx-good); }
body .rc-row i.fa-ruler { color: #e6c35c; }
body .rc-header { font-family: var(--emx-font-body); font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--emx-text-3); border-color: var(--emx-line); }

body #btn-hud-share {
    display: inline-flex; align-items: center; gap: 8px;
    height: 38px; padding: 0 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--emx-line-2);
    color: var(--emx-text);
    font-family: var(--emx-font-body); font-size: 13.5px; font-weight: 600;
    white-space: nowrap; cursor: pointer;
    transition: border-color .2s, color .2s, transform .4s var(--emx-ease);
}
body #btn-hud-share span { margin-left: 0 !important; }
body #btn-hud-share i { color: var(--emx-accent); }
body #btn-hud-share:hover { border-color: var(--emx-accent-base); color: var(--emx-accent); transform: translateY(-1px); }

/* help bubble bottom right: a glass circle, not a glowing cyan disc */
body .feedback-trigger {
    width: 54px; height: 54px;
    background: var(--emx-glass);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid var(--emx-line-2);
    color: var(--emx-accent);
    font-size: 20px;
    box-shadow: var(--emx-shadow-sm);
    transition: transform .4s var(--emx-ease), border-color .2s;
}
body .feedback-trigger:hover { transform: translateY(-2px); border-color: var(--emx-accent-base); box-shadow: var(--emx-shadow-sm); }

/* sidebar actions read in sentence case like the rest of the family;
   only the small captions above fields stay in capitals */
body .sidebar :is(.btn-secondary, .sidebar-ai-btn, .deadhead-btn, .save-order-btn, .bug-report-trigger, .mode-btn span, .avoid-title) {
    text-transform: none; letter-spacing: 0;
}
body .sidebar .sidebar-ai-btn,
body .sidebar .save-order-btn { font-size: 14.5px; font-weight: 600; }
body .sidebar .avoid-title { font-size: 14px; font-weight: 600; }
body .sidebar .mode-btn span { font-size: 13px; font-weight: 600; }
body .sidebar .deadhead-btn { font-size: 11.5px; }
body .sidebar .bug-report-trigger { font-size: 13.5px; }
body .sidebar .btn-secondary { font-size: 14.5px; font-weight: 500; }
body .sidebar .label-title,
body .sidebar .input-group label,
body .sidebar .row label { letter-spacing: .08em; }

/* ─────────────────────────── inputs ─────────────────────────── */

body input.glass-input,
body textarea.glass-input,
body select.glass-input {
    background-color: var(--emx-surface);
    border: 1px solid var(--emx-line-2);
    border-radius: 10px;
    color: var(--emx-text);
    font-family: var(--emx-font-body);
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}
body input.glass-input::placeholder,
body textarea.glass-input::placeholder { color: var(--emx-text-3); opacity: 1; }
body input.glass-input:hover,
body textarea.glass-input:hover,
body select.glass-input:hover { border-color: rgba(255, 255, 255, .22); }
body input.glass-input:focus,
body textarea.glass-input:focus,
body select.glass-input:focus {
    border-color: var(--emx-accent-base);
    background-color: var(--emx-surface);
    box-shadow: 0 0 0 3px var(--emx-tint-2);
}
body select.glass-input option { background: var(--emx-surface); color: var(--emx-text); }

/* ─────────────────────────── buttons ───────────────────────────
   Main action: the metal pill with one slow sheen on hover.
   Everything else: glass with a hairline, accent on hover. */

body .btn-primary,
body .primary-btn,
body .cyber-btn-primary,
body .pf-btn.primary,
body .fx-btn:not(.secondary):not(.danger-btn) {
    position: relative; isolation: isolate; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; padding: 0 24px;
    border: 0; border-radius: 999px;
    background: var(--emx-btn-fill);
    color: var(--emx-accent-ink);
    font-family: var(--emx-font-body); font-weight: 600; font-size: 15px;
    letter-spacing: -.005em; text-transform: none;
    box-shadow: inset 0 1px 0 var(--emx-btn-shine), inset 0 -1px 0 rgba(0, 40, 55, .35), 0 10px 30px -12px var(--emx-btn-shadow);
    filter: none;
    transition: transform .4s var(--emx-ease), box-shadow .4s var(--emx-ease), opacity .2s;
}
body .btn-primary::after,
body .primary-btn::after,
body .cyber-btn-primary::after,
body .pf-btn.primary::after,
body .fx-btn:not(.secondary):not(.danger-btn)::after {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(105deg, transparent 30%, var(--emx-sheen) 50%, transparent 70%);
    transform: translateX(-120%); transition: transform .9s var(--emx-ease);
}
body .btn-primary:hover:not(:disabled),
body .primary-btn:hover:not(:disabled),
body .cyber-btn-primary:hover:not(:disabled),
body .pf-btn.primary:hover:not(:disabled),
body .fx-btn:not(.secondary):not(.danger-btn):hover:not(:disabled) {
    transform: translateY(-2px); filter: none;
    background: var(--emx-btn-fill);
    color: var(--emx-accent-ink);
    box-shadow: inset 0 1px 0 var(--emx-btn-shine), inset 0 -1px 0 rgba(0, 40, 55, .35), 0 16px 36px -14px var(--emx-btn-shadow);
}
body .btn-primary:hover:not(:disabled)::after,
body .primary-btn:hover:not(:disabled)::after,
body .cyber-btn-primary:hover:not(:disabled)::after,
body .pf-btn.primary:hover:not(:disabled)::after,
body .fx-btn:not(.secondary):not(.danger-btn):hover:not(:disabled)::after { transform: translateX(120%); }
body .btn-primary:active:not(:disabled),
body .primary-btn:active:not(:disabled),
body .cyber-btn-primary:active:not(:disabled),
body .pf-btn.primary:active:not(:disabled),
body .fx-btn:not(.secondary):not(.danger-btn):active:not(:disabled) { transform: scale(.98); }
body .btn-primary:disabled,
body .primary-btn:disabled,
body .pf-btn.primary:disabled { opacity: .45; cursor: not-allowed; }

body .btn-secondary,
body .secondary-btn,
body .cyber-btn-secondary,
body .pf-btn:not(.primary),
body .fx-btn.secondary,
body .fx-btn.danger-btn {
    border-radius: 999px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--emx-line-2);
    color: var(--emx-text);
    font-family: var(--emx-font-body); font-weight: 600;
    text-transform: none; letter-spacing: 0;
    box-shadow: none;
    transition: transform .4s var(--emx-ease), border-color .2s, color .2s, background-color .2s;
}
body .btn-secondary:hover:not(:disabled),
body .secondary-btn:hover:not(:disabled),
body .cyber-btn-secondary:hover:not(:disabled),
body .pf-btn:not(.primary):hover:not(:disabled),
body .fx-btn.secondary:hover:not(:disabled) {
    background: var(--emx-tint);
    border-color: var(--emx-accent-base);
    color: var(--emx-accent);
    box-shadow: none;
}
/* destructive: quiet until you mean it */
body .fx-btn.danger-btn { color: var(--emx-text-2); min-height: 48px; padding: 0 22px; font-size: 15px; }
body .fx-btn.danger-btn:hover:not(:disabled) {
    color: var(--emx-bad); border-color: rgba(248, 113, 113, .45); background: rgba(248, 113, 113, .06); transform: none; filter: none;
}
body .fx-btn.secondary { min-height: 48px; font-size: 15px; }

body.light-theme .btn-secondary,
body.light-theme .secondary-btn,
body.light-theme .cyber-btn-secondary,
body.light-theme .pf-btn:not(.primary) { background: rgba(255, 255, 255, .6); }

/* sidebar buttons: full width, calm sizes */
body .sidebar .btn-primary { width: 100%; min-height: 50px; font-size: 15.5px; margin-top: 12px; }
body .sidebar .btn-secondary {
    min-height: 40px; font-size: 13.5px; gap: 8px;
}
body .sidebar #reset-mission-btn { color: var(--emx-text-2); border-color: var(--emx-line); background: transparent; }
body .sidebar #reset-mission-btn:hover { color: var(--emx-bad); border-color: rgba(248, 113, 113, .45); background: rgba(248, 113, 113, .06); }

body .sidebar-ai-btn {
    border-radius: 999px;
    background: var(--emx-tint);
    border: 1px solid rgba(31, 164, 194, .32);
    color: var(--emx-accent);
    font-family: var(--emx-font-body); font-weight: 600; font-size: 13px; letter-spacing: .04em;
    box-shadow: none;
}
body.tir-mode .sidebar-ai-btn { border-color: rgba(232, 146, 42, .34); }
body .sidebar-ai-btn:hover { background: var(--emx-tint-2); border-color: var(--emx-accent-base); box-shadow: none; }

/* ─────────────────────────── modals ───────────────────────────
   Darkened, blurred backdrop; the panel rises from 18px below at .98. */

/* system messages (CyberModal, the only overlay of this class without an id)
   answer whatever window asked for them, so they sit above all of them: the
   AI scanner (.ai-overlay 9999999) and the add-on window (#addon-modal
   10000000) included. The LDT planner and its summary reuse the class with
   their own inline z-index (5000 / 5100), which must stay theirs. */
body .cyber-modal-overlay:not([id]) { z-index: 10000010 !important; }
body .modal-overlay,
body .cyber-modal-overlay {
    background: var(--emx-overlay);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

body .modal-overlay.active { animation: emxFade .35s var(--emx-ease) both; }
body .modal-overlay.active > .modal-content { animation: emxPanelIn .5s var(--emx-ease) both; }

body .modal-content,
body .cyber-modal-box {
    background:
        radial-gradient(ellipse 70% 45% at 0% 0%, var(--emx-tint), transparent 60%),
        var(--emx-surface);
    border: 1px solid var(--emx-line-2);
    border-radius: 24px;
    box-shadow: var(--emx-shadow);
    color: var(--emx-text);
}
body .modal-content.glass-morphism { -webkit-backdrop-filter: none; backdrop-filter: none; }
body.tir-mode #pf-modal .modal-content,
body.tir-mode .modal-content { box-shadow: var(--emx-shadow); }

body .modal-header { border-bottom: 1px solid var(--emx-line); padding-bottom: 16px; margin-bottom: 20px; }

body .modal-header h2,
body .modal-header h3,
body .cyber-modal-header h3 {
    font-family: var(--emx-font-head); font-weight: 700;
    font-size: 1.45rem; line-height: 1.15; letter-spacing: -.025em;
    color: var(--emx-text); text-transform: none; text-shadow: none;
}
body .modal-header h3 i,
body .modal-header h2 i { color: var(--emx-accent); font-size: .8em; margin-right: 4px; }

/* Every dialog close button: a quiet circle with an × drawn from two
   lines. The font glyph (× or fa-xmark) sat off-centre and looked bent,
   so it is hidden; both lines share one grid cell and meet in the middle. */
body :is(.close-btn, .tos-close-btn, .pricing-close-btn, .ai-close-glass, .lightbox-close, .pf-close) {
    display: inline-grid; place-items: center;
    /* the hidden glyph is still a grid item: its implicit row gets no height */
    grid-template: 100% / 100%; grid-auto-rows: 0; grid-auto-columns: 0;
    width: 38px; height: 38px; min-width: 38px; flex: 0 0 38px;
    box-sizing: border-box; padding: 0; margin: 0;
    border-radius: 50%;
    border: 1px solid var(--emx-line-2);
    background: rgba(255, 255, 255, .03);
    color: var(--emx-text-2) !important;
    font-size: 0 !important; line-height: 0;
    cursor: pointer; box-shadow: none; text-shadow: none;
    transition: transform .4s var(--emx-ease), color .2s, border-color .2s, background-color .2s;
}
body :is(.close-btn, .tos-close-btn, .pricing-close-btn, .ai-close-glass, .lightbox-close, .pf-close) > * { display: none !important; }
body :is(.close-btn, .tos-close-btn, .pricing-close-btn, .ai-close-glass, .lightbox-close, .pf-close)::before,
body :is(.close-btn, .tos-close-btn, .pricing-close-btn, .ai-close-glass, .lightbox-close, .pf-close)::after {
    content: '' !important; grid-area: 1 / 1;
    width: 14px; height: 1.6px; border-radius: 2px;
    background: currentColor;
    font-size: 0;
}
body :is(.close-btn, .tos-close-btn, .pricing-close-btn, .ai-close-glass, .lightbox-close, .pf-close)::before { transform: rotate(45deg); }
body :is(.close-btn, .tos-close-btn, .pricing-close-btn, .ai-close-glass, .lightbox-close, .pf-close)::after { transform: rotate(-45deg); }
body :is(.close-btn, .tos-close-btn, .pricing-close-btn, .ai-close-glass, .lightbox-close, .pf-close):hover {
    transform: rotate(90deg);
    color: var(--emx-text) !important;
    border-color: var(--emx-text-3);
    background: rgba(255, 255, 255, .06);
}
body.light-theme :is(.close-btn, .tos-close-btn, .pricing-close-btn, .ai-close-glass, .lightbox-close, .pf-close) { background: rgba(255, 255, 255, .7); }

body .modal-body { color: var(--emx-text); }

/* titles: no icon in front. No closing dot inside the app (the landing's
   headline dot stays on the landing). */
body .modal-header :is(h2, h3) > i { display: none; }

body .settings-info-box {
    background: var(--emx-bg); border: 1px solid var(--emx-line); border-radius: 16px; padding: 18px 20px;
}
body .settings-info-box h5 {
    font-family: var(--emx-font-head); font-weight: 700; font-size: 1.05rem; letter-spacing: -.015em;
    text-transform: none; color: var(--emx-text); margin-bottom: 6px;
}
body .settings-info-box p { font-size: 14.5px !important; line-height: 1.55; color: var(--emx-text-2) !important; }
body .settings-footer-actions { gap: 12px; }

/* system dialogs (CyberModal): same panel, the colour bar on top goes */
body .cyber-modal-box { border-top: 1px solid var(--emx-line-2); padding: 30px; max-width: 460px; }
body .cyber-modal-box.critical { border-color: rgba(248, 113, 113, .4); }
body .cyber-modal-header { border: 0; padding: 0; margin: 0 0 10px; }
body .cyber-modal-message { font-size: 15.5px; line-height: 1.6; color: var(--emx-text-2); }
body .cyber-modal-input {
    background: var(--emx-bg); border: 1px solid var(--emx-line-2); border-radius: 10px;
    color: var(--emx-text); font-size: 15px;
}
body .cyber-modal-input:focus { border-color: var(--emx-accent-base); box-shadow: 0 0 0 3px var(--emx-tint-2); outline: none; }
body .cyber-modal-footer { gap: 10px; border: 0; }
body .cyber-btn { min-height: 46px; padding: 0 22px; font-size: 14.5px; }

@keyframes emxFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes emxPanelIn {
    from { opacity: 0; transform: translateY(18px) scale(.98); }
    to { opacity: 1; transform: none; }
}

/* ─────────────────────── settings modal ─────────────────────── */

body .settings-tab-btn {
    border-radius: 12px; border: 1px solid transparent;
    color: var(--emx-text-2); font-weight: 500; font-size: 14.5px;
    background: transparent;
}
body .settings-tab-btn:hover { background: rgba(255, 255, 255, .04); color: var(--emx-text); }
body .settings-tab-btn.active,
body.tir-mode .settings-tab-btn.active {
    background: var(--emx-tint-2) !important;
    border-color: transparent !important;
    color: var(--emx-text) !important;
    box-shadow: none !important;
}
body .settings-tab-btn.active i { color: var(--emx-accent); }

body .curr-opt,
body .style-opt,
body .lang-opt {
    border-radius: 10px;
    font-size: 13.5px; font-weight: 600;
    color: var(--emx-text-2);
    font-family: var(--emx-font-body);
    transition: background-color .2s, color .2s, border-color .2s;
}
body .curr-opt.active,
body .style-opt.active,
body .lang-opt.active,
body.tir-mode .curr-opt.active,
body.tir-mode .style-opt.active,
body.tir-mode .lang-opt.active {
    background: var(--emx-tint-2) !important;
    border-color: var(--emx-accent-base) !important;
    color: var(--emx-text) !important;
    box-shadow: none !important;
    letter-spacing: normal; opacity: 1;
    font-family: var(--emx-font-body);
    text-transform: none;
}

/* language tiles + the light theme's own "filled" actives: a tint, dark text */
body .lang-btn-opt { border-radius: 12px; font-size: 14.5px; }
body .lang-btn-opt.active { background: var(--emx-tint-2); border-color: var(--emx-accent-base); color: var(--emx-text); }
body.light-theme :is(.curr-opt, .style-opt, .lang-opt, .lang-btn-opt, .filter-pill, .pdf-tab-btn).active {
    background: var(--emx-tint-2) !important;
    border-color: var(--emx-accent-base) !important;
    color: var(--emx-text) !important;
}

/* group: calmer member avatars, readable tabs */
body .member-avatar { background: var(--emx-tint-2) !important; color: var(--emx-accent) !important; border: 1px solid var(--emx-line-2); box-shadow: none; }
body .group-tab-btn { font-size: 14.5px; border-radius: 12px; }
body .team-member-card { background: var(--emx-surface); border-color: var(--emx-line); border-radius: 14px; }

/* ─────────────────────────── toasts ───────────────────────────
   One look for every short message: a dark glass pill, a coloured icon,
   no coloured frame and no glow. */

body .emx-toast,
body #share-toast,
body #avoidance-toast {
    background: var(--emx-glass) !important;
    -webkit-backdrop-filter: blur(20px) saturate(1.4) !important;
    backdrop-filter: blur(20px) saturate(1.4) !important;
    border: 1px solid var(--emx-line-2) !important;
    border-radius: 999px !important;
    box-shadow: var(--emx-shadow-sm) !important;
    color: var(--emx-text) !important;
    font-family: var(--emx-font-body) !important;
    font-size: 14.5px !important; font-weight: 500 !important; letter-spacing: 0 !important;
    padding: 12px 22px !important;
    /* visible over the AI scanner and every other window too */
    z-index: 10000020 !important;
}
body .emx-toast i,
body #share-toast i,
body #avoidance-toast i { color: var(--emx-accent) !important; }
body .emx-toast.is-good i { color: var(--emx-good) !important; }
body .emx-toast.is-bad,
body #avoidance-toast.is-bad { border-color: rgba(248, 113, 113, .38) !important; }
body .emx-toast.is-bad i,
body #avoidance-toast.is-bad i { color: var(--emx-bad) !important; }

/* ─────────────────────────── AI scanner ─────────────────────────── */

body .ai-overlay { background: var(--emx-overlay); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
body .ai-modal-glass,
body .share-modal-card {
    background:
        radial-gradient(ellipse 70% 45% at 0% 0%, var(--emx-tint), transparent 60%),
        var(--emx-surface);
    border: 1px solid var(--emx-line-2);
    border-radius: 24px;
    box-shadow: var(--emx-shadow);
    transition: transform .5s var(--emx-ease);
}
body .ai-modal-glass { transform: translateY(18px) scale(.98); }
body .ai-overlay.visible .ai-modal-glass { transform: none; }
body .share-modal-glow { display: none; }
body .ai-glass-header { border-bottom: 1px solid var(--emx-line); }
body .ai-scanner-title-wrapper { text-align: left; align-items: flex-start; padding-right: 48px; }
body .ai-title-main {
    font-family: var(--emx-font-head); font-weight: 700;
    font-size: 1.55rem; letter-spacing: -.02em; line-height: 1.15; text-transform: none;
    background: none; -webkit-text-fill-color: currentColor; color: var(--emx-text);
    justify-content: flex-start;
}
body .ai-title-main .ai-title-icon { display: none; }
body .ai-subtitle { margin: 0; text-align: left; font-size: 15px; color: var(--emx-text-2); max-width: 44ch; }
body .ai-close-glass { top: -6px; right: -6px; position: absolute; }

body .ai-zone { border-radius: 16px; }
body .ai-zone-full { border: 1px solid var(--emx-line-2); background: var(--emx-tint); box-shadow: none; }
body .ai-zone-quick { border: 1px solid var(--emx-line); background: rgba(255, 255, 255, .015); }
body .ai-zone-badge { border-radius: 12px; }
body .ai-zone-badge.full { color: var(--emx-accent); background: var(--emx-tint-2); border-color: transparent; }
body .ai-zone-title,
body .ai-zone-quick .ai-zone-title {
    font-family: var(--emx-font-head); font-weight: 700;
    font-size: 1.05rem; letter-spacing: -.01em; text-transform: none; color: var(--emx-text);
}
body .ai-zone-sub { font-size: 13.5px; color: var(--emx-text-2); }
body .ai-input-box { background: var(--emx-bg); border: 1px solid var(--emx-line-2); border-radius: 14px; }
/* a quiet focus: the field is already obvious, the frame only confirms it */
body .ai-input-box:focus-within {
    border-color: color-mix(in srgb, var(--emx-accent-base) 42%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--emx-accent-base) 7%, transparent);
}
body .ai-box-text { font-family: var(--emx-font-body); font-size: 15px; color: var(--emx-text); }
body .ai-box-text::placeholder { color: var(--emx-text-3); }
body .ai-box-foot { border-top: 1px solid var(--emx-line); background: transparent; }
body .ai-attach-btn { border-radius: 999px; font-size: 13px; }

/* the order path ends in a saved record: the metal pill. The quick path: glass. */
body .ai-zone-btn {
    min-height: 48px; border-radius: 999px;
    font-family: var(--emx-font-body); font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none;
    transition: transform .4s var(--emx-ease), box-shadow .4s var(--emx-ease), border-color .2s, color .2s;
}
body .ai-zone-btn .ai-btn-glow { display: none; }
body .ai-zone-btn.full,
body.tir-mode .ai-zone-btn.full {
    background: var(--emx-btn-fill);
    border: 0;
    color: var(--emx-accent-ink);
    box-shadow: inset 0 1px 0 var(--emx-btn-shine), inset 0 -1px 0 rgba(0, 40, 55, .35), 0 10px 30px -12px var(--emx-btn-shadow);
}
body .ai-zone-btn.full:hover,
body.tir-mode .ai-zone-btn.full:hover {
    background: var(--emx-btn-fill);
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 var(--emx-btn-shine), inset 0 -1px 0 rgba(0, 40, 55, .35), 0 16px 36px -14px var(--emx-btn-shadow);
}
body .ai-zone-btn.quick,
body.tir-mode .ai-zone-btn.quick { background: rgba(255, 255, 255, .035); border: 1px solid var(--emx-line-2); color: var(--emx-text); }
body .ai-zone-btn.quick:hover { border-color: var(--emx-accent-base); color: var(--emx-accent); background: var(--emx-tint); }
body .ai-disclaimer { font-style: normal; font-size: 12.5px; color: var(--emx-text-3); letter-spacing: 0; }

/* ─────────────────────────── my account ─────────────────────────── */

body #profile-modal .modal-content { width: 400px; padding: 30px; }
body .emx-profile-body { text-align: center; padding: 8px 0 0; }
body #profile-modal .user-avatar {
    width: 72px; height: 72px; margin: 4px auto 16px; border-radius: 50%;
    display: grid; place-items: center; font-size: 28px;
    background: var(--emx-tint-2); color: var(--emx-accent); border: 1px solid var(--emx-line-2);
}
body #user-profile-email { margin: 0 0 8px; font-family: var(--emx-font-head); font-size: 1.15rem; font-weight: 600; color: var(--emx-text); word-break: break-all; }
body .emx-verified {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
    font-size: 12.5px; font-weight: 600; color: var(--emx-good); background: rgba(52, 211, 153, .1);
}
body #profile-modal .profile-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 26px; }
body #profile-modal .profile-actions button { min-height: 48px; font-size: 15px; gap: 10px; justify-content: center; }
body #profile-modal .profile-actions i { color: var(--emx-accent); }
body #profile-modal .logout-btn { color: var(--emx-text-2); border-color: var(--emx-line); background: transparent; margin-top: 6px; }
body #profile-modal .logout-btn i { color: inherit; }
body #profile-modal .logout-btn:hover { color: var(--emx-bad); border-color: rgba(248, 113, 113, .45); background: rgba(248, 113, 113, .06); }

/* ─────────────────────── LDT loading planner ─────────────────────── */

/* LDT planner line icons (scratchpad/icons.py): one stroke weight, drawn
   as masks so they take the text colour and survive the language sweep,
   which keeps an <i> but would drop an inline <svg>. */
body .lx {
    display: inline-block; flex-shrink: 0; width: 1.2em; height: 1.2em; vertical-align: -.22em;
    background-color: currentColor;
    -webkit-mask: var(--lx) center / contain no-repeat; mask: var(--lx) center / contain no-repeat;
}
body .lx-truck { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13.5 17V6a1 1 0 0 0-1-1H3.5a1.5 1.5 0 0 0-1.5 1.5V16a1 1 0 0 0 1 1h1'/%3E%3Cpath d='M13.5 9h3.9a1 1 0 0 1 .8.4l3.1 4a1 1 0 0 1 .2.6V16a1 1 0 0 1-1 1h-.8'/%3E%3Cpath d='M9.2 17h5.6'/%3E%3Ccircle cx='7' cy='17.2' r='2'/%3E%3Ccircle cx='17' cy='17.2' r='2'/%3E%3Cpath d='M5.5 8.2h4.5v4.3H5.5z'/%3E%3C/svg%3E"); }
body .lx-carton { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.8 20.5 7.4v9.2L12 21.2l-8.5-4.6V7.4z'/%3E%3Cpath d='M3.5 7.4 12 12l8.5-4.6M12 12v9.2'/%3E%3Cpath d='m7.8 5.1 8.4 4.6'/%3E%3C/svg%3E"); }
body .lx-pallet { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 3.5h11a1 1 0 0 1 1 1V13h-13V4.5a1 1 0 0 1 1-1z'/%3E%3Cpath d='M10.5 3.5v3.2h3V3.5'/%3E%3Cpath d='M3 13h18v2.6H3zM4.8 15.6v3.4M12 15.6v3.4M19.2 15.6v3.4M3 19h18'/%3E%3C/svg%3E"); }
body .lx-barrel { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h10c1.3 2.9 1.9 5.9 1.9 9s-.6 6.1-1.9 9H7c-1.3-2.9-1.9-5.9-1.9-9S5.7 5.9 7 3z'/%3E%3Cpath d='M5.6 8.2h12.8M5.6 15.8h12.8'/%3E%3C/svg%3E"); }
body .lx-pipes { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.6' cy='15.6' r='4.3'/%3E%3Ccircle cx='7.6' cy='15.6' r='1.5'/%3E%3Ccircle cx='16.4' cy='15.6' r='4.3'/%3E%3Ccircle cx='16.4' cy='15.6' r='1.5'/%3E%3Ccircle cx='12' cy='8' r='4.3'/%3E%3Ccircle cx='12' cy='8' r='1.5'/%3E%3C/svg%3E"); }
body .lx-floor { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 20h19'/%3E%3Cpath d='M4.5 20v-7.5h6.5V20M13 20V8.5h6.5V20'/%3E%3C/svg%3E"); }
body .lx-minimize { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 14h6v6M20 10h-6V4M14 10l6.5-6.5M3.5 20.5 10 14'/%3E%3C/svg%3E"); }
body .lx-van { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.3 17H3a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h11.4a1 1 0 0 1 .8.4l4.4 5.9 1 .5a1 1 0 0 1 .4.8V16a1 1 0 0 1-1 1h-1.2'/%3E%3Cpath d='M14.2 6.6V12.3H19.6'/%3E%3Cpath d='M8.6 17h6.7'/%3E%3Ccircle cx='6.5' cy='17' r='2'/%3E%3Ccircle cx='17.5' cy='17' r='2'/%3E%3C/svg%3E"); }
body .lx-sliders { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h8.5M16.5 6H20M4 12h2.5M10.5 12H20M4 18h10.5M18.5 18H20'/%3E%3Ccircle cx='14.5' cy='6' r='2'/%3E%3Ccircle cx='8.5' cy='12' r='2'/%3E%3Ccircle cx='16.5' cy='18' r='2'/%3E%3C/svg%3E"); }
body .lx-box-plus { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11.3V7.4L12 3 4 7.4v9.2l7.3 4'/%3E%3Cpath d='M4 7.4 12 12l8-4.6M12 12v4.3'/%3E%3Cpath d='M18 14.5v6M15 17.5h6'/%3E%3C/svg%3E"); }
body .lx-box-minus { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11.3V7.4L12 3 4 7.4v9.2l7.3 4'/%3E%3Cpath d='M4 7.4 12 12l8-4.6M12 12v4.3'/%3E%3Cpath d='M15 17.5h6'/%3E%3C/svg%3E"); }
body .lx-layers { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.2 21 8l-9 4.8L3 8z'/%3E%3Cpath d='m3 12.2 9 4.8 9-4.8'/%3E%3Cpath d='m3 16.4 9 4.8 9-4.8'/%3E%3C/svg%3E"); }
body .lx-snowflake { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cg transform='rotate%280 12 12%29'%3E%3Cpath d='M12 12V2.8M9.7 4.8 12 7l2.3-2.2'/%3E%3C/g%3E%3Cg transform='rotate%2860 12 12%29'%3E%3Cpath d='M12 12V2.8M9.7 4.8 12 7l2.3-2.2'/%3E%3C/g%3E%3Cg transform='rotate%28120 12 12%29'%3E%3Cpath d='M12 12V2.8M9.7 4.8 12 7l2.3-2.2'/%3E%3C/g%3E%3Cg transform='rotate%28180 12 12%29'%3E%3Cpath d='M12 12V2.8M9.7 4.8 12 7l2.3-2.2'/%3E%3C/g%3E%3Cg transform='rotate%28240 12 12%29'%3E%3Cpath d='M12 12V2.8M9.7 4.8 12 7l2.3-2.2'/%3E%3C/g%3E%3Cg transform='rotate%28300 12 12%29'%3E%3Cpath d='M12 12V2.8M9.7 4.8 12 7l2.3-2.2'/%3E%3C/g%3E%3C/svg%3E"); }
body .lx-no-stack { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 13h11v7h-11zM8.5 4.5h7V10h-7z'/%3E%3Cpath d='M3.5 3.5l17 17'/%3E%3C/svg%3E"); }
body .lx-wheel-arch { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 16.5h2.6a7.9 7.9 0 0 1 15.8 0h2.6'/%3E%3Ccircle cx='12' cy='16.5' r='4.6'/%3E%3Ccircle cx='12' cy='16.5' r='1.4'/%3E%3C/svg%3E"); }
body .lx-undo { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8.5 13.5 4 9l4.5-4.5'/%3E%3Cpath d='M4 9h10.3a5.5 5.5 0 0 1 0 11H10.5'/%3E%3C/svg%3E"); }
body .lx-redo { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15.5 13.5 20 9l-4.5-4.5'/%3E%3Cpath d='M20 9H9.7a5.5 5.5 0 0 0 0 11h3.8'/%3E%3C/svg%3E"); }
body .lx-sparkles { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 3.5 11.7 8.3 16.5 10l-4.8 1.7L10 16.5l-1.7-4.8L3.5 10l4.8-1.7z'/%3E%3Cpath d='m18 14 .9 2.1 2.1.9-2.1.9-.9 2.1-.9-2.1-2.1-.9 2.1-.9z'/%3E%3Cpath d='M18 3.5v3M16.5 5h3'/%3E%3C/svg%3E"); }
body .lx-trash { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5h16M9.5 6.5v-2a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1v2'/%3E%3Cpath d='m6 6.5.9 12.6a1.5 1.5 0 0 0 1.5 1.4h7.2a1.5 1.5 0 0 0 1.5-1.4L18 6.5'/%3E%3Cpath d='M10 10.5v6M14 10.5v6'/%3E%3C/svg%3E"); }
body .lx-clipboard { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3.5h6v3H9z'/%3E%3Cpath d='M15 5h2a1.5 1.5 0 0 1 1.5 1.5v13a1.5 1.5 0 0 1-1.5 1.5H7a1.5 1.5 0 0 1-1.5-1.5v-13A1.5 1.5 0 0 1 7 5h2'/%3E%3Cpath d='M9 11h6M9 14.5h6M9 18h3.5'/%3E%3C/svg%3E"); }
body .lx-plus { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
body .lx-pencil { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20l1.1-4.1L16.3 4.7a2.1 2.1 0 0 1 3 3L8.1 18.9z'/%3E%3Cpath d='m14.5 6.5 3 3'/%3E%3C/svg%3E"); }
body .lx-copy { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 9h10.5v10.5H9z'/%3E%3Cpath d='M15 9V5.5a1 1 0 0 0-1-1H5.5a1 1 0 0 0-1 1V14a1 1 0 0 0 1 1H9'/%3E%3C/svg%3E"); }
body .lx-move { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h10.5M10 8.5l3.5 3.5-3.5 3.5'/%3E%3Cpath d='M14.5 5H19a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1h-4.5'/%3E%3C/svg%3E"); }
body .lx-chevron { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
body .lx-x { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E"); }
body .lx-weight { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='6.2' r='2.6'/%3E%3Cpath d='M6.6 9.6h10.8a1 1 0 0 1 1 .8l1.8 9a1 1 0 0 1-1 1.2H4.8a1 1 0 0 1-1-1.2l1.8-9a1 1 0 0 1 1-.8z'/%3E%3C/svg%3E"); }
body .lx-download { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v10.5M7.5 10 12 14.5 16.5 10M5 19.5h14'/%3E%3C/svg%3E"); }
body .lx-alert { --lx: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 4.4a2 2 0 0 1 3.4 0l7.4 12.8a2 2 0 0 1-1.7 3H4.6a2 2 0 0 1-1.7-3z'/%3E%3Cpath d='M12 9.5v4.2M12 16.9v.1'/%3E%3C/svg%3E"); }


body #ldt-fullscreen-modal { background: var(--emx-overlay); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
body .ldt-fs-container {
    background: var(--emx-surface);
    border: 1px solid var(--emx-line-2);
    box-shadow: var(--emx-shadow);
    -webkit-backdrop-filter: none; backdrop-filter: none;
}
body .ldt-fs-header { background: var(--emx-bg-2); border-bottom: 1px solid var(--emx-line); padding: 18px 28px; }
body .ldt-fs-title-group {
    font-family: var(--emx-font-head); font-size: 1.35rem; font-weight: 700;
    letter-spacing: -.02em; text-transform: none; color: var(--emx-text);
}
body .ldt-fs-title-group i { color: var(--emx-accent); font-size: 1.3rem; filter: none; }
body .ldt-cargo-tab {
    border-radius: 999px; background: rgba(255, 255, 255, .035); border: 1px solid var(--emx-line-2);
    color: var(--emx-text); font-size: 13.5px; font-weight: 600; letter-spacing: 0;
}
body .ldt-cargo-tab:hover { border-color: var(--emx-accent-base); color: var(--emx-accent); }
body .ldt-cargo-tab.active { background: var(--emx-tint-2); border-color: var(--emx-accent-base); color: var(--emx-text); }
body .ldt-fs-close {
    border-radius: 999px; background: transparent; border: 1px solid var(--emx-line-2);
    color: var(--emx-text-2); font-size: 13.5px; font-weight: 600; letter-spacing: 0;
}
body .ldt-fs-close:hover { background: rgba(248, 113, 113, .08); border-color: rgba(248, 113, 113, .45); color: var(--emx-bad); box-shadow: none; }
body .ldt-fs-sidebar { background: var(--emx-bg-2); border-right: 1px solid var(--emx-line); }
body .ldt-fs-main { background: #1c1c21; }
body .ldt-fs-section { background: var(--emx-surface); border: 1px solid var(--emx-line); border-radius: 16px; }
body .ldt-fs-section:hover { background: var(--emx-surface); border-color: var(--emx-line-2); }
body .ldt-fs-section h4 {
    font-family: var(--emx-font-body); font-size: 12px; font-weight: 600; letter-spacing: .1em;
    color: var(--emx-text-2);
}
body .ldt-fs-section h4 i { color: var(--emx-accent); }
body .ldt-fs-input-box label,
body .ldt-mini-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--emx-text-3); }
body .ldt-fs-input-box input {
    background: var(--emx-bg); border: 1px solid var(--emx-line-2); border-radius: 10px;
    color: var(--emx-text); font-family: var(--emx-font-body); font-size: 15px;
}
body .ldt-fs-input-box input:focus { border-color: var(--emx-accent-base); background: var(--emx-bg); box-shadow: 0 0 0 3px var(--emx-tint-2); }
body .ldt-fs-toggle-card { background: var(--emx-bg); border: 1px solid var(--emx-line); border-radius: 14px; }
body .ldt-fs-toggle-card .toggle-label { font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--emx-text-3); }
body .ldt-fs-toggle-card .toggle-icon { filter: grayscale(1) opacity(.55); }
body .ldt-fs-toggle-card:has(input:checked) { background: var(--emx-tint-2); border-color: var(--emx-accent-base); }
body .ldt-fs-toggle-card:has(input:checked) .toggle-label { color: var(--emx-text); }

/* the three dimension fields line up even when a label wraps to two lines */
body .ldt-fs-grid-3 .ldt-fs-input-box,
body .ldt-fs-grid-2 .ldt-fs-input-box { justify-content: space-between; }
body .ldt-fs-input-box label { line-height: 1.3; }

/* icons instead of emoji: quiet until the option is on */
body .ldt-fs-toggle-card .toggle-icon {
    display: block; font-size: 22px; margin-bottom: 10px;
    color: var(--emx-text-3); filter: none; transform: none;
}
body .ldt-fs-toggle-card:has(input:checked) .toggle-icon { color: var(--emx-accent); transform: none; }
body .ldt-cargo-tab .ldt-type-icon { font-size: 15px; color: var(--emx-accent); }

body .ldt-fs-btn {
    min-height: 44px; border-radius: 999px;
    font-family: var(--emx-font-body); font-size: 14.5px; font-weight: 600; letter-spacing: 0; text-transform: none;
    transition: transform .4s var(--emx-ease), border-color .2s, color .2s, background-color .2s;
}
body .ldt-fs-btn:hover { transform: translateY(-2px); filter: none; }
body .ldt-fs-btn.primary {
    background: var(--emx-btn-fill); color: var(--emx-accent-ink);
    box-shadow: inset 0 1px 0 var(--emx-btn-shine), inset 0 -1px 0 rgba(0, 40, 55, .35), 0 10px 30px -14px var(--emx-btn-shadow);
}
body .ldt-fs-btn.secondary { background: rgba(255, 255, 255, .035); border: 1px solid var(--emx-line-2); color: var(--emx-text); }
body .ldt-fs-btn.secondary:hover { border-color: var(--emx-accent-base); color: var(--emx-accent); }
body .ldt-fs-btn.danger { background: transparent; border: 1px solid var(--emx-line); color: var(--emx-text-2); }
body .ldt-fs-btn.danger:hover { border-color: rgba(248, 113, 113, .45); color: var(--emx-bad); background: rgba(248, 113, 113, .06); }
body .ldt-undo-btn { border-radius: 999px; font-size: 13px; font-weight: 600; letter-spacing: 0; }
body .ldt-fs-stats { background: var(--emx-bg); border: 1px solid var(--emx-line); border-radius: 12px; color: var(--emx-text-2); font-size: 13px; font-weight: 600; }
body .ldt-fs-stats span { color: var(--emx-text); font-family: var(--emx-font-num); }

/* ─────────────────────── sidebar footer ─────────────────────── */

body .bug-report-trigger {
    border-radius: 999px; background: transparent; border: 1px solid var(--emx-line);
    color: var(--emx-text-2); font-family: var(--emx-font-body); font-size: 13px; font-weight: 600; letter-spacing: .04em;
    box-shadow: none;
}
body .bug-report-trigger i { color: var(--emx-text-3); }
body .bug-report-trigger:hover { border-color: var(--emx-line-2); color: var(--emx-text); background: rgba(255, 255, 255, .04); box-shadow: none; transform: none; }

/* ─────────────────────────── PROFIT ───────────────────────────
   The workspace keeps its dense layout; type, switches and cards take the
   family look: calm labels, Jakarta figures, tint instead of a cyan fill. */

body #profit-view { background: var(--emx-bg); font-family: var(--emx-font-body); }
body #profit-view::before {
    background: radial-gradient(900px 420px at 18% -8%, var(--emx-tint), transparent 70%);
}
body #profit-header {
    background: var(--emx-bg-2);
    border-bottom: 1px solid var(--emx-line);
    box-shadow: none;
}
body #profit-subbar { background: transparent; border-bottom: 1px solid var(--emx-line); }

/* map / profit switch and the quick periods: one segmented pill */
body .pf-modes,
body .pf-presets {
    background: var(--emx-surface);
    border: 1px solid var(--emx-line);
    border-radius: 999px;
    padding: 4px;
}
body .pf-mode,
body .pf-presets button {
    border-radius: 999px;
    font-family: var(--emx-font-body);
    font-weight: 600; letter-spacing: 0; text-transform: none;
    color: var(--emx-text-2);
}
body .pf-mode { font-size: 14px; padding: 8px 16px; }
body .pf-presets button { font-size: 13.5px; height: 32px; padding: 0 14px; }
body .pf-mode:hover,
body .pf-presets button:hover { color: var(--emx-text); background: rgba(255, 255, 255, .05); }
body .pf-mode.is-active,
body .pf-mode.is-active:hover,
body .pf-presets button.is-active {
    background: var(--emx-tint-2);
    color: var(--emx-text);
    box-shadow: inset 0 0 0 1px rgba(31, 164, 194, .35);
}
body.tir-mode .pf-mode.is-active,
body.tir-mode .pf-presets button.is-active { box-shadow: inset 0 0 0 1px rgba(232, 146, 42, .38); }
body .pf-mode.is-active i { color: var(--emx-accent); }

/* section tabs: sentence case, the ink bar in metal */
body .pf-tab {
    font-family: var(--emx-font-body);
    font-size: 14.5px; font-weight: 500; letter-spacing: 0; text-transform: none;
    color: var(--emx-text-2);
}
body .pf-tab:hover { color: var(--emx-text); }
body .pf-tab.is-active { color: var(--emx-text); }
body .pf-tab.is-active i { color: var(--emx-accent); }
body .pf-tab-ink { background: var(--emx-btn-fill); height: 2px; }

body .pf-month { border-radius: 999px; border-color: var(--emx-line); background: var(--emx-surface); }
body .pf-month-label {
    font-family: var(--emx-font-head); font-weight: 700; font-size: 15px;
    letter-spacing: -.01em; text-transform: none;
}
body .pf-month-label::first-letter { text-transform: uppercase; }
body .pf-icon-btn { border-radius: 999px; border-color: var(--emx-line-2); color: var(--emx-text-2); }
body .pf-icon-btn:hover { color: var(--emx-text); border-color: var(--emx-text-3); background: rgba(255, 255, 255, .05); }

body .pf-section-title {
    font-size: 11.5px; font-weight: 600; letter-spacing: .12em; color: var(--emx-text-3);
}

/* KPI cards: hairline card, label as a caption, figure in Jakarta */
body .pf-kpi {
    background: var(--emx-surface);
    border: 1px solid var(--emx-line);
    border-radius: 16px;
}
body .pf-kpi::after { display: none; }
body .pf-kpi:hover { background: var(--emx-surface); border-color: var(--emx-line-2); }
body .pf-kpi.accent-cyan,
body .pf-kpi.accent-green,
body .pf-kpi.accent-red,
body .pf-kpi.accent-amber { border-top-color: var(--emx-line); }
body .pf-kpi:hover { border-top-color: var(--emx-line-2); }
body .pf-kpi-label {
    font-size: 11.5px; font-weight: 600; letter-spacing: .12em; color: var(--emx-text-3);
}
/* Inter, not Jakarta: Jakarta has no narrow no-break space, so "6 350 €"
   would print as "6350€" */
body .pf-kpi-value {
    font-family: var(--emx-font-num); font-weight: 700;
    font-size: 29px; letter-spacing: -.02em; color: var(--emx-text);
}
body .pf-kpi-row2 .pf-kpi-value { font-size: 24px; }
body .pf-kpi-sub { font-size: 13px; font-weight: 500; color: var(--emx-text-2); }
body .pf-kpi-delta { font-size: 12.5px; }
body .pf-kpi-delta.good { color: var(--emx-good); }
body .pf-kpi-delta.bad { color: var(--emx-bad); }

/* the "where costs come from" bars: room for the full category names */
body .pf-cbar {
    grid-template-columns: minmax(150px, 200px) minmax(40px, 1fr) auto 56px;
    font-size: 14px;
}
body .pf-cbars-lead { font-size: 14px; color: var(--emx-text-2); }
body .pf-cbar-track { height: 6px; background: rgba(255, 255, 255, .06); }
body .pf-cbar-pct { font-size: 13px; color: var(--emx-text-3); }
body .pf-cbar-total .pf-cbar-label { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; color: var(--emx-text-3); }
@media (max-width: 600px) {
    body .pf-cbar { grid-template-columns: 1fr auto 46px; }
}

/* small PROFIT buttons (Sprawdź, filters) keep their size, lose the shouting */
body .pf-btn:not(.primary) { text-transform: none; letter-spacing: 0; font-size: 13.5px; font-weight: 600; }

/* small print in the map's windows (tolls, documents, group, settings):
   notes and source lines were 9–10px, several of them inline in tolls.js */
body .modal-note { font-size: 12.5px; line-height: 1.5; }
body .modal-overlay :is([style*="font-size:9px"], [style*="font-size: 9px"],
                        [style*="font-size:10px"], [style*="font-size: 10px"]) { font-size: 12px !important; }
body .modal-overlay .label-title { font-size: 12px; }
body .role-badge { font-size: 11px; letter-spacing: .06em; }
body .status-indicator span { font-size: 11.5px; }
body .ldt-fs-input-box label,
body .ldt-fs-toggle-card .toggle-label { font-size: 11.5px; letter-spacing: .03em; }
body .ldt-optional-tag { font-size: 11px; }

/* readable small print: dispatchers read these all day, so no caption under
   11.5px, calmer tracking on the uppercase ones, statuses in plain case */
body .pf-panel-head { font-size: 12px; font-weight: 600; letter-spacing: .1em; color: var(--emx-text-3); }
body .pf-panel-head i { filter: none; }
body .pf-table th { font-size: 11.5px; font-weight: 600; letter-spacing: .07em; }
body .pf-pill { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; }
body .pf-chip { font-size: 12px; letter-spacing: .06em; }
body .pf-idle-fig-label { font-size: 11.5px; letter-spacing: .07em; }
body .pf-trend-sub { font-size: 12.5px; }
body .pf-filter-count { font-size: 13px; }
body .pf-cc { font-size: 12px; }
body .pf-note-small { font-size: 13px; }
body #profit-screen .pf-muted { font-size: max(12.5px, 1em); }
body .pf-idle-card-amt .pf-muted { font-size: 12px; }

/* add-on windows and the PROFIT lock card: headings in Inter like the rest
   of the app; only the metal "EMAROX PROFIT" keeps the wordmark font */
body .emx-addon { --emx-head: var(--emx-font-head); }
body .emx-addon .emx-brand-name { font-family: var(--emx-font-brand); }
body .emx-addon .emx-title { letter-spacing: -.022em; }

/* ───────────── LDT planner: groups, legend, edit dialog ─────────────
   (script.js "LDT groups" / "LDT legend") */

/* the new line icons in the planner's own spots */
body .ldt-fs-toggle-card .toggle-icon.lx { width: 26px; height: 26px; margin-bottom: 10px; }
body .ldt-fs-title-group .lx { width: 1.35em; height: 1.35em; color: var(--emx-accent); }
body .ldt-fs-section h4 .lx { width: 1.15em; height: 1.15em; margin-right: 2px; }
body .ldt-cargo-tab .ldt-type-icon.lx { width: 17px; height: 17px; }
body .ldt-fs-btn .lx, body .ldt-undo-btn .lx, body .ldt-cargo-add .lx, body .ldt-fs-close .lx { width: 16px; height: 16px; }
body .ldt-name-box { margin-bottom: 12px; }
body .ldt-name-box input::placeholder { color: var(--emx-text-3); opacity: .8; }
body .ldt-fs-section .ldt-name-box { margin: 0 0 12px; }

/* legend: a glass card in the 3D view's top-right corner */
body .ldt-legend {
    position: absolute; top: 16px; right: 16px; z-index: 5;
    width: 300px; max-height: calc(100% - 32px);
    display: flex; flex-direction: column;
    background: rgba(24, 24, 28, .86);
    -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
    border: 1px solid var(--emx-line-2); border-radius: 16px;
    box-shadow: var(--emx-shadow-sm);
    cursor: default; overflow: hidden;
    animation: ldtLegendIn .45s var(--emx-ease) both;
}
body .ldt-legend[hidden] { display: none; }
@keyframes ldtLegendIn { from { opacity: 0; transform: translateY(-6px); } }
body .ldt-legend-head {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 13px 14px 13px 16px; border: 0; background: none; cursor: pointer;
    font: inherit; color: var(--emx-text); text-align: left;
}
body .ldt-legend-head .lx-layers { width: 17px; height: 17px; color: var(--emx-accent); }
body .ldt-legend-title { flex: 1; font-family: var(--emx-font-head); font-size: 14.5px; font-weight: 700; letter-spacing: -.005em; }
body .ldt-legend-count {
    min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px;
    display: inline-grid; place-items: center;
    font-size: 12px; font-weight: 600; color: var(--emx-text-2); background: rgba(255, 255, 255, .06);
}
body .ldt-legend-chev { width: 16px; height: 16px; color: var(--emx-text-3); transition: transform .3s var(--emx-ease); }
body .ldt-legend.is-collapsed .ldt-legend-chev { transform: rotate(-90deg); }
body .ldt-legend-list {
    display: flex; flex-direction: column; gap: 2px;
    padding: 0 8px 8px; overflow-y: auto; overscroll-behavior: contain;
    border-top: 1px solid var(--emx-line);
    padding-top: 8px;
}
body .ldt-legend.is-collapsed .ldt-legend-list { display: none; }
body .ldt-lg-row {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 11px;
    padding: 10px 8px 10px 10px; border-radius: 12px;
    transition: background-color .2s;
}
body .ldt-lg-row:hover { background: rgba(255, 255, 255, .045); }
body .ldt-lg-swatch {
    display: inline-block; flex-shrink: 0; width: 14px; height: 14px; margin-top: 2px; border-radius: 5px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 -4px 6px rgba(0, 0, 0, .18);
}
body .ldt-lg-main { min-width: 0; }
body .ldt-lg-name {
    font-size: 14px; font-weight: 600; color: var(--emx-text); line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body .ldt-lg-meta { margin-top: 3px; font-size: 12.5px; color: var(--emx-text-2); line-height: 1.4; font-variant-numeric: tabular-nums; }
body .ldt-lg-status { margin-top: 2px; font-size: 12px; color: var(--emx-text-3); }
body .ldt-lg-row.has-out .ldt-lg-status { color: var(--emx-warn); }
body .ldt-lg-edit {
    display: grid; place-items: center; width: 32px; height: 32px; margin: -3px -2px 0 0;
    border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--emx-text-3);
    cursor: pointer; transition: color .2s, background-color .2s, border-color .2s;
}
body .ldt-lg-edit .lx { width: 16px; height: 16px; }
body .ldt-lg-row:hover .ldt-lg-edit { color: var(--emx-text-2); }
body .ldt-lg-edit:hover { color: var(--emx-accent) !important; background: var(--emx-tint); border-color: var(--emx-line-2); }

/* right-click menu: the family's glass, icons, a group list that opens in place */
body #ldt-context-menu {
    min-width: 214px; padding: 6px;
    background: rgba(26, 26, 30, .94); border: 1px solid var(--emx-line-2); border-radius: 14px;
    box-shadow: var(--emx-shadow-sm);
    font-family: var(--emx-font-body); font-size: 13.5px;
}
body #ldt-context-menu .ctx-item {
    width: 100%; gap: 10px; padding: 9px 12px; border: 0; border-radius: 9px; background: none;
    font: inherit; color: var(--emx-text); text-align: left;
}
body #ldt-context-menu .ctx-item .lx { width: 16px; height: 16px; color: var(--emx-text-3); }
body #ldt-context-menu .ctx-item:hover .lx { color: var(--emx-accent); }
body #ldt-context-menu .ctx-item:hover { background: rgba(255, 255, 255, .06); }
body #ldt-context-menu .ctx-item.ctx-danger, body #ldt-context-menu .ctx-item.ctx-danger .lx { color: var(--emx-bad); }
body #ldt-context-menu .ctx-item.ctx-danger:hover { background: rgba(248, 113, 113, .1); }
body #ldt-context-menu .ctx-divider { margin: 5px 6px; background: var(--emx-line); }
body #ldt-context-menu .ctx-chev { margin-left: auto; transform: rotate(-90deg); transition: transform .25s var(--emx-ease); }
body #ldt-context-menu #ctx-move:has(+ .ctx-sublist:not([hidden])) .ctx-chev { transform: none; }
body #ldt-context-menu .ctx-sublist {
    display: flex; flex-direction: column; margin: 2px 0 4px 18px; padding-left: 8px;
    border-left: 1px solid var(--emx-line-2); max-height: 220px; overflow-y: auto;
}
body #ldt-context-menu .ctx-sublist[hidden] { display: none; }
body #ldt-context-menu .ctx-sub { padding: 8px 10px; font-size: 13px; }
body #ldt-context-menu .ctx-sub .ldt-lg-swatch { margin-top: 0; width: 12px; height: 12px; }
body #ldt-context-menu .ctx-sub-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }

/* edit dialog over the planner */
body .ldt-dialog-layer {
    /* above the planner (.cyber-modal-overlay, 120000 from pricing.css),
       below system messages */
    position: fixed; inset: 0; z-index: 120010;
    display: grid; place-items: center; padding: 16px; overflow-y: auto;
    background: rgba(10, 10, 12, .55);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    opacity: 0; transition: opacity .25s var(--emx-ease);
}
body .ldt-dialog-layer.is-in { opacity: 1; }
body .ldt-dialog {
    width: min(440px, 100%); padding: 22px 22px 20px;
    background: radial-gradient(ellipse 80% 55% at 0% 0%, var(--emx-tint), transparent 60%), var(--emx-surface);
    border: 1px solid var(--emx-line-2); border-radius: 20px; box-shadow: var(--emx-shadow);
    transform: translateY(12px) scale(.98); transition: transform .4s var(--emx-ease);
}
body .ldt-dialog-layer.is-in .ldt-dialog { transform: none; }
body .ldt-dialog-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
body .ldt-dialog-head .ldt-lg-swatch { width: 16px; height: 16px; margin: 0; }
body .ldt-dialog-head h3 {
    flex: 1; min-width: 0; margin: 0;
    font-family: var(--emx-font-head); font-size: 1.2rem; font-weight: 700; letter-spacing: -.015em; color: var(--emx-text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
body .ldt-dialog-x {
    display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0;
    border: 1px solid var(--emx-line-2); border-radius: 50%; background: rgba(255, 255, 255, .03);
    color: var(--emx-text-2); cursor: pointer; transition: color .2s, border-color .2s, transform .4s var(--emx-ease);
}
body .ldt-dialog-x .lx { width: 15px; height: 15px; }
body .ldt-dialog-x:hover { color: var(--emx-accent); border-color: var(--emx-accent-base); transform: rotate(90deg); }
body .ldt-dialog-body { display: flex; flex-direction: column; gap: 12px; }
body .ldt-dialog-grid { display: grid; gap: 10px; }
body .ldt-dialog-grid.cols-1 { grid-template-columns: 1fr; }
body .ldt-dialog-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body .ldt-dialog-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body .ldt-dialog-field { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-width: 0; }
body .ldt-dialog-field > span {
    font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--emx-text-3);
}
body .ldt-dialog-field input {
    width: 100%; min-height: 44px; padding: 0 13px; box-sizing: border-box;
    border: 1px solid var(--emx-line-2); border-radius: 12px; background: var(--emx-bg);
    font: inherit; font-size: 15px; color: var(--emx-text);
    transition: border-color .2s, box-shadow .2s;
}
body .ldt-dialog-field input:focus { outline: none; border-color: var(--emx-accent-base); box-shadow: 0 0 0 3px var(--emx-tint-2); }
body .ldt-dialog-field input.is-bad { border-color: rgba(248, 113, 113, .7); box-shadow: 0 0 0 3px rgba(248, 113, 113, .12); }
body .ldt-dialog-check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--emx-text-2); cursor: pointer; }
body .ldt-dialog-check input { width: 18px; height: 18px; accent-color: var(--emx-accent-base); }
body .ldt-dialog-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--emx-text-3); }
body .ldt-dialog-actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
body .ldt-dialog-spacer { flex: 1; }
body .ldt-dialog-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 0 18px; border-radius: 999px;
    border: 1px solid var(--emx-line-2); background: rgba(255, 255, 255, .035);
    font: inherit; font-size: 14px; font-weight: 600; color: var(--emx-text); cursor: pointer;
    transition: border-color .2s, color .2s, transform .3s var(--emx-ease), background-color .2s;
}
body .ldt-dialog-btn .lx { width: 15px; height: 15px; }
body .ldt-dialog-btn:hover { border-color: var(--emx-accent-base); color: var(--emx-accent); transform: translateY(-1px); }
body .ldt-dialog-btn.is-primary {
    border-color: transparent; color: var(--emx-accent-ink); background: var(--emx-btn-fill);
    box-shadow: inset 0 1px 0 var(--emx-btn-shine), 0 8px 22px -12px var(--emx-btn-shadow);
}
body .ldt-dialog-btn.is-primary:hover { color: var(--emx-accent-ink); filter: brightness(1.05); }
body .ldt-dialog-btn.is-danger { padding: 0 14px; color: var(--emx-text-3); border-color: transparent; background: none; }
body .ldt-dialog-btn.is-danger:hover { color: var(--emx-bad); border-color: rgba(248, 113, 113, .4); background: rgba(248, 113, 113, .06); }

/* summary table: the group's colour beside its name */
body #ldt-summary-items .ldt-lg-swatch { width: 11px; height: 11px; margin: 0 8px 0 0; vertical-align: -1px; }

@media (max-width: 768px) {
    body .ldt-legend { top: 10px; right: 10px; left: 10px; width: auto; max-height: calc(100% - 20px); }
    body .ldt-dialog-actions .ldt-dialog-spacer { display: none; }
    body .ldt-dialog-actions .ldt-dialog-btn { flex: 1 1 auto; }
    body .ldt-dialog-actions .ldt-dialog-btn.is-danger { flex-basis: 100%; order: 3; }
}

/* ───────────────────── other screen sizes ─────────────────────
   Everything below lives in size queries, so the full-HD desktop above
   stays exactly as it is. */

/* the chat bubble sits under every window (modals are 9999), still over PROFIT */
body .feedback-widget { z-index: 9990; }

/* Below 1900px the header links fold into a dropdown under the ☰ button
   (style.css). The navbar's pill radius turned that column into an oval
   that clipped the last item; as a dropdown it is a rounded card. */
@media (max-width: 1899px) {
    body .header-controls {
        min-width: 212px; padding: 8px; gap: 2px;
        border-radius: 18px;
        background: rgba(30, 30, 35, .96);
    }
    body .header-controls .nav-btn,
    body .header-controls .login-ghost-btn {
        width: 100%; height: 44px; padding: 0 14px; margin: 0;
        border-radius: 12px; justify-content: flex-start;
    }
    body .header-controls .login-ghost-btn { margin-top: 6px; }
    body .controls-toggle-btn { border-radius: 999px; }
    /* the group's alert dot sits inside its row, at the right end */
    body .header-controls .nav-btn { position: relative; }
    body .header-controls .nav-btn .notification-badge {
        top: 50%; right: 14px; left: auto; margin: -4px 0 0; width: 8px; height: 8px; transform: none;
    }
}

/* laptops and tablets in landscape: the route HUD shares the top row with
   the ☰ button, so it stops short of it and the Google Maps button keeps
   only its icon */
@media (min-width: 769px) and (max-width: 1200px) {
    body .mission-bar { max-width: calc(100% - 340px - 84px) !important; gap: 10px !important; }
    body #btn-hud-share { margin-left: 8px !important; padding: 0 12px; }
    body #btn-hud-share span { display: none; }
    body .mission-bar .hud-label { font-size: 10px; }
}

/* tablets and phones */
/* AI scanner taller than the screen (phones, 768px-high laptops): it
   scrolls inside the dimmed layer instead of losing its top edge */
body .ai-overlay { align-items: safe center; overflow-y: auto; padding: 16px 12px; }
body .ai-modal-glass { margin: auto 0; }
@media (max-width: 1024px) {
    body .ai-modal-glass { width: 100%; }
}

@media (max-width: 768px) {
    /* the route HUD at the bottom: three equal columns that may shrink below
       their content (plain 1fr would not, and pushed the HUD off the left
       edge on 360px phones); the route-compare toggle floats in the corner */
    body .mission-bar.visible { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; padding-top: 14px !important; }
    body .mission-bar.visible .compare-toggle-container { position: absolute; top: 6px; left: 6px; margin: 0; width: 30px; height: 30px; }
    body .mission-bar.visible > :not(.hud-metric):not(.compare-toggle-container):not(.route-compare-panel) { grid-column: 1 / -1; justify-self: center; }
    body .mission-bar.visible .hud-metric { min-width: 0; }
    body .mission-bar.visible .hud-value { overflow-wrap: anywhere; }
    /* readable figures */
    body .mission-bar.visible .hud-label { font-size: 10px !important; letter-spacing: .06em; margin-bottom: 3px !important; }
    body .mission-bar.visible .hud-value { font-size: 14px !important; }
    body .mission-bar.visible .hud-value.profit,
    body .mission-bar.visible .hud-value.loss,
    body .mission-bar.visible .hud-value.highlight { font-size: 16px !important; }
    body .mission-bar.visible { border-top: 1px solid var(--emx-line-2) !important; border-radius: 18px; }
    /* the chat bubble moves above the HUD instead of covering it */
    body:has(.mission-bar.visible) .feedback-widget { bottom: 196px; right: 16px; }
    body .feedback-trigger { width: 50px; height: 50px; font-size: 20px; }

    /* planner: the settings column keeps its height above the 3D view */
    body .ldt-fs-sidebar { flex: 0 0 auto; }
    /* the 3D view gets a fixed height of its own: its size is read from this
       box (syncVLSize), so a box that grew with the canvas never settled
       and the load was drawn below the visible part */
    body .ldt-fs-main { flex: 1 1 auto; min-height: 280px; }
    body .ldt-fs-main .ldt-fs-3d-wrapper { position: absolute; inset: 0; min-height: 0; }
    body .ldt-fs-flex-wrap { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    body .ldt-fs-toggle-card { min-width: 0; padding: 14px 4px; }
    body .ldt-fs-toggle-card .toggle-label { font-size: 10.5px; letter-spacing: .02em; line-height: 1.35; }
}

/* phones: the planner's cargo tabs and close button in one compact row */
@media (max-width: 480px) {
    body .ldt-cargo-bar { gap: 6px; flex-wrap: wrap; }
    body .ldt-cargo-tab { min-height: 38px; padding: 0 12px; font-size: 13px; }
    body .ldt-fs-header { position: relative; }
    body .ldt-fs-close {
        position: absolute; top: 14px; right: 14px;
        width: 40px; height: 40px; min-height: 0; padding: 0; justify-content: center; border-radius: 999px;
    }
    /* icon only, the label stays for screen readers */
    body .ldt-fs-close span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

    /* settings: map styles two or three to a row, buttons never squeezed */
    body .style-selector {
        display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 6px;
    }
    body .style-selector .style-opt { min-height: 44px; padding: 6px 8px; line-height: 1.25; }
    body .settings-footer-actions { flex-wrap: wrap; gap: 10px; }
    body .settings-footer-actions .fx-btn { flex: 1 1 auto; white-space: nowrap; }
}

/* ───────────────────────── reduced motion ───────────────────────── */

@media (prefers-reduced-motion: reduce) {
    body .modal-overlay.active,
    body .modal-overlay.active > .modal-content { animation: none; }
    body .btn-primary::after,
    body .primary-btn::after,
    body .cyber-btn-primary::after,
    body .pf-btn.primary::after { transition: none; }
    body :is(.close-btn, .tos-close-btn, .pricing-close-btn, .ai-close-glass, .lightbox-close, .pf-close):hover { transform: none; }
}

/* ==========================================================================
   Hangar: a signed-in account without access to the map (2026-10-01).
   One calm card: who is signed in, why there is no map, two clear paths.
   ========================================================================== */
#hangar-overlay {
    background: radial-gradient(1200px 600px at 50% -10%, rgba(31, 164, 194, .10), transparent 60%), var(--emx-bg);
    backdrop-filter: none; -webkit-backdrop-filter: none;
    overflow-y: auto; align-items: flex-start;
}
#hangar-overlay .hangar-container { width: 100%; max-width: 640px; margin: auto; padding: 56px 16px; }
#hangar-overlay .hangar-ui-block {
    background: var(--emx-surface); border: 1px solid var(--emx-line); border-radius: 24px;
    padding: 28px 36px 36px; box-shadow: var(--emx-shadow); text-align: left;
}
#hangar-overlay .hidden { display: none !important; }

#hangar-overlay .hangar-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#hangar-overlay .hangar-brand .emx-side-name { font-size: 1.25rem; }
#hangar-overlay .hangar-logout-btn {
    display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px; margin: 0;
    border-radius: 999px; border: 1px solid var(--emx-line-2); background: transparent; cursor: pointer;
    font: inherit; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--emx-text-2);
    transition: border-color .2s, color .2s;
}
#hangar-overlay .hangar-logout-btn:hover { border-color: var(--emx-bad); color: var(--emx-text); background: transparent; transform: none; }

#hangar-overlay .hangar-header { margin: 36px 0 18px; }
#hangar-overlay .hangar-title {
    margin: 0 0 10px; font-family: var(--emx-font-head); font-size: 1.85rem; font-weight: 700;
    line-height: 1.2; letter-spacing: -.02em; text-transform: none; color: var(--emx-text);
}
#hangar-overlay .hangar-subtitle { margin: 0; max-width: none; font-size: .98rem; line-height: 1.6; color: var(--emx-text-2); }
#hangar-overlay .hangar-when-ended { display: none; }
#hangar-overlay[data-state="ended"] .hangar-when-new { display: none; }
#hangar-overlay[data-state="ended"] .hangar-when-ended { display: block; }

#hangar-overlay .hangar-identity-card { margin: 0 0 24px; }
#hangar-overlay .user-id-strip {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px;
    background: var(--emx-bg-2); border: 1px solid var(--emx-line); font-family: var(--emx-font-body);
    font-size: 13px; color: var(--emx-text);
}
#hangar-overlay .user-id-strip > i, #hangar-overlay .hangar-signed-as { color: var(--emx-text-3); }
#hangar-overlay #hangar-user-email { font-weight: 600; overflow-wrap: anywhere; }

#hangar-overlay .hangar-paths { display: grid; gap: 12px; margin: 0; }
#hangar-overlay .hangar-path-card {
    display: grid; grid-template-columns: 44px minmax(0, 1fr) 18px; align-items: center; gap: 16px;
    width: 100%; margin: 0; padding: 18px 20px; border-radius: 16px; text-align: left; cursor: pointer;
    border: 1px solid var(--emx-line); background: var(--emx-bg-2); color: var(--emx-text); font: inherit;
    transform: none; transition: border-color .2s var(--emx-ease), background-color .2s var(--emx-ease);
}
#hangar-overlay .hangar-path-card:hover,
#hangar-overlay .hangar-path-card:focus-visible { border-color: var(--emx-accent); background: var(--emx-tint); transform: none; box-shadow: none; }
#hangar-overlay .hangar-path-card:focus-visible { outline: 2px solid var(--emx-accent); outline-offset: 2px; }
#hangar-overlay .path-icon {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
    background: var(--emx-tint-2); color: var(--emx-accent); font-size: 1.05rem; border: 0;
}
#hangar-overlay .hangar-path-card:hover .path-icon { transform: none; }
#hangar-overlay .path-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#hangar-overlay .path-title { font-size: 1rem; font-weight: 600; color: var(--emx-text); }
#hangar-overlay .path-desc { font-size: .86rem; line-height: 1.5; color: var(--emx-text-2); }
#hangar-overlay .path-arrow { color: var(--emx-text-3); font-size: .9rem; transition: transform .2s var(--emx-ease), color .2s; }
#hangar-overlay .hangar-path-card:hover .path-arrow { color: var(--emx-accent); transform: translateX(3px); }

#hangar-overlay .hangar-action-block { margin: 0; padding: 0; background: none; border: 0; }
#hangar-overlay .hangar-key-label {
    display: block; margin: 0 0 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em;
    text-transform: uppercase; color: var(--emx-text-2);
}
#hangar-overlay .action-input-wrapper { display: flex; gap: 10px; margin: 0; flex-direction: row; }
#hangar-overlay #hangar-license-input {
    flex: 1; min-width: 0; height: 50px; padding: 0 16px; border-radius: 12px;
    background: var(--emx-bg); border: 1px solid var(--emx-line-2); color: var(--emx-text);
    font-family: ui-monospace, Consolas, monospace; font-size: 1rem; letter-spacing: .06em;
    text-transform: uppercase; text-align: left; box-shadow: none;
}
#hangar-overlay #hangar-license-input::placeholder { color: var(--emx-text-3); }
#hangar-overlay #hangar-license-input:focus { outline: none; border-color: var(--emx-accent); box-shadow: 0 0 0 3px var(--emx-tint-2); }
#hangar-overlay .hangar-btn-primary {
    height: 50px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer;
    background: var(--emx-btn-fill); color: var(--emx-accent-ink); font: inherit; font-size: .95rem; font-weight: 700;
    letter-spacing: 0; text-transform: none; box-shadow: inset 0 1px 0 var(--emx-btn-shine); transform: none;
}
#hangar-overlay .hangar-btn-primary:hover:not(:disabled) { filter: brightness(1.06); transform: none; }
#hangar-overlay .hangar-btn-primary:disabled { opacity: .6; cursor: progress; }
#hangar-overlay .hangar-error { min-height: 20px; margin: 10px 0 0; font-size: 13px; line-height: 1.5; text-align: left; letter-spacing: 0; text-transform: none; }
#hangar-overlay .hangar-error.is-bad { color: var(--emx-bad); }
#hangar-overlay .hangar-error.is-info { color: var(--emx-text-2); }
#hangar-overlay .hangar-error.is-good { color: var(--emx-good); }
#hangar-overlay .hangar-key-hint { margin: 8px 0 20px; font-size: 13px; line-height: 1.5; color: var(--emx-text-3); }
#hangar-overlay .hangar-btn-back {
    display: inline-flex; align-items: center; gap: 8px; padding: 0; margin: 0; border: 0; background: none;
    cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--emx-text-2);
}
#hangar-overlay .hangar-btn-back:hover { color: var(--emx-text); }

/* "Subskrypcja zakończona" card from js/addons.js sits under the e-mail */
#hangar-overlay .hangar-export { margin: 0 0 16px; background: var(--emx-bg-2); border-color: var(--emx-line); }

@media (max-width: 560px) {
    #hangar-overlay .hangar-container { padding: 24px 12px; }
    #hangar-overlay .hangar-ui-block { padding: 22px 20px 26px; border-radius: 20px; }
    #hangar-overlay .hangar-title { font-size: 1.5rem; }
    #hangar-overlay .action-input-wrapper { flex-direction: column; }
}

/* Hangar, third state: the renewal was not paid and the grace period is over.
   One card with the way to the unpaid invoice (js/addons.js overdueCard); the
   two "get access" paths are hidden, so nobody buys a second subscription. */
#hangar-overlay .hangar-when-payment { display: none; }
#hangar-overlay[data-state="payment"] :is(.hangar-when-new, .hangar-when-ended, .hangar-paths) { display: none; }
#hangar-overlay[data-state="payment"] .hangar-when-payment { display: block; }

/* login window: the close circle keeps the shared 38 px (app-shell.css set
   32 px, the shared min-width then stretched it into an oval) */
#auth-modal .close-btn { width: 38px; height: 38px; }
