/*
 * SWISS Virtual Pilot Console — Main Stylesheet
 * ============================================================
 * Unminified, token-driven replacement for pilotconsole.min.css.
 * Requires tokens.css to be loaded FIRST.
 *
 * Token mapping:
 *   #c00 / #CC0000    → var(--color-primary)
 *   #ad0000 / #b30000 → var(--color-primary-hover)
 *   #f2f2f2 / #f5f5f5 → var(--color-surface)
 *   #cdcdcd / #e5e5e5 → var(--color-border)
 *   #46413e            → var(--color-accent)
 *   #666 / #666666     → var(--color-text-muted)
 *   #fff / #ffffff     → var(--color-background)
 *   #000 / #000000     → var(--color-text)
 *   #1e1e1e            → var(--color-text)
 *   #008e17            → var(--color-success)
 *   #f3a200            → var(--color-warning)
 *   #0d82b9            → var(--color-info)
 *
 * Milestone: M002 — CSS Token Architecture
 * Slice: S01 — Design Token Layer + Pilot Console CSS Rewrite
 * ============================================================
 */


/* ========== BASE / LAYOUT ========== */

body {
    width: 100vw;
    margin: 0;
    padding: 0;
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 18px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background-color 1s, color 1s;
}

.body-container {
    width: 80vw;
    margin-left: 10vw;
    /* Mobile: nav-row only (~72px). Tablet+: utility-bar + nav-row (~115px). */
    padding-top: 72px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .body-container {
        padding-top: 115px;
    }
}

.body {
    padding-top: 50px;
    margin-bottom: 150px;
}

.row {
    margin-top: 10px;
}

.row > div {
    margin-bottom: 10px;
}

.nomargin {
    margin: 0;
}

.imgauto {
    width: 100%;
}

.float-right {
    float: right;
}

.inline-block {
    display: inline-block;
}

@media (max-width: 768px) {
    .mobile-hidden {
        display: none;
    }
}


/* ========== HOMEPAGE ALERT ========== */

/* Base rule stripped down — .dash-card handles the chrome.
   The full alert styling lives in the DASHBOARD section. */
.homepage-alert {
    color: var(--color-text);
}

.homepage-alert a {
    color: var(--color-primary);
}

.homepage-alert a:hover {
    color: var(--color-primary-hover);
}


/* ========== TABLE ========== */

.table-placeholder {
    overflow-x: auto;
}

.table {
    border-collapse: collapse;
    width: 100%;
    text-align: left;
    table-layout: fixed;
    border: 1px solid var(--color-border);
}

.table > thead {
    background-color: var(--color-surface);
}

.table > thead > tr > th {
    padding: 10px;
    padding-top: 20px;
    padding-bottom: 20px;
}

.table > tbody > tr {
    border: 1px solid var(--color-border);
}

.table > tbody > tr > td {
    padding: 10px;
}

.table > tbody > tr:nth-child(even) {
    background-color: var(--color-surface);
}

/* Override striping for filterable tables — only stripe visible rows */
#schedules > tbody > tr:nth-child(even) {
    background-color: transparent;
}
#schedules > tbody > tr:nth-child(even of :not(.sf-hidden)) {
    background-color: var(--color-surface);
}

/* ── Company Directory: Discord buttons ──────────────────────────── */
.dir-discord-btn { display: inline-block; text-align: center; border-radius: var(--radius-sm); vertical-align: baseline; min-width: 35px; min-height: 30px; }
.dir-discord-linked { background-color: #5865F2; border-color: #5865F2; color: #fff; }
.dir-discord-linked:hover { background-color: #4752c4; border-color: #4752c4; }
.dir-discord-unlinked { background-color: #8B8FA3; border-color: #8B8FA3; color: rgba(255,255,255,0.5); cursor: default; opacity: 0.6; }


/* ========== NAVBAR ========== */

/*
 * Two-row header: utility-bar (logout + theme) above nav-row (logo + nav + hamburger).
 * Fixed to top of viewport. Mirrors public-web-5.0 structure exactly.
 *
 * Breakpoints (match public site):
 *   Mobile  <768px:      slide-down .site-nav.is-open
 *   Tablet  768–1023px:  dialog#nav-drawer (showModal)
 *   Desktop ≥1024px:     inline .site-nav; CSS :hover dropdowns
 */

/* ── Header shell ── */
.site-header {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    background: var(--color-background);
}

/* ── Utility bar — hidden on mobile, shown tablet+ ── */
.utility-bar {
    display: none;
}

.utility-bar__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text);
    text-decoration: none;
    font-size: inherit;
    transition: color var(--transition-fast);
}

.utility-bar__link:hover {
    color: var(--color-primary);
}

/* ── Utility bar: account button ── */
.utility-bar__account-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text);
    text-decoration: none;
    font-size: inherit;
    transition: color var(--transition-fast);
    padding: 0;
}

.utility-bar__account-btn:hover {
    color: var(--color-primary);
}

.utility-bar__account-btn .icon {
    font-family: var(--font-piktos);
    display: inline-flex;
    justify-content: center;
    font-size: 20px;
}

/* ── Nav row ── */
.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 72px;
}

/* ── Logo ── */
.site-logo {
    display: block;
    flex-shrink: 0;
}

.site-logo img {
    height: 40px;
    width: auto;
}

/* ── Primary nav (desktop) ── */
.site-nav {
    display: flex;
    align-items: center;
    gap: 36px;
    flex-wrap: wrap;
}

.nav-link {
    color: var(--color-text);
    font-weight: 400;
    font-size: 20.25px;
    text-decoration: none;
    transition: color var(--transition-fast);
    padding: 4.5px 0;
}

.nav-link:hover {
    color: var(--color-primary);
}

/* ── Dropdown groups ── */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: none;
    border: none;
    color: var(--color-text);
    font: inherit;
    font-weight: 400;
    font-size: 20.25px;
    cursor: pointer;
    padding: 4.5px 0;
}

.nav-dropdown-toggle:hover {
    color: var(--color-primary);
}

.dropdown-chevron {
    transition: transform 0.2s ease;
}

.nav-dropdown-toggle[aria-expanded="true"] .dropdown-chevron {
    transform: rotate(180deg);
}

/* Dropdown panel */
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1500;
}

.nav-dropdown-menu.align-right {
    right: 0;
    left: auto;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown-toggle[aria-expanded="true"] + .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown items */
.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text);
    font-size: 20.25px;
    text-decoration: none;
    transition: background-color 0.15s ease;
    white-space: nowrap;
}

.nav-dropdown-item:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.nav-dropdown-item:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.nav-dropdown-item:hover {
    background: var(--color-surface);
    color: var(--color-primary);
}

.nav-dropdown-item > .icon {
    font-family: var(--font-piktos);
    display: inline-flex;
    justify-content: center;
    width: 24px;
    font-size: 22px;
    flex-shrink: 0;
}

/* lx-iconfont icon used in nav dropdowns */
.nav-dropdown-item > .lh-photo-gallery::before {
    font-family: 'lx-iconfont';
    content: '\E9F5';
    display: inline-flex;
    justify-content: center;
    width: 24px;
    font-size: 20px;
    flex-shrink: 0;
    font-style: normal;
}

.nav-dropdown-item > .icon-image {
    height: 20px;
    width: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ── Account dropdown: right-anchored modifier ── */
.nav-dropdown-menu--account {
    right: 0;
    left: auto;
}

/* ── Dropdown separator (logout divider) ── */
.nav-dropdown-separator {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-xs) 0;
}

/* ── Hamburger toggle ── */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    position: relative;
    transition: background-color var(--transition-fast);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    transition: transform var(--transition-base);
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    top: 7px;
}

/* Hamburger → X when open */
.nav-toggle[aria-expanded="true"] .hamburger {
    background-color: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ── Mobile utility section (inside slide-down, <768px only) ── */
.nav-utils-mobile {
    display: none;
}

/* ── Dialog drawer (tablet 768–1023px) ── */
.nav-drawer {
    display: none;
    border: none;
    padding: 0;
    max-width: none;
    max-height: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(320px, 80vw);
    height: 100vh;
    height: 100dvh;
    margin: 0;
    background: var(--color-background);
    color: var(--color-text);
    overflow-y: auto;
}

.nav-drawer::backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.nav-drawer[open] {
    display: block;
    animation: drawer-slide-in 250ms ease-out forwards;
}

.nav-drawer[open]::backdrop {
    animation: backdrop-fade-in 250ms ease-out forwards;
}

@keyframes drawer-slide-in {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

@keyframes backdrop-fade-in {
    from { background: rgba(0, 0, 0, 0); }
    to   { background: rgba(0, 0, 0, 0.5); }
}

@media (prefers-reduced-motion: reduce) {
    .nav-drawer[open],
    .nav-drawer[open]::backdrop {
        animation: none;
    }
}

.nav-drawer__content {
    display: flex;
    flex-direction: column;
    padding: var(--space-lg);
    min-height: 100%;
}

.nav-drawer__close {
    align-self: flex-end;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    padding: var(--space-xs);
    margin-bottom: var(--space-lg);
}

.nav-drawer__close:hover {
    color: var(--color-primary);
}

.nav-drawer__nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.nav-drawer__nav a {
    color: var(--color-text);
    text-decoration: none;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    padding: var(--space-sm) 0;
    transition: color var(--transition-fast);
}

.nav-drawer__nav a:hover {
    color: var(--color-primary);
}

/* Drawer dropdown (inline expand) */
.nav-drawer__nav .nav-dropdown {
    width: 100%;
}

.nav-drawer__nav .nav-dropdown-toggle {
    width: 100%;
    justify-content: flex-start;
    padding: var(--space-sm) 0;
    font-size: var(--font-size-lg);
}

.nav-drawer__nav .nav-dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: transparent;
}

.nav-drawer__nav .nav-dropdown-toggle[aria-expanded="true"] + .nav-dropdown-menu {
    max-height: 400px;
}

.nav-drawer__nav .nav-dropdown-menu a {
    padding: var(--space-xs) var(--space-md);
    font-size: 20.25px;
}

.nav-drawer__nav .nav-dropdown-item {
    font-size: 20.25px;
    padding: var(--space-xs) var(--space-md);
}

.nav-drawer__utils {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
    padding-top: var(--space-xl);
    margin-top: auto;
    border-top: 1px solid var(--color-border);
}

/* ── Responsive ── */

/* Mobile: slide-down nav, no utility-bar */
@media (max-width: 767px) {
    .nav-row {
        padding: var(--space-md);
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .nav-toggle {
        display: block;
    }

    .site-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
        padding-top: var(--space-md);
        border-top: 1px solid var(--color-border);
        margin-top: var(--space-md);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav .nav-link,
    .site-nav .nav-dropdown-toggle {
        padding: var(--space-sm) 0;
        width: 100%;
    }

    /* Mobile dropdown */
    .site-nav .nav-dropdown {
        width: 100%;
    }

    .site-nav .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background: transparent;
    }

    .site-nav .nav-dropdown-toggle[aria-expanded="true"] + .nav-dropdown-menu {
        max-height: 400px;
    }

    .nav-utils-mobile {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
        padding-top: var(--space-lg);
        width: 100%;
        border-top: 1px solid var(--color-border);
        margin-top: var(--space-sm);
    }
}

/* Tablet: utility-bar visible, hamburger → drawer */
@media (min-width: 768px) {
    .utility-bar {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 18px;
        padding: 0 72px;
        height: 43px;
        font-size: 16.875px;
    }

    .nav-row {
        padding: 0 72px;
        height: 84px;
    }

    .nav-utils-mobile {
        display: none;
    }

    .nav-drawer__utils {
        display: none;
    }
}

/* Tablet only: hamburger → drawer, hide inline nav */
@media (min-width: 768px) and (max-width: 1023px) {
    .nav-toggle {
        display: block;
    }

    .site-nav {
        display: none;
    }
}

/* Desktop: full inline nav */
@media (min-width: 1024px) {
    .nav-row {
        padding: 0 72px;
        height: 84px;
    }

    .nav-toggle {
        display: none;
    }
}


/* ========== TYPOGRAPHY / UTILITIES ========== */

.page-header {
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border);
}

.page-title {
    color: var(--color-primary);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-light);
    margin: 0;
    transition: color var(--transition-slow);
}

.page-title > small {
    font-size: var(--font-size-lg);
}

.section-heading {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-light);
    color: var(--color-text);
    margin-top: 24px;
    margin-bottom: 16px;
}

.text-green {
    color: var(--color-success);
}

.text-yellow {
    color: var(--color-warning);
}

.text-red {
    color: var(--color-primary);
}

.text-grey {
    color: var(--color-accent);
}

.text-through {
    text-decoration: line-through;
}

.text-lightgray {
    color: var(--color-text-muted);
}

.pikto {
    color: var(--color-accent);
    font-family: var(--font-piktos);
}

.monospace-font {
    font-family: var(--font-mono);
}

.text-uppercase {
    text-transform: uppercase;
}

.text-bold {
    font-weight: 700;
}

a {
    color: var(--color-text);
    text-decoration: underline;
}

a:hover {
    color: var(--color-primary);
}


/* ========== MAPS (Leaflet overrides) ========== */

.leaflet-popup-content-wrapper {
    border-radius: 0;
}

.leaflet-popup-pane {
    width: auto;
}


/* ========== NOTIFICATIONS ========== */

.notifications-box {
    overflow-y: auto;
}

.notifications-box > p {
    text-align: center;
    opacity: 0.55;
}

.notification {
    width: 100%;
    border-bottom: 1px solid #8b8178; /* unique notification border — keep as-is */
    margin-bottom: 5px;
}

.container.notifications {
    padding-top: 0 !important;
}

.notification.read {
    opacity: 0.3;
    transition: opacity 0.5s;
}

.notification.read:hover {
    opacity: 1;
    transition: opacity 0.5s;
}

.notification h1 {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-text);
}

.notification .n-date {
    color: var(--color-text-muted);
}

.notification p {
    font-size: 15px;
    color: var(--color-text);
}

.notification .mark-read {
    font-family: var(--font-piktos);
    margin-left: 5px;
    float: right;
}


/* ========== WIDGET ========== */

.widget {
    width: 100%;
    border: 1px solid var(--color-border);
    height: 100%;
    transition: background-color 1s, color 1s;
}

.widget > .title {
    display: block;
    width: 100%;
    margin: 0;
    background-color: var(--color-surface);
    color: var(--color-text-muted);
    padding: 10px;
    border-bottom: 1px solid var(--color-border);
    transition: background-color 1s, color 1s;
}

.widget > .container {
    margin: 0;
    padding: 15px;
    width: auto !important;
    max-width: none !important;
    word-wrap: break-word;
}

.widget > .container > pre {
    white-space: pre-wrap;
}


/* ========== BUTTONS / FORMS ========== */

/* ----------------------------------------------------------
 * .btn — Base button class (public-web-5.0 design spec)
 * Opt-in via class; no bare element selectors to prevent bleed.
 * ---------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    font: var(--font-weight-semibold) 1rem var(--font-sans);
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all var(--transition-fast);
    letter-spacing: 0.5px;
    box-sizing: border-box;
}

/* Primary — solid red fill */
.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-background);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: var(--color-background);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Secondary — ghost/outline style */
.btn-secondary {
    background-color: transparent;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-background);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Danger — red (alias for primary since --color-primary is #cc0000) */
.btn-danger {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-background);
}

.btn-danger:hover {
    background-color: var(--color-background);
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Success — green */
.btn-success {
    background-color: var(--color-success);
    border-color: var(--color-success);
    color: var(--color-background);
}

.btn-success:hover {
    background-color: var(--color-background);
    border-color: var(--color-success);
    color: var(--color-success);
}

/* Small — compact uppercase variant */
.btn-sm {
    padding: 5px 10px;
    font-size: 0.875rem;
    font-weight: var(--font-weight-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Icon — icon-only button */
.btn-icon {
    padding: 5px 8px;
    line-height: 1;
}

/* Large — full-width form submit */
.btn-lg {
    width: 100%;
    padding: 15px;
    font-size: 1.125rem;
}

/* Disabled state — works on any .btn variant */
.btn:disabled,
.btn[disabled] {
    background-color: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text-muted, #888);
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

input:not([type=button]):not([type=reset]):not([type=submit]):not([type=image]):not([type=checkbox]):not([type=radio]),
select {
    -ms-box-sizing: content-box;
    -moz-box-sizing: content-box;
    -webkit-box-sizing: content-box;
    box-sizing: border-box;
    text-align: left;
    background-color: var(--color-background);
    background-image: none;
    color: var(--color-text);
    height: 30px;
    width: 100%;
    font-size: 18px;
    border: 1.5px solid var(--color-border);
    padding: 25px 10px;
    margin-bottom: 20px;
    transition: border 0.2s;
    font-family: var(--font-sans);
    transition: background-color 1s, color 1s;
}

input[type=date],
input[type=number],
select {
    line-height: 20px !important;
    padding: 13px 10px !important;
    height: unset !important;
    transition: background-color 1s, color 1s;
}

input:not([type=button]):not([type=reset]):not([type=submit]):not([type=image]):not([type=checkbox]):not([type=radio]):focus,
select:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
    border-color: var(--color-primary);
}

textarea {
    box-sizing: content-box;
    background-color: var(--color-background);
    background-image: none;
    color: var(--color-text);
    font-size: 18px;
    border: 1.5px solid var(--color-border);
    margin: 5px 0 5px 0;
    padding: 1.5%;
    width: 98%;
    max-width: 97%;
    min-width: 97%;
    transition: border 0.2s;
    font-family: var(--font-sans);
}

textarea:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
    border-color: var(--color-primary);
}

.switch-group > label,
.switch-group > p {
    display: inline-block;
    vertical-align: middle;
    padding: 0 !important;
}

.switch {
    position: relative;
    display: inline-block;
    width: 30px;
    height: 16px;
}

.switch input {
    display: none;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc; /* slider unchecked — keep as-is */
    -webkit-transition: 0.4s;
    transition: 0.4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 10px;
    width: 10px;
    left: 2px;
    bottom: 3px;
    background-color: var(--color-background);
    -webkit-transition: 0.4s;
    transition: 0.4s;
}

input:checked + .slider {
    background-color: #2bd900; /* ACARS/switch live green — keep as-is */
}

input:focus + .slider {
    box-shadow: 0 0 1px #2bd900; /* ACARS/switch live green — keep as-is */
}

input:checked + .slider:before {
    -webkit-transform: translateX(15px);
    -ms-transform: translateX(15px);
    transform: translateX(15px);
}

.slider.round {
    border-radius: 16px;
}

.slider.round:before {
    border-radius: 50%;
}

label {
    color: var(--color-text-muted);
    font-size: smaller;
    display: block;
    padding: 10px;
    padding-left: 0;
}

.time-picker > select {
    position: relative;
    top: 10px;
    display: inline-block;
    width: 49%;
    padding: 4px !important;
    width: 57px;
}

.date-picker {
    position: relative;
    top: 10px;
    display: inline-block;
    width: 49%;
    padding: 4px 10px !important;
    min-width: 135px;
}


/* ========== MISC LAYOUT ========== */

hr {
    color: var(--color-border);
    background-color: var(--color-border);
    height: 1px;
    border: none;
}

.clock {
    display: none;
}

.utility-bar__clock {
    cursor: default;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

/* Bell icon with notification badge */
.utility-bar__bell {
    position: relative;
    display: flex;
    align-items: center;
    padding: 0.25rem;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
}
.bell-badge {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    background: var(--color-primary);
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
    pointer-events: none;
}

/* ── Notification dropdown ───────────────────────────────────────── */
.utility-bar__notifications {
    position: relative;
    display: flex;
    align-items: center;
}
.notif-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: .5rem 0;
    z-index: 2100;
    margin-top: .35rem;
}
.utility-bar__notifications.is-open .notif-dropdown { display: block; }
.notif-dropdown__title {
    display: block;
    padding: .5rem 1rem .35rem;
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--color-text-muted);
}
.notif-dropdown__item {
    display: flex;
    align-items: center;
    padding: .5rem 1rem;
    gap: .5rem;
    border-bottom: 1px solid var(--color-border);
}
.notif-dropdown__item:last-child { border-bottom: none; }
.notif-dropdown__item--unread { background: color-mix(in srgb, var(--color-primary) 6%, transparent); }
.notif-dropdown__link {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    flex: 1;
    min-width: 0;
    color: var(--color-text);
    text-decoration: none;
    font-size: .82rem;
    line-height: 1.3;
    position: relative;
}
.notif-dropdown__link:hover { color: var(--color-primary); }
.notif-dropdown__dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    margin-top: 4px;
}
.notif-dropdown__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}
.notif-dropdown__text strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.notif-dropdown__date {
    flex-shrink: 0;
    font-size: .65rem;
    color: var(--color-text-muted);
    white-space: nowrap;
    margin-left: auto;
    align-self: flex-start;
}
.notif-dropdown__summary {
    font-size: .74rem;
    color: var(--color-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notif-dropdown__dismiss {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: .25rem;
    cursor: pointer;
    color: var(--color-text-muted);
    border-radius: 4px;
    transition: background .15s, color .15s;
}
.notif-dropdown__dismiss:hover { background: var(--color-surface); color: var(--color-text); }
.notif-dropdown__empty {
    display: block;
    padding: 1.5rem 1rem;
    text-align: center;
    font-size: .82rem;
    color: var(--color-text-muted);
}

/* ========== FEEDBACK ========== */

#blackoverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #555; /* overlay backdrop — keep as-is */
    opacity: 0.8;
    z-index: 4000;
    text-align: center;
    display: none;
    overflow-y: hidden;
    overflow-x: hidden;
}

#blackoverlay > img {
    display: block;
    margin-top: 15%;
    margin-left: auto;
    margin-right: auto;
}

#blackoverlay > p {
    color: var(--color-background);
    font-size: 25px;
}

.swal2-container {
    z-index: 2000 !important;
}

/* ========== FEEDBACK MODAL ========== */

.nps-feedback {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3500;
    align-items: center;
    justify-content: center;
}

.nps-feedback.is-active {
    display: flex;
}

.nps-feedback__backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 3400;
}

.nps-feedback__window {
    position: relative;
    z-index: 3500;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    padding: var(--space-lg) var(--space-lg) var(--space-md);
    background-color: var(--color-background);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
    margin: var(--space-md);
    box-sizing: border-box;
}

.nps-feedback__window h1 {
    color: var(--color-primary);
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
    margin-top: var(--space-md);
    line-height: 1.3;
}

/* Ask Later pill — top-right corner */
.nps-feedback__dismiss {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    padding: 6px 14px;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 9999px;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nps-feedback__dismiss:hover {
    border-color: var(--color-text-muted);
    color: var(--color-text);
}

/* Rating row: Poor — [1 2 3 4 5] — Great */
.nps-feedback__rating-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin: var(--space-md) 0;
}

.nps-feedback__rating-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.nps-feedback__rating {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
}

.nps-feedback__window span.inverted {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    background-color: var(--color-background);
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    flex-shrink: 0;
    user-select: none;
}

.nps-feedback__window span.inverted:hover {
    background-color: var(--color-primary);
    color: var(--color-background);
    transform: scale(1.1);
}

.nps-feedback__window .selected {
    background-color: var(--color-primary) !important;
    color: var(--color-background) !important;
    transform: scale(1.1);
}

/* Textarea */
.nps-feedback__window textarea {
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    box-sizing: border-box;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: var(--color-surface);
    color: var(--color-text);
    font: 0.95rem var(--font-sans);
    resize: vertical;
    margin: var(--space-sm) 0;
}

.nps-feedback__window textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* "Please give a note" warning */
.nps-feedback__window .please-give-note {
    display: none;
    color: var(--color-primary);
    font-size: 0.85rem;
    margin: var(--space-xs) 0;
}

/* Send button */
.nps-feedback__send {
    padding: var(--space-sm) var(--space-xl);
    margin-top: var(--space-sm);
}

.nps-feedback__window cite {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.8rem;
    margin-top: var(--space-sm);
    font-style: normal;
}

/* Mobile: full-screen */
@media (max-width: 600px) {
    .nps-feedback__window {
        max-width: 100%;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .nps-feedback__dismiss {
        border-radius: 0 0 0 var(--radius-lg);
        top: 0;
        right: 0;
    }
}


/* ========== FORUM / COMMUNITY ========== */

.category {
    color: var(--color-text-muted);
    background-color: var(--color-surface);
    position: relative;
}

.category > .btn-sm {
    position: absolute;
    right: 5px;
    top: 15px;
}

.category > .remove-thread {
    right: 230px;
}

@media (max-width: 768px) {
    .category > .btn-sm {
        position: relative;
        display: inline-block;
        left: 5px;
        top: auto;
    }

    .category > .remove-thread {
        margin-right: 5px;
    }
}

.category > p {
    padding: 10px;
    font-weight: 700;
}

.forum {
    width: 96%;
    margin-left: 2%;
    margin-right: 2%;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-border);
}

.forum > .info {
    width: 40%;
}

.forum .name {
    margin: 0;
    padding: 0;
    color: var(--color-primary);
    text-decoration: none;
}

.forum .name:hover {
    text-decoration: underline;
}

.name > p {
    margin: 0;
}

.description {
    margin: 0;
    font-size: smaller;
}

.forum-head {
    color: var(--color-background);
    background-color: var(--color-primary);
    padding: 1px;
}

.thread {
    width: 98%;
    margin-left: 2%;
    margin-bottom: 10px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--color-border);
}

.thread > .name {
    margin: 0;
    padding: 0;
    color: var(--color-primary);
    text-decoration: none;
}

.thread > .name:hover {
    text-decoration: underline;
}

.forum-description {
    font-weight: 400 !important;
}

.date {
    float: right;
    margin: 0;
}

.last-update {
    clear: right;
    float: right;
    margin: 0;
}

.last-thread {
    width: 50%;
    font-size: smaller;
}

.answer {
    border-top: 2px solid var(--color-border);
    border-left: 2px solid var(--color-border);
    padding: 5px;
    margin-bottom: 15px;
}

.signature {
    margin-top: 10px;
    width: 20%;
    border-top: 1px solid var(--color-surface);
    padding: 0;
}


/* ========== DOWNLOADS / DONATIONS ========== */

/* ========== DOWNLOADS ========== */

.dow-hero {
    margin-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-lg);
}

.dow-hero__title {
    font-family: var(--font-sans);
    font-weight: var(--font-weight-light);
    font-size: var(--font-size-4xl);
    color: var(--color-primary);
    line-height: 1.1;
    margin: 0 0 var(--space-sm);
    transition: color 1s;
}

.dow-hero__lead {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    margin: 0;
    font-weight: var(--font-weight-light);
}

.dow-empty {
    color: var(--color-text-muted);
    font-size: var(--font-size-md);
}

/* Tab nav — public-web style: flat, square corners, border-bottom flush */
.dow-tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0;
}

.dow-tab-btn {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-bottom: none;
    padding: 12px 28px;
    margin-right: 8px;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    letter-spacing: 0.01em;
}

.dow-tab-btn:hover {
    color: var(--color-primary);
    background: var(--color-background);
}

.dow-tab-btn.is-active {
    color: var(--color-primary);
    background: var(--color-background);
    border-bottom: 1px solid var(--color-background);
    font-weight: var(--font-weight-bold);
}

/* Panel area — sits flush against the tab bar bottom border */
.dow-tab-panels {
    border: 1px solid var(--color-border);
    border-top: none;
    background: var(--color-background);
    transition: background 1s;
}

.dow-tab-panel {
    display: none;
    padding: var(--space-lg);
}

.dow-tab-panel.is-active {
    display: block;
}

/* Downloads table */
.dow-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-base);
}

.dow-table thead {
    background: var(--color-surface);
    border-bottom: 2px solid var(--color-border);
    transition: background 1s;
}

.dow-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: var(--font-weight-bold);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dow-table__row {
    border-bottom: 1px solid var(--color-border);
    transition: background 0.15s;
}

.dow-table__row:last-child {
    border-bottom: none;
}

.dow-table__row:hover {
    background: var(--color-surface);
}

.dow-table__name {
    padding: 18px 16px;
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    width: 28%;
    vertical-align: top;
}

.dow-table__desc {
    padding: 18px 16px;
    color: var(--color-text-muted);
    line-height: 1.6;
    vertical-align: top;
}

.dow-table__desc a {
    color: var(--color-primary);
    text-decoration: underline;
}

.dow-table__action {
    padding: 18px 16px;
    text-align: right;
    white-space: nowrap;
    vertical-align: middle;
    width: 130px;
}

/* Download button — public-web .btn aesthetic: square, red fill */
.dow-dl-btn {
    display: inline-block;
    background: var(--color-primary);
    color: var(--color-background);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 0;
    transition: background 0.2s, transform 0.15s;
}

.dow-dl-btn:hover {
    background: var(--color-primary-hover);
    color: var(--color-background);
    transform: translateY(-1px);
}

/* Column widths */
.dow-table__col-name   { width: 28%; }
.dow-table__col-desc   { width: auto; }
.dow-table__col-action { width: 130px; }

/* Mobile: stack table into readable rows */
@media (max-width: 768px) {
    .dow-tab-btn {
        padding: 10px 16px;
        font-size: var(--font-size-sm);
    }

    .dow-tab-panel {
        padding: var(--space-md);
    }

    .dow-table thead {
        display: none;
    }

    .dow-table__row {
        display: block;
        padding: var(--space-md) 0;
        border-bottom: 1px solid var(--color-border);
    }

    .dow-table__name,
    .dow-table__desc,
    .dow-table__action {
        display: block;
        width: 100%;
        padding: 4px 0;
    }

    .dow-table__action {
        text-align: left;
        padding-top: var(--space-sm);
    }
}

/* ========== PARTNERS ========== */

.partners-list {
    margin-top: var(--space-lg);
}

.partners-divider {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: var(--space-lg) 0;
}

.partners-row {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.partners-row__logo {
    flex-shrink: 0;
    width: 160px;
    text-align: center;
}

.partners-row__logo img {
    max-width: 140px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(20%);
    transition: filter 0.2s;
}

.partners-row__logo img:hover {
    filter: grayscale(0%);
}

.partners-row__content {
    flex: 1;
}

.partners-row__name {
    font-family: var(--font-sans);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    margin: 0 0 var(--space-xs);
    transition: color 1s;
}

.partners-row__desc {
    color: var(--color-text-muted);
    font-size: var(--font-size-base);
    margin: 0 0 var(--space-sm);
}

@media (max-width: 768px) {
    .partners-row {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-md);
    }

    .partners-row__logo {
        width: 100%;
        text-align: left;
    }
}

/* ========== LIVE DOCUMENTATION LIBRARY ========== */

.livdoc-layout {
    display: flex;
    gap: var(--space-xl);
    align-items: flex-start;
}

.livdoc-sidebar {
    flex-shrink: 0;
    width: 220px;
    position: sticky;
    top: 130px;
}

.livdoc-sidebar__section {
    border: 1px solid var(--color-border);
    padding: var(--space-md);
    background: var(--color-surface);
    transition: background 1s;
}

.livdoc-sidebar__heading {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    margin: 0 0 var(--space-sm);
}

.livdoc-sidebar__text {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin: 0 0 var(--space-sm);
    line-height: 1.5;
}

.livdoc-sidebar__link {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--color-primary);
    text-decoration: none;
    font-weight: var(--font-weight-bold);
    transition: color 0.15s;
}

.livdoc-sidebar__link:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

.livdoc-main {
    flex: 1;
    min-width: 0;
}

/* Folder tree */
.livdoc-tree {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.livdoc-folder--top {
    border-bottom: 1px solid var(--color-border);
}

.livdoc-folder--top:last-child {
    border-bottom: none;
}

.livdoc-folder__toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--color-surface);
    border: none;
    border-bottom: 1px solid transparent;
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s, color 1s;
}

.livdoc-folder__toggle:hover {
    background: var(--color-border);
}

.livdoc-folder__toggle.is-open {
    border-bottom-color: var(--color-border);
}

.livdoc-folder__chevron {
    flex-shrink: 0;
    transition: transform 0.2s;
    color: var(--color-text-muted);
}

.livdoc-folder__toggle.is-open .livdoc-folder__chevron {
    transform: rotate(0deg);
}

.livdoc-folder__toggle:not(.is-open) .livdoc-folder__chevron {
    transform: rotate(-90deg);
}

.livdoc-folder__icon {
    flex-shrink: 0;
    color: var(--color-primary);
}

.livdoc-folder__contents {
    display: none;
    padding: var(--space-xs) 0;
    background: var(--color-background);
    transition: background 1s;
}

.livdoc-folder__contents.is-open {
    display: block;
}

/* Nested folders indent */
.livdoc-folder__contents .livdoc-folder__toggle {
    padding-left: 36px;
    font-weight: var(--font-weight-normal);
    background: var(--color-background);
    font-size: var(--font-size-sm);
}

.livdoc-folder__contents .livdoc-folder__contents .livdoc-folder__toggle {
    padding-left: 56px;
}

.livdoc-folder__contents .livdoc-folder__contents .livdoc-folder__contents .livdoc-folder__toggle {
    padding-left: 76px;
}

/* File rows */
.livdoc-file {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 9px;
    padding-right: 16px;
    padding-bottom: 9px;
    /* padding-left is set inline per depth level */
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background 0.15s;
}

.livdoc-file:hover {
    background: var(--color-surface);
    color: var(--color-primary);
}

.livdoc-file:hover .livdoc-file__icon {
    color: var(--color-primary);
}

.livdoc-file__icon {
    flex-shrink: 0;
    color: var(--color-text-muted);
    transition: color 0.15s;
}

.livdoc-file__name {
    flex: 1;
    font-size: var(--font-size-base);
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.15s;
}

.livdoc-file:hover .livdoc-file__name {
    color: var(--color-primary);
}

.livdoc-file__ext {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 1px 5px;
    border-radius: var(--radius-sm);
}

/* Mobile */
@media (max-width: 768px) {
    .livdoc-layout {
        flex-direction: column;
    }

    .livdoc-sidebar {
        width: 100%;
        position: static;
    }

    .livdoc-file__name {
        white-space: normal;
        overflow: visible;
    }
}

.donation-intro {
    margin-bottom: 2rem;
    color: var(--color-text-muted);
    max-width: 640px;
}

/* 3-column grid; equal-height cards via flexbox column */
.donation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 20px;
    margin-bottom: 2rem;
}

@media (max-width: 900px) {
    .donation-grid { grid-template-columns: repeat(2, 1fr); }
    .donation-card--association { grid-column: span 1; grid-row: span 1; }
}

@media (max-width: 580px) {
    .donation-grid { grid-template-columns: 1fr; }
    .donation-card--featured { grid-column: span 1; }
    .donation-card--association { grid-column: span 1; grid-row: span 1; }
}

.donation-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 24px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.donation-card--featured {
    grid-column: span 2;
}

.donation-card--association {
    grid-row: span 2;
}

.donation-iconplaceholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    margin-bottom: 8px;
}

.donation-iconplaceholder--dual {
    flex-direction: row;
    gap: 12px;
    justify-content: center;
    width: auto;
}

.donation-iconplaceholder--dual .donation-iconfont {
    font-size: 48px;
}

.donation-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.donation-iconfont {
    font-family: var(--font-piktos);
    font-size: 80px;
    line-height: 1;
}

.donation-iconplaceholder-svg {
    display: flex;
    align-items: center;
    justify-content: center;
}

.donation-icon-svg {
    width: 80px;
    height: 80px;
    fill: var(--color-accent);
}

.donation-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 8px 0 6px;
}

.donation-text {
    color: var(--color-text-muted);
    font-size: 0.88rem;
    line-height: 1.5;
    flex: 1;
    margin-bottom: 1rem;
}

.donation-amount-input {
    width: 100%;
    margin-bottom: 0.6rem;
}

.donation-link {
    width: 100%;
    margin-top: auto;
}

.donation-thankyou {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-success);
    border-radius: 6px;
    padding: 14px 20px;
    margin-bottom: 1.5rem;
    color: var(--color-text);
    font-size: 0.92rem;
}

/* Ensure closed dialogs are hidden — some CSS resets override the UA stylesheet default */
dialog:not([open]) { display: none; }

/* Modals */
.donation-modal {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 30px;
    max-width: 680px;
    width: 90vw;
    position: relative;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
}

/* Stripe Checkout iframe modal — larger, no content padding */

/* Stripe Embedded Checkout modal */
.donation-modal-stripe {
    padding: 0;
    max-width: 540px;
    width: 95vw;
    height: min(92vh, 860px);
    max-height: min(92vh, 860px) !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #eeeeee;
    border-radius: 12px;
}

.donation-modal-stripe #stripe-modal-close {
    position: absolute;
    top: 8px;
    right: 28px; /* 12px button width + ~16px scrollbar clearance */
    z-index: 10;
    background: rgba(0,0,0,0.25);
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.donation-modal-stripe #stripe-modal-close:focus {
    outline: none;
}

.donation-modal-stripe #stripe-modal-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}


.donation-modal::backdrop {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
}

.donation-modal h2 {
    color: var(--color-primary);
    margin-bottom: 16px;
    font-size: 1.4rem;
}

.donation-modal p {
    color: var(--color-text);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.donation-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-text);
    padding: 0;
}

.donation-modal-close:hover {
    color: var(--color-primary);
}

.donation-qr {
    display: block;
    margin: 0 auto 16px;
    width: 240px;
    height: 240px;
    image-rendering: pixelated;
}

.donation-modal-details {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--color-text);
}


/* ========== ARTICLES / WORLD OF SWISS ========== */

/* Hero header — mirrors dow-hero */
.wos-hero {
    margin-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-lg);
}

.wos-hero__title {
    font-family: var(--font-sans);
    font-weight: var(--font-weight-light);
    font-size: var(--font-size-4xl);
    color: var(--color-primary);
    line-height: 1.1;
    margin: 0 0 var(--space-sm);
    transition: color 1s;
}

.wos-hero__lead {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    margin: 0;
    font-weight: var(--font-weight-light);
}

.wos-empty {
    color: var(--color-text-muted);
    font-size: var(--font-size-md);
}

/* Card list — vertical stack inside each year panel */
.wos-list {
    list-style: none;
    margin: 0;
    padding: var(--space-md) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* Landscape card: image left (fixed width), text right (flexible) */
.wos-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--color-border);
    transition: background 0.15s;
}

.wos-card:hover {
    background: var(--color-surface);
}

.wos-card__img-wrap {
    flex: 0 0 275px;
    overflow: hidden;
    background: var(--color-surface);
}

.wos-card__img {
    width: 100%;
    height: 100%;
    min-height: 140px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.wos-card:hover .wos-card__img {
    transform: scale(1.03);
}

.wos-card__body {
    flex: 1 1 auto;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-xs);
    min-width: 0;
}

.wos-card__date {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin: 0;
    flex-shrink: 0;
}

.wos-card__title {
    font-family: var(--font-sans);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    margin: 0;
    line-height: 1.3;
}

.wos-card__preview {
    font-size: var(--font-size-base);
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.6;
    /* Clamp to 3 lines — keeps cards a consistent height */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wos-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-primary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    letter-spacing: 0.02em;
    margin-top: var(--space-xs);
    transition: color 0.15s;
    flex-shrink: 0;
}

.wos-card__link:hover {
    color: var(--color-primary-hover);
}

.wos-card__link-icon {
    font-size: 0.8em;
}

/* Mobile: stack image above text */
@media (max-width: 768px) {
    .wos-card {
        flex-direction: column;
    }

    .wos-card__img-wrap {
        flex: 0 0 auto;
        height: 225px;
    }

    .wos-card__img {
        min-height: unset;
        height: 225px;
    }

    .wos-card__body {
        padding: var(--space-md);
    }
}


/* ========== EVENTS ========== */

.evt-section {
    margin-bottom: var(--space-xl);
}

.evt-section__heading {
    font-family: var(--font-sans);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
    margin: 0 0 var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

/* Past event dimming */
.evt-past {
    opacity: 0.45;
    transition: opacity 0.2s;
}

.evt-past:hover {
    opacity: 0.7;
}

.evt-past .wos-card__img {
    filter: grayscale(0.6);
}

.evt-past__link {
    color: var(--color-text-muted) !important;
}

.evt-past__link:hover {
    color: var(--color-text) !important;
}


/* ========== ALERTS ========== */
/* Bootstrap-style alert component — hardcoded colors preserved intentionally */

.alert {
    padding: 8px 35px 8px 14px;
    margin-bottom: 18px;
    color: #c09853;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    background-color: #fcf8e3;
    border: 1px solid #fbeed5;
    -webkit-border-radius: 4px;
    -moz-border-radius: 4px;
    border-radius: 4px;
}

.alert-heading {
    color: inherit;
}

.alert .close {
    float: right;
    text-decoration: none;
    color: #b94a48;
}

.alert .close:hover {
    color: #ad1a17;
}

.alert-danger,
.alert-error {
    color: #b94a48;
    background-color: #f2dede;
    border-color: #eed3d7;
}

/* Alert dark-mode overrides */
[data-theme="dark"] .alert {
    background-color: #332b00;
    color: #ffd666;
    border-color: #665500;
    text-shadow: none;
}

[data-theme="dark"] .alert-danger,
[data-theme="dark"] .alert-error {
    background-color: #330000;
    color: #ff6666;
    border-color: #660000;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .alert {
        background-color: #332b00;
        color: #ffd666;
        border-color: #665500;
        text-shadow: none;
    }

    :root:not([data-theme]) .alert-danger,
    :root:not([data-theme]) .alert-error {
        background-color: #330000;
        color: #ff6666;
        border-color: #660000;
    }
}


/* ========== SCHEDULE / BOOKINGS ========== */

.divertaction-timepicker {
    max-width: 250px;
}

.divertaction-timepicker > .date-picker {
    width: 100%;
}

.divertaction-timepicker > .time-picker {
    display: flex;
    justify-content: space-between;
}

.divertaction-timepicker > .time-picker > select {
    width: 49%;
}

.routemap {
    width: 100%;
    height: 400px;
    margin-bottom: 10px;
}

.book-table > tbody > tr > td:nth-of-type(even) {
    background-color: var(--color-surface);
}

.book-table > tbody > tr > td {
    vertical-align: top;
}

.schedule-mode-switcher {
    margin-top: 7px;
    margin-bottom: 7px;
    width: 100%;
    color: var(--color-text-muted);
}

.schedule-mode-switcher a:not(:last-child) {
    border-right: 2px solid var(--color-border);
}

.schedule-mode-switcher a {
    box-sizing: border-box;
    display: inline-block;
    height: auto;
    min-height: 50px;
    line-height: 50px;
    vertical-align: middle;
    font-weight: 700;
    width: 33.333%;
    text-decoration: none;
    text-align: center;
    background-color: var(--color-surface);
    transition: background-color 0.3s, color 0.3s;
}

.schedule-mode-switcher a:not(.active):hover {
    background-color: var(--color-border);
    color: var(--color-text);
    transition: background-color 0.3s, color 0.3s;
}

.schedule-mode-switcher .active {
    color: var(--color-primary);
    cursor: default;
    background-color: var(--color-border);
}

/* Schedule filter bar — 5-column grid with equal-height stretch */
.sf-bar { display: grid; grid-template-columns: 1fr 1fr 1fr auto 1.2fr; gap: 6px; width: 100%; margin-bottom: 15px; align-items: stretch; position: relative; z-index: 410; }
.sf-bar.sf-bar-row2 { z-index: 400; }
/* Row 2: segmented toggle groups (Airports / Schedule) */
.sf-bar.sf-bar-row2 { display: flex; gap: 12px; margin-bottom: 15px; }
.sf-group-toggle { flex: 0 1 auto; }
.sf-toggle-group { display: inline-flex; border: 1px solid var(--color-border); border-radius: 5px; overflow: hidden; background: var(--color-surface); }
.sf-toggle-btn { border: none; background: none; padding: 6px 14px; font-size: var(--font-size-sm); font-weight: 500; color: var(--color-text-muted); cursor: pointer; transition: background-color 0.15s, color 0.15s; white-space: nowrap; }
.sf-toggle-btn:not(:last-child) { border-right: 1px solid var(--color-border); }
.sf-toggle-btn:hover { background: var(--color-border); color: var(--color-text); }
.sf-toggle-btn.sf-toggle-active { background: var(--color-primary); color: #fff; }
.sf-toggle-btn.sf-toggle-active:hover { background: var(--color-primary); opacity: 0.9; }
.sf-group { display: flex; flex-direction: column; min-width: 0; }
.sf-label { font-size: var(--font-size-sm); color: var(--color-text-muted); margin-bottom: 4px; font-weight: 500; display: block; }

/* Chip-input boxes — flex:1 makes them fill remaining group height (stretch) */
.sf-chip-input { position: relative; display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; gap: 5px; min-height: 34px; padding: 6px 8px; border: 1px solid var(--color-border); border-radius: 5px; background: var(--color-surface); box-sizing: border-box; cursor: text; overflow: hidden; flex: 1; }
.sf-chip-input:focus-within { border-color: var(--color-primary); box-shadow: 0 0 0 2px rgba(204,0,0,0.12); }
.sf-chip-input-search { padding-left: 28px; overflow: visible; cursor: text; }
.sf-chips { display: contents; }

/* Invisible-when-empty draft-chip input — must override global input:not(...) rule with !important */
.sf-input {
    flex: 0 1 auto !important;
    min-width: 1ch !important;
    max-width: none !important;
    width: auto !important;
    height: 20px !important;
    border: none !important;
    border-radius: 0 !important;
    outline: none !important;
    background: transparent !important;
    color: var(--color-text) !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
    line-height: 20px !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    transition: border-color 0.1s !important;
}
.sf-input:focus:placeholder-shown {
    border-color: transparent !important;
}
.sf-input:focus:not(:placeholder-shown) {
    border-color: var(--color-border) !important;
}
.sf-input:focus {
    outline: none !important;
    box-shadow: none !important;
}
.sf-input::placeholder { color: transparent; }

/* Draft chip — wraps input + greyed × to look like a chip outline */
.sf-draft-chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px; border-radius: 3px; border: 1px dashed var(--color-border); line-height: 20px; height: 24px; box-sizing: border-box; transition: border-color 0.1s; cursor: text; }
.sf-draft-chip:focus-within { border-color: var(--color-border); }
.sf-draft-chip:focus-within .sf-draft-x { visibility: visible; }
.sf-draft-x { font-size: 14px; line-height: 1; color: var(--color-text-muted); opacity: 0.4; visibility: hidden; pointer-events: none; }

/* Search icon */
.sf-search-icon { position: absolute; top: 6px; left: 8px; pointer-events: none; line-height: 0; }

/* Chips — red filled */
.sf-chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px; border-radius: 3px; background: var(--color-primary); color: #fff; font-size: 12px; font-weight: 500; border: none; cursor: pointer; line-height: 20px; height: 24px; white-space: nowrap; transition: opacity 0.15s; }
.sf-chip:hover { opacity: 0.85; }
.sf-chip-x { font-size: 14px; line-height: 1; margin-left: 2px; opacity: 0.7; }
.sf-chip:hover .sf-chip-x { opacity: 1; }

/* Square chips (1:1 aspect for single-letter pills) */
.sf-chip-square { width: 24px; min-width: 24px; max-width: 24px; padding-left: 0; padding-right: 0; justify-content: center; }

/* Wide chip: "Other" — exactly 3 squares wide (3×24 + 2×5 gap) */
.sf-chip-wide { width: 82px; min-width: 82px; max-width: 82px; padding-left: 0; padding-right: 0; justify-content: center; }

/* Preset chips — toggle style (grey off, red on) */
.sf-chip-preset { background: var(--color-border); color: var(--color-text); cursor: pointer; }
.sf-chip-preset.sf-chip-active { background: var(--color-primary); color: #fff; }

/* +N more overflow badge */
.sf-more-badge { display: inline-flex; align-items: center; justify-content: center; padding: 2px 8px; border-radius: 3px; background: var(--color-border); color: var(--color-text-muted); font-size: 11px; font-weight: 500; cursor: pointer; line-height: 20px; white-space: nowrap; border: none; transition: background 0.15s; }
.sf-more-badge:hover { background: #d5d5d5; }

/* Chip overflow modal */
.sf-chip-modal { border: none; border-radius: 8px; padding: 0; width: min(440px, 90vw); min-height: 320px; box-shadow: 0 8px 32px rgba(0,0,0,0.2); background: var(--color-surface); overflow: visible; }
.sf-chip-modal::backdrop { background: rgba(0,0,0,0.35); }
.sf-chip-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--color-border); }
.sf-chip-modal-title { font-size: 14px; font-weight: 600; color: var(--color-text); }
.sf-chip-modal-close { background: none; border: none; font-size: 22px; line-height: 1; color: var(--color-text-muted); cursor: pointer; padding: 0 4px; }
.sf-chip-modal-close:hover { color: var(--color-text); }
.sf-chip-modal-body { padding: 16px; position: relative; overflow: visible; }
.sf-chip-modal-chips { display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; gap: 5px; min-height: 200px; padding: 6px 8px; border: 1px solid var(--color-border); border-radius: 5px; background: var(--color-surface); cursor: text; }
.sf-chip-modal-draft { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px; border-radius: 3px; border: 1px dashed transparent; line-height: 20px; height: 24px; box-sizing: border-box; transition: border-color 0.1s; }
.sf-chip-modal-draft:focus-within { border-color: var(--color-border); }
.sf-chip-modal-draft:focus-within .sf-chip-modal-draft-x { visibility: visible; }
.sf-chip-modal-draft-x { font-size: 14px; line-height: 1; color: var(--color-text-muted); opacity: 0.4; visibility: hidden; pointer-events: none; }
.sf-chip-modal-input { flex: 0 1 auto !important; min-width: 1ch !important; width: auto !important; height: 20px !important; border: none !important; border-radius: 0 !important; outline: none !important; background: transparent !important; color: var(--color-text) !important; font-size: 12px !important; font-weight: 500 !important; padding: 0 !important; margin: 0 !important; box-shadow: none !important; display: inline-block !important; }
.sf-chip-modal-input:focus { border: none !important; outline: none !important; box-shadow: none !important; }
.sf-chip-modal-input::placeholder { color: transparent; }
.sf-chip-modal-suggestions { position: absolute; left: 16px; right: 16px; z-index: 200; max-height: 240px; overflow-y: auto; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 0 0 5px 5px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

/* Suggestions dropdown */
.sf-suggestions { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 100; background: var(--color-surface); border: 1px solid var(--color-border); border-top: none; border-radius: 0 0 5px 5px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); max-height: 240px; overflow-y: auto; }
.sf-suggestion-item { display: block; width: 100%; padding: 7px 10px; text-align: left; background: none; border: none; border-bottom: 1px solid var(--color-border); cursor: pointer; color: var(--color-text); font-size: var(--font-size-sm); }
.sf-suggestion-item:last-child { border-bottom: none; }
.sf-suggestion-item:hover { background-color: var(--color-border); }

/* Type/Days stacked column — two rows, gap 2px */
.sf-group-typdays { overflow: visible; display: flex; flex-direction: column; }
.sf-group-typdays .sf-label { flex: 0 0 auto; }
.sf-chip-input-pills { overflow: visible; min-height: 28px; padding: 0 4px; cursor: default; flex: 1 1 0; display: flex; align-items: center; align-content: center; flex-wrap: wrap; }
.sf-group-typdays .sf-chip-input-pills + .sf-chip-input-pills { margin-top: 2px; }

/* Tooltips on preset chips — instant, no delay */
.sf-chip-preset[title] { position: relative; }
.sf-chip-preset[title]::after { content: attr(title); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 4px 10px; background: #1a1a1a; color: #fff; font-size: 11px; font-weight: 400; border-radius: 4px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0s; z-index: 200; }
.sf-chip-preset[title]::before { content: ''; position: absolute; bottom: calc(100% + 2px); left: 50%; transform: translateX(-50%); border: 4px solid transparent; border-top-color: #1a1a1a; pointer-events: none; opacity: 0; transition: opacity 0s; z-index: 200; }
.sf-chip-preset[title]:hover::after, .sf-chip-preset[title]:hover::before { opacity: 1; }

/* Duration slider box */
.sf-dur-box { padding: 10px 16px 6px 16px; display: flex; flex-direction: column; justify-content: center; gap: 2px; cursor: default; }
.sf-dur-box:focus-within { border-color: var(--color-border) !important; box-shadow: none !important; }
.sf-dur-track { position: relative; height: 40px; width: 100%; }
.sf-dur-bg { position: absolute; top: 26px; left: 7px; right: 7px; height: 4px; background: var(--color-border); border-radius: 2px; }
.sf-dur-fill { position: absolute; top: 26px; left: 7px; height: 4px; background: var(--color-primary); border-radius: 2px; pointer-events: none; z-index: 1; }
.sf-dur-thumb {
    position: absolute; top: 0; left: 0; width: 100%; height: 40px;
    margin: 0 !important; padding: 0 !important;
    -webkit-appearance: none; appearance: none;
    background: transparent !important; pointer-events: none; z-index: 2;
    outline: none !important; border: none !important; box-shadow: none !important;
}
.sf-dur-thumb:focus { outline: none !important; box-shadow: none !important; }
.sf-dur-thumb::-webkit-slider-container { -webkit-appearance: none; appearance: none; background: transparent !important; min-height: 0 !important; max-height: 40px !important; padding: 0 !important; margin: 0 !important; }
.sf-dur-thumb::-webkit-slider-runnable-track { -webkit-appearance: none; appearance: none; height: 4px; background: transparent !important; border: none; margin-top: 14px; }
.sf-dur-thumb::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--color-primary); border: 2px solid var(--color-background); cursor: pointer; pointer-events: auto; margin-top: -11px; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.sf-dur-thumb::-moz-range-track { height: 0; background: transparent; border: none; }
.sf-dur-thumb::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--color-primary); border: 2px solid var(--color-background); cursor: pointer; pointer-events: auto; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.sf-dur-graduations { position: relative; height: 14px; margin-top: -1px; width: 100%; }
.sf-dur-tick { position: absolute; font-size: 10px; color: var(--color-text-muted); white-space: nowrap; }
.sf-dur-thumb-tooltip { position: fixed; background: var(--color-primary); color: #fff; border-radius: 4px; padding: 2px 7px; font-size: 11px; font-weight: 600; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .1s; transform: translateX(-50%); z-index: 9999; }
.sf-dur-thumb-tooltip.visible { opacity: 1; }
.sf-dur-thumb-tooltip::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--color-primary); }

/* Responsive: reflow grid on narrow screens */
@media (max-width: 900px) {
    .sf-bar {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto;
    }
    /* Row 1: Aircraft spans full width */
    .sf-bar > .sf-group:nth-child(1) { grid-column: 1 / -1; }
    /* Row 2: Origin + Destination side by side */
    .sf-bar > .sf-group:nth-child(2) { grid-column: 1; }
    .sf-bar > .sf-group:nth-child(3) { grid-column: 2; }
    /* Row 3: Type/Days + Duration side by side */
    .sf-group-typdays { grid-column: 1; }
    .sf-bar > .sf-group:nth-child(5) { grid-column: 2; }
}

/* Schedule map (M029) */
/* ── SCHEDULE MAP ──────────────────────────────────────────────────────── */
.schedule-map-container {
    position: relative;
    overflow: hidden;
}
.schedule-map {
    width: 100%;
    min-height: 400px;
}
/* Hub Swiss flag marker */
.smap-hub-flag {
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.35));
    cursor: pointer;
}
/* Cluster icon */
.smap-cluster {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
/* ── Flight drawer (slides in from right) ─────────────────────────────── */
.schedule-drawer {
    position: absolute;
    top: 0;
    right: 0;
    width: 340px;
    max-width: 90vw;
    height: 100%;
    background: var(--color-background);
    border-left: 1px solid var(--color-border);
    box-shadow: -2px 0 12px rgba(0,0,0,0.12);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 800;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.schedule-drawer.open {
    transform: translateX(0);
}
.schedule-drawer-close {
    position: sticky;
    top: 0;
    float: right;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    padding: 10px 14px;
    cursor: pointer;
    color: var(--color-text-muted);
    z-index: 1;
}
.schedule-drawer-close:hover { color: var(--color-text); }
.schedule-drawer-header {
    padding: 14px 16px 8px;
    border-bottom: 1px solid var(--color-border);
}
.schedule-drawer-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}
.schedule-drawer-subtitle {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--color-text-muted);
}
.schedule-drawer-count {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--color-text-muted);
}
.schedule-drawer-dest {
    padding: 10px 16px;
    border-bottom: 1px solid var(--color-border);
}
.schedule-drawer-dest-header {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
}
.schedule-drawer-flight {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 5px 0;
    font-size: 13px;
    line-height: 1.5;
    border-bottom: 1px solid var(--color-border);
}
.schedule-drawer-flight:last-child { border-bottom: none; }
.schedule-drawer-flight.suspended .schedule-drawer-flight-details { text-decoration: line-through; color: var(--color-text-muted); }
.schedule-drawer-flight-id { font-weight: 700; min-width: 54px; font-size: 12px; padding-top: 1px; }
.schedule-drawer-flight-details { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.schedule-drawer-flight-row { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--color-text-muted); }
.sdf-icon { font-style: normal; width: 14px; text-align: center; flex-shrink: 0; }
.schedule-drawer-flight-susp { color: var(--color-warning, #b58105); font-size: 11px; }
.schedule-drawer-flight-link {
    align-self: center;
    white-space: nowrap;
    color: var(--color-primary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
}
.schedule-drawer-flight-link:hover { text-decoration: underline; }
.schedule-drawer-flight.greyed .schedule-drawer-flight-link { pointer-events: none; color: var(--color-text-muted); }
/* Override MarkerCluster default styles to use project tokens */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large { background: none !important; }
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div { background: none !important; }

.selected-flight {
    border-left: 3px solid var(--color-primary);
    background-color: var(--color-surface);
    padding-left: 8px;
    border-radius: 4px;
}

.hour-selector {
    text-align: center;
    margin-top: 7px;
    margin-bottom: 7px;
    width: 100%;
}

.hour-selector span {
    color: var(--color-primary);
    display: inline-block;
    border: 1px solid var(--color-primary);
    border-radius: 5px;
    padding: 2px;
    margin: 2px;
}

.hour-selector span.selected {
    background-color: var(--color-primary);
    color: var(--color-background);
}

.hour-selector span:not(.deactivated):hover {
    background-color: var(--color-primary);
    color: var(--color-background);
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.hour-selector span.deactivated {
    border: 1px solid var(--color-border);
    color: var(--color-border);
}

/* Route-level suspension warning (schedule list views) — icon inside button */
.btn .icon {
    font-family: swiss-piktos;
}

.btn .pikto {
    color: inherit;
}

/* Per-departure suspension (book page) */
.schedule-suspended-flight {
    text-decoration: line-through;
    color: var(--color-text-muted);
    margin-bottom: 2px;
}

.suspension-reason {
    font-size: 0.82em;
    color: var(--color-primary);
    margin-top: 0;
}

.suspension-reason .icon {
    font-family: swiss-piktos;
}

.box-status {
    float: right;
    padding: 3px;
    font-weight: 400;
    font-size: 23px;
}

.box-status.green {
    color: var(--color-background);
    background-color: var(--color-success);
}

.box-status.yellow {
    color: var(--color-background);
    background-color: var(--color-warning);
}

.box-status.red {
    color: var(--color-background);
    background-color: var(--color-primary);
}

.auto-complete {
    background-color: var(--color-surface);
    width: 100%;
    padding: 5px;
    display: block;
}


/* ========== LOGIN / AUTH ========== */

/* Full-viewport wrapper — intentionally dark in both themes */
.auth-page {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Dark gradient is hardcoded: deliberate — auth page stays dark regardless of theme */
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0d0d0d 100%);
    /* Subtle SWISS red accent via layered gradient */
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(204, 0, 0, 0.08) 0%, transparent 60%),
        linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0d0d0d 100%);
    padding: var(--space-md);
    box-sizing: border-box;
}

/* Centred card */
.auth-card {
    background: var(--color-background);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-xl) var(--space-lg);
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
}

/* Logo area */
.auth-card__logo {
    display: block;
    width: 100%;
    margin-bottom: var(--space-lg);
}

.auth-card__logo > img {
    width: 100%;
    height: auto;
    display: block;
}

/* Card heading */
.auth-card__title {
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-md);
    line-height: var(--line-height-tight);
}

/* Form inputs inside the card */
.auth-card input[type="text"],
.auth-card input[type="password"],
.auth-card input[type="email"] {
    display: block;
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    transition: border-color var(--transition-fast);
    box-sizing: border-box;
    margin-bottom: var(--space-sm);
}

.auth-card input[type="text"]:focus,
.auth-card input[type="password"]:focus,
.auth-card input[type="email"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.15);
}

/* Password field + eye toggle wrapper */
.auth-password-wrapper {
    position: relative;
    display: block;
    margin-bottom: var(--space-sm);
}

.auth-password-wrapper input[type="password"],
.auth-password-wrapper input[type="text"] {
    margin-bottom: 0;
    padding-right: calc(var(--space-lg) + var(--space-md));
}

/* Eye toggle button — overlaid on the right side of the password field */
.auth-eye-toggle {
    position: absolute;
    right: var(--space-sm);
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
    line-height: 1;
}

.auth-eye-toggle:hover {
    color: var(--color-text);
}

.auth-eye-toggle svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Forgot password link */
.auth-forgot-link {
    display: inline-block;
    margin-bottom: var(--space-md);
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.auth-forgot-link:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

/* "or" divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin: var(--space-md) 0;
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

/* Future auth method buttons (Passkey, Entra SSO, etc.) */
.auth-method-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-sm);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
    box-sizing: border-box;
    text-align: center;
}

.auth-method-btn:hover:not([disabled]) {
    border-color: var(--color-primary);
    background: var(--color-surface);
}

/* Placeholder state for future auth methods */
.auth-method-btn[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Icon slot inside method buttons */
.auth-method-btn__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Checkbox + label row for reset-password consent */
.auth-consent-group {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    color: var(--color-text);
    font-size: var(--font-size-sm);
}

.auth-consent-group input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--color-primary);
}

/* Back to login link */
.auth-back-link {
    display: inline-block;
    margin-top: var(--space-sm);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.auth-back-link:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .auth-card {
        padding: var(--space-lg) var(--space-md);
        max-width: 90vw;
        width: 90vw;
    }
}

.greeting {
    margin-bottom: 15px;
    color: var(--color-primary);
}


/* ========== PROFILE / COMAIL ========== */

.pilot-profile-link {
    color: var(--color-text-muted);
}

.pilot-info a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.comail-box {
    padding: 20px;
    margin: 50px 0;
    border: 2px solid var(--color-primary);
    background: var(--color-background);
    text-decoration: none;
    color: var(--color-primary);
    width: 100%;
    text-align: center;
    transition: all 0.2s ease-in-out;
    position: relative;
    box-sizing: border-box;
    cursor: pointer;
}

.comail-box a {
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--color-primary);
}

.comail-box:hover > a {
    color: var(--color-background);
}

.comail-box:hover > .comail-message {
    color: var(--color-primary);
}

.comail-box:hover {
    color: var(--color-background);
    background-color: var(--color-primary);
    transition: all 0.5s ease-in-out;
}

.comail-message {
    position: absolute;
    left: -8px;
    top: -8px;
}


/* ========== OPERATIONS / ACARS ========== */

.operations-center {
    width: 100%;
    border-radius: 10px;
    font-weight: 700;
}

.operations-center p {
    line-height: 27px;
}

.operations-center p > small {
    font-weight: 400;
}

.operations-center.offline {
    color: var(--color-primary);
    opacity: 0.6;
}

.dash-map > .header {
    background-color: var(--color-surface);
    height: 50px;
    color: var(--color-text-muted);
    padding-left: 15px;
    padding-right: 15px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.acarsmap-live {
    display: inline-block;
    height: 30px;
    width: 55px;
    text-transform: uppercase;
    background-color: #2bd900; /* ACARS live green — keep as-is */
    color: var(--color-background);
    line-height: 30px;
    text-align: center;
    font-size: smaller;
    border-radius: 4px;
}

/* .acarsmap, .notams-table, .discord-widget rules live in the DASHBOARD section */


/* ========== WEATHER / NEWS / SOCIAL ========== */

.instagram-image {
    width: 100%;
}

.container.instagram {
    padding: 0;
}

.instagram-text {
    padding: 15px;
}

.box-weather {
    display: inline-block;
    width: 50%;
    text-align: center;
    vertical-align: top;
}

.box-weather > .icon {
    color: var(--color-accent);
    font-size: 50px;
}

.box-weather > .main {
    color: var(--color-primary);
}

.box-weather > .main > p {
    color: var(--color-text);
    font-size: 30px;
}

.box-weather > .details {
    font-size: 14px;
    color: var(--color-text-muted);
}

.news > h1 {
    font-size: 20px;
    font-weight: 400;
}

.news > p {
    font-size: 14px;
    color: var(--color-text-muted);
}

.news > p > a {
    color: var(--color-info);
}

/* discord-widget rules live in the DASHBOARD section */


/* ========== FLYPAD ========== */

.flypad-block {
    width: 80vw;
    margin-left: 10vw;
}

.flypad-back {
    font-size: x-large;
    color: var(--color-primary);
    margin-right: 5px;
    transition: color 1s;
}

.flypad-nightmodeblock {
    position: absolute;
    margin-right: 10vw;
    right: 0;
}

@media (max-width: 768px) {
    .flypad-nightmodeblock {
        position: absolute;
        left: 1vw;
        top: 0;
    }
}

.download-loadsheet {
    float: right;
    margin-right: 5px;
}

.flypad-map {
    height: 350px;
}


/* ========== MISC LAYOUT (continued) ========== */

.forum-widget {
    background-color: var(--color-surface);
    position: relative;
}

.forum-bottom {
    position: absolute;
    bottom: 150px;
}

@media (max-width: 768px) {
    .forum-bottom {
        position: relative;
        bottom: auto;
    }
}

.container.md {
    text-align: center;
}

.container.md > cite {
    color: var(--color-text-muted);
}

.container.md > h1 {
    margin-bottom: 0;
}

.container.md > .description {
    margin-top: 20px;
    max-height: 170px;
    overflow-y: auto;
    font-size: 15px;
    text-align: left;
}

/* Hidden-by-filter footer for schedule list and map drawer */
.sf-hidden-footer {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--color-text-muted);
    text-align: center;
    border-top: 1px solid var(--color-border);
    margin-top: 4px;
}
.schedule-drawer-hidden-footer {
    padding: 10px 16px;
    font-size: 12px;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
    margin-top: 4px;
}


/* ========== MESSENGER (from M001) ========== */
/*
 * Duplicated from comail_show.tpl inline <style>.
 * The inline styles remain in comail_show.tpl for now — S04 will remove
 * the inline duplicate once this file is the canonical source.
 */

.conversation-thread {
    margin-top: 16px;
}

.conversation-msg {
    padding: 10px 14px;
    margin-bottom: 12px;
    border-left: 4px solid #555; /* overlay/neutral — keep as-is */
    background: rgba(255, 255, 255, 0.04);
}

.conversation-msg.sent {
    border-left-color: #e74c3c; /* conversation sent border — keep as-is */
}

.conversation-msg.received {
    border-left-color: #2ecc71; /* conversation received border — keep as-is */
}

.conversation-msg .msg-meta {
    font-size: 0.85em;
    margin-bottom: 6px;
}

.conversation-msg .msg-content {
    margin: 0;
}


/* ========== THEME SWITCHER ========== */

.theme-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--color-background);
    border: 1.5px solid var(--color-text);
    border-radius: 100vw;
    padding: 2px;
    margin-left: 15px;
    flex-shrink: 0;
}

.theme-switcher__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border: none;
    border-radius: 100vw;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.theme-switcher__btn svg {
    display: block;
    width: 14px;
    height: 14px;
}

.theme-switcher__btn--auto {
    font-size: 9px;
    font-weight: 700;
    font-family: var(--font-sans);
    letter-spacing: 0.02em;
    line-height: 1;
    padding: 0 5px;
}

.theme-switcher__btn[aria-checked="true"] {
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
}

.theme-switcher__btn:hover {
    color: var(--color-text);
}

.theme-switcher__btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Dark mode refinements for theme switcher */
:root[data-theme="dark"] .theme-switcher {
    border: 1px solid rgba(255, 255, 255, 0.35);
}

:root[data-theme="dark"] .theme-switcher__btn {
    color: rgba(255, 255, 255, 0.3);
}

:root[data-theme="dark"] .theme-switcher__btn[aria-checked="true"] {
    background: #2a2a2a;
    color: #ffffff;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .theme-switcher {
        border: 1px solid rgba(255, 255, 255, 0.35);
    }

    :root:not([data-theme]) .theme-switcher__btn {
        color: rgba(255, 255, 255, 0.3);
    }

    :root:not([data-theme]) .theme-switcher__btn[aria-checked="true"] {
        background: #2a2a2a;
        color: #ffffff;
    }
}

/* ========== DASHBOARD ========== */

/*
 * CSS Grid layout for the pilot dashboard (/profile/self).
 * Replaces Bootstrap col-md-* columns with semantic grid cells.
 * Design language mirrors public-web-5.0: cards lift on hover (translateY + shadow-lg),
 * no resting shadow (matches fleet-card / team-card / partner-card pattern),
 * container-wide max-width frames the grid on large viewports.
 * Inspect: DevTools → Elements → .dashboard-grid → Computed tab.
 */

/* Outer wrapper — constrains grid to 1200px like public-web container-wide */
.dashboard-wrapper {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: var(--space-lg);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-md);
}

/* Hero cell — greeting, pilot stats, comail, ops-centre (spans 2 of 3 cols) */
.dash-hero {
    grid-column: 1 / 3;
}

.dash-hero > .container {
    padding: var(--space-md);
}

/* Map cell grid-column, flex layout, and .acarsmap live in the card chrome section below */

/* NOTAMs — formerly the notifications slot (auto-flow, one of the 3 equal cells) */
.dash-notams {
    /* auto-flow — no explicit grid-column needed */
}

/* Three equal-width cells: notifications, tutorials, weather — auto-flow */
/* .dash-notifications, .dash-tutorials, .dash-weather — no explicit column needed */

/* Destination of the month — spans the freed 2 columns (placeholder removed) */
.dash-destination {
    grid-column: 2 / 4;
}

/* ---- Card chrome ---- */
/*
 * Matches public-web-5.0 card pattern (fleet-card, team-card, partner-card):
 * - No resting box-shadow (cards sit flush against the page surface)
 * - On hover: translateY(-4px) lift + shadow-lg (same as public site)
 * - transition-base (200ms ease) for snappy feel
 * - overflow:hidden removed from .dash-card — it clips the lifted shadow and
 *   collapses the border on hover. Each card's inner content handles its own
 *   overflow where needed (e.g. acarsmap, iframe).
 *
 * .dash-notams is excluded from hover lift — it's a full-width informational
 * banner, not an interactive card.
 */
.dash-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background-color: var(--color-background);
    transition: background-color var(--transition-slow),
                color var(--transition-slow);
    /* overflow managed per-child — keeps border-radius visible */
}

.dash-card > .title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    background-color: var(--color-surface);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--color-border);
    border-radius: var(--radius-md) var(--radius-md) 0 0; /* clip top corners */
    transition: background-color var(--transition-slow), color var(--transition-slow);
    box-sizing: border-box;
}

/* Homepage alert — rendered as a card above the grid */
.homepage-alert.dash-card {
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-lg);
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Operations Center alert — same pattern as homepage-alert, shown only when active */
.ops-center-alert.dash-card {
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    border-color: var(--color-success);
    color: var(--color-text);
}

/* Map card — full-width (formerly notams slot), flex column so acarsmap fills height */
.dash-map {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-md);
    position: relative;
}

.flight-info-panel {
    position: absolute;
    top: 3.5rem;
    right: 1rem;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffffff;
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    z-index: 800;
    max-width: 240px;
    pointer-events: none;
    font-size: 0.82rem;
}

.fip-route { font-weight: 700; margin-bottom: 2px; color: #ffffff; }
.fip-pilot { color: rgba(255,255,255,0.65); margin-bottom: 2px; }
.fip-aircraft { color: rgba(255,255,255,0.65); }
.fip-stats { margin-top: 4px; color: rgba(255,255,255,0.85); }

.acarsmap {
    flex: 1;
    width: 100%;
    min-height: 400px;
}

/* Discord card — flex column so iframe fills card edge-to-edge */
.dash-discord {
    grid-column: 1 / 2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.discord-widget {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.discord-widget > iframe {
    flex: 1;
    width: 100%;
    min-height: 300px;
    border: 0;
    display: block;
}

/* NOTAMs table — tighten font, remove duplicate td rule */
.notams-table {
    border-collapse: collapse;
    width: 100%;
    text-align: left;
    font-size: var(--font-size-sm);
}

.notams-table tr:nth-child(2n) {
    background-color: var(--color-surface);
}

.notams-table td {
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text-muted);
}

.notams-table a {
    text-decoration: none;
    color: var(--color-primary);
}

.notams-table a:visited {
    color: var(--color-text-muted);
}

/* YouTube / tutorial iframe — CSS-controlled sizing (no inline style needed) */
.dash-tutorials iframe {
    width: 100%;
    height: 300px;
    border: 0;
}

/* ---- Responsive collapse ---- */
@media (max-width: 768px) {
    .dashboard-wrapper {
        padding-inline: var(--space-md);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dash-hero,
    .dash-map,
    .dash-discord,
    .dash-destination {
        grid-column: auto;
    }
}

/* ========== QR MODAL (FlyPad home) ========== */

.qr-link {
    color: var(--color-text-muted);
    font-size: 11px;
    text-decoration: none;
}

.qr-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.qr-modal-box {
    position: relative;
    background: var(--color-surface);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--color-border);
}

.qr-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: var(--color-text-muted);
    font-size: 24px;
    text-decoration: none;
    font-weight: 300;
}

.qr-caption {
    margin-top: 15px;
    color: var(--color-text-muted);
    font-size: 12px;
}


/* ═══ Dashboard v2 (M024 Remediation) ═══ */

/* ─── Page-level body-container override ─── */
.page-dashboard .body-container {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    max-width: none;
    padding: 0;
}
.dv2-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5vw;
}

/* ─── Hero ─────────────────────────────────────────────────────── */
.dv2-hero {
    position: relative;
    min-height: 50vh;
    background-size: cover;
    background-position: center;
    background-color: #1a1a1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Full-viewport bleed regardless of body-container width */
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,0.22);
}
.dv2-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.65) 100%);
}
.dv2-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 6rem 2rem 1.5rem;
    max-width: 1100px;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.dv2-hero-eyebrow {
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    margin: 0 0 0.5rem;
}
.dv2-hero-title {
    font-size: clamp(2rem, 1.5rem + 2.5vw, 3.5rem);
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    margin: 0 0 1.5rem;
}

/* Hero overlay stats — all pilot data inside the hero image */
.dv2-hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.dv2-hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}
/* Vertical divider between stat groups */
.dv2-hero-stat--divider {
    width: 1px;
    height: 2rem;
    background: rgba(255,255,255,0.3);
    pointer-events: none;
}
.dv2-hero-stat-value {
    font-size: clamp(1.2rem, 0.8rem + 1.5vw, 2rem);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    line-height: 1;
}
.dv2-hero-stat-label {
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
}
.dv2-status-active {
    display: inline-block;
    padding: 0.15em 0.6em;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(0,142,23,0.3);
    color: #ffffff;
    border: 1px solid rgba(0,142,23,0.6);
    vertical-align: middle;
}
.dv2-status-inactive {
    display: inline-block;
    padding: 0.15em 0.6em;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(204,0,0,0.3);
    color: #ffffff;
    border: 1px solid rgba(204,0,0,0.5);
    vertical-align: middle;
}

/* ─── Accent stat strip (removed — stats now in hero) ──────────── */
/* .dv2-stats preserved for backwards compatibility only */
.dv2-stats { display: none; }

/* ─── Lifecycle spotlight card — inset at hero bottom ───────────── */
.dv2-lifecycle {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem max(15px, calc((100vw - 1400px) / 2 + 15px));
    width: 100%;
    background: rgba(0,0,0,0.52);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255,255,255,0.12);
    border-left: none;
    border-radius: 0;
    box-sizing: border-box;
}
.dv2-lifecycle--live       { border-top-color: rgba(204,0,0,0.6); }
.dv2-lifecycle--dispatched { border-top-color: rgba(0,102,204,0.6); }
.dv2-lifecycle--booked     { border-top-color: rgba(0,122,14,0.6); }
.dv2-lifecycle--rejected   { border-top-color: rgba(204,102,0,0.6); }
.dv2-lifecycle--idle       { border-top-color: rgba(255,255,255,0.12); }
.dv2-lifecycle-header {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    margin: 0 0 0.3rem;
    white-space: nowrap;
}
.dv2-lifecycle--live .dv2-lifecycle-header       { color: rgba(255,100,100,0.9); }
.dv2-lifecycle--dispatched .dv2-lifecycle-header { color: rgba(80,160,255,0.9); }
.dv2-lifecycle--booked .dv2-lifecycle-header     { color: rgba(80,200,100,0.9); }
.dv2-lifecycle--rejected .dv2-lifecycle-header   { color: rgba(255,160,60,0.9); }
.dv2-lifecycle-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex-shrink: 0;
}
.dv2-lifecycle-route {
    font-size: clamp(1.2rem, 0.9rem + 1vw, 1.6rem);
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.25rem;
    line-height: 1.1;
}
.dv2-lifecycle-meta {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.7);
    margin: 0;
    line-height: 1.5;
}
.dv2-lifecycle-cta {
    flex-shrink: 0;
    display: inline-block;
    padding: 0.45em 1.2em;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--color-primary);
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.dv2-lifecycle-cta:hover { opacity: 0.85; color: #ffffff; text-decoration: none; }
.dv2-lifecycle--dispatched .dv2-lifecycle-cta--dispatched { background: #0066cc; }
.dv2-lifecycle--booked .dv2-lifecycle-cta--booked { background: #007a0e; }
.dv2-lifecycle--rejected .dv2-lifecycle-cta--rejected { background: #cc6600; }
.dv2-lifecycle--idle .dv2-lifecycle-cta { background: var(--color-text-muted); }
.dv2-lifecycle-cta-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    gap: 0.3rem;
}
.dv2-lifecycle-cta--disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    background: var(--color-text-muted);
}
.dv2-lifecycle-cta-hint {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.5);
    margin: 0;
    white-space: nowrap;
    text-align: center;
}
.dv2-lifecycle-announce {
    margin-left: auto;
    flex-shrink: 0;
    max-width: 280px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.5;
    padding-left: 2rem;
    border-left: 1px solid rgba(255,255,255,0.15);
}
.dv2-lifecycle-announce .pikto {
    font-size: 1rem;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.3em;
    color: var(--color-warning);
}
.dv2-lifecycle-announce a {
    color: rgba(255,255,255,0.9);
    text-decoration: underline;
}
.dv2-lifecycle-announce a:hover { color: #ffffff; }

/* Photo credit block — sits left of announce divider in lifecycle strip */
.dv2-lifecycle-credit {
    margin-left: auto;
    flex-shrink: 0;
    padding-right: 1.25rem;
    border-right: 1px solid rgba(255,255,255,0.15);
    text-align: right;
}
.dv2-lifecycle-credit-heading {
    font-size: .65rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin: 0 0 .2rem;
}
.dv2-lifecycle-credit-heading .lh { margin-right: .25em; font-size: .8rem; }
.dv2-lifecycle-credit-line {
    font-size: .75rem;
    color: rgba(255,255,255,0.65);
    margin: 0;
    line-height: 1.45;
    white-space: nowrap;
}
/* When credit is present, announce loses its margin-left:auto (credit takes it) */
.dv2-lifecycle-credit + .dv2-lifecycle-announce {
    margin-left: 0;
    border-left: none;
    padding-left: 1.25rem;
}

/* ─── ACARS map section (full-width bleed) ──────────────────────── */
.dv2-map-section {
    margin: 2rem -5vw 0;
    width: calc(100% + 10vw);
    padding: 0;
}
.dv2-map-section .acarsmap {
    height: 440px;
    width: 100%;
    display: block;
}

/* ─── Map stage wrapper (positions LIVE badge over map) ─────────── */
.dv2-map-stage {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

/* ─── LIVE badge overlay — top-right, matches swiss-virtual.com style ── */
.dv2-map-live-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    pointer-events: none;
}
.dv2-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #e5002d;
    flex-shrink: 0;
    animation: dv2-pulse 1.6s ease-in-out infinite;
}
@keyframes dv2-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.8); }
}
.dv2-live-separator {
    opacity: 0.4;
    margin: 0 0.1rem;
}

/* ─── Editorial grid ────────────────────────────────────────────── */
/* ─── Row 1: Weather (1/4) | NOTAMs (2/4) | Discord (1/4) ────────── */
.dv2-row1 {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 2.5rem;
    padding: 3rem 0 0;
}

/* ─── Row 2: Focus Destination (1/4) | News (3/4) ────────────────── */
.dv2-row2 {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 2.5rem;
    padding: 2.5rem 0 3rem;
    /* Both columns stretch to same row height */
}

.dv2-col-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin: 0 0 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

/* ─── Weather — stacked vertically in 1/4 column ────────────────── */
.dv2-weather-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.dv2-weather-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.dv2-weather-card .owf {
    font-size: 2.4rem;
    line-height: 1;
    color: var(--color-text-muted);
    flex-shrink: 0;
}
.dv2-weather-card .dv2-weather-na-icon {
    font-size: 2.4rem;
    line-height: 1;
    color: var(--color-text-muted);
    flex-shrink: 0;
    width: 2.4rem;
    text-align: center;
}
.dv2-weather-info h3 {
    font-size: 0.82rem;
    font-weight: 600;
    margin: 0 0 0.15rem;
    color: var(--color-text);
}
.dv2-weather-temp {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 0.2rem;
    line-height: 1;
}
.dv2-weather-detail {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.45;
}

/* ─── NOTAMs (editorial list) ────────────────────────────────────── */
.dv2-notams-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.dv2-notam-item {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.875rem;
}
.dv2-notam-item:last-child { border-bottom: none; }

.dv2-notam-date {
    flex-shrink: 0;
    font-size: 0.72rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}
.dv2-notam-item a {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-text);
    text-decoration: none;
}
.dv2-notam-item a:hover { color: var(--color-primary); }
.dv2-notams-more {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.78rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}
.dv2-notams-more:hover { text-decoration: underline; }
.dv2-notams-empty {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0;
}

/* ─── Discord card — icon aligned, button below text ─────────────── */
.dv2-col-title--discord {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.dv2-discord-icon {
    /* nudge SVG down to align with uppercase text baseline */
    vertical-align: middle;
    position: relative;
    top: 1px;
}
.dv2-discord-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.dv2-discord-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.dv2-discord-text strong {
    font-size: 0.9rem;
    color: var(--color-text);
}
.dv2-discord-text span {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}
.dv2-discord-action {
    /* button sits below text, not beside it */
}
.dv2-discord-btn {
    background: #5865F2;
    color: #ffffff;
    border: none;
    display: inline-block;
}
.dv2-discord-btn:hover { background: #4752c4; color: #ffffff; }
.dv2-discord-btn--connected {
    background: #43b581;
    border-color: #43b581;
    cursor: default;
}
.dv2-discord-btn--connected:hover { background: #43b581; }
.dv2-discord-btn--open {
    background: #5865F2;
    color: #ffffff;
}
.dv2-discord-btn--open:hover { background: #4752c4; color: #ffffff; }

/* ─── Discord live data — counts, activity, messages ─────────────── */
.dv2-discord-counts {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}
.dv2-discord-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.2rem;
}
.dv2-discord-dot--online {
    background: #43b581;
    box-shadow: 0 0 4px rgba(67, 181, 129, 0.5);
}
.dv2-discord-online {
    display: flex;
    align-items: center;
    color: #43b581;
    font-weight: 600;
}
.dv2-discord-sep {
    color: var(--color-text-muted);
}
.dv2-discord-total {
    color: var(--color-text-muted);
}
.dv2-discord-activity {
    margin-bottom: 0.25rem;
}
.dv2-discord-activity-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    margin: 0 0 0.35rem 0;
    font-weight: 600;
}
.dv2-discord-messages {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.dv2-discord-msg {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    font-size: 0.78rem;
    line-height: 1.35;
    color: var(--color-text);
}
.dv2-discord-msg-icon {
    flex-shrink: 0;
    font-size: 0.72rem;
}
.dv2-discord-msg-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--color-text);
}
.dv2-discord-msg-author {
    flex-shrink: 0;
    color: var(--color-text-muted);
    font-size: 0.72rem;
}

.dv2-discord-btn--disabled {
    background: #8B8FA3;
    border-color: #8B8FA3;
    cursor: default;
    opacity: 0.5;
}

/* ─── Focus Destination — vertical card, full-width image ────────── */
.dv2-destination {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.dv2-destination-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}
.dv2-destination-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}
.dv2-destination-chip {
    display: inline-block;
    padding: 0.15em 0.55em;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    background: transparent;
    white-space: nowrap;
    flex-shrink: 0;
}
.dv2-destination-name {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-text);
}
.dv2-destination-desc {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin: 0 0 0.75rem;
    line-height: 1.5;
    text-align: justify;
}
.dv2-destination-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ─── News — 3-column grid inside the 3/4 column ─────────────────── */
.dv2-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem 2rem;
    margin-top: 1.25rem;
}
.dv2-news-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}
.dv2-news-source {
    display: inline-block;
    padding: 0.15em 0.6em;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    width: fit-content;
}
.dv2-news-source--swiss {
    background: rgba(204,0,0,0.1);
    color: var(--color-primary);
    border: 1px solid rgba(204,0,0,0.2);
}
.dv2-news-source--swissinfo {
    background: rgba(0,80,160,0.08);
    color: #0050a0;
    border: 1px solid rgba(0,80,160,0.15);
}
.dv2-news-headline {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dv2-news-headline a { color: var(--color-text); text-decoration: none; }
.dv2-news-headline a:hover { color: var(--color-primary); }
.dv2-news-preview {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin: 0;
    line-height: 1.5;
    flex: 1;
    text-align: justify;
}

/* ─── Upcoming events ────────────────────────────────────────────── */
.dv2-events-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.dv2-event-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.dv2-event-date {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: 4px;
    padding: 0.25rem 0;
}
.dv2-event-day {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}
.dv2-event-month {
    font-size: 0.55rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.85;
}
.dv2-event-body {
    flex: 1;
}
.dv2-event-name {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
}
.dv2-event-name a {
    color: var(--color-text);
    text-decoration: none;
}
.dv2-event-name a:hover { color: var(--color-primary); }
.dv2-event-time {
    margin: 0.1rem 0 0;
    font-size: 0.75rem;
    color: var(--color-text-muted);
}
.dv2-events-all {
    font-size: 0.78rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}
.dv2-events-all:hover { text-decoration: underline; }

/* ─── Dark mode — dashboard adjustments ─────────────────────────── */
[data-theme="dark"] .dv2-news-source--swissinfo { color: #6ab0ff; border-color: rgba(106,176,255,0.2); background: rgba(106,176,255,0.08); }

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .dv2-news-source--swissinfo { color: #6ab0ff; border-color: rgba(106,176,255,0.2); background: rgba(106,176,255,0.08); }
}

/* ─── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1023px) {
    .dv2-row1 { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .dv2-row1-discord { grid-column: 1 / -1; }
    .dv2-row2 { grid-template-columns: 1fr 2fr; gap: 2rem; }
    .dv2-news-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
    .dv2-hero { min-height: 40vh; }
    .dv2-hero-content { padding-top: 4rem; }
    .dv2-hero-stats { gap: 1rem; }
    .dv2-hero-stat--divider { display: none; }
    .dv2-lifecycle {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
        padding: 1.25rem 4vw;
    }
    .dv2-lifecycle-body { align-items: center; }
    .dv2-lifecycle-cta-wrap { align-items: center; }
    .dv2-lifecycle-announce {
        margin-left: 0;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.15);
        padding-left: 0;
        padding-top: 0.75rem;
        max-width: 100%;
        width: 100%;
        text-align: center;
    }
    .dv2-row1 { grid-template-columns: 1fr; gap: 2rem; }
    .dv2-row1-discord { grid-column: auto; }
    .dv2-row2 { grid-template-columns: 1fr; gap: 2rem; }
    .dv2-news-grid { grid-template-columns: 1fr; }
    .dv2-map-section .acarsmap { height: 300px; }
    .dv2-dashboard { padding: 0 4vw; }
    .dv2-map-section { margin: 2rem -4vw 0; width: calc(100% + 8vw); }
}

@media (max-width: 479px) {
    .dv2-hero { min-height: 35vh; }
    .dv2-hero-stats { gap: 0.75rem; }
    .dv2-hero-stat-value { font-size: 1.2rem; }
    .dv2-lifecycle-route { font-size: 1.4rem; }
}

/* ─── Hero credit (moved from inline <style>) ──────────────────────── */
.dv2-hero-credit {
    position: relative;
    z-index: 10;
    align-self: flex-end;
    margin-right: 1rem;
    margin-bottom: .75rem;
}
.dv2-hero-credit-text {
    display: inline-block;
    padding: .2rem .55rem;
    background: rgba(0,0,0,.45);
    border-radius: 3px;
    color: rgba(255,255,255,.82);
    font-size: .72rem;
    letter-spacing: .02em;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    max-width: 28rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ─── Navbar hero lab icon + dropdown ──────────────────────────────── */
.utility-bar__hero-lab { position: relative; }
.utility-bar__hero-lab-btn { background: none; border: none; cursor: pointer; }
.utility-bar__hero-lab-btn .lh { font-size: 28px; vertical-align: middle; }
.hero-lab-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: .5rem 0;
    z-index: 2100;
    margin-top: .35rem;
}
.utility-bar__hero-lab.is-open .hero-lab-dropdown { display: block; }
.hero-lab-dropdown__title {
    display: block;
    padding: .4rem 1rem .3rem;
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--color-text-muted);
}
.hero-lab-dropdown__item {
    display: block;
    padding: .45rem 1rem;
    font-size: .82rem;
    color: var(--color-text);
    text-decoration: none;
    transition: background .1s;
}
.hero-lab-dropdown__item:hover { background: var(--color-surface); text-decoration: none; color: var(--color-text); }
.hero-lab-dropdown__item--active { font-weight: 600; color: var(--color-primary); }
.hero-lab-dropdown__item--active::before { content: '✓ '; }

/* ─── Shared overrides for variant heroes ──────────────────────────── */
.dv2-hero[class*="--v"] {
    left: auto; right: auto; margin-left: 0; margin-right: 0;
    width: auto; overflow: visible; padding-top: 5rem;
}
.dv2-hero-eyebrow--dark { color: var(--color-text-muted); text-align: left; }
.dv2-hero-title--dark { color: var(--color-text); text-shadow: none; text-align: left; }
.dv2-status--light.dv2-status-active { background: rgba(0,142,23,0.1); color: #008e17; border-color: rgba(0,142,23,0.3); }
.dv2-status--light.dv2-status-inactive { background: rgba(204,0,0,0.1); color: #cc0000; border-color: rgba(204,0,0,0.3); }

/* ═══════════════════════════════════════════════════════════════════
   VARIANT 0 — Default hero, left/right aligned text
   ═══════════════════════════════════════════════════════════════════ */
.dv2-hero.dv2-hero--v0 {
    left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; width: 100vw;
    padding-top: 0; overflow: hidden;
}
.dv2-hero-content--v0 {
    position: relative;
    display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
    text-align: left; align-items: end;
    padding: 7rem calc(5vw + 15px) 2rem; max-width: calc(1400px + 30px); margin: 0 auto;
    box-sizing: border-box;
}
/* V0 credit pill — top-right corner, same height as eyebrow */
.dv2-hero-v0-credit-pill {
    position: absolute;
    top: 7rem;                         /* match content padding-top */
    right: calc(5vw + 15px);          /* match content padding-right */
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    border-radius: 999px;
    padding: .25rem .75rem;
    font-size: .72rem;
    color: rgba(255,255,255,0.82);
    white-space: nowrap;
    z-index: 5;
    line-height: 1.5;
}
.dv2-hero-v0-credit-pill .lh { font-size: .78rem; margin-right: .15em; vertical-align: middle; }
.dv2-hero-v0-left .dv2-hero-eyebrow { text-align: left; }
.dv2-hero-v0-left .dv2-hero-title { text-align: left; margin-bottom: .75rem; }
/* Stack stats vertically, left-aligned */
.dv2-hero-stats--left { flex-direction: column; align-items: flex-start; gap: .75rem; }
.dv2-hero-stats--left .dv2-hero-stat { align-items: flex-start; }
/* Right column: bottom-aligned, stats stacked vertically, right-aligned */
.dv2-hero-v0-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: flex-end; }
.dv2-hero-stats--right { flex-direction: column; align-items: flex-end; gap: .75rem; }
.dv2-hero-stats--right .dv2-hero-stat { align-items: flex-end; }

@media (max-width: 767px) {
    .dv2-hero-content--v0 { grid-template-columns: 1fr; }
    .dv2-hero-v0-right { align-items: flex-start; }
    .dv2-hero-stats--right { align-items: flex-start; }
    .dv2-hero-stats--right .dv2-hero-stat { align-items: flex-start; }
}

/* ═══════════════════════════════════════════════════════════════════
   VARIANT 8 — Stats list left (1/3), large image right (2/3)
   Image height matches stats. Lifecycle in map sidebar.
   ═══════════════════════════════════════════════════════════════════ */
.dv2-hero--v8 { background: var(--color-background); min-height: auto; box-shadow: none; display: block; }
.dv2-hero--v8 .dv2-hero-overlay { display: none; }
.dv2-hero-v8-split {
    display: grid; grid-template-columns: 1fr 2fr; gap: 2rem;
    padding: 0; align-items: stretch;
}
.dv2-hero-v8-stats { display: flex; flex-direction: column; }
.dv2-v8-dl { margin: 1rem 0 0; }
.dv2-v8-dl-row { display: flex; justify-content: space-between; padding: .6rem 0; border-bottom: 1px solid var(--color-border); }
.dv2-v8-dl-row dt { font-size: .82rem; color: var(--color-text-muted); }
.dv2-v8-dl-row dd { font-size: .82rem; font-weight: 600; color: var(--color-text); margin: 0; }
.dv2-hero-v8-image-wrap {
    position: relative; border-radius: 16px; overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18), 0 4px 12px rgba(0,0,0,0.08);
    min-height: 240px;
}
.dv2-hero-v8-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.dv2-hero-v8-credit {
    position: absolute; bottom: 0; left: 0; right: 0; padding: .55rem .85rem;
    background: rgba(255,255,255,0.12); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-top: 1px solid rgba(255,255,255,0.18);
}
.dv2-hero-v8-credit-text { font-size: .72rem; color: rgba(255,255,255,0.92); text-shadow: 0 1px 3px rgba(0,0,0,0.35); }
@media (max-width: 767px) { .dv2-hero-v8-split { grid-template-columns: 1fr; } .dv2-hero-v8-image-wrap { min-height: 220px; } }

/* V8 map section: map (flexible) + lifecycle card (auto-width, right) */
.dv2-map-section--v8 {
    display: grid; grid-template-columns: 1fr auto; gap: 1.5rem;
    margin-top: 2.5rem; margin-bottom: .5rem;
    padding: 0 3vw;
    align-items: stretch;
}
.dv2-map-section--v8 .dv2-map-stage {
    position: relative;
    min-width: 0;                      /* let grid item shrink */
}
.dv2-map-section--v8 .acarsmap { height: 400px; }
.dv2-v8-lifecycle-sidebar {
    background: var(--color-surface);
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    display: flex; flex-direction: column; justify-content: flex-start;
    padding: 1.75rem;
    min-width: 260px;                  /* at least this wide */
    max-width: 320px;                  /* cap it */
    box-sizing: border-box;
}
.dv2-v8-lifecycle-sidebar .dv2-lifecycle {
    background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
    border-top: none; padding: 0; width: auto;
    flex-direction: column; align-items: flex-start; gap: .75rem;
}
.dv2-v8-lifecycle-sidebar .dv2-lifecycle-body { white-space: nowrap; }
.dv2-v8-lifecycle-sidebar .dv2-lifecycle-route { color: var(--color-text); font-size: 1.2rem; }
.dv2-v8-lifecycle-sidebar .dv2-lifecycle-meta { color: var(--color-text-muted); }
.dv2-v8-lifecycle-sidebar .dv2-lifecycle-header { color: var(--color-text-muted); }
.dv2-v8-lifecycle-sidebar .dv2-lifecycle-cta { align-self: flex-start; }
.dv2-v8-lifecycle-sidebar .dv2-lifecycle-announce {
    margin-left: 0; border-left: none; border-top: 1px solid var(--color-border);
    padding-left: 0; padding-top: .75rem; color: var(--color-text-muted);
    max-width: 100%; white-space: normal;     /* allow aggressive wrapping */
    font-size: .78rem; line-height: 1.45;
    text-align: left;
}
.dv2-v8-lifecycle-sidebar .dv2-lifecycle-announce a { color: var(--color-primary); white-space: nowrap; }
@media (max-width: 767px) {
    .dv2-map-section--v8 { grid-template-columns: 1fr; padding: 0 1rem; }
    .dv2-v8-lifecycle-sidebar {
        width: 100%; max-width: none; min-width: 0;
        border-radius: 12px;
        padding: 1.25rem 1rem;
    }
    /* Override base lifecycle mobile centering — left-align everything */
    .dv2-v8-lifecycle-sidebar .dv2-lifecycle {
        text-align: left;
        flex-direction: row; flex-wrap: wrap; gap: .75rem;
        align-items: stretch;
    }
    .dv2-v8-lifecycle-sidebar .dv2-lifecycle-body {
        flex: 1 1 auto; white-space: nowrap;
        align-items: flex-start;
    }
    .dv2-v8-lifecycle-sidebar .dv2-lifecycle-header { text-align: left; }
    .dv2-v8-lifecycle-sidebar .dv2-lifecycle-route { text-align: left; }
    .dv2-v8-lifecycle-sidebar .dv2-lifecycle-meta { text-align: left; }
    .dv2-v8-lifecycle-sidebar .dv2-lifecycle-cta {
        flex-shrink: 0; align-self: center;
    }
    .dv2-v8-lifecycle-sidebar .dv2-lifecycle-announce {
        flex-basis: 100%; text-align: left;
    }
}

/* V8 lifecycle strip hidden in hero — rendered in map sidebar instead */
.dv2-hero--v8 .dv2-lifecycle { display: none; }

/* end Dashboard v2 */

/* ── Logbook / Pirep List Map ───────────────────────────────────────── */
.plmap-container {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 0;
}
.plmap {
    width: 100%;
    min-height: 280px;
}
/* pl-row hover highlight */
#pirepTable tr.pl-row { cursor: default; }
#pirepTable tr.pl-row:hover td { background-color: var(--color-surface); }
/* end Logbook / Pirep List Map */

/* Pirep list filter bar — 5 equal-ish columns (no preset-pill auto column) */
.sf-bar.sf-bar-pireps { grid-template-columns: 1fr 1fr 1fr 1.2fr 1.2fr; }

/* Pirep list — sticky top section + scrollable list below */
.pl-sticky-top {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--color-background);
    padding-bottom: 4px;
}
.pl-scroll-body {
    /* rest of viewport after sticky top */
}
.pl-scroll-body .table-placeholder {
    max-height: calc(100vh - 380px);
    overflow-y: auto;
}
.pl-scroll-body .table-placeholder thead th {
    position: sticky;
    top: 0;
    background: var(--color-background);
    z-index: 10;
}

/* Pirep list map height — CSS controlled */
.plmap {
    height: 38vh;
    min-height: 220px;
}

/* ========== FLEET PAGE — card grid, modals, gallery ========== */
/* Milestone M031 / Slice S01 / Task T02 */

/* Section heading (Short-Haul Fleet, Long-Haul Fleet, Other) */
.fleet-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 2rem 0 var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 2px solid var(--color-primary);
}

/* Card grid — 3 columns desktop */
.fleet-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

@media (max-width: 900px) {
    .fleet-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
    .fleet-grid { grid-template-columns: 1fr; }
}

/* Aircraft card */
.fleet-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: box-shadow 0.18s, border-color 0.18s;
    outline: none;
}

.fleet-card:hover,
.fleet-card:focus-visible {
    box-shadow: 0 4px 16px rgba(0,0,0,0.14);
    border-color: var(--color-primary);
}

/* Hero image container — 16:9 aspect ratio */
.fleet-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--color-surface);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fleet-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.fleet-card-image .fleet-card-icon {
    object-fit: contain;
    padding: var(--space-sm);
}

/* Icon fallback placeholder */
.fleet-card-icon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
}

.fleet-card-icon-font {
    font-family: var(--font-piktos);
    font-size: 64px;
    line-height: 1;
    color: var(--color-text-muted);
    opacity: 0.45;
}
.fleet-card-icon-glyph {
    font-size: 64px;
    color: var(--color-text-muted);
    opacity: 0.45;
}

/* Card body */
.fleet-card-body {
    padding: var(--space-md) var(--space-sm) var(--space-sm);
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: var(--space-xs);
}

.fleet-card-icao {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    text-transform: uppercase;
}

.fleet-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.fleet-card-excerpt {
    font-size: 0.83rem;
    color: var(--color-text-muted);
    line-height: 1.45;
    flex: 1;
    margin: 0;
}

.fleet-card-btn {
    margin-top: var(--space-sm);
    align-self: flex-start;
}

/* ===== Fleet modal ===== */
.fleet-modal {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 28px 32px 32px;
    max-width: 760px;
    width: 92vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
}

.fleet-modal::backdrop {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
}

.fleet-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-text);
    padding: 0;
    z-index: 1;
}

.fleet-modal-close:hover {
    color: var(--color-primary);
}

/* Modal hero image */
.fleet-modal-header {
    margin-bottom: var(--space-md);
}

.fleet-modal-hero {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: var(--space-sm);
    display: block;
}

.fleet-modal-title-group {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.fleet-modal-icao {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    text-transform: uppercase;
}

.fleet-modal-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

.fleet-modal-subtitle {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    margin: var(--space-md) 0 var(--space-xs);
    padding-bottom: 4px;
    border-bottom: 1px solid var(--color-border);
}

.fleet-modal-description {
    font-size: 0.92rem;
    color: var(--color-text);
    line-height: 1.6;
    margin: 0 0 var(--space-sm);
}

/* Specs table */
.fleet-specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.87rem;
    margin-bottom: var(--space-sm);
}

.fleet-specs-table tr:nth-child(odd) {
    background: rgba(0,0,0,0.03);
}

.fleet-specs-table th,
.fleet-specs-table td {
    padding: 6px 10px;
    text-align: left;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
}

.fleet-specs-table th {
    font-weight: 600;
    width: 42%;
    color: var(--color-text-muted);
}

/* Seatmap */
.fleet-modal-seatmap {
    margin-bottom: var(--space-md);
    text-align: center;
}

.fleet-modal-seatmap img {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid var(--color-border);
}

/* Gallery grid */
.fleet-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.fleet-gallery-item {
    margin: 0;
    border-radius: 6px;
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}

.fleet-gallery-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.fleet-gallery-item figcaption {
    font-size: 0.77rem;
    color: var(--color-text-muted);
    padding: 4px 8px;
    text-align: center;
}

/* Gallery submission form */
.fleet-gallery-submit {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: var(--space-md);
    margin-top: var(--space-md);
}

.fleet-gallery-submit-note {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0 0 var(--space-sm);
}

.fleet-gallery-form-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: var(--space-sm);
}

.fleet-gallery-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
}

.fleet-gallery-file {
    font-size: 0.85rem;
}

.fleet-gallery-caption {
    font-size: 0.9rem;
}

.fleet-gallery-submit-btn {
    margin-top: var(--space-xs);
}

/* ===== Dark mode overrides ===== */
[data-theme="dark"] .fleet-card {
    background: var(--color-surface);
    border-color: var(--color-border);
}

[data-theme="dark"] .fleet-card:hover,
[data-theme="dark"] .fleet-card:focus-visible {
    border-color: var(--color-primary);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

[data-theme="dark"] .fleet-card-icon-placeholder {
    background: var(--color-surface);
}

[data-theme="dark"] .fleet-modal {
    background: var(--color-surface);
    border-color: var(--color-border);
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

[data-theme="dark"] .fleet-specs-table tr:nth-child(odd) {
    background: rgba(255,255,255,0.04);
}

[data-theme="dark"] .fleet-specs-table th,
[data-theme="dark"] .fleet-specs-table td {
    border-color: var(--color-border);
}

[data-theme="dark"] .fleet-gallery-submit {
    background: var(--color-surface);
    border-color: var(--color-border);
}

[data-theme="dark"] .fleet-gallery-item {
    background: var(--color-surface);
    border-color: var(--color-border);
}

[data-theme="dark"] .fleet-modal-seatmap img {
    border-color: var(--color-border);
}

[data-theme="dark"] .fleet-section-title {
    border-color: var(--color-primary);
}

/* ========== ACCOUNT & SECURITY ========== */

/* Tabs */
.sec-tabs {
    max-width: 900px;
}

.sec-tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0;
}

.sec-tab-btn {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-bottom: none;
    padding: 12px 28px;
    margin-right: 8px;
    margin-bottom: -1px;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    letter-spacing: 0.01em;
}

.sec-tab-btn:hover {
    color: var(--color-primary);
    background: var(--color-background);
}

.sec-tab-btn.is-active {
    color: var(--color-primary);
    background: var(--color-background);
    border-bottom: 1px solid var(--color-background);
    font-weight: var(--font-weight-bold);
}

.sec-tab-panels {
    border: 1px solid var(--color-border);
    border-top: none;
    background: var(--color-background);
}

.sec-tab-panel {
    display: none;
    padding: var(--space-lg);
}

.sec-tab-panel.is-active {
    display: block;
}

/* Action row: two equal cards side by side */
.sec-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

/* Shared card component */
.sec-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
}

.sec-card--info {
    border-style: dashed;
}

.sec-card__title {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    margin: 0;
}

.sec-card__label {
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0;
}

.sec-card__desc {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.55;
    margin: 0;
}

.sec-card__logos {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
    max-width: 70%;
}

.sec-card__logo {
    height: 20px;
    max-width: 45%;
    object-fit: contain;
    flex-shrink: 1;
}

.sec-card__logo--lhg {
    height: 16px;
}

.sec-card__logo-sep {
    width: 1px;
    height: 24px;
    background: var(--color-border);
    flex-shrink: 0;
}

/* Credential lists — shared between Passkeys and Microsoft */
.sec-credential-list {
    width: 100%;
    border-collapse: collapse;
}

.sec-credential-list thead tr {
    border-bottom: 2px solid var(--color-border);
}

.sec-credential-list th {
    padding: var(--space-sm) var(--space-md);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
}

.sec-credential-list td {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
    border-bottom: 1px solid var(--color-border);
}

.sec-credential-sub {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.sec-credential-date {
    color: var(--color-text-muted);
    white-space: nowrap;
}

.sec-credential-action {
    text-align: right;
}

.sec-empty-state {
    color: var(--color-text-muted);
    text-align: center;
    padding: var(--space-md) 0;
    font-size: var(--font-size-sm);
}

/* Status messages */
.sec-status-msg {
    display: none;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

.sec-status-msg--success { color: var(--color-success); display: block; }
.sec-status-msg--error   { color: var(--color-danger);  display: block; }

/* Error messages */
.sec-error-msg {
    display: none;
    margin-top: var(--space-sm);
    color: var(--color-danger);
    font-size: var(--font-size-sm);
}

/* Password — two-stage flow */
.sec-pw-stages {
    max-width: 480px;
}

.sec-pw-stage {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.sec-pw-stage--locked {
    opacity: 0.45;
    pointer-events: none;
}

.sec-pw-stage--done {
    border-color: var(--color-success);
    border-style: dashed;
}

.sec-pw-stage__header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.sec-pw-stage__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    flex-shrink: 0;
}

.sec-pw-stage--done .sec-pw-stage__step {
    background: var(--color-success);
}

.sec-pw-stage--locked .sec-pw-stage__step {
    background: var(--color-text-muted);
}

.sec-pw-stage__title {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
    margin: 0;
}

.sec-pw-stage__badge {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    margin-left: auto;
}

.sec-pw-stage__badge--done {
    color: var(--color-success);
}

.sec-pw-stage__desc {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    line-height: 1.55;
    margin: 0 0 var(--space-sm);
}

/* Password form card */
.sec-pw-card {
    max-width: 480px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.sec-pw-label {
    display: block;
    margin-bottom: 4px;
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
    color: var(--color-text);
}

.sec-pw-input {
    display: block;
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    transition: border-color var(--transition-fast);
    box-sizing: border-box;
}

.sec-pw-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.15);
}

.sec-pw-wrapper {
    margin-bottom: var(--space-sm);
}

.sec-pw-wrapper input {
    display: block;
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    padding-right: calc(var(--space-lg) + var(--space-md));
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    transition: border-color var(--transition-fast);
    box-sizing: border-box;
    margin-bottom: 0;
}

.sec-pw-wrapper input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.15);
}

/* Step-up modal */
.sec-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.55);
    align-items: center;
    justify-content: center;
}

.sec-modal {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-lg);
    max-width: 420px;
    width: calc(100% - 48px);
    position: relative;
}

.sec-modal__title {
    font-family: var(--font-sans);
    font-size: var(--font-size-md);
    font-weight: var(--font-weight-semibold);
    margin: 0 0 var(--space-xs);
    color: var(--color-text);
}

.sec-modal__subtitle {
    color: var(--color-text-muted);
    margin: 0 0 var(--space-md);
    font-size: var(--font-size-sm);
}

.sec-modal__actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.sec-modal__actions .btn { flex: 1; }

.sec-modal__divider {
    border-top: 1px solid var(--color-border);
    margin: var(--space-md) 0;
}

.sec-modal__alt-text {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    margin: 0 0 var(--space-sm);
}

.sec-modal__close {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-md);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 1.4rem;
    line-height: 1;
    padding: 4px;
}

.sec-modal__close:hover { color: var(--color-text); }

/* Responsive */
@media (max-width: 640px) {
    .sec-action-row {
        grid-template-columns: 1fr;
    }

    .sec-credential-list th:nth-child(3),
    .sec-credential-list td:nth-child(3) {
        display: none;
    }

    .sec-pw-stages {
        max-width: 100%;
    }

    .sec-tab-btn {
        padding: 10px 16px;
        font-size: var(--font-size-sm);
    }
}

/* ========== OPERATIONS / ACARS ========== */

.operations-center {
    width: 100%;
    border-radius: 10px;
    font-weight: 700;
}

.operations-center p {
    line-height: 27px;
}

.operations-center p > small {
    font-weight: 400;
}

.operations-center.offline {
    color: var(--color-primary);
    opacity: 0.6;
}

.dash-map > .header {
    background-color: var(--color-surface);
    height: 50px;
    color: var(--color-text-muted);
    padding-left: 15px;
    padding-right: 15px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.acarsmap-live {
    display: inline-block;
    height: 30px;
    width: 55px;
    text-transform: uppercase;
    background-color: #2bd900; /* ACARS live green — keep as-is */
    color: var(--color-background);
    line-height: 30px;
    text-align: center;
    font-size: smaller;
    border-radius: 4px;
}

/* .acarsmap, .notams-table, .discord-widget rules live in the DASHBOARD section */


/* ========== WEATHER / NEWS / SOCIAL ========== */

.instagram-image {
    width: 100%;
}

.container.instagram {
    padding: 0;
}

.instagram-text {
    padding: 15px;
}

.box-weather {
    display: inline-block;
    width: 50%;
    text-align: center;
    vertical-align: top;
}

.box-weather > .icon {
    color: var(--color-accent);
    font-size: 50px;
}

.box-weather > .main {
    color: var(--color-primary);
}

.box-weather > .main > p {
    color: var(--color-text);
    font-size: 30px;
}

.box-weather > .details {
    font-size: 14px;
    color: var(--color-text-muted);
}

.news > h1 {
    font-size: 20px;
    font-weight: 400;
}

.news > p {
    font-size: 14px;
    color: var(--color-text-muted);
}

.news > p > a {
    color: var(--color-info);
}

/* discord-widget rules live in the DASHBOARD section */


/* ========== FLYPAD ========== */

.flypad-block {
    width: 80vw;
    margin-left: 10vw;
}

.flypad-back {
    font-size: x-large;
    color: var(--color-primary);
    margin-right: 5px;
    transition: color 1s;
}

.flypad-nightmodeblock {
    position: absolute;
    margin-right: 10vw;
    right: 0;
}

@media (max-width: 768px) {
    .flypad-nightmodeblock {
        position: absolute;
        left: 1vw;
        top: 0;
    }
}

.download-loadsheet {
    float: right;
    margin-right: 5px;
}

.flypad-map {
    height: 350px;
}


/* ========== MISC LAYOUT (continued) ========== */

.forum-widget {
    background-color: var(--color-surface);
    position: relative;
}

.forum-bottom {
    position: absolute;
    bottom: 150px;
}

@media (max-width: 768px) {
    .forum-bottom {
        position: relative;
        bottom: auto;
    }
}

.container.md {
    text-align: center;
}

.container.md > cite {
    color: var(--color-text-muted);
}

.container.md > h1 {
    margin-bottom: 0;
}

.container.md > .description {
    margin-top: 20px;
    max-height: 170px;
    overflow-y: auto;
    font-size: 15px;
    text-align: left;
}

/* Hidden-by-filter footer for schedule list and map drawer */
.sf-hidden-footer {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--color-text-muted);
    text-align: center;
    border-top: 1px solid var(--color-border);
    margin-top: 4px;
}
.schedule-drawer-hidden-footer {
    padding: 10px 16px;
    font-size: 12px;
    color: var(--color-text-muted);
    border-top: 1px solid var(--color-border);
    margin-top: 4px;
}


/* ========== MESSENGER (from M001) ========== */
/*
 * Duplicated from comail_show.tpl inline <style>.
 * The inline styles remain in comail_show.tpl for now — S04 will remove
 * the inline duplicate once this file is the canonical source.
 */

.conversation-thread {
    margin-top: 16px;
}

.conversation-msg {
    padding: 10px 14px;
    margin-bottom: 12px;
    border-left: 4px solid #555; /* overlay/neutral — keep as-is */
    background: rgba(255, 255, 255, 0.04);
}

.conversation-msg.sent {
    border-left-color: #e74c3c; /* conversation sent border — keep as-is */
}

.conversation-msg.received {
    border-left-color: #2ecc71; /* conversation received border — keep as-is */
}

.conversation-msg .msg-meta {
    font-size: 0.85em;
    margin-bottom: 6px;
}

.conversation-msg .msg-content {
    margin: 0;
}


/* ========== THEME SWITCHER ========== */

.theme-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--color-background);
    border: 1.5px solid var(--color-text);
    border-radius: 100vw;
    padding: 2px;
    margin-left: 15px;
    flex-shrink: 0;
}

.theme-switcher__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border: none;
    border-radius: 100vw;
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.theme-switcher__btn svg {
    display: block;
    width: 14px;
    height: 14px;
}

.theme-switcher__btn--auto {
    font-size: 9px;
    font-weight: 700;
    font-family: var(--font-sans);
    letter-spacing: 0.02em;
    line-height: 1;
    padding: 0 5px;
}

.theme-switcher__btn[aria-checked="true"] {
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
}

.theme-switcher__btn:hover {
    color: var(--color-text);
}

.theme-switcher__btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Dark mode refinements for theme switcher */
:root[data-theme="dark"] .theme-switcher {
    border: 1px solid rgba(255, 255, 255, 0.35);
}

:root[data-theme="dark"] .theme-switcher__btn {
    color: rgba(255, 255, 255, 0.3);
}

:root[data-theme="dark"] .theme-switcher__btn[aria-checked="true"] {
    background: #2a2a2a;
    color: #ffffff;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .theme-switcher {
        border: 1px solid rgba(255, 255, 255, 0.35);
    }

    :root:not([data-theme]) .theme-switcher__btn {
        color: rgba(255, 255, 255, 0.3);
    }

    :root:not([data-theme]) .theme-switcher__btn[aria-checked="true"] {
        background: #2a2a2a;
        color: #ffffff;
    }
}

/* ========== DASHBOARD ========== */

/*
 * CSS Grid layout for the pilot dashboard (/profile/self).
 * Replaces Bootstrap col-md-* columns with semantic grid cells.
 * Design language mirrors public-web-5.0: cards lift on hover (translateY + shadow-lg),
 * no resting shadow (matches fleet-card / team-card / partner-card pattern),
 * container-wide max-width frames the grid on large viewports.
 * Inspect: DevTools → Elements → .dashboard-grid → Computed tab.
 */

/* Outer wrapper — constrains grid to 1200px like public-web container-wide */
.dashboard-wrapper {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: var(--space-lg);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-md);
}

/* Hero cell — greeting, pilot stats, comail, ops-centre (spans 2 of 3 cols) */
.dash-hero {
    grid-column: 1 / 3;
}

.dash-hero > .container {
    padding: var(--space-md);
}

/* Map cell grid-column, flex layout, and .acarsmap live in the card chrome section below */

/* NOTAMs — formerly the notifications slot (auto-flow, one of the 3 equal cells) */
.dash-notams {
    /* auto-flow — no explicit grid-column needed */
}

/* Three equal-width cells: notifications, tutorials, weather — auto-flow */
/* .dash-notifications, .dash-tutorials, .dash-weather — no explicit column needed */

/* Destination of the month — spans the freed 2 columns (placeholder removed) */
.dash-destination {
    grid-column: 2 / 4;
}

/* ---- Card chrome ---- */
/*
 * Matches public-web-5.0 card pattern (fleet-card, team-card, partner-card):
 * - No resting box-shadow (cards sit flush against the page surface)
 * - On hover: translateY(-4px) lift + shadow-lg (same as public site)
 * - transition-base (200ms ease) for snappy feel
 * - overflow:hidden removed from .dash-card — it clips the lifted shadow and
 *   collapses the border on hover. Each card's inner content handles its own
 *   overflow where needed (e.g. acarsmap, iframe).
 *
 * .dash-notams is excluded from hover lift — it's a full-width informational
 * banner, not an interactive card.
 */
.dash-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background-color: var(--color-background);
    transition: background-color var(--transition-slow),
                color var(--transition-slow);
    /* overflow managed per-child — keeps border-radius visible */
}

.dash-card > .title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    background-color: var(--color-surface);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--color-border);
    border-radius: var(--radius-md) var(--radius-md) 0 0; /* clip top corners */
    transition: background-color var(--transition-slow), color var(--transition-slow);
    box-sizing: border-box;
}

/* Homepage alert — rendered as a card above the grid */
.homepage-alert.dash-card {
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-lg);
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Operations Center alert — same pattern as homepage-alert, shown only when active */
.ops-center-alert.dash-card {
    padding: var(--space-sm) var(--space-md);
    margin-bottom: var(--space-sm);
    font-size: var(--font-size-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    border-color: var(--color-success);
    color: var(--color-text);
}

/* Map card — full-width (formerly notams slot), flex column so acarsmap fills height */
.dash-map {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-md);
    position: relative;
}

.flight-info-panel {
    position: absolute;
    top: 3.5rem;
    right: 1rem;
    background: rgba(0,0,0,0.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #ffffff;
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    z-index: 800;
    max-width: 240px;
    pointer-events: none;
    font-size: 0.82rem;
}

.fip-route { font-weight: 700; margin-bottom: 2px; color: #ffffff; }
.fip-pilot { color: rgba(255,255,255,0.65); margin-bottom: 2px; }
.fip-aircraft { color: rgba(255,255,255,0.65); }
.fip-stats { margin-top: 4px; color: rgba(255,255,255,0.85); }

.acarsmap {
    flex: 1;
    width: 100%;
    min-height: 400px;
}

/* Discord card — flex column so iframe fills card edge-to-edge */
.dash-discord {
    grid-column: 1 / 2;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.discord-widget {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.discord-widget > iframe {
    flex: 1;
    width: 100%;
    min-height: 300px;
    border: 0;
    display: block;
}

/* NOTAMs table — tighten font, remove duplicate td rule */
.notams-table {
    border-collapse: collapse;
    width: 100%;
    text-align: left;
    font-size: var(--font-size-sm);
}

.notams-table tr:nth-child(2n) {
    background-color: var(--color-surface);
}

.notams-table td {
    padding: var(--space-sm) var(--space-md);
    color: var(--color-text-muted);
}

.notams-table a {
    text-decoration: none;
    color: var(--color-primary);
}

.notams-table a:visited {
    color: var(--color-text-muted);
}

/* YouTube / tutorial iframe — CSS-controlled sizing (no inline style needed) */
.dash-tutorials iframe {
    width: 100%;
    height: 300px;
    border: 0;
}

/* ---- Responsive collapse ---- */
@media (max-width: 768px) {
    .dashboard-wrapper {
        padding-inline: var(--space-md);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dash-hero,
    .dash-map,
    .dash-discord,
    .dash-destination {
        grid-column: auto;
    }
}

/* ========== QR MODAL (FlyPad home) ========== */

.qr-link {
    color: var(--color-text-muted);
    font-size: 11px;
    text-decoration: none;
}

.qr-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.qr-modal-box {
    position: relative;
    background: var(--color-surface);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--color-border);
}

.qr-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: var(--color-text-muted);
    font-size: 24px;
    text-decoration: none;
    font-weight: 300;
}

.qr-caption {
    margin-top: 15px;
    color: var(--color-text-muted);
    font-size: 12px;
}

/* ── Logbook / Pirep List Map ───────────────────────────────────────── */
.plmap-container {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 0;
}
.plmap {
    width: 100%;
    min-height: 280px;
}
/* pl-row hover highlight */
#pirepTable tr.pl-row { cursor: default; }
#pirepTable tr.pl-row:hover td { background-color: var(--color-surface); }
/* end Logbook / Pirep List Map */

/* Pirep list filter bar — 5 equal-ish columns (no preset-pill auto column) */
.sf-bar.sf-bar-pireps { grid-template-columns: 1fr 1fr 1fr 1.2fr 1.2fr; }

/* Pirep list — sticky top section + scrollable list below */
.pl-sticky-top {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--color-background);
    padding-bottom: 4px;
}
.pl-scroll-body {
    /* rest of viewport after sticky top */
}
.pl-scroll-body .table-placeholder {
    max-height: calc(100vh - 380px);
    overflow-y: auto;
}
.pl-scroll-body .table-placeholder thead th {
    position: sticky;
    top: 0;
    background: var(--color-background);
    z-index: 10;
}

/* Pirep list map height — CSS controlled */
.plmap {
    height: 38vh;
    min-height: 220px;
}

/* ========== FLEET PAGE — card grid, modals, gallery ========== */
/* Milestone M031 / Slice S01 / Task T02 */

/* Section heading (Short-Haul Fleet, Long-Haul Fleet, Other) */
.fleet-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 2rem 0 var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 2px solid var(--color-primary);
}

/* Card grid — 3 columns desktop */
.fleet-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

@media (max-width: 900px) {
    .fleet-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
    .fleet-grid { grid-template-columns: 1fr; }
}

/* Aircraft card */
.fleet-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: box-shadow 0.18s, border-color 0.18s;
    outline: none;
}

.fleet-card:hover,
.fleet-card:focus-visible {
    box-shadow: 0 4px 16px rgba(0,0,0,0.14);
    border-color: var(--color-primary);
}

/* Hero image container — 16:9 aspect ratio */
.fleet-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--color-surface);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fleet-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.fleet-card-image .fleet-card-icon {
    object-fit: contain;
    padding: var(--space-sm);
}

/* Icon fallback placeholder */
.fleet-card-icon-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
}

.fleet-card-icon-font {
    font-family: var(--font-piktos);
    font-size: 64px;
    line-height: 1;
    color: var(--color-text-muted);
    opacity: 0.45;
}
.fleet-card-icon-glyph {
    font-size: 64px;
    color: var(--color-text-muted);
    opacity: 0.45;
}

/* Card body */
.fleet-card-body {
    padding: var(--space-md) var(--space-sm) var(--space-sm);
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: var(--space-xs);
}

.fleet-card-icao {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    text-transform: uppercase;
}

.fleet-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin: 0;
}

.fleet-card-excerpt {
    font-size: 0.83rem;
    color: var(--color-text-muted);
    line-height: 1.45;
    flex: 1;
    margin: 0;
}

.fleet-card-btn {
    margin-top: var(--space-sm);
    align-self: flex-start;
}

/* ===== Fleet modal ===== */
.fleet-modal {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 28px 32px 32px;
    max-width: 760px;
    width: 92vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,0.22);
}

.fleet-modal::backdrop {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
}

.fleet-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    color: var(--color-text);
    padding: 0;
    z-index: 1;
}

.fleet-modal-close:hover {
    color: var(--color-primary);
}

/* Modal hero image */
.fleet-modal-header {
    margin-bottom: var(--space-md);
}

.fleet-modal-hero {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: var(--space-sm);
    display: block;
}

.fleet-modal-title-group {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.fleet-modal-icao {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    text-transform: uppercase;
}

.fleet-modal-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}

.fleet-modal-subtitle {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text);
    margin: var(--space-md) 0 var(--space-xs);
    padding-bottom: 4px;
    border-bottom: 1px solid var(--color-border);
}

.fleet-modal-description {
    font-size: 0.92rem;
    color: var(--color-text);
    line-height: 1.6;
    margin: 0 0 var(--space-sm);
}

/* Specs table */
.fleet-specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.87rem;
    margin-bottom: var(--space-sm);
}

.fleet-specs-table tr:nth-child(odd) {
    background: rgba(0,0,0,0.03);
}

.fleet-specs-table th,
.fleet-specs-table td {
    padding: 6px 10px;
    text-align: left;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
}

.fleet-specs-table th {
    font-weight: 600;
    width: 42%;
    color: var(--color-text-muted);
}

/* Seatmap */
.fleet-modal-seatmap {
    margin-bottom: var(--space-md);
    text-align: center;
}

.fleet-modal-seatmap img {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 6px;
    border: 1px solid var(--color-border);
}

/* Gallery grid */
.fleet-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.fleet-gallery-item {
    margin: 0;
    border-radius: 6px;
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}

.fleet-gallery-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.fleet-gallery-item figcaption {
    font-size: 0.77rem;
    color: var(--color-text-muted);
    padding: 4px 8px;
    text-align: center;
}

/* Gallery submission form */
.fleet-gallery-submit {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: var(--space-md);
    margin-top: var(--space-md);
}

.fleet-gallery-submit-note {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0 0 var(--space-sm);
}

.fleet-gallery-form-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: var(--space-sm);
}

.fleet-gallery-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
}

.fleet-gallery-file {
    font-size: 0.85rem;
}

.fleet-gallery-caption {
    font-size: 0.9rem;
}

.fleet-gallery-submit-btn {
    margin-top: var(--space-xs);
}

/* ===== Dark mode overrides ===== */
[data-theme="dark"] .fleet-card {
    background: var(--color-surface);
    border-color: var(--color-border);
}

[data-theme="dark"] .fleet-card:hover,
[data-theme="dark"] .fleet-card:focus-visible {
    border-color: var(--color-primary);
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

[data-theme="dark"] .fleet-card-icon-placeholder {
    background: var(--color-surface);
}

[data-theme="dark"] .fleet-modal {
    background: var(--color-surface);
    border-color: var(--color-border);
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

[data-theme="dark"] .fleet-specs-table tr:nth-child(odd) {
    background: rgba(255,255,255,0.04);
}

[data-theme="dark"] .fleet-specs-table th,
[data-theme="dark"] .fleet-specs-table td {
    border-color: var(--color-border);
}

[data-theme="dark"] .fleet-gallery-submit {
    background: var(--color-surface);
    border-color: var(--color-border);
}

[data-theme="dark"] .fleet-gallery-item {
    background: var(--color-surface);
    border-color: var(--color-border);
}

[data-theme="dark"] .fleet-modal-seatmap img {
    border-color: var(--color-border);
}

[data-theme="dark"] .fleet-section-title {
    border-color: var(--color-primary);
}

/* ================================================================
   LUFTHANSA GROUP LOGO — dark mode inversion
   The PNG is deep-blue on white; invert in dark mode so it reads
   as a light logo on the dark card background.
   ================================================================ */
[data-theme="dark"] .lhg-logo-img {
    filter: invert(1) hue-rotate(180deg);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .lhg-logo-img {
        filter: invert(1) hue-rotate(180deg);
    }
}

/* ========== BUG REPORT WIDGET ========== */

.bugreport-widget {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
}

.bugreport-widget--open {
    display: block;
}

.bugreport-widget__backdrop {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.bugreport-widget__panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 100vw;
    background-color: var(--color-background);
    border-left: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    /* Clear the fixed site-header: ~72px on mobile, ~115px on tablet+ */
    padding-top: 72px;
}

.bugreport-widget__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.bugreport-widget__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.bugreport-widget__close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s, background-color 0.15s;
}

.bugreport-widget__close:hover {
    color: var(--color-text);
    background-color: var(--color-surface);
}

.bugreport-widget__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bugreport-widget__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bugreport-widget__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text);
}

.bugreport-widget__required {
    color: var(--color-primary);
}

.bugreport-widget__input,
.bugreport-widget__textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background-color: var(--color-surface);
    color: var(--color-text);
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.bugreport-widget__input:focus,
.bugreport-widget__textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.bugreport-widget__input[readonly] {
    color: var(--color-text-muted);
    cursor: default;
}

.bugreport-widget__textarea {
    resize: vertical;
    min-height: 90px;
}

.bugreport-widget__screenshot-area {
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background-color: var(--color-surface);
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.bugreport-widget__screenshot-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    color: var(--color-text-muted);
    font-size: 13px;
}

.bugreport-widget__screenshot-preview {
    width: 100%;
    display: block;
    border-radius: 3px;
}

.bugreport-widget__screenshot-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.bugreport-widget__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
}

.bugreport-widget__btn-primary {
    padding: 8px 18px;
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s;
}

.bugreport-widget__btn-primary:hover:not(:disabled) {
    background-color: var(--color-primary-hover);
}

.bugreport-widget__btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.bugreport-widget__btn-secondary {
    padding: 8px 14px;
    background-color: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s;
}

.bugreport-widget__btn-secondary:hover {
    background-color: var(--color-border);
    border-color: var(--color-text-muted);
}

.utility-bar__bug-report {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-align: left;
}
.utility-bar__sim-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
}

@media (min-width: 768px) {
    .bugreport-widget__panel {
        padding-top: 115px;
    }
}

@media (max-width: 480px) {
    .bugreport-widget__panel {
        width: 100vw;
        border-left: none;
        border-top: 1px solid var(--color-border);
        top: auto;
        padding-top: 72px;
    }
}


/* ========== FORUM / COMMUNITY ========== */

.category {
    color: var(--color-text-muted);
}

/* ─── Dashboard polish — Discord header online, text links ───────── */
.dv2-discord-online-header {
    margin-left: auto;
    display: flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: #43b581;
    text-transform: none;
    letter-spacing: 0;
}
.dv2-discord-open-link {
    display: inline-block;
    font-size: 0.78rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}
.dv2-discord-open-link:hover { text-decoration: underline; }

.dv2-destination-link {
    display: inline-block;
    font-size: 0.78rem;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}
.dv2-destination-link:hover { text-decoration: underline; }

/* ─── Discord activity — fill column, clip overflow ──────────────── */
.dv2-row1-discord {
    display: flex;
    flex-direction: column;
}
.dv2-discord-card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.dv2-discord-activity {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.dv2-discord-messages {
    max-height: 100%;
    overflow: hidden;
}
.dir-member-badge { display: inline-block; padding: 1px 7px; font-size: 10px; font-weight: 600; line-height: 16px; border-radius: 8px; background-color: var(--color-accent, #c00); color: #fff; vertical-align: middle; letter-spacing: 0.03em; }
