﻿/* ─────────────────────────────────────────────────────────────────────────────
   atlasLayout — scoped styles
   Uses CSS custom properties so light/dark is driven entirely by
   [data-bs-theme] on <html>, no JS class toggling needed.
───────────────────────────────────────────────────────────────────────────── */

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root,
[data-bs-theme="light"] {
    /* ── Layout chrome ──────────────────────────── */
    --atlas-topbar-bg: #1f4e79;
    --atlas-topbar-fg: #f0f4ff;
    --atlas-topbar-border: #183d61;
    --atlas-nav-hover-bg: rgba(255,255,255,0.12);
    --atlas-nav-active-bg: rgba(255,255,255,0.2);
    --atlas-nav-active-fw: 600;
    --atlas-main-bg: #f4f6fb;
    --atlas-main-fg: #1a2333;
    --atlas-footer-bg: #e8ecf4;
    --atlas-footer-fg: #6b7a99;
    --atlas-shadow: 0 2px 12px rgba(30,58,95,0.10);
    --atlas-topbar-h: 60px;
    --atlas-modal-header-bg: var(--atlas-topbar-bg); 
    --atlas-modal-header-fg: var(--atlas-topbar-fg);
    /* ── Input controls ─────────────────────────── */
    --atlas-input-bg: #ffffff;
    --atlas-input-bg-disabled: #eef0f4;
    --atlas-input-text: #1f2937;
    --atlas-input-border: #9aa1ac;
    --atlas-input-placeholder: #9ca3af;
    /* ── Brand ──────────────────────────────────── */
    --atlas-color-brand: #c62828;
    --atlas-color-brand-hover: #a91f1f;
    --atlas-color-blue: #1f4e79;
    --atlas-color-blue-light: #4a90d9;
    /* ── Surface & border ───────────────────────── */
    --atlas-color-surface: #ffffff;
    --atlas-color-surface-alt: #f8f9fb;
    --atlas-color-border: #e6e9ef;
    --atlas-color-border-strong: #d4d8e0;
    /* ── Text ───────────────────────────────────── */
    --atlas-color-text: #1f2937;
    --atlas-color-text-muted: #6b7280;
    --atlas-color-text-subtle: #9ca3af;
    /* ── Semantic status ────────────────────────── */
    --atlas-color-success: #198754;
    --atlas-color-success-bg: #d1f2e1;
    --atlas-color-warning: #f59e0b;
    --atlas-color-warning-bg: #fef3c7;
    --atlas-color-danger: #dc3545;
    --atlas-color-danger-bg: #fde2e4;
    --atlas-color-info: #0dcaf0;
    --atlas-color-info-bg: #cff4fc;
    /* ── Typography ─────────────────────────────── */
    --atlas-font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    --atlas-font-mono: "Cascadia Code", "Consolas", "Fira Code", monospace;
    --atlas-text-xs: 0.6875rem; /* 11px — labels, badges        */
    --atlas-text-sm: 0.75rem; /* 12px — secondary body        */
    --atlas-text-base: 0.875rem; /* 14px — primary body          */
    --atlas-text-md: 1rem; /* 16px — comfortable reading   */
    --atlas-text-lg: 1.125rem; /* 18px — subheadings           */
    --atlas-text-xl: 1.25rem; /* 20px — section headings      */
    --atlas-text-2xl: 1.5rem; /* 24px — page headings         */
    --atlas-text-3xl: 1.875rem; /* 30px — hero / display        */

    --atlas-fw-regular: 400;
    --atlas-fw-medium: 500;
    --atlas-fw-semibold: 600;
    --atlas-fw-bold: 700;
    --atlas-fw-extrabold: 800;
    --atlas-lh-tight: 1.2;
    --atlas-lh-snug: 1.35;
    --atlas-lh-normal: 1.5;
    --atlas-lh-relaxed: 1.65;
    --atlas-ls-tight: -0.02em;
    --atlas-ls-normal: 0;
    --atlas-ls-wide: 0.04em;
    --atlas-ls-wider: 0.08em;
    --atlas-ls-widest: 0.12em;
    /* ── Spacing (4pt scale) ────────────────────── */
    --atlas-space-1: 0.25rem; /*  4px */
    --atlas-space-2: 0.5rem; /*  8px */
    --atlas-space-3: 0.75rem; /* 12px */
    --atlas-space-4: 1rem; /* 16px */
    --atlas-space-5: 1.25rem; /* 20px */
    --atlas-space-6: 1.5rem; /* 24px */
    --atlas-space-8: 2rem; /* 32px */
    --atlas-space-10: 2.5rem; /* 40px */
    --atlas-space-12: 3rem; /* 48px */
    --atlas-space-16: 4rem; /* 64px */
    /* ── Border radius ──────────────────────────── */
    --atlas-radius-sm: 4px;
    --atlas-radius-md: 8px;
    --atlas-radius-lg: 12px;
    --atlas-radius-xl: 16px;
    --atlas-radius-2xl: 24px;
    --atlas-radius-pill: 999px;
    /* ── Elevation ──────────────────────────────── */
    --atlas-shadow-xs: 0 1px 2px rgba(15,23,42,0.04);
    --atlas-shadow-sm: 0 2px 6px rgba(15,23,42,0.07);
    --atlas-shadow-md: 0 4px 14px rgba(15,23,42,0.09);
    --atlas-shadow-lg: 0 12px 30px rgba(15,23,42,0.13);
    --atlas-shadow-xl: 0 24px 48px rgba(15,23,42,0.18);
    /* ── Motion ─────────────────────────────────── */
    --atlas-duration-fast: 100ms;
    --atlas-duration-base: 200ms;
    --atlas-duration-slow: 350ms;
    --atlas-ease-default: cubic-bezier(0.4, 0, 0.2, 1);
    --atlas-ease-in: cubic-bezier(0.4, 0, 1, 1);
    --atlas-ease-out: cubic-bezier(0, 0, 0.2, 1);
    /* ── Z-index stack ──────────────────────────── */
    --atlas-z-base: 1;
    --atlas-z-raised: 10;
    --atlas-z-dropdown: 1000;
    --atlas-z-sticky: 1020;
    --atlas-z-overlay: 1040;
    --atlas-z-modal: 1060;
    --atlas-z-toast: 1080;
    --atlas-z-tooltip: 1090;
}

[data-bs-theme="dark"] {
    /* Only override what changes in dark mode —
       typography, spacing, radius, motion and z-index stay the same */
    --atlas-topbar-bg: #1e2433;
    --atlas-topbar-fg: #c8d6f0;
    --atlas-topbar-border: #1e2433;
    --atlas-nav-hover-bg: rgba(255,255,255,0.08);
    --atlas-nav-active-bg: rgba(255,255,255,0.15);
    --atlas-main-bg: #111827;
    --atlas-main-fg: #e2e8f0;
    --atlas-footer-bg: #0d1526;
    --atlas-footer-fg: #4a5878;
    --atlas-shadow: 0 2px 12px rgba(0,0,0,0.35);
    --atlas-color-surface: #1e2433;
    --atlas-color-surface-alt: #252f42;
    --atlas-color-border: #2d3748;
    --atlas-color-border-strong: #3d4f6b;
    --atlas-color-text: #e2e8f0;
    --atlas-color-text-muted: #94a3b8;
    --atlas-color-text-subtle: #64748b;
    --atlas-shadow-xs: 0 1px 2px rgba(0,0,0,0.20);
    --atlas-shadow-sm: 0 2px 6px rgba(0,0,0,0.28);
    --atlas-shadow-md: 0 4px 14px rgba(0,0,0,0.35);
    --atlas-shadow-lg: 0 12px 30px rgba(0,0,0,0.45);
    --atlas-shadow-xl: 0 24px 48px rgba(0,0,0,0.55);
    /* ── Modal header ───────────────────────────── */
    --atlas-modal-header-bg: var(--atlas-color-surface-alt);
    --atlas-modal-header-fg: var(--atlas-color-text);
    /* ── Input controls ─────────────────────────── */
    --atlas-input-bg: #1e1f27;
    --atlas-input-bg-disabled: #17202e;
    --atlas-input-text: #e2e8f0;
    --atlas-input-border: #5a6f92;
    --atlas-input-placeholder: var(--atlas-input-text);
}

/* ── Shell ───────────────────────────────────────────────────────────────── */
.atlas-shell {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    width: 100%;
    background: var(--atlas-main-bg);
    color: var(--atlas-main-fg);
    transition: background 0.2s ease, color 0.2s ease;
}

/*Detail Panel*/
.detail-panel {
    background: var(--bs-body-bg);
    border: 1px solid var(--atlas-color-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.detail-panel-header {
    display: flex;
    align-items: center;
    padding-left: .75rem;
    padding-right: .75rem;
    min-height: 1.8rem;
    background: var(--atlas-topbar-bg);
    color: var(--atlas-topbar-fg);
    border-bottom: none;
    font-size: var(--ds-font-size-md)
}

.form-panel .detail-panel-header h4 {
    font-size: var(--ds-font-size-sm);
    color: var(--atlas-topbar-fg);
}

.form-panel .detail-panel-header i {
    font-size: var(--ds-font-size-sm);
    color: var(--atlas-topbar-fg);
}



/* 
    FORM CONTROLS — Unified
   Single source of truth for every <input>, <select>, <textarea> in the app.
   Covers .field-group · .filter-group · .atlas-input class · .page-size-group
   --atlas-input-* tokens flip automatically between light and dark mode.
*/

/* ── Base: colors & box model ────────────────────────────────────────────── */
.field-group select,
.field-group input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.field-group textarea,
.filter-group select,
.filter-group input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.filter-group textarea,
.filter-group .multiselect-trigger,
input.atlas-input,
select.atlas-input,
textarea.atlas-input {
    background: var(--atlas-input-bg);
    color: var(--atlas-input-text);
    border: 1px solid var(--atlas-input-border);
    border-radius: 6px;
    padding: 0.45rem 0.65rem;
    font-size: 0.75rem;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    min-height: 2.125rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* ── Bootstrap form controls (.form-control / .form-select) ─────────────────
   Darker border to match the atlas-input tokens above, applied globally. */
.form-control,
.form-select {
    border-color: var(--atlas-input-border) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--atlas-color-blue-light) !important;
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

/* ── Custom chevron + right padding for selects ──────────────────────────── */
.field-group select,
.filter-group select,
.filter-group .multiselect-trigger,
select.atlas-input {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8.825a.5.5 0 0 1-.354-.146l-3.5-3.5a.5.5 0 1 1 .708-.708L6 7.618l3.146-3.147a.5.5 0 1 1 .708.708l-3.5 3.5A.5.5 0 0 1 6 8.825z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    padding-right: 2rem;
}

/* ── Placeholder ─────────────────────────────────────────────────────────── */
.field-group input::placeholder,
.field-group textarea::placeholder,
.filter-group input::placeholder,
.filter-group textarea::placeholder,
input.atlas-input::placeholder,
textarea.atlas-input::placeholder {
    color: var(--atlas-input-placeholder);
    opacity: 1;
}

/* ── Focus ring ──────────────────────────────────────────────────────────── */
.field-group select:focus,
.field-group input:focus,
.field-group textarea:focus,
.filter-group select:focus,
.filter-group input:focus,
.filter-group textarea:focus,
.filter-group .multiselect-trigger:focus,
input.atlas-input:focus,
select.atlas-input:focus,
textarea.atlas-input:focus {
    outline: none;
    border-color: var(--atlas-color-blue-light);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

/* ── Disabled ────────────────────────────────────────────────────────────── */
.field-group select:disabled,
.field-group input:disabled,
.field-group textarea:disabled,
.filter-group select:disabled,
.filter-group input:disabled,
.filter-group textarea:disabled,
input.atlas-input:disabled,
select.atlas-input:disabled,
textarea.atlas-input:disabled {
    background: var(--atlas-input-bg-disabled);
    color: var(--atlas-color-text-muted);
    cursor: not-allowed;
    opacity: 0.65;
}

/* ── Read-only ───────────────────────────────────────────────────────────── */
.field-group input[readonly],
.field-group textarea[readonly],
.filter-group input[readonly],
.filter-group textarea[readonly],
input.atlas-input[readonly],
textarea.atlas-input[readonly] {
    background: var(--atlas-input-bg-disabled);
    color: var(--atlas-color-text-muted);
    cursor: default;
}

/* ── Textarea ────────────────────────────────────────────────────────────── */
.field-group textarea,
.filter-group textarea,
textarea.atlas-input {
    resize: vertical;
    min-height: 5rem;
    min-height: revert; /* let individual fields override min-height */
}

/* ── Labels ──────────────────────────────────────────────────────────────── */
.field-group label,
.filter-group label {
    color: var(--atlas-color-text-muted);
}

/* ── Date picker color-scheme ────────────────────────────────────────────── */
.field-group input[type="date"],
.filter-group input[type="date"],
.form-grid-responsive input[type="date"],
input.atlas-input[type="date"] {
    color-scheme: light;
}

/* ── Page-size select — same token colors, no full-width ─────────────────── */
.page-size-group select {
    -webkit-appearance: none;
    appearance: none;
    background: var(--atlas-input-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8.825a.5.5 0 0 1-.354-.146l-3.5-3.5a.5.5 0 1 1 .708-.708L6 7.618l3.146-3.147a.5.5 0 1 1 .708.708l-3.5 3.5A.5.5 0 0 1 6 8.825z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    padding-right: 1.75rem;
    color: var(--atlas-input-text);
    border-color: var(--atlas-input-border);
}

    .page-size-group select:focus {
        outline: none;
        border-color: var(--atlas-color-blue-light);
        box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
    }

/* ── Multiselect dropdown panel ──────────────────────────────────────────── */
.multiselect-dropdown {
    background: var(--atlas-input-bg);
    border-color: var(--atlas-input-border);
}

.multiselect-dropdown-item:hover {
    background: var(--atlas-color-surface-alt);
}

/* ── form-input-static — read-only display field ─────────────────────────── */
div.form-input-static {
    background: var(--atlas-input-bg-disabled);
    color: var(--atlas-color-text-muted);
}

/* ── ds-label utility ────────────────────────────────────────────────────── */
.ds-label {
    color: var(--atlas-color-text);
}

.ds-label--muted {
    color: var(--atlas-color-text-muted);
}


/* DARK MODE OVERRIDES
   Bootstrap resets many input styles under [data-bs-theme=dark].
   Re-anchor every control to --atlas-input-* so the tokens win.
*/
/* ── Controls ────────────────────────────────────────────────────────────── */
[data-bs-theme="dark"] .field-group select,
[data-bs-theme="dark"] .field-group input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
[data-bs-theme="dark"] .field-group textarea,
[data-bs-theme="dark"] .filter-group select,
[data-bs-theme="dark"] .filter-group input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
[data-bs-theme="dark"] .filter-group textarea,
[data-bs-theme="dark"] .filter-group .multiselect-trigger,
[data-bs-theme="dark"] .page-size-group select,
[data-bs-theme="dark"] input.atlas-input,
[data-bs-theme="dark"] select.atlas-input,
[data-bs-theme="dark"] textarea.atlas-input {
    background-color: var(--atlas-input-bg);
    color: var(--atlas-input-text);
    border-color: var(--atlas-input-border);
}

/* ── Chevron swap — one place, light SVG on dark bg ─────────────────────── */
[data-bs-theme="dark"] .field-group select,
[data-bs-theme="dark"] .filter-group select,
[data-bs-theme="dark"] .filter-group .multiselect-trigger,
[data-bs-theme="dark"] .page-size-group select,
[data-bs-theme="dark"] select.atlas-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0aec0' d='M6 8.825a.5.5 0 0 1-.354-.146l-3.5-3.5a.5.5 0 1 1 .708-.708L6 7.618l3.146-3.147a.5.5 0 1 1 .708.708l-3.5 3.5A.5.5 0 0 1 6 8.825z'/%3E%3C/svg%3E");
}

/* ── Date picker color-scheme ────────────────────────────────────────────── */
[data-bs-theme="dark"] .field-group input[type="date"],
[data-bs-theme="dark"] .filter-group input[type="date"],
[data-bs-theme="dark"] .form-grid-responsive input[type="date"],
[data-bs-theme="dark"] input.atlas-input[type="date"] {
    color-scheme: dark;
}

/* ── Disabled controls ───────────────────────────────────────────────────── */
[data-bs-theme="dark"] .field-group select:disabled,
[data-bs-theme="dark"] .field-group input:disabled,
[data-bs-theme="dark"] .field-group textarea:disabled,
[data-bs-theme="dark"] .filter-group select:disabled,
[data-bs-theme="dark"] .filter-group input:disabled,
[data-bs-theme="dark"] .filter-group textarea:disabled,
[data-bs-theme="dark"] input.atlas-input:disabled,
[data-bs-theme="dark"] select.atlas-input:disabled,
[data-bs-theme="dark"] textarea.atlas-input:disabled {
    background: var(--atlas-input-bg-disabled);
    color: var(--atlas-color-text-muted);
}

/* ── Multiselect dropdown ────────────────────────────────────────────────── */
[data-bs-theme="dark"] .multiselect-dropdown {
    background: var(--atlas-input-bg);
    border-color: var(--atlas-input-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .multiselect-dropdown-actions {
    border-bottom-color: var(--atlas-color-border);
}

[data-bs-theme="dark"] .multiselect-dropdown-item:hover {
    background: var(--atlas-color-surface-alt);
}

/* ── Misc utilities ──────────────────────────────────────────────────────── */
[data-bs-theme="dark"] .btn-outline-secondary:disabled,
[data-bs-theme="dark"] .btn-outline-secondary[disabled] {
    background-color: var(--atlas-input-bg-disabled) !important;
    color: var(--atlas-color-text-muted) !important;
    border-color: var(--atlas-color-border) !important;
}

/*[data-bs-theme="dark"] .form-panel .detail-panel-header:not(.detail-panel-gradient-blue) i {
    color: var(--atlas-color-blue-light);
}*/

[data-bs-theme="dark"] .detail-field label {
    color: var(--atlas-color-text-muted);
}

[data-bs-theme="dark"] div.form-input-static {
    background: var(--atlas-input-bg-disabled);
    color: var(--atlas-color-text-muted);
}

[data-bs-theme="dark"] .ds-label {
    color: var(--atlas-color-text);
}

[data-bs-theme="dark"] .ds-label--muted {
    color: var(--atlas-color-text-muted);
}





/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════════════════════════════════ */

/* ── Full-screen wrapper ──────────────────────────────────────────────────── */
.login-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: calc(2rem + env(safe-area-inset-top)) calc(1rem + env(safe-area-inset-right)) calc(2rem + env(safe-area-inset-bottom)) calc(1rem + env(safe-area-inset-left));
    /*
     * Light spotlight effect:
     * Near-white at the centre (where the card lives) bleeding out to a
     * calm, muted blue-gray at the edges — the card appears to glow.
     */
    background-color: #d8e0ef;
    background-image: radial-gradient( ellipse 72% 68% at 50% 46%, #f5f8ff 0%, #e6ecf8 45%, #d8e0ef 100% );
    position: relative;
}

@media (max-width: 576px) {
    .login-wrapper {
        padding-top: calc(1rem + env(safe-area-inset-top));
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }
}

/* ── Card ─────────────────────────────────────────────────────────────────── */
.login-card {
    width: 100%;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    /*
     * Four shadow layers:
     *  1. Crisp edge ring — separates card from background
     *  2. Close soft shadow — lift / depth
     *  3. Mid ambient shadow — body
     *  4. Outer spread glow — the "glow" the user asked for
     */
    box-shadow: 0 0 0 1px rgba(31, 78, 121, 0.10), 0 4px 12px rgba(31, 78, 121, 0.10), 0 20px 48px rgba(31, 78, 121, 0.16), 0 0 90px 18px rgba(63, 106, 166, 0.12);
}

/* ── System Maintenance Banner ────────────────────────────────────────────── */
.login-maintenance-banner {
    background: linear-gradient(135deg, #f59e42 0%, #e67e22 100%);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-bottom: 1px solid rgba(0,0,0,0.08);
    animation: maintenanceFadeIn 0.5s ease-out;
}

.maintenance-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.2);
    border-radius: var(--atlas-radius-md);
    color: #fff;
    font-size: 1.25rem;
}

.maintenance-content {
    flex: 1;
    min-width: 0;
}

.maintenance-title {
    margin: 0 0 0.35rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.maintenance-message {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.95);
    font-weight: 400;
}

@keyframes maintenanceFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustment for maintenance banner */
@media (max-width: 576px) {
    .login-maintenance-banner {
        padding: 1rem;
        gap: 0.75rem;
    }

    .maintenance-icon {
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
    }

    .maintenance-title {
        font-size: 0.875rem;
    }

    .maintenance-message {
        font-size: 0.75rem;
    }
}

/* ── Brand header ─────────────────────────────────────────────────────────── */
.login-brand {
    background: linear-gradient(135deg, #3f6aa6 0%, #2a4e8c 100%);
    padding: 3rem 2rem;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

@media (max-width: 576px) {
    .login-brand {
        padding: 2rem 1.5rem;
    }
}

/* Subtle overlay pattern for depth */
.login-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.login-brand-mark {
    position: relative;
    z-index: 1;
    margin: 0 auto 1.5rem;
    animation: brandFadeIn 0.6s ease-out;
}

.login-brand-content {
    position: relative;
    z-index: 1;
    animation: brandFadeIn 0.8s ease-out 0.1s backwards;
}

.login-brand-name {
    font-size: 1.875rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.login-brand-sub {
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.8);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

@keyframes brandFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Form section ─────────────────────────────────────────────────────────── */
.login-form-section {
    padding: 2rem;
}

@media (max-width: 576px) {
    .login-form-section {
        padding: 1.5rem 1.25rem;
    }
}

/* ── Fields ───────────────────────────────────────────────────────────────── */
.login-field {
    margin-bottom: 1.25rem;
}

.login-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.375rem;
    letter-spacing: 0.15px;
}

.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    left: 0.875rem;
    color: #9ca3af;
    font-size: 0.9375rem;
    pointer-events: none;
    z-index: 1;
}

.login-input {
    width: 100%;
    height: 50px;
    padding: 0 1rem 0 2.5rem;
    border: 1.5px solid #d1d9e0;
    border-radius: 9px;
    /* 16px prevents iOS Safari from auto-zooming the page on input focus */
    font-size: 16px;
    color: #1a2332;
    background: #f8fafc;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.login-input--password {
    padding-right: 2.75rem;
}

.login-input:focus {
    border-color: #3f6aa6;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(63,106,166,0.14);
}

.login-input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.login-input::placeholder {
    color: #b0bec5;
}

/* ── Password eye toggle ──────────────────────────────────────────────────── */
.login-eye-btn {
    position: absolute;
    right: 0.25rem;
    background: none;
    border: none;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
    font-size: 0.9375rem;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

    .login-eye-btn:hover {
        color: #3f6aa6;
        background: rgba(63,106,166,0.08);
    }

/* ── Error alert ──────────────────────────────────────────────────────────── */
.login-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: #fff1f0;
    border: 1px solid #fecaca;
    border-left: 3px solid #ef4444;
    border-radius: 8px;
    color: #b91c1c;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    animation: login-fadeIn 0.2s ease;
}

/* ── Sign-in button ───────────────────────────────────────────────────────── */
.login-btn {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #3f6aa6 0%, #2a4e8c 100%);
    color: #fff;
    border: none;
    border-radius: 9px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: opacity 0.15s, transform 0.12s, box-shadow 0.15s;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 14px rgba(42,78,140,0.30);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

    .login-btn:hover:not(:disabled) {
        opacity: 0.92;
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(42,78,140,0.40);
    }

    .login-btn:active:not(:disabled) {
        transform: translateY(0);
    }

    .login-btn:disabled {
        opacity: 0.65;
        cursor: not-allowed;
        box-shadow: none;
    }

/* ── Loading spinner ──────────────────────────────────────────────────────── */
.login-spinner {
    width: 17px;
    height: 17px;
    border: 2.5px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: login-spin 0.6s linear infinite;
    flex-shrink: 0;
}

/* ── Page footer — dark text for light background ─────────────────────────── */
.login-page-footer {
    margin-top: 1.75rem;
    color: rgba(31,78,121,0.40);
    font-size: 0.8125rem;
    position: relative;
    z-index: 1;
}

/* ── Animations ───────────────────────────────────────────────────────────── */
@keyframes login-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes login-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ═══════════════════════════════════════════
   LOGIN PAGE — split enterprise layout
═══════════════════════════════════════════ */

.login-wrapper--split {
    background-color: #0f2745;
    background-image: radial-gradient(ellipse 80% 60% at 50% 0%, #17335a 0%, #0f2745 60%, #0a1c33 100%);
    padding: 2rem 1rem;
}

.login-shell {
    width: 100%;
    max-width: 1040px;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.15), 0 30px 80px rgba(0,0,0,0.45);
    min-height: 640px;
}

@media (max-width: 640px) {
    .login-shell {
        grid-template-columns: 1fr;
        min-height: 0;
        max-width: 460px;
    }
}

/* ── Hero / marketing panel ───────────────────────── */
.login-hero {
    position: relative;
    color: #fff;
    padding: 2.5rem 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 640px;
}

.login-hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('/images/login-hero.jpg');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.login-hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11,31,58,0.55) 0%, rgba(10,27,51,0.78) 45%, rgba(7,20,40,0.95) 100%),
                linear-gradient(100deg, rgba(15,39,69,0.65) 0%, rgba(60,130,200,0.18) 55%);
    z-index: 1;
}

.login-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

.login-hero-top {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.login-hero-logo {
    height: 34px;
    width: 34px;
    object-fit: contain;
    border-radius: 8px;
}

.login-hero-brand-name {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.login-hero-middle {
/*    margin-top: 3.5rem;
    flex: 1;*/
}

.login-hero-headline {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 1rem;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.login-hero-sub {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.88);
    max-width: 34rem;
    margin: 0 0 1.5rem;
}

.login-hero-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

    .login-hero-features li {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        font-size: 0.875rem;
        color: rgba(255,255,255,0.92);
    }

    .login-hero-features i {
        color: #7ec8f2;
        font-size: 1rem;
        flex-shrink: 0;
    }

.login-hero-integration {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 10px;
}

    .login-hero-integration i {
        color: #7ec8f2;
        font-size: 1.25rem;
        flex-shrink: 0;
        margin-top: 0.1rem;
    }

    .login-hero-integration-content {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
    }

    .login-hero-integration-brand {
        font-size: 0.75rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        color: #7ec8f2;
        text-transform: uppercase;
    }

    .login-hero-integration-title {
        font-size: 0.9375rem;
        font-weight: 700;
        color: #fff;
    }

    .login-hero-integration-text {
        font-size: 0.8125rem;
        line-height: 1.55;
        color: rgba(255,255,255,0.88);
    }

    .login-hero-integration a {
        display: inline-block;
        margin-top: 0.35rem;
        color: #7ec8f2;
        font-weight: 600;
        text-decoration: none;
    }

        .login-hero-integration a:hover {
            text-decoration: underline;
        }

.login-hero-bottom {
    margin-top: 2rem;
}

.login-hero-stats {
    display: flex;
    gap: 1.75rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.18);
}

.login-hero-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.login-hero-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.login-hero-stat-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.72);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-hero-about {
    font-size: 0.8125rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.78);
    margin: 0;
    max-width: 34rem;
    padding-top:.5rem;
}

    .login-hero-about strong {
        color: #fff;
    }

.login-hero-about-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.9rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 8px;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    background: rgba(255,255,255,0.06);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

    .login-hero-about-btn:hover {
        background: rgba(255,255,255,0.14);
        border-color: rgba(255,255,255,0.55);
        color: #fff;
        transform: translateY(-1px);
    }

    .login-hero-about-btn i {
        font-size: 0.9375rem;
    }

@media (max-width: 640px) {
    .login-hero {
        display: none;
    }
}

/* Extra breathing room on very small phones for the form panel */
@media (max-width: 400px) {
    .login-card--split {
        padding: 1.75rem 1.25rem;
    }
}

/* ── Standalone card (Forgot/Reset Password) — matches login-card--split visuals, no hero panel ── */
.login-card--standalone {
    max-width: 440px;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2.5rem 3rem;
}

    .login-card--standalone .login-form-header,
    .login-card--standalone .login-form-section {
        width: 100%;
        max-width: 360px;
    }

@media (max-width: 576px) {
    .login-card--standalone {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 400px) {
    .login-card--standalone {
        padding: 1.75rem 1.25rem;
    }
}

/* ── Login form panel (split layout) ───────────────────────── */
.login-card--split {
    box-shadow: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 3rem;
    text-align: center;
}

.login-card--split .login-maintenance-banner,
.login-card--split .login-form-header,
.login-card--split .login-form-section {
    width: 100%;
    max-width: 360px;
}

.login-card--split .login-form-section {
    text-align: left;
}

.login-card--split .login-maintenance-banner {
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.login-card--split .login-hero-integration {
    width: 100%;
    max-width: 360px;
    margin-top: 0;
    margin-bottom: 1.75rem;
    background: #f0f7ff;
    border: 1px solid #cfe4fb;
    border-radius: 10px;
    text-align: left;
}

    .login-card--split .login-hero-integration i {
        color: #2f6fed;
    }

    .login-card--split .login-hero-integration-brand {
        color: #2f6fed;
    }

    .login-card--split .login-hero-integration-title {
        color: #1f2a37;
    }

    .login-card--split .login-hero-integration-text {
        color: #3a4a5e;
    }

    .login-card--split .login-hero-integration a {
        color: #2f6fed;
    }

.login-form-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}

/*.login-form-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    width: 38px;
    border-radius: 9px;
    background: linear-gradient(135deg, #3f6aa6 0%, #1c3f6e 100%);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(28,63,110,0.28);
}*/

.login-form-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: linear-gradient(135deg,#3f6aa6 0%,#1c3f6e 100%);
    color: #fff;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-weight: 800;
    letter-spacing: -0.5px; /* tighter FR */
    font-size: 15px; /* slightly larger */
}



.login-form-logo-text {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a2332;
    letter-spacing: -0.4px;
}

.login-form-logo-tld {
    color: #3f6aa6;
    font-weight: 600;
}

/* Top bar (light mode only) — soft border on the mark and lighter brand text for readability on navy */
[data-bs-theme="light"] .atlas-brand-link .login-form-logo-mark {
    border: 1px solid rgba(255,255,255,0.35);
}

[data-bs-theme="light"] .atlas-brand-link .login-form-logo-text {
    color: #dce6f5;
}

[data-bs-theme="light"] .atlas-brand-link .login-form-logo-tld {
    color: #9db8dd;
}

/* Top bar (dark mode) — same soft border and lighter brand text treatment */
[data-bs-theme="dark"] .atlas-brand-link .login-form-logo-mark {
    border: 1px solid rgba(255,255,255,0.35);
}

[data-bs-theme="dark"] .atlas-brand-link .login-form-logo-text {
    color: #dce6f5;
}

[data-bs-theme="dark"] .atlas-brand-link .login-form-logo-tld {
    color: #9db8dd;
}

/* Remove bottom margin when used inline in the top bar brand link */
.atlas-brand-link .login-form-logo {
    margin-bottom: 0;
}

.login-form-header {
    margin-bottom: 1.5rem;
}

.login-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a2332;
    margin: 0 0 0.35rem;
    letter-spacing: -0.3px;
}

.login-form-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.login-card--split .login-form-section {
    padding: 0;
}

.login-page-footer--split {
    text-align: center;
    color: rgba(31,78,121,0.40);
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.login-interest-link {
    display: block;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #3f6aa6;
    text-decoration: none;
    margin-top: 0.4rem;
}

    .login-interest-link:hover {
        color: #2a4e8c;
        text-decoration: underline;
    }

@media (max-width: 900px) {
    .login-card--split {
        padding: 2rem 1.75rem;
    }
}

/* ═══════════════════════════════════════════
   ABOUT PAGE — founder story
═══════════════════════════════════════════ */

.about-wrapper {
    align-items: flex-start;
    padding: 3rem 1rem;
}

.about-shell {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    color: #fff;
}

.about-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.85);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: color 0.15s ease;
}

    .about-back-link:hover {
        color: #fff;
    }

.about-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.about-headshot {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.35);
    box-shadow: 0 8px 22px rgba(0,0,0,0.35);
    flex-shrink: 0;
}

.about-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.4px;
    margin: 0 0 0.25rem;
    color: #fff;
}

.about-subtitle {
    font-size: 0.9375rem;
    color: rgba(255,255,255,0.78);
    margin: 0;
}

.about-card {
    background: #ffffff;
    color: #1a2332;
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

    .about-card p {
        font-size: 0.9375rem;
        line-height: 1.7;
        color: #374151;
        margin: 0 0 1rem;
    }

        .about-card p:last-child {
            margin-bottom: 0;
        }

    .about-card strong {
        color: #1a2332;
    }

.about-card-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

    .about-card-header i {
        color: #3f6aa6;
        font-size: 1.25rem;
    }

    .about-card-header h2 {
        font-size: 1.125rem;
        font-weight: 700;
        color: #1a2332;
        margin: 0;
        letter-spacing: -0.2px;
    }

.about-military-badge {
    height: 34px;
    width: 34px;
    object-fit: contain;
    border-radius: 6px;
}

.about-principles {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 1rem;
}

    .about-principles li {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.875rem;
        color: #374151;
    }

    .about-principles i {
        color: #3f6aa6;
        font-size: 0.9375rem;
        flex-shrink: 0;
    }

.about-mission {
    background: linear-gradient(135deg, #3f6aa6 0%, #1c3f6e 100%);
    color: #fff;
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 12px 30px rgba(0,0,0,0.3);
    position: relative;
}

    .about-mission i {
        font-size: 1.75rem;
        color: rgba(255,255,255,0.5);
        display: block;
        margin-bottom: 0.5rem;
    }

    .about-mission p {
        font-size: 1.0625rem;
        font-weight: 600;
        line-height: 1.5;
        margin: 0;
        letter-spacing: -0.1px;
    }

.about-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 0.5rem;
}

.about-footer-btn {
    max-width: 280px;
}

/* ── Interested in FoulReports.com card ───────────────────────── */
.about-interest .about-interest-form {
    text-align: left;
}

.about-interest-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}

.about-interest-textarea {
    height: auto;
    min-height: 90px;
    padding: 0.75rem 1rem;
    resize: vertical;
    font-family: inherit;
}

.about-interest-btn {
    width: auto;
    padding: 0 1.5rem;
}

.about-interest-success {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #047857;
    border-radius: 10px;
    padding: 0.9rem 1.1rem;
    font-size: 0.9375rem;
    font-weight: 500;
}

    .about-interest-success i {
        font-size: 1.15rem;
        flex-shrink: 0;
    }

@media (max-width: 576px) {
    .about-interest-row {
        grid-template-columns: 1fr;
    }

    .about-interest-btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .about-wrapper {
        padding: 2rem 0.85rem;
    }

    .about-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.85rem;
    }

    .about-headshot {
        width: 68px;
        height: 68px;
    }

    .about-title {
        font-size: 1.4rem;
    }

    .about-card,
    .about-mission {
        padding: 1.4rem 1.25rem;
        border-radius: 14px;
    }

    .about-principles {
        grid-template-columns: 1fr;
    }
}










/* ── Detail panels & form controls — dark mode ──────────────────────────── */

/* Field-group labels */
/*[data-bs-theme="dark"] .field-group label {
    color: var(--atlas-color-text-muted);
}*/

/* Native controls inside field-group */
/*[data-bs-theme="dark"] .field-group select,
[data-bs-theme="dark"] .field-group input[type="text"],
[data-bs-theme="dark"] .field-group input[type="number"],
[data-bs-theme="dark"] .field-group input[type="email"],
[data-bs-theme="dark"] .field-group input[type="date"],
[data-bs-theme="dark"] .field-group textarea {
    background: var(--atlas-input-bg);
    color: var(--atlas-input-text);
    border-color: var(--atlas-input-border);
}*/

/* Select arrow — swap dark-gray SVG for light-gray on dark backgrounds */
/*[data-bs-theme="dark"] .field-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23aaaaaa' d='M6 8.825a.5.5 0 0 1-.354-.146l-3.5-3.5a.5.5 0 1 1 .708-.708L6 7.618l3.146-3.147a.5.5 0 1 1 .708.708l-3.5 3.5A.5.5 0 0 1 6 8.825z'/%3E%3C/svg%3E");
}*/

    /* Disabled controls */
    /*[data-bs-theme="dark"] .field-group select:disabled,
    [data-bs-theme="dark"] .field-group input:disabled,
    [data-bs-theme="dark"] .field-group textarea:disabled {
        background: var(--atlas-input-bg-disabled);
        color: var(--atlas-color-text-muted);
    }*/

/* Date picker — tells the browser to render the picker chrome in dark */
/*[data-bs-theme="dark"] .field-group input[type="date"],
[data-bs-theme="dark"] .form-grid-responsive input[type="date"] {
    background: var(--atlas-input-bg);
    color: var(--atlas-input-text);
    border-color: var(--atlas-input-border);
    color-scheme: dark;
}*/

/* Non-gradient panel-header icon */
/*[data-bs-theme="dark"] .form-panel .detail-panel-header:not(.detail-panel-gradient-blue) i {
    color: var(--atlas-color-blue-light);
}*/

/* Read-only detail field labels */
/*[data-bs-theme="dark"] .detail-field label {
    color: var(--atlas-color-text-muted);
}*/

/* Disabled outline-secondary buttons */
/*[data-bs-theme="dark"] .btn-outline-secondary:disabled,
[data-bs-theme="dark"] .btn-outline-secondary[disabled] {
    background-color: var(--atlas-input-bg-disabled) !important;
    color: var(--atlas-color-text-muted) !important;
    border-color: var(--atlas-color-border) !important;
}*/

/* ds-label utility */
/*[data-bs-theme="dark"] .ds-label {
    color: var(--atlas-color-text);
}

[data-bs-theme="dark"] .ds-label--muted {
    color: var(--atlas-color-text-muted);
}*/




/* ── Topbar ──────────────────────────────────────────────────────────────── */
.atlas-topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    height: calc(var(--atlas-topbar-h) + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    background: var(--atlas-topbar-bg);
    border-bottom: 1px solid var(--atlas-topbar-border);
    box-shadow: var(--atlas-shadow);
    overflow: visible;
    box-sizing: border-box;
}

.atlas-impersonation-banner {
    position: sticky;
    top: 0;
    z-index: 1010;
    width: 100%;
    background: #fff3cd;
    border-bottom: 1px solid #ffe69c;
    box-sizing: border-box;
    padding-top: env(safe-area-inset-top, 0px);
}

.atlas-impersonation-banner-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    padding: 0.5rem 1rem;
    color: #664d03;
    font-weight: 500;
    text-align: center;
}

@media (max-width: 768px) {
    .atlas-impersonation-banner-inner {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

.atlas-impersonation-banner-inner i.bi-person-badge {
    font-size: 1.1rem;
}

.atlas-impersonation-stop-btn {
    background: #664d03;
    color: #fff;
    border: none;
}

.atlas-impersonation-stop-btn:hover {
    background: #52400a;
    color: #fff;
}

/* ── Topbar inner — brand | [centered nav] | actions ────────────────────── */
.atlas-topbar-inner {
    display: flex;
    align-items: center;
    height: var(--atlas-topbar-h);
    width: 100%;
    padding: 0 calc(1.5rem + env(safe-area-inset-right, 0px)) 0 calc(1.5rem + env(safe-area-inset-left, 0px));
    gap: 0;
}

/* ── Brand ───────────────────────────────────────────────────────────────── */
/*.atlas-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: var(--atlas-radius-md);
    background: var(--atlas-color-brand);
    color: #fff;
    font-family: var(--atlas-font-sans);
    font-size: 1.125rem;
    font-weight: var(--atlas-fw-extrabold);
    letter-spacing: var(--atlas-ls-tight);
    line-height: 1;
    box-shadow: 0 2px 8px rgba(198, 40, 40, 0.40);
    user-select: none;
    transition: box-shadow var(--atlas-duration-base) var(--atlas-ease-out);
}*/

/*
serif italic A*/
.atlas-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: var(--atlas-radius-md);
    background: var(--atlas-color-brand);
    color: #fff;
    font-family: Georgia, 'Palatino Linotype', serif;
    font-style: italic;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    line-height: 1;
    box-shadow: 0 2px 8px rgba(198, 40, 40, 0.40);
    user-select: none;
    transition: box-shadow var(--atlas-duration-base) var(--atlas-ease-out);
}

/*Greek lambda
.atlas-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: var(--atlas-radius-md);
    background: var(--atlas-color-brand);
    color: #fff;
    font-family: var(--atlas-font-sans);
    font-size: 1.25rem;
    font-weight: var(--atlas-fw-extrabold);
    letter-spacing: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    line-height: 1;
    box-shadow: 0 2px 8px rgba(198, 40, 40, 0.40);
    user-select: none;
    transition: box-shadow var(--atlas-duration-base) var(--atlas-ease-out);
}*/


/*Diamond*/
/*.atlas-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: var(--atlas-radius-md);
    background: var(--atlas-color-brand);
    color: #fff;
    font-family: var(--atlas-font-sans);
    font-size: 0;
    transform: rotate(45deg);
    border-radius: 5px;
    width: 28px;
    height: 28px;
    margin: 0 6px;
    box-shadow: 0 3px 10px rgba(198, 40, 40, 0.45);
    user-select: none;
    transition: box-shadow var(--atlas-duration-base) var(--atlas-ease-out);
}

    .atlas-brand-mark::after {
        content: 'A';
        display: inline-block;
        font-family: var(--atlas-font-sans);
        font-size: 1rem;
        font-weight: var(--atlas-fw-extrabold);
        color: #fff;
        letter-spacing: var(--atlas-ls-tight);
        line-height: 1;
        transform: rotate(-45deg);
    }*/
/*Diamond*/


.atlas-brand-lockup {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    margin-left: 0.625rem;
    gap: 0.1rem;
    line-height: 1;
}

.atlas-brand-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border-radius: var(--atlas-radius-md, 6px);
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: opacity 0.15s ease;
}

    .atlas-brand-link:hover,
    .atlas-brand-link:focus-visible {
        opacity: 0.85;
    }

    .atlas-brand-link:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(255,255,255,0.35);
    }

.atlas-brand-name {
    font-family: var(--atlas-font-sans);
    font-size: 0.9375rem;
    font-weight: var(--atlas-fw-bold);
    letter-spacing: var(--atlas-ls-tight);
    color: var(--atlas-topbar-fg);
    line-height: 1.15;
    white-space: nowrap;
    transition: color var(--atlas-duration-base) var(--atlas-ease-default);
}

.atlas-brand-sub {
    font-family: var(--atlas-font-sans);
    font-size: 0.5625rem;
    font-weight: var(--atlas-fw-medium);
    letter-spacing: var(--atlas-ls-wider);
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.50);
    line-height: 1.2;
    white-space: nowrap;
    transition: color var(--atlas-duration-base) var(--atlas-ease-default);
}




/* ── Nav — centered absolutely so it doesn't depend on brand/actions widths  */
.atlas-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.1rem;
    pointer-events: auto;
}

.atlas-nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
    color: var(--atlas-topbar-fg);
    text-decoration: none;
    font-size: 0.675rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0.82;
    transition: background 0.15s ease, opacity 0.15s ease;
    flex-shrink: 0;
}

    .atlas-nav-link:hover {
        background: var(--atlas-nav-hover-bg);
        opacity: 1;
        color: var(--atlas-topbar-fg);
    }

    .atlas-nav-link.is-active {
        background: var(--atlas-nav-active-bg);
        font-weight: 600;
        opacity: 1;
    }

/* ── Right actions ───────────────────────────────────────────────────────── */
.atlas-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: auto;
    flex-shrink: 0;
}

/* ── Theme toggle ────────────────────────────────────────────────────────── */
.atlas-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: var(--atlas-nav-hover-bg);
    color: var(--atlas-topbar-fg);
    font-size: 0.95rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, transform 0.2s ease;
}

    .atlas-theme-toggle:hover {
        background: var(--atlas-nav-active-bg);
        transform: rotate(20deg);
    }

/* ── Hamburger — hidden on desktop, shown on tablet + mobile ─────────────── */
.atlas-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    padding: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    order: -1; /* sits left of brand on mobile */
}

    .atlas-hamburger span {
        display: block;
        height: 2px;
        background: var(--atlas-topbar-fg);
        border-radius: 2px;
        transition: transform 0.22s ease, opacity 0.22s ease;
    }

    .atlas-hamburger.is-open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .atlas-hamburger.is-open span:nth-child(2) {
        opacity: 0;
    }

    .atlas-hamburger.is-open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

/* ── Dim overlay (shared by nav drawer + user dropdown) ──────────────────── */
.atlas-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(1px);
}

/* ── Main content — full width, comfortable padding ─────────────────────── */
.atlas-main {
    flex: 1;
    width: 100%;
    padding: .5rem 1rem;
}

.atlas-content {
    width: 100%;
}


/* ── Lookup Field (reusable modal picker) ─────────────── */
.lookup-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #1f4e79;
    color: #fff;
    flex-shrink: 0;
}

/* ── Lookup Field — Dark Mode ─────────────────────────── */

[data-bs-theme="dark"] .lookup-modal {
    background: #1b1c22;
    border: 1px solid #2c3240;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

[data-bs-theme="dark"] .lookup-modal-header {
    background: #132237;
    color: #e8edf2;
    border-bottom: 1px solid #1e3254;
}

    [data-bs-theme="dark"] .lookup-modal-header h4 {
        color: #e8edf2;
    }

[data-bs-theme="dark"] .lookup-search-bar {
    background: #16202c;
    border-bottom-color: #2c3240;
}

[data-bs-theme="dark"] .lookup-search-icon {
    color: #6b7e91;
}

[data-bs-theme="dark"] .lookup-search-input {
    color: var(--ins-body-color);
}

    [data-bs-theme="dark"] .lookup-search-input::placeholder {
        color: var(--atlas-input-placeholder);
    }

[data-bs-theme="dark"] .lookup-result-count {
    background: #141c25;
    border-bottom-color: #2c3240;
    color: #6b7e91;
}

[data-bs-theme="dark"] .lookup-item {
    border-bottom-color: #252e3a;
}

    [data-bs-theme="dark"] .lookup-item:hover {
        background: #1e2d3e;
    }

    [data-bs-theme="dark"] .lookup-item:active {
        background: #1a2b3c;
    }

    [data-bs-theme="dark"] .lookup-item.lookup-item-selected {
        background: #17304d;
        border-left-color: var(--ds-color-atlas-blue);
    }

[data-bs-theme="dark"] .lookup-item-primary {
    color: #dbe4ee;
}

[data-bs-theme="dark"] .lookup-item-detail-right {
    color: #c4cdd8;
}

[data-bs-theme="dark"] .lookup-filter-bar {
    background: #16202c;
    border-bottom-color: #2c3240;
}

[data-bs-theme="dark"] .lookup-empty {
    color: #6b7e91;
}

[data-bs-theme="dark"] .lookup-input {
    background: #1b1c22;
    border-color: #2c3240;
}

    [data-bs-theme="dark"] .lookup-input:hover {
        border-color: #3d4f60;
    }

[data-bs-theme="dark"] .lookup-input-text {
    color: var(--ins-body-color);
}

    [data-bs-theme="dark"] .lookup-input-text::placeholder {
        color: var(--atlas-input-placeholder);
    }

[data-bs-theme="dark"] .lookup-btn-browse {
    border-left-color: #2c3240;
}

[data-bs-theme="dark"] .uom-toggle {
    background: #1e2530;
    border-color: #2c3240;
    color: #8495ab;
}

    [data-bs-theme="dark"] .uom-toggle:hover {
        background: #222d3a;
        border-color: #3d4f60;
    }

/* ── Quick Search ────────────────────────────────────────────────────────── */
.filter-panel {
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #e5e7eb);
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: .5rem;
}

.atlas-quick-search,
.quick-search,
.assoc-date-filter,
.assoc-team-filter,
.assoc-season-filter,
.assoc-usertype-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.5rem;
}

.quick-search {
    width: 100%;
}

    .atlas-quick-search .search-filter-group,
    .quick-search .search-filter-group {
        flex: 0 1 320px;
        min-width: 220px;
        max-width: 360px;
    }

    .atlas-quick-search .filter-group label,
    .quick-search .filter-group label,
    .assoc-date-filter .filter-group label,
    .assoc-team-filter .filter-group label,
    .assoc-season-filter .filter-group label,
    .assoc-usertype-filter .filter-group label {
        color: var(--atlas-color-text-muted);
    }

    .atlas-quick-search .record-count,
    .quick-search .record-count {
        color: var(--atlas-color-text-muted);
    }


/* ── Paging Bar ──────────────────────────────────────────────────────────── */
.paging-bar {
    border-top-color: var(--atlas-color-border);
    color: var(--atlas-color-text-muted);
}

.paging-controls {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.page-size-group {
    color: var(--atlas-color-text-muted);
}

    /*.page-size-group select {
        appearance: none;
        -webkit-appearance: none;
        background-color: var(--atlas-input-bg);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666666' d='M6 8.825a.5.5 0 0 1-.354-.146l-3.5-3.5a.5.5 0 1 1 .708-.708L6 7.618l3.146-3.147a.5.5 0 1 1 .708.708l-3.5 3.5A.5.5 0 0 1 6 8.825z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 0.5rem center;
        padding-right: 1.75rem;
        color: var(--atlas-input-text);
        border-color: var(--atlas-input-border);
    }

        .page-size-group select:focus {
            outline: none;
            border-color: var(--atlas-color-blue-light);
            box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
        }*/

/* Chevron goes light in dark mode */
/*[data-bs-theme="dark"] .page-size-group select {
    background-color: var(--atlas-input-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0aec0' d='M6 8.825a.5.5 0 0 1-.354-.146l-3.5-3.5a.5.5 0 1 1 .708-.708L6 7.618l3.146-3.147a.5.5 0 1 1 .708.708l-3.5 3.5A.5.5 0 0 1 6 8.825z'/%3E%3C/svg%3E");
    color: var(--atlas-input-text);
    border-color: var(--atlas-input-border);
}*/

/* ── Button ──────────────────────────────────────────────────────────────── */
/* Shared base for .atlas-btn (general use) and .paging-controls button.     */
/* --atlas-input-* tokens are defined in both :root AND [data-bs-theme=dark] */
/* so they auto-switch — no dark-mode override block needed for base styles.  */

.atlas-btn,
.paging-controls button,
.btn-back-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.6875rem;
    font-family: inherit;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
    cursor: pointer;
    border-radius: 6px;
    border: 1px solid var(--atlas-input-border);
    background: var(--atlas-input-bg);
    color: var(--atlas-input-text);
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
    text-decoration: none;
    user-select: none;
}

    .atlas-btn:hover:not(:disabled),
    .paging-controls button:hover:not(:disabled),
    .btn-back-inline:hover {
        background: var(--atlas-color-surface-alt);
        border-color: var(--atlas-color-border-strong);
        color: var(--atlas-color-text);
    }

    .atlas-btn:focus-visible,
    .paging-controls button:focus-visible,
    .btn-back-inline:focus-visible {
        outline: none;
        box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.25);
    }

    .atlas-btn:disabled,
    .paging-controls button:disabled,
    .btn-back-inline:disabled {
        opacity: 0.45;
        cursor: default;
    }

    /* ── Primary / active-page variant ───────────────────── */
    .atlas-btn.atlas-btn-primary,
    .paging-controls button.active-page {
        background: var(--atlas-color-blue-light);
        border-color: var(--atlas-color-blue-light);
        color: #fff;
    }

        .atlas-btn.atlas-btn-primary:hover:not(:disabled),
        .paging-controls button.active-page:hover:not(:disabled) {
            background: var(--atlas-color-blue-light);
            border-color: var(--atlas-color-blue-light);
            color: #fff;
        }

    /* ── Danger variant (destructive actions) ──────────────── */
    .atlas-btn.atlas-btn-danger {
        background: #dc3545;
        border-color: #dc3545;
        color: #fff;
    }

        .atlas-btn.atlas-btn-danger:hover:not(:disabled) {
            background: #bb2d3b;
            border-color: #b02a37;
            color: #fff;
        }

        .atlas-btn.atlas-btn-danger:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.3);
        }

    .atlas-btn.atlas-btn-success {
        background: #198754;
        border-color: #198754;
        color: #fff;
    }

        .atlas-btn.atlas-btn-success:hover:not(:disabled) {
            background: #157347;
            border-color: #146c43;
            color: #fff;
        }

        .atlas-btn.atlas-btn-success:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.3);
        }

    /* ── Info variant (uploads / secondary calls to action) ───────── */
    .atlas-btn.atlas-btn-info {
        background: #6f42c1;
        border-color: #6f42c1;
        color: #fff;
    }

        .atlas-btn.atlas-btn-info:hover:not(:disabled) {
            background: #5f36a3;
            border-color: #59329a;
            color: #fff;
        }

        .atlas-btn.atlas-btn-info:focus-visible {
            outline: none;
            box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.3);
        }

    /* ── Secondary variant (lighter blue, for "save & keep going" actions) ── */
    .atlas-btn.atlas-btn-secondary {
        background: #fff;
        border-color: var(--atlas-color-blue-light);
        color: var(--atlas-color-blue-light);
    }

        .atlas-btn.atlas-btn-secondary:hover:not(:disabled) {
            background: rgba(74, 144, 217, 0.1);
            border-color: var(--atlas-color-blue-light);
            color: var(--atlas-color-blue-light);
        }

    /* ── Outline / cancel variant ───────────────────────────────────────── */
    .atlas-btn.atlas-btn-outline {
        background: transparent;
        border-color: var(--atlas-input-border);
        color: var(--atlas-color-text);
    }

        .atlas-btn.atlas-btn-outline:hover:not(:disabled) {
            background: rgba(0, 0, 0, 0.04);
            border-color: var(--atlas-input-border);
        }

/* ── Page Breadcrumb ─────────────────────────────────────────── */
.page-breadcrumb-title {
    color: var(--atlas-color-text);
}

.page-breadcrumb-trail .breadcrumb-item,
.page-breadcrumb-trail .breadcrumb-item a {
    color: var(--atlas-color-text-muted);
}

    .page-breadcrumb-trail .breadcrumb-item.active {
        color: var(--atlas-color-text);
    }

    .page-breadcrumb-trail .breadcrumb-item a:hover {
        color: var(--atlas-color-blue-light);
    }

/* Size/icon overrides only — hover/color/bg come from shared button group */
.btn-back-inline {
    padding: 0;
    width: 1.75rem;
    height: 1.75rem;
    color: var(--atlas-color-blue-light);
}

.btn-favorite-star {
    color: var(--atlas-color-text-muted);
}

    .btn-favorite-star:hover:not(:disabled),
    .btn-favorite-star.is-favorite {
        color: #ffc107;
    }

/* Loading States */
.loading-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5rem 1.5rem;
}

.loading-overlay--modal {
    position: fixed;
    inset: 0;
    padding: 1.5rem;
    background: rgba(15, 23, 32, 0.45);
    z-index: 1080;
}

.loading-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 3rem 4rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    animation: fadeInUp 0.4s ease-out;
}

    .loading-card .spinner-ring {
        display: inline-block;
        width: 3rem;
        height: 3rem;
        border: 4px solid #e8ecf1;
        border-top-color: var(--ds-color-atlas-blue);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
        margin-bottom: 1.25rem;
    }

    .loading-card h3 {
        margin: 0 0 0.4rem;
        font-size: 0.875rem;
        font-weight: 700;
        color: #333;
    }

    .loading-card p {
        margin: 0;
        font-size: 0.75rem;
        color: #888;
    }

/* Dark mode — Loading States */
[data-bs-theme="dark"] .loading-card {
    background: #1e2a38;
    border-color: #2e3d4f;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

    [data-bs-theme="dark"] .loading-card .spinner-ring {
        border-color: #2e3d4f;
        border-top-color: var(--ds-color-atlas-blue);
    }

    [data-bs-theme="dark"] .loading-card h3 {
        color: #e8edf2;
    }

    [data-bs-theme="dark"] .loading-card p {
        color: #8ca0b5;
    }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.td-modal {
    background: var(--atlas-color-surface);
    color: var(--atlas-color-text);
}

.td-modal-header {
    background: var(--atlas-modal-header-bg);
    color: var(--atlas-modal-header-fg);
}

    .td-modal-header h4 {
        color: var(--atlas-modal-header-fg);
    }

        .td-modal-header h4 i {
            color: var(--atlas-modal-header-fg);
        }

.td-modal-close {
    color: var(--atlas-modal-header-fg);
    opacity: 0.8;
}

    .td-modal-close:hover {
        color: var(--atlas-modal-header-fg);
        opacity: 1;
        background: rgba(255, 255, 255, 0.12);
    }

.td-modal-body {
    background: var(--atlas-color-surface);
    color: var(--atlas-color-text);
}

    /* Labels inside modal body */
    .td-modal-body .field-group label {
        color: var(--atlas-color-text-muted);
    }

    /* small hint text inside modal body */
    .td-modal-body .field-group small {
        color: var(--atlas-color-text-subtle);
    }

/* form-input-static — read-only display field.                               */
div.form-input-static {
    background: var(--atlas-input-bg-disabled);
    color: var(--atlas-color-text-muted);
}

/* Dark mode explicit anchors */
[data-bs-theme="dark"] .td-modal {
    background: var(--atlas-color-surface);
    color: var(--atlas-color-text);
}

[data-bs-theme="dark"] .td-modal-header {
    background: var(--atlas-modal-header-bg);
    color: var(--atlas-modal-header-fg);
}

[data-bs-theme="dark"] .td-modal-body {
    background: var(--atlas-color-surface);
    color: var(--atlas-color-text);
}

[data-bs-theme="dark"] .td-modal-footer {
    background: var(--atlas-color-surface-alt);
    border-top-color: var(--atlas-color-border);
}

[data-bs-theme="dark"] div.form-input-static {
    background: var(--atlas-input-bg-disabled);
    color: var(--atlas-color-text-muted);
}

/* ── Input ───────────────────────────────────────────────────────────────── */
/*input.atlas-input,
select.atlas-input,
textarea.atlas-input {
    width: 100%;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--atlas-input-border);
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: inherit;
    background: var(--atlas-input-bg);
    color: var(--atlas-input-text);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    min-height: 2.125rem;
}

    input.atlas-input::placeholder,
    select.atlas-input::placeholder,
    textarea.atlas-input::placeholder {
        color: var(--atlas-input-placeholder);
        opacity: 1;
    }

    input.atlas-input:focus,
    select.atlas-input:focus,
    textarea.atlas-input:focus {
        outline: none;
        border-color: var(--atlas-color-blue-light);
        box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
    }

    input.atlas-input:disabled,
    select.atlas-input:disabled,
    textarea.atlas-input:disabled {
        background: var(--atlas-input-bg-disabled);
        color: var(--atlas-color-text-muted);
        cursor: not-allowed;
        opacity: 0.65;
    }

    input.atlas-input[readonly],
    textarea.atlas-input[readonly] {
        background: var(--atlas-input-bg-disabled);
        color: var(--atlas-color-text-muted);
        cursor: default;
    }*/

/* Dark mode */
/*[data-bs-theme="dark"] input.atlas-input,
[data-bs-theme="dark"] select.atlas-input,
[data-bs-theme="dark"] textarea.atlas-input {
    background: var(--atlas-input-bg);
    color: var(--atlas-input-text);
    border-color: var(--atlas-input-border);
}*/

/* ── Multiselect trigger — exact clone of .filter-group select ── */
/*.filter-group .multiselect-trigger {
    padding: 0.45rem 2rem 0.45rem 0.65rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.75rem;
    background-color: #fafafa;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8.825a.5.5 0 0 1-.354-.146l-3.5-3.5a.5.5 0 1 1 .708-.708L6 7.618l3.146-3.147a.5.5 0 1 1 .708.708l-3.5 3.5A.5.5 0 0 1 6 8.825z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    color: inherit;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .filter-group .multiselect-trigger:focus {
        outline: none;
        border-color: var(--ds-color-atlas-blue);
        box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
    }*/

/* ── Multiselect dropdown panel ── */
/*.multiselect-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fafafa;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    max-height: 220px;
    overflow-y: auto;
    padding: 0.25rem 0;
    display: flex;
    flex-direction: column;
}

.multiselect-dropdown-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

.multiselect-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.65rem;
    cursor: pointer;
    font-size: 0.75rem;
    white-space: nowrap;
    transition: background 0.1s;
}

    .multiselect-dropdown-item:hover {
        background: #f0f4f8;
    }*/

/* ── Invisible backdrop — closes dropdown on outside click ── */
/*.multiselect-backdrop {
    position: fixed;
    inset: 0;
    z-index: 199;
}*/

/* ── Dark mode ── */
/*[data-bs-theme="dark"] .filter-group .multiselect-trigger {
    background-color: var(--ins-secondary-bg, #1e1f27);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23aab8c5' d='M6 8.825a.5.5 0 0 1-.354-.146l-3.5-3.5a.5.5 0 1 1 .708-.708L6 7.618l3.146-3.147a.5.5 0 1 1 .708.708l-3.5 3.5A.5.5 0 0 1 6 8.825z'/%3E%3C/svg%3E");
    border-color: var(--ins-border-color, #293036);
    color: var(--ins-body-color, #aab8c5);
}

[data-bs-theme="dark"] .filter-group select,
[data-bs-theme="dark"] .filter-group input {
    background-color: var(--ins-secondary-bg, #1e1f27);
    border-color: var(--ins-border-color, #293036);
    color: var(--ins-body-color, #aab8c5);
}

[data-bs-theme="dark"] .multiselect-dropdown {
    background: var(--ins-secondary-bg, #1e1f27);
    border-color: var(--ins-border-color, #293036);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .multiselect-dropdown-actions {
    border-bottom-color: var(--ins-border-color, #293036);
}

[data-bs-theme="dark"] .multiselect-dropdown-item:hover {
    background: var(--ins-tertiary-bg, #272832);
}*/

/* ── Footer ──────────────────────────────────────────────────────────────── */
.atlas-footer {
    width: 100%;
    padding: 0.7rem 2rem;
    background: var(--atlas-footer-bg);
    color: var(--atlas-footer-fg);
    font-size: 0.8rem;
    text-align: center;
    border-top: 1px solid var(--atlas-topbar-border);
}

/* ── User dropdown ───────────────────────────────────────────────────────── */
.atlas-user {
    position: relative;
}

.atlas-user-btn {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.32rem 0.6rem 0.32rem 0.38rem;
    border: none;
    border-radius: 8px;
    background: var(--atlas-nav-hover-bg);
    color: var(--atlas-topbar-fg);
    font-size: 0.675rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

    .atlas-user-btn:hover,
    .atlas-user.is-open .atlas-user-btn {
        background: var(--atlas-nav-active-bg);
    }

.atlas-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #c62828;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

.atlas-user-name {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.atlas-user-chevron {
    font-size: 0.68rem;
    opacity: 0.65;
    transition: transform 0.2s ease;
}

.atlas-user.is-open .atlas-user-chevron {
    transform: rotate(180deg);
}

.atlas-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 210px;
    border-radius: 10px;
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #e5e7eb);
    box-shadow: 0 8px 28px rgba(0,0,0,0.15);
    overflow: hidden;
    z-index: 2000;
    animation: dropdown-in 0.15s ease;
}

@keyframes dropdown-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.atlas-user-dropdown-header {
    padding: 0.8rem 1rem 0.65rem;
}

.atlas-user-dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 0.6rem;
    padding: 0.7rem 1rem;
    font-size: 0.675rem;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    text-align: left;
    color: var(--bs-body-color);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.12s ease;
}

    .atlas-user-dropdown-item:hover {
        background: var(--bs-tertiary-bg, #f9fafb);
        color: var(--bs-body-color);
    }

.atlas-user-dropdown-item--danger {
    color: #dc2626;
}

    .atlas-user-dropdown-item--danger:hover {
        background: #fef2f2;
        color: #dc2626;
    }

/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   1. ≤ 1024px  Tablet  — collapse nav to drawer, show hamburger
   2. ≤  640px  Mobile  — tighten padding, hide user name text
════════════════════════════════════════════════════════════════════════════ */

/* ── Tablet (≤ 900px) — collapse to drawer ─────────────────────────────── */
@media (max-width: 900px) {

    .atlas-hamburger {
        display: flex;
    }

    .atlas-topbar-inner {
        justify-content: space-between;
    }

    /* Reset absolute centering — becomes a drawer instead */
    .atlas-nav {
        position: fixed;
        left: 0;
        top: calc(var(--atlas-topbar-h) + env(safe-area-inset-top, 0px));
        bottom: 0;
        transform: translateX(-110%);
        flex-direction: column;
        align-items: stretch;
        gap: 0.2rem;
        width: min(300px, 80vw);
        z-index: 1000;
        padding: 1rem 0.75rem;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
        background: var(--atlas-topbar-bg);
        overflow-y: auto;
        box-shadow: 4px 0 24px rgba(0,0,0,0.25);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

        .atlas-nav.is-open {
            transform: translateX(0);
        }

        .atlas-nav::before {
            content: "Navigation";
            display: block;
            padding: 0.25rem 0.9rem 0.75rem;
            font-size: 0.9375rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            opacity: 0.4;
            color: var(--atlas-topbar-fg);
        }

    .atlas-nav-link {
        padding: 0.75rem 0.9rem;
        font-size: 0.9375rem;
        opacity: 0.9;
        min-height: 2.75rem;
        display: flex;
        align-items: center;
        gap: 0.6rem;
        touch-action: manipulation;
    }

        .atlas-nav-link i {
            font-size: 1.05rem;
        }
}


/* ── Mobile (≤ 640px) ────────────────────────────────────────────────────── */
@media (max-width: 640px) {

    .atlas-topbar-inner {
        padding: 0 calc(1rem + env(safe-area-inset-right, 0px)) 0 calc(1rem + env(safe-area-inset-left, 0px));
        gap: 0.4rem;
    }

    /* Brand — shrink logo mark and text on small screens */
    .atlas-brand-link .login-form-logo-mark {
        height: 32px;
        width: 32px;
        font-size: 0.8rem;
    }

    .atlas-brand-link .login-form-logo-text {
        font-size: 1.1rem;
    }

    /* Hide user name — show avatar only */
    .atlas-user-name {
        display: none;
    }

    .atlas-user-chevron {
        display: none;
    }

    .atlas-user-btn {
        padding: 0.32rem 0.38rem;
        min-width: 2.5rem;
        min-height: 2.5rem;
        justify-content: center;
    }

    .atlas-user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    .atlas-hamburger {
        width: 44px;
        height: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .atlas-theme-toggle {
        width: 40px;
        height: 40px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .atlas-user-dropdown {
        min-width: 190px;
    }

    .atlas-user-dropdown-item {
        min-height: 2.75rem;
        font-size: 0.8125rem;
        touch-action: manipulation;
    }

    .atlas-nav-link {
        min-height: 2.75rem;
        touch-action: manipulation;
    }

    .atlas-main {
        padding: 1.25rem 1rem;
    }

    .atlas-footer {
        padding: 0.65rem 1rem;
    }
}


/* ATLAS Page styling */

/* ── Welcome ─────────────────────────────────────────────────────────────── */
.atlas-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.atlas-welcome-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
    color: inherit;
}

.atlas-welcome-sub {
    margin: 0;
    opacity: 0.65;
    font-size: 0.95rem;
}

.atlas-badge {
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    background: #3b82f620;
    color: #3b82f6;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    border: 1px solid #3b82f640;
    white-space: nowrap;
}

/* ── KPI grid ────────────────────────────────────────────────────────────── */
.atlas-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.atlas-kpi-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 12px;
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #e5e7eb);
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

    .atlas-kpi-card:hover {
        box-shadow: 0 4px 16px rgba(0,0,0,0.10);
        transform: translateY(-2px);
    }

.atlas-kpi-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--kpi-color) 15%, transparent);
    color: var(--kpi-color);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.atlas-kpi-value {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
}

.atlas-kpi-label {
    font-size: 0.82rem;
    opacity: 0.65;
    margin: 0.15rem 0 0.35rem;
}

.atlas-kpi-trend {
    font-size: 0.78rem;
    font-weight: 500;
}

    .atlas-kpi-trend.up {
        color: #10b981;
    }

    .atlas-kpi-trend.down {
        color: #ef4444;
    }

/* ── Section title ───────────────────────────────────────────────────────── */
.atlas-section-title {
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    opacity: 0.85;
}

/* ── Module grid ─────────────────────────────────────────────────────────── */
.atlas-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.atlas-module-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.25rem;
    border-radius: 12px;
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #e5e7eb);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

    .atlas-module-card:hover {
        box-shadow: 0 6px 20px rgba(0,0,0,0.12);
        transform: translateY(-3px);
        color: inherit;
    }

.atlas-module-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--mod-color) 15%, transparent);
    color: var(--mod-color);
    font-size: 1.1rem;
}

.atlas-module-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.atlas-module-desc {
    font-size: 0.8rem;
    opacity: 0.6;
    flex: 1;
}

.atlas-module-arrow {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    opacity: 0;
    color: var(--mod-color);
    font-size: 1.1rem;
    transition: opacity 0.15s ease;
}

.atlas-module-card:hover .atlas-module-arrow {
    opacity: 1;
}

.atlas-module-coming-soon {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #dc2626;
    text-transform: uppercase;
}

.atlas-module-card--coming-soon {
    opacity: 0.85;
}

/* Compact variant - denser, icon + title only, used for busy overview pages */
.atlas-module-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 0.6rem;
}

.atlas-module-card--compact {
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.85rem;
    min-height: unset;
}

    .atlas-module-card--compact .atlas-module-icon {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    .atlas-module-card--compact .atlas-module-name {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .atlas-module-card--compact .atlas-module-arrow {
        position: static;
        margin-left: auto;
        opacity: 0.35;
        font-size: 0.9rem;
    }

    .atlas-module-card--compact:hover .atlas-module-arrow {
        opacity: 1;
    }

    .atlas-module-card--compact.atlas-module-card--wide {
        grid-column: span 2;
        max-width: 340px;
    }


/* ── Button Toggle ───────────────────────────────────────────────────────── */

/* Light mode — active button uses a soft, professional blue */
.button-toggle .toggle-btn.active {
    background: var(--atlas-color-blue-light);
    color: #fff;
    font-weight: 600;
}

    .button-toggle .toggle-btn.active:hover {
        background: #3a78bd; /* one step darker than --atlas-color-blue-light */
        color: #fff;
    }

/* Dark mode — base shell */
[data-bs-theme="dark"] .button-toggle {
    background: var(--atlas-color-surface-alt);
    border-color: var(--atlas-color-border);
}

    /* Dark mode — inactive button */
    [data-bs-theme="dark"] .button-toggle .toggle-btn {
        background: var(--atlas-color-surface-alt);
        color: var(--atlas-color-text-muted);
    }

        [data-bs-theme="dark"] .button-toggle .toggle-btn:not(:last-child) {
            border-right-color: var(--atlas-color-border);
        }

        [data-bs-theme="dark"] .button-toggle .toggle-btn:hover:not(.active) {
            background: var(--atlas-color-surface);
            color: var(--atlas-color-text);
        }

        /* Dark mode — active button: atlas-blue-light so it pops on the dark surface */
        [data-bs-theme="dark"] .button-toggle .toggle-btn.active {
            background: var(--atlas-color-blue-light);
            color: #fff;
            font-weight: 600;
        }

            [data-bs-theme="dark"] .button-toggle .toggle-btn.active:hover {
                background: #3a78bd;
                color: #fff;
            }

/* ── Log Activity panel ──────────────────────────────────────────────────── */
.atlas-logactivity {
    grid-column: 1 / -1;
    background: #e8f0fa;
    border: 1px solid #a0b8d8;
    border-radius: 6px;
    padding: 0.45rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

    .atlas-logactivity span {
        font-size: var(--atlas-text-xs);
        color: var(--atlas-color-text-muted);
    }

[data-bs-theme="dark"] .atlas-logactivity {
    background: var(--atlas-color-surface-alt);
    border-color: var(--atlas-color-border);
}

/* Line Item Header */
.atlas-lineitem-header {
    padding:0.25rem .25rem; 
    background:#f8fafe; 
    border-bottom:1px solid #e0e0e0;
}

[data-bs-theme="dark"] .atlas-lineitem-header {
    background: var(--atlas-color-surface-alt);
    border-bottom-color: var(--atlas-color-border);
}

/* ── Activity table ──────────────────────────────────────────────────────── */
.atlas-activity-card {
    border-radius: 0;
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #e5e7eb);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.atlas-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--atlas-text-xs);
    border-radius: 0;
}

    .atlas-table thead th {
        padding: 0.35rem .5rem;
        font-weight: var(--atlas-fw-semibold);
        font-size: var(--atlas-text-xs);
        text-transform: uppercase;
        opacity: 0.5;
        border-bottom: 1px solid var(--bs-border-color, #e5e7eb);
        white-space: nowrap;
    }

    .atlas-table tbody td {
        padding: 0.25rem .5rem;
        border-bottom: 1px solid var(--bs-border-color-translucent, #e5e7eb80);
        vertical-align: middle;
    }

    .atlas-table tbody tr:last-child td {
        border-bottom: none;
    }

    .atlas-table tbody tr:hover {
        background: var(--bs-tertiary-bg, #f9fafb);
    }

    /* ── Selectable rows ──────────────────────────────────── */
    .atlas-table tbody tr.selectable-row {
        cursor: pointer;
        transition: background-color 0.15s ease, box-shadow 0.15s ease;
    }

        .atlas-table tbody tr.selectable-row:hover {
            background: var(--bs-tertiary-bg, #f8fafc);
        }

        .atlas-table tbody tr.selectable-row.is-selected {
            background: linear-gradient(90deg, #e0edfa 0%, #f5faff 100%);
            box-shadow: 0 1px 6px 0 rgba(37, 99, 235, 0.06);
            outline: 2px solid var(--atlas-color-blue);
            outline-offset: -2px;
            transition: background 0.18s, box-shadow 0.18s;
        }

/* ── Dark mode overrides ─────────────────────────────────────────────────── */
[data-bs-theme="dark"] .atlas-table tbody tr.selectable-row:hover {
    background: rgba(74, 144, 217, 0.08);
}

[data-bs-theme="dark"] .atlas-table tbody tr.selectable-row.is-selected {
    background: linear-gradient(90deg, rgba(74, 144, 217, 0.22) 0%, rgba(74, 144, 217, 0.09) 100%);
    box-shadow: 0 1px 8px 0 rgba(74, 144, 217, 0.18);
    outline-color: var(--atlas-color-blue-light);
}

.atlas-table-muted {
    opacity: 0.5;
    white-space: nowrap;
}

.atlas-chip {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--bs-secondary-bg, #f1f5f9);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.atlas-status {
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
}

.atlas-status--clickable {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.atlas-status--clickable:hover {
    opacity: 0.8;
}

.atlas-status--green {
    background: #ecfdf5;
    color: #047857;
}

.atlas-status--yellow {
    background: #fffbeb;
    color: #b45309;
}

.atlas-status--blue {
    background: #eff6ff;
    color: #1d4ed8;
}

.atlas-status--red {
    background: #fef2f2;
    color: #b91c1c;
}

.atlas-status--orange {
    background: #fff7ed;
    color: #c2410c;
}

.atlas-status--purple {
    background: #f5f3ff;
    color: #6d28d9;
}

.atlas-status--gray {
    background: #f3f4f6;
    color: #4b5563;
}

/* Dark mode — muted, professional tones instead of bright neon-on-black */
[data-bs-theme="dark"] .atlas-status--green {
    background: rgba(16, 185, 129, 0.14);
    color: #6ee7b7;
}

[data-bs-theme="dark"] .atlas-status--yellow {
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
}

[data-bs-theme="dark"] .atlas-status--blue {
    background: rgba(59, 130, 246, 0.16);
    color: #93c5fd;
}

[data-bs-theme="dark"] .atlas-status--red {
    background: rgba(190, 45, 45, 0.22);
    color: #f3a5a5;
}

[data-bs-theme="dark"] .atlas-status--orange {
    background: rgba(249, 115, 22, 0.16);
    color: #fdba74;
}

[data-bs-theme="dark"] .atlas-status--purple {
    background: rgba(139, 92, 246, 0.16);
    color: #c4b5fd;
}

[data-bs-theme="dark"] .atlas-status--gray {
    background: rgba(107, 114, 128, 0.2);
    color: #d1d5db;
}

/* Generic reporting-breakdown-grid style card (used by StateAssociationReporting, SeasonOverview, GameCard, etc.) */
.reporting-breakdown-title {
    font-size: .75rem;
    font-weight: 600;
    margin: 0 0 .75rem 0;
    padding: 0 3rem;
}

.reporting-card-header {
    background: #eff6ff;
    border-bottom: 1px solid #dbeafe;
    color: #1e40af;
    margin: 0;
    padding: 0.25rem .5rem !important;
    border-radius: 10px 10px 0 0;
}

.reporting-card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    background: #eff6ff;
    border-bottom: 1px solid #dbeafe;
    border-radius: 10px 10px 0 0;
    padding: 0.25rem .5rem;
}

    .reporting-card-header-row .reporting-breakdown-title {
        padding: 0;
        margin: 0;
    }

.atlas-activity-card .atlas-table {
    margin-top: 0;
}

.atlas-activity-card .selectable-row:hover,
.atlas-activity-card .selectable-row.selected {
    background-color: #eef2ff;
}

.atlas-table.sortable-table tbody tr.selectable-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.atlas-table.sortable-table tbody tr.selectable-row.row-restricted {
    cursor: not-allowed;
}

.game-card-report-action-cell {
    text-align: center;
    white-space: nowrap;
}

.game-card-report-action-cell .atlas-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    height: auto;
    line-height: 1.2;
}

.game-card-report-action-cell .atlas-btn-icon-only {
    padding: 0.25rem 0.5rem;
}

.game-card-report .atlas-table thead th {
    padding: 0.2rem .5rem;
    color: #000000;
    opacity: 1;
    font-weight: 700;
}

[data-bs-theme="dark"] .game-card-report .atlas-table thead th {
    color: #cbd5e1;
}

.game-card-report .atlas-table tbody td {
    padding: 0.15rem .5rem;
    font-weight: 500;
    color: #000000;
}

[data-bs-theme="dark"] .game-card-report .atlas-table tbody td {
    color: #d1d5db;
}

[data-bs-theme="dark"] .reporting-card-header,
[data-bs-theme="dark"] .reporting-card-header-row {
    background: #0f172a;
    border-bottom-color: #334155;
    color: #a5b4fc;
}

/* Game card report layout (report-style version of the shared GameCard component) */
.game-card-report {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1rem;
}

.game-card-report--clickable {
    cursor: pointer;
}

.game-card-report-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.game-card-report-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 500;
}

.game-card-report-date i {
    color: #9ca3af;
}

.game-card-report-time {
    color: #9ca3af;
    padding-left: 0.5rem;
    border-left: 1px solid #e5e7eb;
}

.game-card-report-association {
    font-size: 0.75rem;
    color: #667eea;
    background: #ede9fe;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 600;
}

.game-card-report-header.reporting-card-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: none;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 0 0.75rem;
    margin: 0 0 0.75rem;
    color: inherit;
}

[data-bs-theme="dark"] .game-card-report-header.reporting-card-header {
    background: none;
    border-bottom-color: #334155;
    color: inherit;
}

.game-card-report-teams {
    font-size: 0.75rem;
    font-weight:bold;
    color: #9ca3af;
}

[data-bs-theme="dark"] .game-card-report-teams {
    color: #cbd5e1;
}

.game-card-report-time-row {
    font-size: 0.75rem;
    color: #9ca3af;
}

.game-card-report-header .game-card-report-location {
    margin-bottom: 0;
    color: inherit;
}

.game-card-report-header .game-card-report-location i {
    color: inherit;
}

.game-card-report-location {
    font-size: 0.8125rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
}

.game-card-report-location i {
    color: #9ca3af;
    font-size: 0.75rem;
}

.game-card-report-evaluator {
    font-size: 0.6875rem;
    color: #6b7280;
    margin-top: 0.5rem;
}

.game-card-report-col-status,
.game-card-report-col-action {
    text-align: right;
}

.game-card-report-col-status span {
    display: inline-block;
}

/* Game card stepper reuses the my-game-card-step layout (icon + dashed row divider)
   for visual consistency with MyGameCard.razor, but adds a right-aligned status column. */
.game-card-report-stepper .my-game-card-step-title {
    justify-content: space-between;
}

.game-card-report-pill-btn {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    font: inherit;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    min-width: 2.75rem;
    padding: 0.5rem 1rem;
    transition: opacity 0.15s ease, transform 0.1s ease;
}

.game-card-report-pill-btn:hover {
    opacity: 0.85;
}

.game-card-report-pill-btn:active {
    opacity: 0.6;
    transform: scale(0.94);
}

.game-card-report-pill-btn:focus-visible {
    outline: 2px solid var(--atlas-color-blue, #2563eb);
    outline-offset: 2px;
}

.game-card-report-pdf-btn {
    color: #dc2626 !important;
    border-color: #fecaca !important;
    background: #fef2f2 !important;
}

.game-card-report-pdf-btn:hover {
    color: #b91c1c !important;
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
}

.game-card-report-pdf-btn i {
    color: #dc2626;
}

[data-bs-theme="dark"] .game-card-report-pdf-btn {
    color: #f87171 !important;
    border-color: var(--bs-border-color, #334155) !important;
    background: var(--bs-body-bg, #0f172a) !important;
}

[data-bs-theme="dark"] .game-card-report-pdf-btn:hover {
    color: #fca5a5 !important;
    background: var(--bs-body-bg, #0f172a) !important;
    border-color: #f87171 !important;
}

[data-bs-theme="dark"] .game-card-report-pdf-btn i {
    color: #f87171;
}

.game-card-report-fouls-btn {
    background: #667eea !important;
    border-color: #667eea !important;
    color: #ffffff !important;
    font-weight: 600;
}

.game-card-report-fouls-btn:hover {
    background: #5a67d8 !important;
    border-color: #5a67d8 !important;
}

.game-card-report-unavailable {
    font-size: 0.75rem;
    font-style: italic;
    color: #9ca3af;
}

.game-card-report-actions {
    margin-top: auto;
    padding-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

[data-bs-theme="dark"] .game-card-report-date {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .game-card-report-date i {
    color: #94a3b8;
}

[data-bs-theme="dark"] .game-card-report-time {
    color: #94a3b8;
    border-left-color: #334155;
}

[data-bs-theme="dark"] .game-card-report-association {
    color: #a5b4fc;
    background: rgba(129, 140, 248, 0.15);
}

[data-bs-theme="dark"] .game-card-report-location {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .game-card-report-location i {
    color: #94a3b8;
}

[data-bs-theme="dark"] .game-card-report-evaluator {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .game-card-report-evaluator i {
    color: #fbbf24;
}

@media (max-width: 576px) {
    .game-card-report {
        padding: 0.875rem;
    }

    .game-card-report-teams {
        font-size: 0.95rem;
    }

    .game-card-report-time-row,
    .game-card-report-location {
        font-size: 0.85rem;
    }

    .game-card-report-stepper .my-game-card-step-title {
        font-size: 0.85rem;
    }

    .game-card-report-col-status .atlas-status {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
        min-height: 2.25rem;
        min-width: 2.25rem;
    }

    .game-card-report-pill-btn {
        font-size: 0.85rem;
        min-height: 3rem;
        min-width: 3rem;
        padding: 0.6rem 1.1rem;
    }

    .game-card-report-actions .atlas-btn {
        width: 100%;
        justify-content: center;
        font-size: 0.9rem;
        padding: 0.55rem 0.8rem;
        min-height: 2.5rem;
    }

    .game-card-report-actions {
        flex-direction: column;
    }
}

/* ── MyGameCard: guided-workflow stepper card for "My Games This Week" ── */
.my-game-card {
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.my-game-card-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
}

[data-bs-theme="dark"] .my-game-card-header {
    border-bottom-color: #334155;
}

.my-game-card-teams {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #000000;
}

[data-bs-theme="dark"] .my-game-card-teams {
    color: #e2e8f0;
}

.my-game-card-datetime {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

[data-bs-theme="dark"] .my-game-card-datetime {
    color: #94a3b8;
}

.my-game-card-location {
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.125rem;
}

[data-bs-theme="dark"] .my-game-card-location {
    color: #94a3b8;
}

.my-game-card-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.my-game-card-progress-bar {
    flex: 1 1 auto;
    height: 6px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

[data-bs-theme="dark"] .my-game-card-progress-bar {
    background: #334155;
}

.my-game-card-progress-fill {
    height: 100%;
    background: #198754;
    border-radius: 999px;
    transition: width 0.2s ease;
}

.my-game-card-progress-label {
    font-size: 0.6875rem;
    color: #6b7280;
    white-space: nowrap;
    font-weight: 600;
}

[data-bs-theme="dark"] .my-game-card-progress-label {
    color: #94a3b8;
}

.my-game-card-stepper {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.my-game-card-step {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.1rem 0;
    border-bottom: 1px dashed #e5e7eb;
}

[data-bs-theme="dark"] .my-game-card-step {
    border-bottom-color: #334155;
}

.my-game-card-step:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.my-game-card-step-icon {
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    background: #f3f4f6;
    color: #9ca3af;
}

[data-bs-theme="dark"] .my-game-card-step-icon {
    background: #1e293b;
    color: #64748b;
}

.my-game-card-step-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.my-game-card-step-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #000000;
}

[data-bs-theme="dark"] .my-game-card-step-title {
    color: #e2e8f0;
}

.my-game-card-step-action {
    display: flex;
    justify-content: flex-end;
}

.my-game-card-step-action .atlas-btn {
    font-size: 0.75rem;
    padding: 0.3rem 0.75rem;
    height: auto;
    line-height: 1.2;
}

/* Locked steps: dimmed, no call to action emphasis */
.my-game-card-step--locked {
    opacity: 0.55;
}

.my-game-card-step--locked .my-game-card-step-icon {
    background: #f3f4f6;
    color: #9ca3af;
}

/* Completed steps: green icon accent */
.my-game-card-step--completed .my-game-card-step-icon {
    background: #d1f2e1;
    color: #198754;
}

[data-bs-theme="dark"] .my-game-card-step--completed .my-game-card-step-icon {
    background: rgba(25, 135, 84, 0.18);
    color: #4ade80;
}

/* In-progress steps: amber icon accent, this is the "do this next" affordance */
.my-game-card-step--inprogress .my-game-card-step-icon {
    background: #fef3c7;
    color: #b45309;
}

[data-bs-theme="dark"] .my-game-card-step--inprogress .my-game-card-step-icon {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
}

/* Not-started steps: red icon accent, matches the red "0" status pill */
.my-game-card-step--notstarted:not(.my-game-card-step--locked) .my-game-card-step-icon {
    background: #fde2e1;
    color: #dc3545;
}

[data-bs-theme="dark"] .my-game-card-step--notstarted:not(.my-game-card-step--locked) .my-game-card-step-icon {
    background: rgba(220, 53, 69, 0.18);
    color: #f87171;
}

/* Foul Report step ready to submit: amber icon accent to match the yellow
   "Click to Submit" pill instead of the default red not-started color.
   Higher specificity than .my-game-card-step--notstarted so it wins when
   both classes are present on the same step. */
.my-game-card-step--notstarted.my-game-card-step--readytosubmit .my-game-card-step-icon {
    background: #fef3c7;
    color: #b45309;
}

[data-bs-theme="dark"] .my-game-card-step--notstarted.my-game-card-step--readytosubmit .my-game-card-step-icon {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
}

/* Game Day Notice step whose action is no longer available: grayed out/disabled, matching locked steps */
.my-game-card-step--unavailable {
    opacity: 0.55;
}

.my-game-card-step--unavailable .my-game-card-step-icon {
    background: #f3f4f6;
    color: #9ca3af;
}

[data-bs-theme="dark"] .my-game-card-step--unavailable .my-game-card-step-icon {
    background: #1e293b;
    color: #64748b;
}

.my-game-card-unavailable,
.my-game-card-locked-hint {
    font-size: 0.6875rem;
    font-style: italic;
    color: #9ca3af;
}

.my-game-card-evaluator {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

[data-bs-theme="dark"] .my-game-card-evaluator {
    color: #cbd5e1;
}

@media (max-width: 576px) {
    .my-game-card {
        padding: 0.875rem;
    }

    .my-game-card-teams {
        font-size: 1.05rem;
    }

    .my-game-card-datetime,
    .my-game-card-location {
        font-size: 0.85rem;
    }

    .my-game-card-progress-label {
        font-size: 0.75rem;
    }

    .my-game-card-step {
        padding: 0.4rem 0;
        gap: 0.65rem;
    }

    .my-game-card-step-icon {
        width: 2.1rem;
        height: 2.1rem;
        font-size: 0.95rem;
    }

    .my-game-card-step-title {
        font-size: 0.95rem;
    }

    .my-game-card-step-title .atlas-status {
        font-size: 0.85rem;
        padding: 0.4rem 0.75rem;
        min-height: 2rem;
    }

    .my-game-card-step-action .atlas-btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.9rem;
        min-height: 2.4rem;
    }

    .my-game-card-unavailable,
    .my-game-card-locked-hint,
    .my-game-card-evaluator {
        font-size: 0.8rem;
    }
}


.my-game-card-pdf-btn {
    color: #dc2626 !important;
    border-color: #fecaca !important;
    background: #fef2f2 !important;
}

.my-game-card-pdf-btn:hover {
    color: #b91c1c !important;
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
}

.my-game-card-pdf-btn i {
    color: #dc2626;
}

[data-bs-theme="dark"] .my-game-card-pdf-btn {
    color: #f87171 !important;
    border-color: var(--bs-border-color, #334155) !important;
    background: var(--bs-body-bg, #0f172a) !important;
}

[data-bs-theme="dark"] .my-game-card-pdf-btn:hover {
    color: #fca5a5 !important;
    background: var(--bs-body-bg, #0f172a) !important;
    border-color: #f87171 !important;
}

[data-bs-theme="dark"] .my-game-card-pdf-btn i {
    color: #f87171;
}

.my-game-card-fouls-btn {
    background: #667eea !important;
    border-color: #667eea !important;
    color: #ffffff !important;
    font-weight: 600;
}

.my-game-card-fouls-btn:hover {
    background: #5a67d8 !important;
    border-color: #5a67d8 !important;
}

.my-game-card-hint {
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

[data-bs-theme="dark"] .my-game-card-hint {
    color: #94a3b8;
}

.my-game-card-step-title span.atlas-status {
    cursor: default;
}

.my-game-card-step-title span.atlas-status.atlas-status--clickable {
    cursor: pointer;
}


@media (max-width: 420px) {
    .my-game-card-step {
        flex-wrap: wrap;
    }

    .my-game-card-step-title {
        flex-direction: column;
        align-items: flex-start;
    }

    .my-game-card-step-action {
        justify-content: flex-start;
        width: 100%;
    }

    .my-game-card-step-action .atlas-btn {
        width: 100%;
        text-align: center;
    }
}


/* ── Responsive table
/* Apply to both <th> and <td> in the same column position.                  */
/*   col-hide-1400  →  hidden at ≤ 1400px                                   */
/*   col-hide-1024  →  hidden at ≤ 1024px                                   */
/*   col-hide-932   →  hidden at ≤  932px                                   */
/*   col-hide-700   →  hidden at ≤  700px                                   */

@media (max-width: 1400px) {
    .atlas-table th.col-hide-1400,
    .atlas-table td.col-hide-1400 {
        display: none;
    }
}

@media (max-width: 1024px) {
    .atlas-table th.col-hide-1024,
    .atlas-table td.col-hide-1024 {
        display: none;
    }
}

@media (max-width: 932px) {
    .atlas-table th.col-hide-932,
    .atlas-table td.col-hide-932 {
        display: none;
    }
}

@media (max-width: 700px) {
    .atlas-table th.col-hide-700,
    .atlas-table td.col-hide-700 {
        display: none;
    }
}

/* ── Horizontal scroll — opt-in per card ─────────────────────────────────── */
/* Add table-scroll-NNNN to atlas-activity-card to enable scrolling above    */
/* the point where column-hiding alone is insufficient.                      */
/* Example: <div class="atlas-activity-card table-scroll-1024">              */

@media (max-width: 1400px) {
    .atlas-activity-card.table-scroll-1400 {
        overflow-x: auto;
    }
}

@media (max-width: 1024px) {
    .atlas-activity-card.table-scroll-1024 {
        overflow-x: auto;
    }
}

@media (max-width: 932px) {
    .atlas-activity-card.table-scroll-932 {
        overflow-x: auto;
    }
}

/* Below 700px always scroll — no table should clip on a phone */
@media (max-width: 700px) {
    .atlas-activity-card {
        overflow-x: auto;
    }
}

/* ── Responsive Table → Card Swap ─────────────────────────────────────────
   .atlas-activity-card   = table wrapper  (visible by default, hidden at breakpoint)
   .card-list-responsive  = card list      (hidden by default, shown at breakpoint)

   Cards are always full-width stacked — fields INSIDE each card go multi-column.
   Inner grid field columns per breakpoint (orders page, 10 fields):
     ≤1400px  →  4 cols  (Customer | Order Date | Site | Days Old on row 1)
     ≤1024px  →  3 cols
     ≤932px   →  2 cols  (Customer | Order Date on row 1)
     ≤700px   →  1 col
   !important needed to beat legacy atlas-components.css flex rule.
──────────────────────────────────────────────────────────────────────────── */

.card-list-responsive {
    display: none;
}

/* ── 1400 — swap table out, show stacked cards ── */
@media (max-width: 1400px) {
    .card-list-responsive.card-list-break-1400 {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .atlas-activity-card.card-list-break-1400 {
        display: none !important;
    }
}

/* ── 1024 — swap table out, show stacked cards ── */
@media (max-width: 1024px) {
    .card-list-responsive.card-list-break-1024 {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .atlas-activity-card.card-list-break-1024 {
        display: none !important;
    }
}

/* ── 932 — swap table out, show stacked cards ── */
@media (max-width: 932px) {
    .card-list-responsive.card-list-break-932 {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .atlas-activity-card.card-list-break-932 {
        display: none !important;
    }
}

/* ── 700 — swap table out, show stacked cards ── */
@media (max-width: 700px) {
    .card-list-responsive.card-list-break-700 {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .atlas-activity-card.card-list-break-700 {
        display: none !important;
    }
}

/* ── Inner field grid — columns INSIDE each card ──────────────────────────
   The card is always full-width, so these breakpoints control how many
   fields sit side-by-side on each row within the card body.
──────────────────────────────────────────────────────────────────────────── */

/* Default (widest — cards first appear at 1400): 4 fields per row */
.detail-grid.detail-grid-responsive {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem 0.75rem;
}

/* Tablet landscape / large tablet portrait: 3 fields per row */
@media (max-width: 1024px) {
    .detail-grid.detail-grid-responsive {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Small tablet / large phone landscape: 2 fields per row */
@media (max-width: 932px) {
    .detail-grid.detail-grid-responsive {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Phone portrait: 1 field per row */
@media (max-width: 700px) {
    .detail-grid.detail-grid-responsive {
        grid-template-columns: 1fr;
    }
}

/* Even 2-column split, regardless of viewport width */
.detail-grid.detail-grid-responsive-2col {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem 0.75rem;
}

@media (max-width: 700px) {
    .detail-grid.detail-grid-responsive-2col {
        grid-template-columns: 1fr;
    }
}




.no-access-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 3rem 1.5rem;
    gap: 1rem;
}

.no-access-icon {
    font-size: 4rem;
    line-height: 1;
    color: var(--atlas-color-brand);
    opacity: 0.85;
}

.no-access-title {
    font-size: var(--atlas-text-2xl);
    font-weight: var(--atlas-fw-bold);
    color: var(--atlas-color-text);
    margin: 0;
}

.no-access-body {
    font-size: var(--atlas-text-base);
    color: var(--atlas-color-text-muted);
    line-height: var(--atlas-lh-relaxed);
    max-width: 420px;
    margin: 0;
}

.no-access-btn {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 1.25rem;
    background: var(--atlas-color-blue);
    color: #fff;
    border: none;
    border-radius: var(--atlas-radius-md);
    font-size: var(--atlas-text-base);
    font-weight: var(--atlas-fw-semibold);
    cursor: pointer;
    margin-top: 0.5rem;
    transition: opacity 0.15s;
}

    .no-access-btn:hover {
        opacity: 0.88;
    }


/* Modern Toggle Switch Styling */
.form-check.form-switch {
    padding-left: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .form-check.form-switch .form-check-input {
        width: 2.25rem;
        height: 1.25rem;
        margin: 0;
        cursor: pointer;
        background-color: #d1d5db;
        border: none;
        border-radius: 1.25rem;
        transition: background-color 0.25s ease;
        background-image: none;
        position: relative;
    }

        .form-check.form-switch .form-check-input:focus {
            box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.15);
            outline: none;
        }

        .form-check.form-switch .form-check-input:checked {
            background-color: #0d6efd;
            border-color: #0d6efd;
        }

        .form-check.form-switch .form-check-input::before {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            width: 1rem;
            height: 1rem;
            background-color: white;
            border-radius: 50%;
            transition: transform 0.25s ease;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
        }

        .form-check.form-switch .form-check-input:checked::before {
            transform: translateX(1rem);
        }

    .form-check.form-switch .form-check-label {
        font-weight: 400;
        font-size: 0.75rem;
        color: #6c757d;
        cursor: pointer;
        user-select: none;
        margin: 0;
    }

    /* Hover effects */
    .form-check.form-switch .form-check-input:hover:not(:disabled) {
        opacity: 0.9;
    }

    .form-check.form-switch .form-check-input:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

        .form-check.form-switch .form-check-input:disabled ~ .form-check-label {
            opacity: 0.5;
            cursor: not-allowed;
        }

/* Custom Badge Height Override */
.badge {
    padding: 0.4em 0.5em !important;
    line-height: 1.3 !important;
    min-height: 1.6em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    /* Ensure consistent sizing for status badges */
    .badge.bg-danger,
    .badge.bg-warning,
    .badge.bg-primary,
    .badge.bg-success {
        padding: 0.4em 0.5em !important;
        line-height: 1.3 !important;
    }

/* Match the pastel pill coloring used on GameCard's status badges */
.badge.bg-success {
    background-color: #ecfdf5 !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0;
}

.badge.bg-warning {
    background-color: #fffbeb !important;
    color: #b45309 !important;
    border: 1px solid #fde68a;
}

.badge.bg-primary {
    background-color: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe;
}

.badge.bg-danger {
    background-color: #fef2f2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca;
}

/* Dark mode — muted, professional tones instead of bright neon pastels */
[data-bs-theme="dark"] .badge.bg-success {
    background-color: rgba(16, 185, 129, 0.14) !important;
    color: #6ee7b7 !important;
    border: 1px solid rgba(110, 231, 183, 0.35);
}

[data-bs-theme="dark"] .badge.bg-warning {
    background-color: rgba(245, 158, 11, 0.14) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(251, 191, 36, 0.35);
}

[data-bs-theme="dark"] .badge.bg-primary {
    background-color: rgba(59, 130, 246, 0.16) !important;
    color: #93c5fd !important;
    border: 1px solid rgba(147, 197, 253, 0.35);
}

[data-bs-theme="dark"] .badge.bg-danger {
    background-color: rgba(190, 45, 45, 0.22) !important;
    color: #f3a5a5 !important;
    border: 1px solid rgba(243, 165, 165, 0.35);
}

/* Subtle week-navigation icons placed alongside the Start Date label */
.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.field-label-row label {
    margin: 0;
}

.week-nav-group {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.week-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--atlas-color-text-muted, #6b7280);
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

    .week-nav-link i {
        font-size: 0.875rem;
    }

    .week-nav-link .week-nav-icon {
        display: inline-block;
        width: 0.875rem;
        height: 0.875rem;
    }

    .week-nav-link:hover {
        opacity: 1;
        background: rgba(102, 126, 234, 0.12);
        color: var(--atlas-color-blue-light, #667eea);
    }

    .week-nav-link:focus-visible {
        outline: none;
        opacity: 1;
        box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
    }

/* Touch-friendly week-nav buttons (tablets / phones) */
@media (pointer: coarse) {
    .week-nav-group {
        gap: 0.25rem;
    }

    .week-nav-link {
        width: 2.25rem;
        height: 2.25rem;
        min-width: 44px;
        min-height: 44px;
    }

        .week-nav-link .week-nav-icon {
            width: 1rem;
            height: 1rem;
        }
}


/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--atlas-color-surface, #fff);
    color: var(--atlas-color-text, #1f2937);
    border: 1px solid var(--atlas-color-border, #e6e9ef);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding-bottom:.5rem;
}

    .empty-state i {
        font-size: 2rem;
        color: var(--atlas-color-text-subtle, #9ca3af);
    }

    .empty-state p {
        font-size: .85rem;
        color: var(--atlas-color-text-muted, #6b7280);
        margin: 0;
    }



/* Section Titles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: .85rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0;
}

    .section-title i {
        font-size: .85rem;
        color: #667eea;
    }


/* Dashboard filter headers */
.dashboard-context-bar {
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.dashboard-context-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

    .dashboard-context-item i {
        font-size: 0.9rem;
        color: var(--bs-secondary-color, #6b7280);
        flex-shrink: 0;
    }

/* ── Admin Card (mobile/tablet listing card) ──────────────────────────────
   Mirrors GameCard.razor.css styling so admin listing pages (ViewTeams,
   ViewCrews, ViewGames, ViewUsers, ViewTeamContacts) present consistent
   mobile/tablet card views via AdminTeamCard, AdminCrewCard, AdminGameCard,
   AdminUserCard, AdminTeamContactCard. */
.admin-card {
    background: var(--bs-body-bg, #fff);
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--bs-border-color, #e5e7eb);
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--bs-border-color-translucent, #f3f4f6);
}

.admin-card-title {
    font-weight: 600;
    color: var(--bs-body-color, #111827);
    line-height: 1.4;
}

.admin-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.admin-card-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 700px) {
    .admin-card-fields {
        grid-template-columns: 1fr;
    }
}

.admin-card-field label {
    display: block;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--bs-secondary-color, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.15rem;
}

.admin-card-field span {
    font-size: 0.8125rem;
    color: var(--bs-body-color, #374151);
}

/* ── Button spinner ────────────────────────────────────────────────────── */
.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spinner-spin 0.6s linear infinite;
    flex-shrink: 0;
}

@keyframes btn-spinner-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Toggle button (btn-check) active/checked state ────────────────────
   Bootstrap's default .btn-outline-primary checked state uses an indigo/
   purple (#6658dd) that clashes with Atlas's blue palette. Override the
   checked appearance app-wide to match atlas-btn-primary's blue instead. */
.btn-check:checked + .btn-outline-primary,
.btn-check:active + .btn-outline-primary,
.btn-outline-primary:active,
.btn-outline-primary.active {
    background-color: var(--atlas-color-blue-light);
    border-color: var(--atlas-color-blue-light);
    color: #fff;
}

/* ── Prevent iOS Safari auto-zoom on input focus ─────────────────
   Safari zooms the viewport when a focused text input/select/textarea
   has a computed font-size below 16px. Force 16px on small screens only,
   so desktop typography is unaffected. */
@media (max-width: 767.98px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="tel"],
    input[type="search"],
    input[type="url"],
    input[type="date"],
    input[type="datetime-local"],
    input[type="time"],
    input[type="month"],
    input[type="week"],
    textarea,
    select,
    .form-control,
    .form-select,
    .form-floating > .form-control,
    .form-floating > .form-select {
        font-size: 16px !important;
    }
}

/* ── Blazor Server reconnect UI ──────────────────────────────────────────
   Blazor toggles components-reconnect-show/hide/failed/rejected classes on
   #components-reconnect-modal automatically. Keep it small and non-blocking
   so it never covers/consumes clicks on the underlying page. */
#components-reconnect-modal {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    left: auto;
    z-index: 10000;
    pointer-events: none;
    display: none;
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: block;
}

#components-reconnect-modal.components-reconnect-hide {
    display: none;
}

.components-reconnect-modal-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

#components-reconnect-modal.components-reconnect-failed .components-reconnect-modal-content,
#components-reconnect-modal.components-reconnect-rejected .components-reconnect-modal-content {
    background: rgba(220, 38, 38, 0.95);
}

/* ── Fully stacked, full-width phone buttons for status pills ───────────
   Small pill buttons are hard to tap reliably on phones. Below 576px, turn
   the status pills/actions in both MyGameCard.razor and GameCard.razor into
   full-width, stacked buttons for larger, more reliable touch targets. */
@media (max-width: 576px) {
    .my-game-card-step-title {
        flex-direction: column;
        align-items: stretch;
    }

    .my-game-card-step-title span.atlas-status,
    .my-game-card-step-title .game-card-report-pill-btn {
        width: 100%;
        display: flex;
        justify-content: center;
        text-align: center;
        min-height: 2.75rem;
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
}

}