/* ============================================
   THEME: navy, teal, golden sand and paper
   Order: tokens, base, layout, components (buttons, header, notices, cards, map),
   pages (user area, dashboard, text pages, sign-in, company area), Bootstrap alignment,
   the trial photo background and reduced motion.
   ============================================ */

/* ---------- Tokens ---------- */

:root {
    --navy-900: #2a5483;
    --navy-800: #1f4468;
    --navy-700: #27507c;
    --on-gold: #173452;
    --teal-600: #0f766e;
    --teal-500: #14918a;
    --teal-300: #5fd1c4;
    --sand-50: #fdf9ee;
    --sand-100: #fbf1d6;
    --sand-200: #f4e0a6;
    --sand-400: #e2b33a;
    --sand-500: #ecc356;
    --sand-600: #8a6510;
    --sand-rgb: 226, 179, 58;
    --ink: #14212f;
    --ink-2: #3d4b5c;
    --ink-3: #5c6876;
    --line: #e3dccf;
    --paper: #fffdf9;
    --on-dark: #e8f1f4;
    --on-dark-2: #bcd0d8;
    --focus: var(--teal-600);
    --fl-row: 30px;
    --fl-h: 76px;
    --head-gap: 10px;
    --head-h: calc(var(--fl-row) + var(--fl-h));
    --top-h: calc(var(--head-h) + var(--head-gap));
    --page-max: 1320px;
    --page-gutter: clamp(16px, 3vw, 40px);
    --head: "Fira Sans Condensed", "Golos Text", system-ui, sans-serif;
    --body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;

    --theme-blue-dark: var(--navy-800);
    --theme-blue: var(--navy-900);
    --theme-blue-mid: var(--navy-700);
    --theme-primary: var(--navy-900);
    --theme-primary-hover: var(--teal-600);
    --theme-primary-light: var(--sand-100);
    --theme-green: var(--teal-600);
    --theme-green-on-dark: var(--teal-300);
    --theme-text: var(--ink);
    --theme-muted: var(--ink-3);
    --theme-border: var(--line);
    --theme-surface: #ffffff;
    --theme-page: var(--paper);
    --theme-radius: 6px;
    --theme-radius-lg: 8px;
    --theme-hero-from: var(--navy-800);
    --theme-hero-to: var(--navy-900);
    --theme-sign: var(--teal-600);
    --theme-sign-light: var(--teal-500);
    --theme-sign-edge: var(--navy-800);
    --theme-road: #f2c94c;
    --theme-shadow-tile: 0 0 0 1px rgba(27, 58, 92, 0.08), 0 4px 0 rgba(27, 58, 92, 0.06), 0 12px 22px -16px rgba(27, 58, 92, 0.4);
    --theme-shadow-hero: 0 18px 40px -24px rgba(10, 27, 46, 0.6);

    --color-black: var(--ink);
    --color-dark: var(--ink-2);
    --color-gray: var(--ink-3);
    --color-muted: var(--ink-3);
    --color-light: var(--paper);
    --color-lighter: var(--sand-50);
    --color-border: var(--line);
    --color-border-light: #efe9dd;
    --color-info: var(--navy-900);
    --color-info-bg: var(--sand-100);
    --radius-sm: 6px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --primary-color: var(--navy-900);
    --secondary-color: var(--navy-700);
    --accent-color: var(--teal-600);
    --bg-gradient: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);

    --bs-primary: #2a5483;
    --bs-primary-rgb: 42, 84, 131;
    --bs-link-color: #2a5483;
    --bs-link-color-rgb: 42, 84, 131;
    --bs-link-hover-color: #0f766e;
    --bs-link-hover-color-rgb: 15, 118, 110;
    --bs-body-font-family: var(--body);
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--paper);
    --bs-border-color: var(--line);
    --bs-border-radius: 6px;
    --bs-border-radius-sm: 6px;
    --bs-border-radius-lg: 8px;
    --bs-focus-ring-color: rgba(15, 118, 110, 0.25);
    --bs-primary-bg-subtle: var(--sand-100);
    --bs-primary-text-emphasis: var(--navy-900);
}

/* ---------- Base ---------- */

html {
    font-feature-settings: "locl" 0;
    scroll-padding-top: calc(var(--top-h) + 8px);
}

body {
    background: var(--theme-page);
    color: var(--ink);
    font-family: var(--body);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--head);
    color: var(--navy-900);
}

a {
    color: var(--navy-900);
}

a:hover {
    color: var(--teal-600);
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

::selection {
    background: var(--navy-900);
    color: #ffffff;
}

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 2000;
    padding: 10px 14px;
    border-radius: 6px;
    background: var(--navy-900);
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
    color: #ffffff;
}

.is-dark {
    --focus: var(--sand-400);
}

.app-main:focus {
    outline: none;
}

/* ---------- Layout: page width, main area ---------- */

.site-container {
    width: 100%;
    max-width: var(--page-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
}

body > .app-main {
    padding: 1.5rem 0;
}

body:has(.journey) > .app-main {
    padding: 0;
}

body:has(.journey) > .app-main > .site-container {
    max-width: none;
    padding: 0;
}

/* ============================================
   COMPONENTS
   ============================================ */

/* ---------- Buttons: one base, variants set only their colours ---------- */

.ui-btn {
    --btn-bg: linear-gradient(180deg, #ffffff, #f7f3ec);
    --btn-border: var(--line);
    --btn-color: var(--navy-900);
    --btn-shadow: 0 1px 2px rgba(16, 40, 70, 0.06);
    --btn-border-hover: var(--btn-border);
    --btn-color-hover: var(--btn-color);
    --btn-shadow-hover: var(--btn-shadow);
    --btn-filter-hover: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 14px 0 16px;
    border: 1px solid var(--btn-border);
    border-radius: 10px;
    background: var(--btn-bg);
    color: var(--btn-color);
    box-shadow: var(--btn-shadow);
    font: 600 15px/1 var(--body);
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.2s, filter 0.2s, border-color 0.2s, color 0.2s, background-color 0.2s;
}

.ui-btn::after {
    content: "\f138";
    font-family: "bootstrap-icons";
    font-size: 0.95em;
    line-height: 1;
    transition: transform 0.28s cubic-bezier(0.3, 0.7, 0.4, 1);
}

.ui-btn:hover,
.ui-btn:focus-visible {
    border-color: var(--btn-border-hover);
    color: var(--btn-color-hover);
    box-shadow: var(--btn-shadow-hover);
    filter: var(--btn-filter-hover);
}

.ui-btn-plain::after {
    display: none;
}

.ui-btn:hover::after,
.ui-btn:focus-visible::after {
    transform: translateX(5px);
}

.ui-btn:active {
    filter: brightness(0.96);
}

.ui-btn-primary,
.btn-primary,
.btn-dark {
    --btn-bg: linear-gradient(180deg, #34669f, #2a5483 60%, #26507c);
    --btn-border: #24507c;
    --btn-color: #ffffff;
    --btn-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 6px 16px -8px rgba(31, 68, 104, 0.75);
    --btn-shadow-hover: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 22px -10px rgba(31, 68, 104, 0.85);
    --btn-filter-hover: brightness(1.08);
}

.ui-btn-secondary,
.btn-outline-primary,
.btn-outline-dark,
.btn-outline-secondary,
.btn-light {
    --btn-bg: linear-gradient(180deg, #ffffff, #f7f3ec);
    --btn-border: var(--line);
    --btn-color: var(--navy-900);
    --btn-shadow: 0 1px 2px rgba(16, 40, 70, 0.06);
    --btn-border-hover: rgba(42, 84, 131, 0.35);
    --btn-color-hover: var(--teal-600);
    --btn-shadow-hover: 0 6px 14px -8px rgba(16, 40, 70, 0.35);
}

.ui-btn-on-dark-primary {
    --btn-bg: linear-gradient(180deg, #f0cb5f, var(--sand-400));
    --btn-border: #cf9f2c;
    --btn-color: var(--on-gold);
    --btn-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 6px 16px -8px rgba(138, 101, 16, 0.7);
    --btn-shadow-hover: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 10px 22px -10px rgba(138, 101, 16, 0.8);
    --btn-filter-hover: brightness(1.05);
}

.ui-btn-on-dark-secondary {
    --btn-bg: linear-gradient(180deg, #ffffff, #f7f3ec);
    --btn-border: rgba(255, 255, 255, 0.7);
    --btn-color: var(--navy-900);
    --btn-shadow: 0 6px 16px -8px rgba(4, 16, 30, 0.6);
    --btn-border-hover: var(--sand-400);
    --btn-shadow-hover: 0 10px 22px -10px rgba(4, 16, 30, 0.7);
}

.ui-btn-lg {
    min-height: 56px;
    padding: 0 24px 0 28px;
    font-size: 17px;
}

/* ---------- Site header: owner line and a bar of paired cards ---------- */

.site-head {
    position: sticky;
    top: 0;
    z-index: 1030;
    padding-bottom: var(--head-gap);
    background: rgba(251, 247, 240, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    font-family: var(--body);
}

.fl-owner {
    height: var(--fl-row);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--ink-3);
    font-size: 12.5px;
    line-height: 1.2;
    transition: color 0.3s;
}

.ob-owner {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ob-short {
    display: none;
}

.ob-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: var(--fl-row);
    margin: 0 -8px;
    padding: 0 8px;
    flex: none;
    border-radius: 6px;
    color: var(--navy-900);
    font-weight: 600;
    text-decoration: none;
}

.ob-link i {
    font-size: 11px;
    color: var(--sand-600);
}

.ob-link:hover,
.ob-link:focus-visible {
    color: var(--navy-900);
    text-decoration: underline;
    text-underline-offset: 3px;
}

body:has(.journey) .site-head {
    position: fixed;
    left: 0;
    right: 0;
    padding-bottom: 0;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
}

body:has(.journey) .site-head,
body:has(.journey) .site-head .site-container,
body:has(.journey) .site-head .pairs-bar {
    pointer-events: none;
}

body:has(.journey) .site-head .fl-owner > *,
body:has(.journey) .site-head .pairs-bar > *,
body:has(.journey) .site-head .pairs-nav > * {
    pointer-events: auto;
}

body:has(.journey) .site-head:not(.is-light) .fl-owner {
    --focus: var(--sand-400);
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 6px rgba(8, 24, 42, 0.5);
}

body:has(.journey) .site-head:not(.is-light) .ob-link,
body:has(.journey) .site-head:not(.is-light) .ob-link:hover,
body:has(.journey) .site-head:not(.is-light) .ob-link i {
    color: #ffffff;
}


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

.pairs-bar {
    position: relative;
    height: var(--fl-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.pairs-nav {
    display: contents;
}

.pair {
    display: inline-grid;
    flex: none;
    grid-auto-flow: column;
    grid-auto-columns: auto;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 0 0 1px rgba(42, 84, 131, 0.12), 0 16px 32px -20px rgba(8, 24, 42, 0.55), 0 3px 8px -6px rgba(8, 24, 42, 0.25);
    text-decoration: none;
}

.pair > :first-child {
    border-radius: 14px 0 0 14px;
}

.pair > :last-child {
    border-radius: 0 14px 14px 0;
}

.pair > * + * {
    border-left: 1px solid rgba(42, 84, 131, 0.12);
}

.pair-link,
.pair .half {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
    padding: 10px 14px;
    border: 0;
    background: transparent;
    color: var(--navy-900);
    text-align: left;
    text-decoration: none;
    transition: background-color 0.2s;
}

.pair-dd > .pair-link {
    width: 100%;
    border-radius: inherit;
    font: inherit;
    cursor: pointer;
}

.pair-dd {
    position: relative;
}

.pair-link:hover,
.pair-link:focus-visible,
.pair-link[aria-expanded="true"] {
    background: #f6f1e4;
    color: var(--navy-900);
}

.pair-link[aria-current="page"] {
    background: #f6f1e4;
    box-shadow: inset 0 -3px 0 var(--sand-400);
}

.pair .ic {
    display: grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 18px;
    transition: transform 0.2s;
}

.pair-link:hover .ic {
    transform: scale(1.08);
}

.pair .t {
    display: block;
    color: var(--navy-900);
    font: 700 15.5px/1.15 var(--head);
    white-space: nowrap;
}

.pair .d {
    display: block;
    margin-top: 2px;
    color: var(--ink-3);
    font-size: 12.5px;
    line-height: 1.25;
    white-space: nowrap;
}

.pair-dd .t {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ic-gold {
    background: var(--sand-100);
    color: var(--sand-600);
}

.ic-navy {
    background: #e6eef7;
    color: var(--navy-900);
}

.ic-teal {
    background: #e3f4f1;
    color: var(--teal-600);
}

.ic-green {
    background: #e6f4e6;
    color: #2f7a2f;
}

.pair.has-arrow > a.pair-link::after {
    content: "\f138";
    margin-left: 6px;
    color: #9fb0c4;
    font-family: "bootstrap-icons";
    transition: transform 0.2s, color 0.2s;
}

.pair.has-arrow > a.pair-link:hover::after,
.pair.has-arrow > a.pair-link:focus-visible::after {
    transform: translateX(3px);
    color: var(--sand-600);
}

.pair-brand .half-logo {
    padding: 8px 14px;
    background: #ffffff;
}

.pair-brand .half-logo img {
    display: block;
    height: 34px;
    width: auto;
}

.pair-brand .half:last-child {
    background: var(--navy-900);
    transition: background-color 0.2s;
}

.pair-brand .half:last-child .t {
    color: #ffffff;
    font-size: 17px;
}

.pair-brand .half:last-child .d {
    color: #c9d8e6;
}

.pair-brand:hover .half:last-child,
.pair-brand:focus-visible .half:last-child {
    background: var(--navy-800);
}

.pair-dd .dropdown-menu {
    min-width: 240px;
    margin-top: 8px !important;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--paper);
    box-shadow: 0 24px 48px -24px rgba(10, 27, 46, 0.45);
}

.pair-dd .dropdown-item {
    min-height: 44px;
    display: flex;
    align-items: center;
    border-radius: 8px;
    font-size: 15px;
    color: var(--ink-2);
}

.pair-dd .dropdown-item i {
    color: var(--teal-600);
}

.pair-dd .dropdown-item:hover,
.pair-dd .dropdown-item:focus-visible,
.pair-dd .dropdown-item.active {
    background: var(--sand-100);
    color: var(--navy-900);
}

.pair-dd .dropdown-item.text-danger i {
    color: inherit;
}

.pair-dd .dropdown-item.text-danger:hover,
.pair-dd .dropdown-item.text-danger:focus-visible {
    color: #b42318 !important;
}

.menu-btn {
    display: none;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    min-width: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff, #f7f3ec);
    color: var(--navy-900);
    font: 600 15px/1 var(--body);
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(42, 84, 131, 0.06), 0 10px 22px -16px rgba(8, 24, 42, 0.55);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.menu-btn i {
    font-size: 20px;
}

.menu-btn:hover,
.menu-btn:focus-visible {
    border-color: rgba(42, 84, 131, 0.35);
}

.menu-btn[aria-expanded="true"] {
    border-color: var(--teal-600);
    background: var(--sand-100);
}

@media (min-width: 1180px) {
    .pairs-nav.collapse,
    .pairs-nav.collapsing {
        display: contents !important;
        height: auto !important;
    }
}

@media (min-width: 1180px) and (max-width: 1499.98px) {
    .pair.has-arrow > a.pair-link::after {
        display: none;
    }
}

@media (min-width: 1180px) and (max-width: 1365.98px) {
    .pairs-nav .d {
        display: none;
    }
}

@media (max-width: 1179.98px) {
    .pairs-bar {
        justify-content: space-between;
    }

    .menu-btn {
        display: inline-flex;
    }

    .pairs-nav {
        position: absolute;
        left: 0;
        right: 0;
        top: calc(100% + 8px);
        z-index: 1040;
        flex-direction: column;
        gap: 10px;
        padding: 12px;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 0 0 1px rgba(42, 84, 131, 0.12), 0 22px 40px -20px rgba(8, 24, 42, 0.6);
    }

    .pairs-nav.show,
    .pairs-nav.collapsing {
        display: flex;
    }

    .pairs-nav > .pair {
        display: grid;
        grid-auto-flow: row;
        grid-template-columns: 1fr 1fr;
    }

    .pairs-nav .pair-dd .dropdown-menu {
        position: static !important;
        transform: none !important;
        margin: 0 8px 8px !important;
        box-shadow: none;
    }
}

@media (max-width: 999.98px) {
    .menu-btn span {
        display: none;
    }
}

@media (max-width: 767.98px) {
    :root {
        --fl-row: 26px;
        --fl-h: 64px;
        --head-gap: 8px;
    }

    .site-head,
    body:has(.journey) .site-head {
        position: sticky;
        top: 0;
        padding-bottom: var(--head-gap);
        background: rgba(251, 247, 240, 0.94);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }

    .site-head .site-container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .fl-owner {
        font-size: 12px;
    }

    .ob-long {
        display: none;
    }

    .ob-short {
        display: inline;
    }
}

@media (max-width: 519.98px) {
    .pair-brand {
        flex: 0 1 auto;
        min-width: 0;
    }

    .pair-brand .half:last-child {
        min-width: 0;
    }

    .pair-brand .half:last-child .d {
        display: none;
    }

    .pair-brand .half-logo img {
        height: 26px;
    }

    .pair-brand .half:last-child .t {
        font-size: 15.5px;
        white-space: normal;
    }

    .pairs-nav > .pair {
        grid-template-columns: 1fr;
    }

    .pairs-nav > .pair > * + * {
        border-left: 0;
        border-top: 1px solid rgba(42, 84, 131, 0.12);
    }

    .pairs-nav > .pair > :first-child {
        border-radius: 14px 14px 0 0;
    }

    .pairs-nav > .pair > :last-child {
        border-radius: 0 0 14px 14px;
    }
}

@media (max-width: 380px) {
    .pair-brand .half-logo {
        padding: 8px 10px;
    }

    .pair-brand .half-logo img {
        height: 22px;
    }

    .pair-brand .half {
        padding: 8px 10px;
    }

    .pair-brand .half:last-child .t {
        font-size: 14.5px;
    }
}

/* ---------- Test environment notice ---------- */

.env-notice {
    position: fixed;
    right: 14px;
    top: calc(var(--head-h) + 14px);
    z-index: 1035;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 28px);
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--sand-400);
    color: var(--on-gold);
    box-shadow: 0 6px 18px -6px rgba(10, 27, 46, 0.5);
    font: 700 13px/1.2 var(--head);
    letter-spacing: 0.03em;
    pointer-events: none;
}

.env-notice-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
    .env-notice {
        top: auto;
        left: 10px;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        justify-content: center;
        max-width: none;
        padding: 8px 12px;
        border-radius: 8px;
        font-size: 12px;
        text-align: center;
    }

    body:has(.env-notice) {
        padding-bottom: calc(52px + env(safe-area-inset-bottom));
    }
}

@media print {
    .site-head,
    .env-notice,
    .site-foot {
        display: none !important;
    }
}

/* ---------- Test environment notice: temporarily hidden (remove this section to show it again) ---------- */

.env-notice {
    display: none;
}

@media (max-width: 767.98px) {
    body:has(.env-notice) {
        padding-bottom: 0;
    }
}

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

.key-card {
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(16, 40, 70, 0.08), 0 10px 22px -14px rgba(16, 40, 70, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.key-card:hover,
.key-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 0 0 3px var(--sand-400), 0 16px 28px -14px rgba(16, 40, 70, 0.5);
}

.key-card:active {
    transform: none;
}

.card-go {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 600;
}

.card-go i {
    color: var(--sand-400);
    transition: transform 0.15s ease;
}

.key-card:hover .card-go i,
.key-card:focus-visible .card-go i {
    transform: translateX(4px);
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    color: var(--sand-600);
    font-size: 13.5px;
    font-weight: 600;
}

.card-link i {
    transition: transform 0.15s ease;
}

.key-card:hover .card-link,
.key-card:focus-visible .card-link {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.key-card:hover .card-link i,
.key-card:focus-visible .card-link i {
    transform: translate(2px, -2px);
}

/* ---------- Road map on a dark background ---------- */

.road-map {
    display: block;
    width: 100%;
    height: auto;
}

.road-map-land {
    fill: rgba(255, 255, 255, 0.05);
    stroke: rgba(95, 209, 196, 0.55);
    stroke-width: 1.4;
    stroke-linejoin: round;
}

.road-map-national path {
    fill: none;
    stroke: #ffffff;
    stroke-opacity: 0.38;
    stroke-width: 1;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.road-map-national-lines path {
    fill: none;
    stroke: none;
}

.road-map-roads path {
    fill: none;
    stroke: var(--theme-road);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-opacity: 0.92;
}

.road-map-dots circle {
    fill: #ffe9a8;
}

.road-map-dots.is-national circle {
    fill: #ffffff;
    opacity: 0.75;
}

.road-map-dots {
    filter: url(#roadMapGlow);
}

.road-map-glow {
    filter: url(#roadMapGlow);
}

.road-map-glow path {
    fill: none;
    stroke: #fff4cf;
    stroke-width: 3.6;
    stroke-linecap: round;
    stroke-dasharray: 24 900;
    stroke-dashoffset: 924;
    opacity: 0.9;
    animation: road-map-flow 10s linear infinite;
}

.road-map-glow path:nth-child(2) { animation-duration: 11s; animation-delay: -4s; }
.road-map-glow path:nth-child(3) { animation-duration: 7s; animation-delay: -2s; }
.road-map-glow path:nth-child(4) { animation-duration: 8s; animation-delay: -5s; }
.road-map-glow path:nth-child(5) { animation-duration: 7.5s; animation-delay: -1s; }
.road-map-glow path:nth-child(6) { animation-duration: 9s; animation-delay: -6s; }
.road-map-glow path:nth-child(7) { animation-duration: 8.5s; animation-delay: -3s; }
.road-map-glow path:nth-child(8) { animation-duration: 9.5s; animation-delay: -7s; }
.road-map-glow path:nth-child(9) { animation-duration: 6.5s; animation-delay: -2.5s; }
.road-map-glow path:nth-child(10) { animation-duration: 7s; animation-delay: -5.5s; }
.road-map-glow path:nth-child(11) { animation-duration: 8s; animation-delay: -1.5s; }
.road-map-glow path:nth-child(12) { animation-duration: 12s; animation-delay: -8s; }
.road-map-glow path:nth-child(13) { animation-duration: 9s; animation-delay: -4.5s; }
.road-map-glow path:nth-child(14) { animation-duration: 6s; animation-delay: -3.5s; }
.road-map-glow path:nth-child(15) { animation-duration: 7s; animation-delay: -0.5s; }

@keyframes road-map-flow {
    from { stroke-dashoffset: 924; }
    to { stroke-dashoffset: 0; }
}

.road-map-pulses circle {
    fill: none;
    stroke: var(--sand-400);
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
    transform-box: fill-box;
    transform-origin: center;
    opacity: 0;
    animation: road-map-pulse 4.2s ease-out infinite;
}

.road-map-pulses circle:nth-child(2) { animation-delay: 0.7s; }
.road-map-pulses circle:nth-child(3) { animation-delay: 1.4s; }
.road-map-pulses circle:nth-child(4) { animation-delay: 2.1s; }
.road-map-pulses circle:nth-child(5) { animation-delay: 2.8s; }
.road-map-pulses circle:nth-child(6) { animation-delay: 3.5s; }

@keyframes road-map-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    70% { opacity: 0; }
    100% { transform: scale(3.6); opacity: 0; }
}

.road-map-cities circle {
    fill: var(--navy-900);
    stroke: var(--sand-400);
    stroke-width: 2;
}

.road-map-cities text {
    fill: #ecdfc2;
    font: 600 15px var(--body);
    paint-order: stroke;
    stroke: var(--navy-900);
    stroke-width: 4px;
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    color: var(--on-dark-2);
    font-size: 13.5px;
}

.map-legend span {
    display: inline-block;
    width: 22px;
    height: 4px;
    margin-right: 8px;
    border-radius: 3px;
    background: var(--theme-road);
    vertical-align: middle;
}

.map-legend .lg-n {
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
}

.map-credit {
    margin: 6px 0 0;
    color: #8ea6b0;
    font-size: 12px;
}

.dark-panel {
    --focus: var(--sand-400);
    color: var(--on-dark);
    background:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 44px 44px,
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px) 0 0 / 44px 44px,
        radial-gradient(120% 80% at 85% 10%, rgba(20, 145, 138, 0.45), transparent 60%),
        radial-gradient(90% 70% at 0% 100%, rgba(var(--sand-rgb), 0.18), transparent 55%),
        linear-gradient(160deg, var(--navy-800), #183a5b 60%, #132f4b);
}

/* ============================================
   PAGES: user area and dashboard
   ============================================ */

/* ---------- User area: side menu, phone tab bar and content ---------- */

.user-shell {
    --side-w: 268px;
    display: grid;
    grid-template-columns: var(--side-w) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

body.side-collapsed .user-shell {
    --side-w: 64px;
}

.user-content {
    min-width: 0;
}

.user-content > .container {
    max-width: none;
    padding: 0 !important;
}

.user-side {
    position: sticky;
    top: calc(var(--top-h) + 1rem);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.side-group {
    margin: 14px 12px 6px;
    color: var(--ink-3);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.side-link,
.side-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: none;
    color: var(--ink-2);
    font-weight: 500;
    text-align: left;
    text-decoration: none;
}

.side-link i {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: var(--navy-700);
    font-size: 18px;
    flex: none;
}

.side-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-link:hover,
.side-link:focus-visible {
    border-color: var(--line);
    background: #ffffff;
    color: var(--navy-900);
}

.side-link[aria-current="page"],
.side-link[aria-current="page"]:hover,
.side-link[aria-current="page"]:focus-visible {
    border-color: #dbe4ef;
    background: #ffffff;
    color: var(--navy-900);
    font-weight: 600;
}

.side-link[aria-current="page"] i {
    background: var(--teal-600);
    color: #ffffff;
}

.side-foot {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.side-foot .side-link {
    min-height: 40px;
    color: var(--ink-3);
    font-size: 15px;
}

.side-toggle {
    min-height: 40px;
    margin-top: 6px;
    color: var(--ink-3);
    font-size: 14px;
    cursor: pointer;
}

.side-toggle i {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #ffffff;
    margin: 0 4px;
    font-size: 11px;
}

.side-toggle:hover,
.side-toggle:focus-visible {
    background: #ffffff;
    color: var(--navy-900);
}

body.side-collapsed .side-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

body.side-collapsed .side-group {
    position: relative;
    color: transparent;
    overflow: hidden;
}

body.side-collapsed .side-group::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: var(--line);
}

body.side-collapsed .side-link,
body.side-collapsed .side-toggle {
    justify-content: center;
    padding: 0;
}

body.side-collapsed .side-link {
    width: 46px;
    margin-inline: auto;
}

body.side-collapsed .side-foot .side-link {
    width: 40px;
}

body.side-collapsed .side-toggle i {
    transform: rotate(180deg);
}

.tab-bar {
    display: none;
}

@media (max-width: 1023.98px) {
    .user-shell {
        grid-template-columns: minmax(0, 1fr);
        padding-bottom: calc(64px + 24px + env(safe-area-inset-bottom));
    }

    .user-side {
        display: none;
    }

    .user-content {
        padding: 18px 16px;
        border-radius: 12px;
    }

    .tab-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1030;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        height: calc(64px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        border-top: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.97);
        box-shadow: 0 -10px 30px -20px rgba(16, 40, 70, 0.5);
    }

    .tab-bar a {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: var(--ink-3);
        font-size: 11.5px;
        font-weight: 500;
        text-decoration: none;
    }

    .tab-bar a i {
        color: var(--ink-3);
        font-size: 21px;
    }

    .tab-bar a[aria-current="page"] {
        color: var(--navy-800);
        font-weight: 600;
    }

    .tab-bar a[aria-current="page"] i {
        color: var(--teal-600);
    }

    .tab-bar a[aria-current="page"]::before {
        content: "";
        position: absolute;
        top: 0;
        left: 28%;
        right: 28%;
        height: 3px;
        border-radius: 0 0 3px 3px;
        background: var(--teal-600);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .side-toggle i {
        transition: transform 0.2s;
    }
}

/* ---------- Dashboard ---------- */

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 2px 0 16px;
}

.page-head h1 {
    margin: 0;
    color: var(--navy-800);
    font: 700 clamp(26px, 3.2vw, 34px)/1.2 var(--head);
}

.page-head .page-lead {
    margin: 6px 0 0;
    color: var(--ink-2);
}

.dash-todo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    padding: 12px 14px 12px 16px;
    border-radius: 8px;
    background: var(--sand-50);
    box-shadow: inset 0 0 0 1px var(--sand-200);
    color: var(--ink-2);
    font-size: 15px;
}

.dash-todo > i {
    color: var(--sand-600);
    font-size: 22px;
}

.dash-todo > div {
    flex: 1;
}

.dash-todo strong {
    color: var(--ink);
}

.dash-sum {
    margin-bottom: 14px;
    padding: clamp(16px, 2vw, 22px);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(16, 40, 70, 0.05), 0 10px 26px -18px rgba(16, 40, 70, 0.45), 0 2px 6px -4px rgba(16, 40, 70, 0.15);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 28px;
}

.dash-sum .ui-btn {
    margin-left: auto;
}

.dash-sum-label {
    color: var(--ink-3);
    font-size: 14px;
}

.dash-sum-value {
    color: var(--navy-800);
    font: 700 34px/1.1 var(--head);
}

.dash-sum-year {
    margin-top: 6px;
    color: var(--ink-2);
    font: 600 22px/1.1 var(--head);
}

.dash-company-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dash-company-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid #eee8dc;
}

.dash-company-row:first-child {
    padding-top: 0;
    border-top: 0;
}

.dash-company-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #eef3f9;
    color: var(--navy-900);
    font-size: 20px;
}

.dash-company-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dash-company-name {
    color: var(--navy-800);
    font: 600 17px/1.25 var(--head);
}

.dash-company-meta,
.dash-company-month {
    color: var(--ink-3);
    font-size: 13.5px;
}

.dash-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

.dash-badge.is-wait {
    background: var(--sand-100);
    color: var(--sand-600);
}

.dash-badge.is-ok {
    background: #e9f6f4;
    color: var(--teal-600);
}

.dash-company-money {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.dash-money {
    color: var(--sand-600);
    font: 700 17px/1.2 var(--head);
}

.dash-company-actions {
    display: flex;
    gap: 6px;
}

.dash-company-actions .ui-btn::after {
    display: none;
}

.dash-delete {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    color: var(--ink-3);
}

.dash-delete:hover,
.dash-delete:focus-visible {
    border-color: #b42318;
    color: #b42318;
}

@media (max-width: 767.98px) {
    .dash-todo {
        flex-wrap: wrap;
    }

    .dash-todo .ui-btn,
    .dash-sum .ui-btn {
        width: 100%;
        margin-left: 0;
    }

    .dash-company-row {
        grid-template-columns: 42px minmax(0, 1fr) auto;
        row-gap: 10px;
    }

    .dash-company-state {
        grid-column: 2 / -1;
        grid-row: 2;
    }

    .dash-company-money {
        grid-column: 3;
        grid-row: 1;
    }

    .dash-company-actions {
        grid-column: 1 / -1;
    }

    .dash-company-actions .ui-btn {
        flex: 1;
    }
}

/* ---------- User area forms: breadcrumbs, form card, fields, wizard steps ---------- */

.crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    color: var(--ink-3);
    font-size: 14px;
}

.crumbs a {
    color: var(--ink-3);
    text-decoration: none;
}

.crumbs a:hover,
.crumbs a:focus-visible {
    color: var(--navy-900);
    text-decoration: underline;
}

.form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}

.form-card {
    padding: clamp(16px, 2vw, 22px);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(16, 40, 70, 0.05), 0 10px 26px -18px rgba(16, 40, 70, 0.45), 0 2px 6px -4px rgba(16, 40, 70, 0.15);
}

.wizard-steps {
    display: flex;
    gap: 8px;
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.wizard-steps li {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    color: var(--ink-3);
    font-size: 13.5px;
}

.wizard-steps li::before {
    content: "";
    height: 5px;
    border-radius: 99px;
    background: #e9e3d7;
}

.wizard-steps li.is-done::before {
    background: var(--teal-600);
}

.wizard-steps li.is-now {
    color: var(--navy-800);
    font-weight: 600;
}

.wizard-steps li.is-now::before {
    background: var(--navy-900);
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field > label {
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
}

.eik-row {
    display: flex;
    gap: 10px;
}

.eik-row .form-input {
    flex: 1;
    min-width: 0;
}

.eik-row .ui-btn::after {
    display: none;
}

.form-input {
    width: 100%;
    min-height: 44px;
    padding: 0 44px 0 14px;
    border: 1px solid #d6cfc1;
    border-radius: 10px;
    background: #ffffff;
    font-size: 17px;
}

.form-input:focus {
    border-color: var(--navy-900);
    outline: none;
    box-shadow: 0 0 0 4px rgba(42, 84, 131, 0.16);
}

.form-input.is-big {
    min-height: 44px;
    font: 600 22px/1 var(--head);
    letter-spacing: 0.06em;
}

.form-input.is-ok {
    border-color: var(--teal-600);
}

.form-input.is-bad {
    border-color: #b42318;
    box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.1);
}

.form-hint {
    color: var(--ink-3);
    font-size: 13.5px;
}

.form-message {
    font-size: 14px;
}

.form-message.is-ok {
    color: var(--teal-600);
}

.form-message.is-bad {
    color: #b42318;
}

.form-foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #eee8dc;
}

.found-card {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #bfe3dd;
    border-radius: 8px;
    background: linear-gradient(180deg, #f3fbf9, #ffffff);
}

.found-card h3 {
    margin: 8px 0 0;
    color: var(--navy-800);
    font: 600 20px/1.25 var(--head);
}

.found-card dl {
    display: grid;
    grid-template-columns: minmax(110px, auto) 1fr;
    gap: 6px 14px;
    margin: 12px 0 0;
    font-size: 15px;
}

.found-card dt {
    color: var(--ink-3);
    font-weight: 400;
}

.found-card dd {
    margin: 0;
    color: var(--ink);
    font-weight: 500;
}

.found-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #e9f6f4;
    color: var(--teal-600);
    font-size: 12.5px;
    font-weight: 600;
}

.found-badge.is-warn {
    background: var(--sand-100);
    color: var(--sand-600);
}

.done-note {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 8px;
    background: #e9f6f4;
    color: var(--ink-2);
}

.done-note > i {
    color: var(--teal-600);
    font-size: 20px;
}

.done-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.done-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: inherit;
    text-decoration: none;
}

.done-link:hover,
.done-link:focus-visible {
    border-color: rgba(42, 84, 131, 0.35);
    box-shadow: 0 16px 32px -18px rgba(16, 40, 70, 0.55);
}

.done-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #eef3f9;
    color: var(--navy-900);
    font-size: 20px;
}

.done-title {
    display: block;
    color: var(--navy-800);
    font: 600 17px/1.25 var(--head);
}

.done-text {
    display: block;
    color: var(--ink-3);
    font-size: 13.5px;
}

.form-tips h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: var(--navy-800);
    font: 600 17px/1.2 var(--head);
}

.form-tips h2 i {
    color: var(--sand-600);
}

.form-tips ul {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 20px;
    color: var(--ink-2);
    font-size: 15px;
}

.form-why {
    margin-top: 14px;
    border-radius: 10px;
    background: var(--sand-50);
    box-shadow: inset 0 0 0 1px var(--line);
}

.form-why summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 14px;
    color: var(--navy-900);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.form-why > div {
    padding: 0 14px 14px;
    color: var(--ink-2);
    font-size: 14.5px;
}

@media (max-width: 1199.98px) {
    .form-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 767.98px) {
    .done-links {
        grid-template-columns: minmax(0, 1fr);
    }

    .form-foot {
        flex-direction: column-reverse;
    }
}

/* ---------- Company frame, lists and vehicle pages ---------- */

.co-frame {
    border-radius: 12px;
    background: #f7f9fc;
    box-shadow: 0 0 0 1px #dbe4ef, 0 10px 26px -18px rgba(16, 40, 70, 0.45);
}

.co-switch {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid #dbe4ef;
    border-radius: 12px 12px 0 0;
    background: #eef3f9;
}

.co-switch-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.co-switch-label {
    color: var(--ink-3);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.co-switch-name {
    color: var(--navy-800);
    font: 600 18px/1.25 var(--head);
}

.co-switch-meta {
    color: var(--ink-3);
    font-size: 13px;
}

.co-arrow {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    color: var(--navy-900);
    font-size: 17px;
    text-decoration: none;
}

.co-arrow:hover,
.co-arrow:focus-visible {
    border-color: rgba(42, 84, 131, 0.35);
    color: var(--teal-600);
}

.co-body {
    padding: 16px;
}

.co-body.is-plain {
    border-radius: 0 0 12px 12px;
    background: #ffffff;
}

.co-switch {
    flex-wrap: wrap;
}

.co-back {
    flex: none;
}

.co-back::after,
.list-tools .ui-btn::after {
    display: none;
}

.list-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.list-search {
    position: relative;
    flex: 1 1 240px;
}

.list-search i {
    position: absolute;
    top: 50%;
    left: 14px;
    color: var(--ink-3);
    transform: translateY(-50%);
}

.list-search .form-input {
    min-height: 44px;
    padding-left: 42px;
    font-size: 16px;
}

.list-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.list-filters a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 99px;
    background: #ffffff;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.list-filters a span {
    opacity: 0.75;
}

@media (pointer: coarse) {
    .list-filters a {
        min-height: 40px;
    }
}

.list-filters a[aria-current="true"] {
    border-color: var(--navy-800);
    background: var(--navy-800);
    color: #ffffff;
}

.list-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    color: var(--ink-2);
    font-size: 14px;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 15px;
}

.data-table th {
    padding: 0 12px 10px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-3);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table tbody th[scope="row"],
.data-table tfoot th[scope="row"] {
    padding-top: 6px;
    padding-bottom: 6px;
    border-bottom-color: #eee8dc;
    color: var(--ink);
    font-size: 15px;
    letter-spacing: 0;
    text-transform: none;
    vertical-align: middle;
}

.data-table td {
    padding: 6px 12px;
    border-bottom: 1px solid #eee8dc;
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover td {
    background: #fcfaf5;
}

.plate {
    display: inline-flex;
    align-items: stretch;
    min-width: 128px;
    min-height: 30px;
    overflow: hidden;
    border: 1.5px solid #1d2733;
    border-radius: 6px;
    background: #ffffff;
    color: #111111;
    font: 700 15px/1 var(--head);
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.plate-country {
    display: flex;
    align-items: flex-end;
    padding: 2px 4px 3px;
    background: #1f4fb4;
    color: #ffffff;
    font-size: 11px;
    letter-spacing: 0;
}

.plate-number {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
}

.cell-note {
    margin-top: 2px;
    color: var(--ink-3);
    font-size: 12.5px;
}

.reg-ok,
.reg-bad,
.reg-wait {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-2);
}

.reg-ok i {
    color: var(--teal-600);
}

.reg-bad i {
    color: #b42318;
}

.reg-wait {
    color: var(--ink-3);
    font-size: 14px;
}

.new-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 99px;
    background: #eef3f9;
    color: var(--navy-900);
    font-size: 12px;
    font-weight: 600;
}

.cell-actions {
    text-align: right;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    color: var(--ink-3);
}

.icon-button:hover,
.icon-button:focus-visible {
    border-color: #b42318;
    color: #b42318;
}

.file-row .document-buttons .btn {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    color: var(--ink-3);
}

.file-row .document-buttons .btn:hover,
.file-row .document-buttons .btn:focus-visible {
    border-color: var(--navy-700);
    color: var(--navy-700);
}

.row-menu {
    position: relative;
    display: inline-block;
}

.row-menu > summary {
    list-style: none;
    cursor: pointer;
}

.row-menu > summary::-webkit-details-marker {
    display: none;
}

.row-menu > summary:hover,
.row-menu > summary:focus-visible,
.row-menu[open] > summary {
    border-color: var(--navy-900);
    color: var(--navy-900);
}

.row-menu-list {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 20;
    min-width: 230px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 12px 28px -14px rgba(16, 40, 70, 0.45);
    text-align: left;
}

.row-menu-list form {
    margin: 0;
}

.row-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--navy-800);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.row-menu-item:hover,
.row-menu-item:focus-visible {
    background: #eef3f9;
}

.row-menu-item.is-danger {
    color: #b42318;
}

.row-menu-item.is-danger:hover,
.row-menu-item.is-danger:focus-visible {
    background: #fdf0ee;
}

.report-table tr.is-muted {
    color: var(--ink-3);
}

.link-button {
    margin-left: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--navy-900);
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
}

.link-button.is-danger {
    margin: 0;
    color: #b42318;
}

.list-foot {
    margin-top: 16px;
    text-align: right;
}

.form-alert,
.form-result {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: 8px;
}

.form-alert {
    display: flex;
    gap: 8px;
    background: #fdeceb;
    color: #b42318;
}

.form-result {
    background: #e9f6f4;
    color: var(--ink-2);
}

.form-result i {
    margin-right: 6px;
    color: var(--teal-600);
}

.result-list {
    margin: 8px 0 0;
    padding-left: 20px;
    color: #b42318;
    font-size: 14px;
}

.veh-add {
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
}

.veh-add-form {
    display: grid;
    grid-template-columns: minmax(140px, 200px) minmax(160px, 1fr) minmax(150px, 180px) auto;
    gap: 10px;
    align-items: end;
}

.veh-add-form .form-field {
    margin: 0;
}

.veh-add-hint {
    grid-column: 2;
    margin-top: -4px;
}

.veh-add-start-hint {
    grid-column: 3;
    margin-top: -4px;
}

.veh-add-btn {
    grid-row: 1;
    grid-column: 4;
    align-self: end;
}

.veh-dates-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 220px));
    gap: 10px 14px;
}

.veh-dates-form .form-hint,
.veh-dates-form .form-foot {
    grid-column: 1 / -1;
}

.veh-import {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.veh-import-btn {
    cursor: pointer;
}

.veh-import-btn:focus-within {
    outline: 2px solid var(--teal-600);
    outline-offset: 2px;
}

.veh-import .form-hint {
    flex: 1 1 260px;
}

.data-table tr.is-just-added > td {
    background: #f1f8f4;
}

.form-select-plain {
    padding-right: 14px;
}

.form-textarea {
    min-height: 160px;
    padding: 12px 14px;
    font: 500 16px/1.6 ui-monospace, Consolas, monospace;
}

.form-file {
    padding: 12px 14px;
    font-size: 15px;
}

@media (max-width: 767.98px) {
    .row-menu-list {
        right: auto;
        left: 0;
    }

    .co-body {
        padding: 10px;
    }

    .co-body .form-card {
        padding: 4px 0 0;
        background: transparent;
        box-shadow: none;
    }

    .data-table thead {
        display: none;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tr {
        margin-bottom: 10px;
        padding: 10px 12px;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: #ffffff;
    }

    .data-table td {
        padding: 4px 0;
        border: 0;
        text-align: left;
    }

    .data-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        color: var(--ink-3);
        font-size: 12px;
    }

    .veh-add-form {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .veh-add-form .form-field:nth-of-type(3),
    .veh-add-start-hint,
    .veh-add-hint,
    .veh-add-btn {
        grid-row: auto;
        grid-column: 1 / -1;
    }

    .veh-add-form .form-select-plain {
        padding: 0 24px 0 10px;
    }
}

@media (pointer: coarse) {
    .icon-button,
    .file-row .document-buttons .btn {
        width: 44px;
        height: 44px;
    }

    .eik-link,
    .ticket-back,
    .link-button,
    .file-name,
    .ob-link {
        display: inline-flex;
        align-items: center;
        min-height: 36px;
    }
}

/* ---------- Bank account page ---------- */

.card-title {
    margin: 0 0 14px;
    color: var(--navy-800);
    font: 600 21px/1.2 var(--head);
}

.iban-input {
    padding-right: 14px;
    font: 600 19px/1 ui-monospace, Consolas, monospace;
    letter-spacing: 0.05em;
}

@media (max-width: 575.98px) {
    .ui-btn {
        width: 100%;
    }

    .eik-row {
        flex-direction: column;
    }

    .iban-input {
        font-size: 16px;
        letter-spacing: 0;
    }
}

.form-message-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    margin-top: 8px;
}

.bank-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 10px;
    background: #e9f6f4;
    color: var(--teal-600);
    font-size: 14px;
    font-weight: 600;
}

.file-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
}

.file-icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: #eef3f9;
    color: var(--navy-900);
    font-size: 20px;
}

.file-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.file-name {
    overflow: hidden;
    color: var(--navy-900);
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
}

.upload-row .form-file {
    flex: 1 1 260px;
}

.state-steps {
    margin: 0;
    padding: 0;
    list-style: none;
}

.state-steps li {
    position: relative;
    display: flex;
    gap: 12px;
    padding-bottom: 16px;
}

.state-steps li:last-child {
    padding-bottom: 0;
}

.state-steps li::before {
    content: "";
    position: absolute;
    top: 28px;
    bottom: 0;
    left: 13px;
    width: 2px;
    background: var(--line);
}

.state-steps li:last-child::before {
    display: none;
}

.state-mark {
    position: relative;
    z-index: 1;
    display: grid;
    flex: none;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #f1efe9;
    color: var(--ink-3);
    font-size: 14px;
    box-shadow: 0 0 0 1px var(--line);
}

.state-steps .is-done .state-mark {
    background: var(--teal-600);
    color: #ffffff;
    box-shadow: none;
}

.state-steps .is-now .state-mark {
    background: var(--sand-400);
    color: var(--on-gold);
    box-shadow: 0 0 0 4px rgba(226, 179, 58, 0.25);
}

.state-title {
    color: var(--navy-800);
    font-weight: 600;
}

.state-text {
    color: var(--ink-3);
    font-size: 13.5px;
}

.form-tips ol {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 20px;
    color: var(--ink-2);
    font-size: 15px;
}

.company-facts {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    margin: 0;
    font-size: 14px;
}

.company-facts dt {
    color: var(--ink-3);
    font-weight: 400;
}

.company-facts dd {
    margin: 0;
}

/* ---------- Discounts page ---------- */

.month-nav {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.co-arrow.is-off {
    opacity: 0.35;
}

.month-list {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 8px;
}

.month-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    color: inherit;
    text-align: center;
    text-decoration: none;
}

.month-card:hover,
.month-card:focus-visible {
    border-color: rgba(42, 84, 131, 0.35);
}

.month-card.is-off {
    border-style: dashed;
    background: transparent;
    opacity: 0.55;
    cursor: default;
}

.month-card.is-off:hover {
    border-color: var(--line);
}

.month-card[aria-current="page"] {
    border-color: var(--navy-900);
    background: #eef3f9;
    box-shadow: inset 0 0 0 1px var(--navy-900);
}

.month-name {
    color: var(--navy-800);
    font: 600 16px/1.2 var(--head);
}

.month-name::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 8px;
    border-radius: 3px;
    background: var(--navy-900);
    vertical-align: 1px;
}

.month-card.is-calculating .month-name::before {
    background: repeating-linear-gradient(135deg, var(--sand-400) 0 3px, var(--sand-100) 3px 6px);
}

.month-card.is-current .month-name::before {
    background: repeating-linear-gradient(135deg, #c9c3b7 0 3px, #f3efe7 3px 6px);
}

.month-value {
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 600;
}

.month-all {
    color: var(--ink-3);
    font-size: 12px;
}

.report-card {
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(16, 40, 70, 0.05), 0 10px 26px -18px rgba(16, 40, 70, 0.45), 0 2px 6px -4px rgba(16, 40, 70, 0.15);
}

.report-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-bottom: 1px solid #dbe4ef;
    background: #eef3f9;
}

.report-sum {
    display: flex;
    align-items: center;
    gap: 10px;
}

.report-table {
    margin: 4px 0 6px;
}

.report-table th:first-child,
.report-table td:first-child {
    padding-left: 18px;
}

.report-table th:last-child,
.report-table td:last-child {
    padding-right: 18px;
}

.data-table .num {
    text-align: right;
}

.report-empty,
.report-note {
    margin: 0;
    padding: 12px 18px;
    color: var(--ink-3);
    font-size: 14px;
}

.report-note {
    border-top: 1px solid #eee8dc;
}

@media (max-width: 767.98px) {
    .month-nav {
        grid-template-columns: 36px minmax(0, 1fr) 36px;
        gap: 6px;
    }

    .month-list {
        gap: 6px;
    }

    .month-name {
        font-size: 14px;
    }

    .report-head {
        flex-wrap: wrap;
    }

    .report-head .co-switch-text {
        flex-basis: 100%;
        order: -1;
        text-align: center;
    }

    .report-sum {
        flex: 1;
        justify-content: center;
    }

    .report-table thead {
        display: table-header-group;
    }

    .report-table,
    .report-table tbody {
        display: table;
        width: 100%;
    }

    .report-table tbody {
        display: table-row-group;
    }

    .report-table tr {
        display: table-row;
        margin: 0;
        padding: 0;
        border: 0;
    }

    .report-table td,
    .report-table th {
        display: table-cell;
        width: auto;
        padding: 6px;
        border-bottom: 1px solid #eee8dc;
    }

    .hide-small {
        display: none !important;
    }
}

/* ---------- Profile page ---------- */

.profile-top {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-avatar {
    display: grid;
    flex: none;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--navy-900);
    color: #ffffff;
    font: 600 22px/1 var(--head);
}

.profile-text {
    min-width: 0;
}

.profile-mail {
    margin: 0;
    color: var(--navy-800);
    font: 600 20px/1.25 var(--head);
    word-break: break-all;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
    gap: 8px;
    margin-top: 18px;
}

.profile-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 12px 6px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fcfaf5;
    text-decoration: none;
}

.profile-stat:hover,
.profile-stat:focus-visible {
    border-color: rgba(42, 84, 131, 0.35);
}

.profile-stat-value {
    color: var(--navy-800);
    font: 700 26px/1.1 var(--head);
}

.profile-stat-label {
    color: var(--ink-3);
    font-size: 13px;
    white-space: nowrap;
}

.password-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.form-alert ul {
    margin: 0;
    padding-left: 18px;
}

@media (max-width: 767.98px) {
    .password-pair {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ---------- Tickets page ---------- */
.ticket-layout {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.ticket-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ticket-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--theme-radius);
    color: var(--ink);
    text-decoration: none;
    background: var(--theme-surface);
}

.ticket-item:hover {
    border-color: var(--navy-700);
    color: var(--ink);
}

.ticket-item[aria-current="true"] {
    border-color: var(--navy-900);
    box-shadow: inset 3px 0 0 var(--navy-900);
    background: var(--sand-50);
}

.ticket-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 13px;
    color: var(--ink-3);
}

.ticket-no {
    white-space: nowrap;
}

.ticket-date {
    margin-left: auto;
    white-space: nowrap;
}

.ticket-unread {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal-600);
    flex: none;
}

.ticket-status {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    background: #eef1f5;
    color: var(--ink-2);
}

.ticket-status.is-new {
    background: var(--sand-100);
    color: var(--sand-600);
}

.ticket-status.is-progress {
    background: #e6eef8;
    color: var(--navy-900);
}

.ticket-status.is-answered {
    background: #e3f3f1;
    color: var(--teal-600);
}

.ticket-subject {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-context {
    font-size: 14px;
    color: var(--ink-3);
}

.ticket-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 48px 24px;
    text-align: center;
    color: var(--ink-3);
}

.ticket-empty > i {
    font-size: 2rem;
    color: var(--navy-700);
}

.ticket-back {
    display: none;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    text-decoration: none;
}

.ticket-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.ticket-head h2 {
    margin: 0;
    font-size: 1.2rem;
}

.ticket-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 16px;
    width: 100%;
    font-size: 14px;
    color: var(--ink-3);
}

.ticket-meta .link-button {
    text-align: left;
}

.thread {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.thread-message {
    max-width: 85%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.thread-message.is-mine {
    align-self: flex-end;
    align-items: flex-end;
}

.thread-message.is-theirs {
    align-self: flex-start;
}

.thread-who {
    font-size: 13px;
    color: var(--ink-3);
}

.thread-body {
    padding: 10px 14px;
    border-radius: var(--theme-radius-lg);
    overflow-wrap: anywhere;
}

.thread-body > :last-child {
    margin-bottom: 0;
}

.thread-message.is-mine .thread-body {
    background: var(--navy-900);
    color: #ffffff;
}

.thread-message.is-mine .thread-body a {
    color: var(--on-dark);
}

.thread-message.is-theirs .thread-body {
    background: #f1f4f8;
    border: 1px solid var(--line);
}

.thread-message.is-unread .thread-body {
    border-color: var(--teal-600);
    box-shadow: inset 3px 0 0 var(--teal-600);
}

.thread-files {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.thread-file {
    font-size: 0.85rem;
}

.thread-reply {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

@media (max-width: 991.98px) {
    .ticket-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .ticket-layout.is-open .ticket-list-card {
        display: none;
    }

    .page-head:has(+ .ticket-layout.is-open) > .ui-btn {
        display: none;
    }

    .ticket-layout:not(.is-open) .ticket-empty {
        display: none;
    }

    .ticket-back {
        display: inline-flex;
    }

    .thread-message {
        max-width: 100%;
    }
}

.dash-empty {
    background: var(--theme-surface);
    border: 1px dashed #b9c4d6;
    border-radius: var(--theme-radius);
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--theme-muted);
}

.dash-empty i {
    font-size: 2rem;
    color: var(--theme-primary);
    display: block;
    margin-bottom: 0.5rem;
}

/* ============================================
   PAGES: text pages, sign-in, company area
   ============================================ */

/* ---------- Page heading: title and lead of text pages ---------- */

.page-heading {
    margin: 0.75rem 0 2.25rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}

.page-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    color: var(--teal-600);
    font: 700 15px/1 var(--head);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-kicker::before {
    content: "";
    width: 28px;
    height: 4px;
    border-radius: 2px;
    background: var(--sand-400);
}

.page-title {
    margin: 0 0 14px;
    color: var(--navy-900);
    font: 800 clamp(30px, 3.4vw, 46px)/1.06 var(--head);
    letter-spacing: -0.005em;
    text-wrap: balance;
}

.page-lead {
    max-width: none;
    margin: 0;
    color: var(--ink-2);
    font-size: clamp(17px, 1.3vw, 19px);
    line-height: 1.55;
}

/* ---------- Prose: long text pages ---------- */

.prose {
    padding: clamp(20px, 3.4vw, 48px);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 24px 48px -32px rgba(16, 40, 70, 0.5);
    color: var(--ink-2);
    font-size: 17px;
    line-height: 1.7;
}

@media (min-width: 1200px) {
    .prose {
        columns: 2;
        column-gap: clamp(40px, 4vw, 72px);
        column-rule: 1px solid var(--line);
    }
}

.prose-section {
    margin-bottom: 28px;
    break-inside: avoid;
    scroll-margin-top: calc(var(--top-h) + 12px);
}

.prose-section:last-child {
    margin-bottom: 0;
}

.prose-section > :last-child {
    margin-bottom: 0;
}

.prose-title {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 0 0 12px;
    color: var(--navy-900);
    font: 700 clamp(22px, 2vw, 27px)/1.2 var(--head);
}

.prose-num {
    display: inline-grid;
    place-items: center;
    flex: none;
    min-width: 34px;
    height: 30px;
    padding: 0 8px;
    border-radius: 6px;
    background: var(--navy-900);
    color: #ffffff;
    font: 700 16px/1 var(--head);
    transform: translateY(-2px);
}

.prose p {
    margin: 0 0 0.9rem;
}

.prose ul {
    margin: 0 0 0.9rem;
    padding-left: 1.4rem;
}

.prose li {
    margin-bottom: 0.45rem;
}

.prose li::marker {
    color: var(--sand-600);
}

.prose a {
    color: var(--navy-900);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(var(--sand-rgb), 0.9);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.prose a:hover,
.prose a:focus-visible {
    color: var(--teal-600);
    text-decoration-color: var(--teal-600);
}

.prose-table {
    width: 100%;
    margin: 0.5rem 0 1.1rem;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    font-size: 16px;
}

.prose-table caption {
    caption-side: top;
    padding: 0 0 8px;
    color: var(--ink-3);
    font-size: 14px;
}

.prose-table th,
.prose-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.prose-table thead th {
    background: var(--sand-100);
    color: var(--navy-900);
    font-weight: 600;
}

.prose-table tbody tr:last-child td {
    border-bottom: 0;
}

.prose-table .tier-value {
    color: var(--navy-900);
    font: 700 19px/1 var(--head);
    white-space: nowrap;
}

/* ---------- Sign-in and registration: form card left, navy panel right ---------- */

.auth-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 20px;
    align-items: stretch;
}

.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 4px 0 rgba(27, 58, 92, 0.06), 0 18px 40px -30px rgba(10, 27, 46, 0.45);
}

.auth-title {
    margin: 0 0 6px;
    color: var(--navy-900);
    font: 800 clamp(26px, 2.2vw, 32px)/1.08 var(--head);
}

.auth-lead {
    margin: 0 0 18px;
    color: var(--ink-3);
    font-size: 15.5px;
}

.auth-field {
    margin-bottom: 14px;
}

.auth-field .form-label {
    margin-bottom: 4px;
    color: var(--navy-900);
    font-weight: 600;
    font-size: 15px;
}

.auth-input {
    min-height: 44px;
    padding: 8px 14px;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    background: var(--sand-50);
    font-size: 16px;
}

.auth-input:focus {
    border-color: var(--teal-600);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15);
}

.auth-input.input-validation-error {
    border-color: #b42318;
    background: #ffffff;
}

.auth-input.input-validation-error:focus {
    box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.15);
}

.auth-field .field-validation-error {
    display: block;
    margin-top: 6px;
    color: #b42318;
    font-size: 14px;
}

.auth-input-group .input-group-text {
    border: 1.5px solid var(--line);
    border-right: 0;
    border-radius: 8px 0 0 8px;
    background: var(--sand-100);
    color: var(--teal-600);
}

.auth-input-group .auth-input {
    border-radius: 0 8px 8px 0;
}

.auth-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin-bottom: 16px;
    padding: 0;
}

.auth-option .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
}

.auth-option .form-check-label {
    color: var(--ink-2);
    font-weight: 500;
    cursor: pointer;
}

.auth-submit {
    width: 100%;
    min-height: 44px;
    font-size: 16.5px;
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 24px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--ink-3);
    font-size: 15px;
}

.auth-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    color: var(--navy-900);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(var(--sand-rgb), 0.9);
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.auth-links a:hover,
.auth-links a:focus-visible {
    color: var(--teal-600);
    text-decoration-color: var(--teal-600);
}

.auth-hero {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    margin: 0;
    padding: 32px;
    overflow: hidden;
    border-radius: 8px;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    color: var(--sand-400);
    font: 700 15px/1 var(--head);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-kicker::before {
    content: "";
    width: 28px;
    height: 4px;
    border-radius: 2px;
    background: var(--sand-400);
}

.auth-hero-title {
    margin: 0 0 8px;
    color: #ffffff;
    font: 800 clamp(24px, 2.1vw, 30px)/1.08 var(--head);
    text-wrap: balance;
}

.auth-hero-lead {
    max-width: 44ch;
    margin: 0 0 12px;
    color: #c9d8de;
    font-size: 16px;
}

.auth-hero .map-frame {
    max-width: 34rem;
    margin: auto 0 0;
    padding-top: 14px;
}

.auth-hero .road-map {
    max-height: clamp(220px, calc(100vh - 470px), 330px);
}

.auth-hero .map-legend {
    color: #e8f1f4;
    text-shadow: 0 1px 4px rgba(8, 24, 42, 0.7);
}

/* ---------- Small account pages: one centred card ---------- */

.auth-narrow {
    max-width: 34rem;
    margin: 1rem auto 1.5rem;
}

.auth-icon {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    border-radius: 8px;
    background: var(--sand-100);
    color: var(--teal-600);
    font-size: 26px;
}

.auth-icon.is-danger {
    background: #fdecea;
    color: #b42318;
}

.auth-email {
    color: var(--navy-900);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.auth-tip {
    display: flex;
    gap: 10px;
    margin: 0 0 22px;
    padding: 12px 14px;
    border: 1px solid rgba(var(--sand-rgb), 0.45);
    border-radius: 8px;
    background: var(--sand-50);
    color: var(--ink-2);
    font-size: 15px;
}

.auth-tip i {
    flex: none;
    color: var(--sand-600);
}

@media (max-width: 991.98px) {
    .auth-split {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 767.98px) {
    .auth-hero .map-frame {
        display: none;
    }
}

/* ============================================
   BOOTSTRAP ALIGNMENT: buttons, links, forms, focus
   ============================================ */

.btn {
    font-family: var(--body);
}

.btn:not(.btn-link):not(.btn-close) {
    border-radius: 10px;
    transition: box-shadow 0.2s, filter 0.2s, border-color 0.2s, color 0.2s, background-color 0.2s;
}

.btn-primary,
.btn-dark,
.btn-outline-primary,
.btn-outline-dark,
.btn-outline-secondary,
.btn-light {
    border-color: var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-color);
    box-shadow: var(--btn-shadow);
}

.btn-primary:hover,
.btn-primary:focus-visible,
.btn-dark:hover,
.btn-dark:focus-visible,
.btn-outline-primary:hover,
.btn-outline-primary:focus-visible,
.btn-outline-dark:hover,
.btn-outline-dark:focus-visible,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus-visible,
.btn-light:hover,
.btn-light:focus-visible {
    border-color: var(--btn-border-hover, var(--btn-border));
    background: var(--btn-bg);
    color: var(--btn-color-hover, var(--btn-color));
    box-shadow: var(--btn-shadow-hover, var(--btn-shadow));
    filter: var(--btn-filter-hover, none);
}

.btn:not(.btn-link):not(.btn-close):active {
    transform: none;
    filter: brightness(0.96);
}

.btn-link {
    color: var(--navy-900);
}

.btn:focus-visible,
.btn:active:focus,
.btn-link.nav-link:focus {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.text-primary {
    color: var(--navy-900) !important;
}

.bg-primary {
    background-color: var(--navy-900) !important;
}

.border-primary {
    border-color: var(--navy-900) !important;
}

.form-control,
.form-select {
    border-color: var(--line);
    border-radius: 6px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--teal-600);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15);
}

.form-check-input:checked {
    background-color: var(--teal-600);
    border-color: var(--teal-600);
}

.form-check-input:focus {
    border-color: var(--teal-600);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15);
}

.form-label {
    color: var(--navy-900);
}

.card {
    border-color: var(--line);
    border-radius: 8px;
}

.card-header {
    border-radius: 8px 8px 0 0 !important;
}

.page-link {
    color: var(--navy-900);
}

.page-item.active .page-link,
.nav-pills .nav-link.active {
    background-color: var(--navy-900);
    border-color: var(--navy-900);
    color: #ffffff;
}

.dropdown-menu {
    border-color: var(--line);
    border-radius: 8px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--sand-100);
}

.table th {
    color: var(--navy-900);
}

/* ============================================
   SITE-WIDE ROAD PHOTO BACKGROUND (trial; remove this block to go back to plain paper)
   ============================================ */

body {
    background:
        linear-gradient(rgba(251, 247, 240, 0.6), rgba(251, 247, 240, 0.7)),
        url("../images/home-road.jpg") center / cover fixed no-repeat,
        var(--paper);
}

body:has(.user-shell) {
    background: var(--paper);
}

.prose,
.faq-page,
.auth-narrow .auth-card,
.page-heading {
    position: relative;
}

.page-heading {
    border-bottom-color: rgba(42, 84, 131, 0.18);
}

.page-heading .page-kicker,
.page-heading .page-title,
.page-heading .page-lead,
.faq-section-title {
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.95), 0 0 14px rgba(255, 255, 255, 0.85);
}

.page-heading .page-title,
.faq-section-title {
    color: var(--navy-800);
}

.page-heading .page-kicker {
    color: #0b5a54;
}

.page-heading .page-lead {
    color: var(--ink);
}

.dash-empty {
    box-shadow: 0 10px 24px -20px rgba(16, 40, 70, 0.45);
}

@media (max-width: 767.98px), (hover: none) {
    body {
        background-attachment: scroll;
    }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }

    .road-map-dots,
    .road-map-glow,
    .road-map-pulses {
        display: none;
    }

    .ui-btn,
    .ui-btn::after,
    .exit i,
    .btn,
    .exit,
    .faq-btn,
    .menu-btn,
    .key-card,
    .card-go i,
    .card-link i {
        transform: none !important;
    }
}

/* ---------- Recent sign-ins in the profile ---------- */

.signin-list {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
}

.signin-list li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--line);
}

.signin-list li:last-child {
    border-bottom: none;
}

.signin-device {
    font-weight: 600;
    color: var(--ink);
}

.signin-here {
    margin-left: 0.5rem;
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--sand-100);
    color: var(--sand-600);
    font-size: 12px;
    font-weight: 600;
}

.signin-time {
    font-size: 13px;
    color: var(--ink-3);
}

/* ---------- Second factor set-up ---------- */

.twofa-steps {
    margin: 0 0 1rem;
    padding-left: 1.25rem;
    color: var(--ink-2);
}

.twofa-qr {
    display: flex;
    justify-content: center;
    margin: 0 0 1rem;
}

.twofa-qr svg {
    width: 200px;
    height: 200px;
}

.twofa-key code,
.twofa-codes code {
    font-size: 1rem;
    letter-spacing: 0.05em;
    color: var(--navy-800);
}

.twofa-codes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0 0 1.25rem;
    padding: 1rem;
    list-style: none;
    background: var(--sand-50);
    border: 1px solid var(--line);
    border-radius: 6px;
}
