/**
 * WarehouseWrangler - Main Application Styles
 * Dashboard and core application styling aligned to the WarehouseWrangler design system
 */

:root {
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

:root[data-theme="light"],
:root:not([data-theme]) {
    --color-primary: #0056B3;
    --color-accent: #0070D1;
    --color-neutral: #F7F7F7;
    --color-surface: #FFFFFF;
    --color-surface-alt: #F0F5FF;
    --color-surface-elevated: #FFFFFF;
    --color-text: #333333;
    --color-muted: #666666;
    --text-strong: #1C2333;
    --text-muted: #4A5672;
    --surface: var(--color-surface);
    --surface-elevated: var(--color-surface-elevated);
    --surface-subtle: #EEF1F7;
    --border-subtle: var(--color-border);
    --border-strong: var(--color-border-strong);
    --color-border: #DDDDDD;
    --color-border-strong: #BFC8D2;
    --accent: var(--color-accent);
    --success: var(--color-success);
    --warning: var(--color-warning);
    --danger: var(--color-danger);
    --color-success: #28A745;
    --color-warning: #FFC107;
    --color-danger: #DC3545;
    --shadow-soft: 0 12px 24px rgba(0, 30, 77, 0.08);
    --shadow-card: 0 8px 20px rgba(0, 30, 77, 0.06);
    --shadow-modal: 0 20px 45px rgba(0, 52, 109, 0.18);
    --modal-overlay: rgba(7, 33, 68, 0.45);
    --modal-close-bg: rgba(255, 255, 255, 0.85);
    --tooltip-background: rgba(15, 25, 40, 0.95);
    --tooltip-text: #FFFFFF;
    --focus-ring-color: rgba(0, 86, 179, 0.15);
    --placeholder-color: rgba(51, 51, 51, 0.55);
    --spinner-track-color: rgba(255, 255, 255, 0.6);
    --spinner-cap-color: var(--color-surface);
    --badge-color-black-bg: #333333;
    --badge-color-black-text: #FFFFFF;
    --badge-color-white-bg: #F7F7F7;
    --badge-color-white-text: #333333;
    --badge-color-white-border: var(--color-border);
    --badge-success-bg: rgba(40, 167, 69, 0.15);
    --badge-success-text: var(--color-success);
    --badge-warning-bg: rgba(255, 193, 7, 0.2);
    --badge-warning-text: #B77900;
    --badge-danger-bg: rgba(220, 53, 69, 0.15);
    --badge-danger-text: var(--color-danger);
    --status-success-bg: rgba(40, 167, 69, 0.18);
    --status-success-text: #0F5E27;
    --status-warning-bg: rgba(255, 193, 7, 0.18);
    --status-warning-text: #946200;
    --status-danger-bg: rgba(220, 53, 69, 0.18);
    --status-danger-text: #8C1B24;
    --location-incoming-bg: rgba(0, 86, 179, 0.15);
    --location-incoming-text: var(--color-primary);
    --location-wml-bg: rgba(40, 167, 69, 0.15);
    --location-wml-text: var(--color-success);
    --location-gmr-bg: rgba(156, 39, 176, 0.15);
    --location-gmr-text: #6D1E77;
    --landing-background: radial-gradient(circle at top, rgba(0, 86, 179, 0.08), transparent 60%),
        linear-gradient(135deg, #F0F5FF 0%, #F7F9FF 40%, #EEF3FF 100%);
    --landing-hero-glow: radial-gradient(circle at center, rgba(0, 86, 179, 0.12), transparent 65%);
    --landing-metric-bg: rgba(0, 86, 179, 0.06);
    --landing-metric-border: rgba(0, 86, 179, 0.12);
    --login-card-border: rgba(0, 86, 179, 0.18);
    --login-card-shadow: 0 20px 45px rgba(0, 52, 109, 0.18);
    --alert-error-bg: #FDE8E8;
    --alert-error-border: #F1AEB5;
    --alert-error-text: #B42318;
    --alert-success-bg: #E7F6ED;
    --alert-success-border: #A4DFB8;
    --alert-success-text: #146C43;
    --brand-gradient-start: #004A99;
    --brand-gradient-end: #0070D1;
}

:root[data-theme="dark"] {
    --color-primary: #4C9CFF;
    --color-accent: #82C4FF;
    --color-neutral: #16233B;
    --color-surface: #111C2D;
    --color-surface-alt: #0B1525;
    --color-surface-elevated: #1A2840;
    --color-text: #E2E8F0;
    --color-muted: #9AA5B8;
    --text-strong: #F1F5FF;
    --text-muted: #9FB3D1;
    --surface: var(--color-surface);
    --surface-elevated: var(--color-surface-elevated);
    --surface-subtle: rgba(148, 163, 184, 0.12);
    --border-subtle: var(--color-border);
    --border-strong: var(--color-border-strong);
    --color-border: rgba(148, 163, 184, 0.28);
    --color-border-strong: rgba(148, 163, 184, 0.42);
    --accent: var(--color-accent);
    --success: var(--color-success);
    --warning: var(--color-warning);
    --danger: var(--color-danger);
    --color-success: #4ADE80;
    --color-warning: #FACC15;
    --color-danger: #F87171;
    --shadow-soft: 0 16px 40px rgba(2, 6, 23, 0.45);
    --shadow-card: 0 12px 32px rgba(2, 6, 23, 0.4);
    --shadow-modal: 0 28px 56px rgba(2, 6, 23, 0.65);
    --modal-overlay: rgba(2, 6, 23, 0.65);
    --modal-close-bg: rgba(30, 41, 59, 0.85);
    --tooltip-background: rgba(15, 23, 42, 0.95);
    --tooltip-text: #E2E8F0;
    --focus-ring-color: rgba(76, 156, 255, 0.35);
    --placeholder-color: rgba(148, 163, 184, 0.65);
    --spinner-track-color: rgba(226, 232, 240, 0.35);
    --spinner-cap-color: var(--color-surface);
    --badge-color-black-bg: #0B1220;
    --badge-color-black-text: #F8FAFC;
    --badge-color-white-bg: #E2E8F0;
    --badge-color-white-text: #0B1220;
    --badge-color-white-border: rgba(148, 163, 184, 0.4);
    --badge-success-bg: rgba(74, 222, 128, 0.16);
    --badge-success-text: #BBF7D0;
    --badge-warning-bg: rgba(250, 204, 21, 0.2);
    --badge-warning-text: #FCD34D;
    --badge-danger-bg: rgba(248, 113, 113, 0.18);
    --badge-danger-text: #FCA5A5;
    --status-success-bg: rgba(74, 222, 128, 0.2);
    --status-success-text: #BBF7D0;
    --status-warning-bg: rgba(250, 204, 21, 0.22);
    --status-warning-text: #FCD34D;
    --status-danger-bg: rgba(248, 113, 113, 0.24);
    --status-danger-text: #FCA5A5;
    --location-incoming-bg: rgba(59, 130, 246, 0.22);
    --location-incoming-text: #93C5FD;
    --location-wml-bg: rgba(52, 211, 153, 0.22);
    --location-wml-text: #A7F3D0;
    --location-gmr-bg: rgba(192, 132, 252, 0.22);
    --location-gmr-text: #E9D5FF;
    --landing-background: radial-gradient(circle at top, rgba(76, 156, 255, 0.12), transparent 55%),
        linear-gradient(135deg, #0B1220 0%, #0F172A 45%, #111C2D 100%);
    --landing-hero-glow: radial-gradient(circle at center, rgba(76, 156, 255, 0.18), transparent 65%);
    --landing-metric-bg: rgba(17, 28, 45, 0.8);
    --landing-metric-border: rgba(148, 163, 184, 0.28);
    --login-card-border: rgba(148, 163, 184, 0.28);
    --login-card-shadow: 0 28px 56px rgba(2, 6, 23, 0.65);
    --alert-error-bg: rgba(248, 113, 113, 0.16);
    --alert-error-border: rgba(248, 113, 113, 0.32);
    --alert-error-text: #FCA5A5;
    --alert-success-bg: rgba(74, 222, 128, 0.16);
    --alert-success-border: rgba(74, 222, 128, 0.32);
    --alert-success-text: #BBF7D0;
    --brand-gradient-start: #5B9BFF;
    --brand-gradient-end: #7AC2FF;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--color-neutral);
    color: var(--color-text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

.material-icons-outlined {
    font-size: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ============================================================================
   LOADING SCREEN
   ============================================================================ */

.loading-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(0, 86, 179, 0.85), rgba(0, 51, 107, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    color: var(--color-surface);
    text-align: center;
    padding: 2rem;
}

.loading-icon {
    font-size: 48px;
    margin-bottom: 1rem;
}

.loading-title {
    font-size: 1.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.loading-text {
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.85);
}

/* ============================================================================
   HEADER
   ============================================================================ */

.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 2.5rem;
    position: sticky;
    top: 0;
    z-index: 60;
}

.branding {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0, 86, 179, 0.12);
    color: var(--color-primary);
    font-size: 28px;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0, 86, 179, 0.08);
    padding: 4px 6px;
    object-fit: contain;
    object-position: center;
    display: block;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 600;
}

.brand-name {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--color-primary);
    text-transform: none;
    background: linear-gradient(90deg, var(--brand-gradient-start) 0%, var(--brand-gradient-end) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.brand-tagline {
    font-size: 0.875rem;
    color: var(--color-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}


.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 86, 179, 0.24);
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    color: var(--color-primary);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:is(:hover, :focus-visible) {
    background: rgba(0, 86, 179, 0.08);
}

.primary-nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    position: relative;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-item {
    position: relative;
    display: flex;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-sm);
    color: var(--color-muted);
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
}

a.nav-link {
    cursor: pointer;
}

.nav-link:is(:hover, :focus-visible) {
    background: rgba(0, 86, 179, 0.12);
    color: var(--color-primary);
}

.nav-link.is-active,
.nav-item--active > .nav-link,
.nav-item--open > .nav-link {
    background: rgba(0, 86, 179, 0.18);
    color: var(--color-primary);
    box-shadow: inset 0 0 0 1px rgba(0, 86, 179, 0.24);
}

.nav-link__chevron {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.nav-item--open > .nav-link .nav-link__chevron,
.nav-item--active > .nav-link .nav-link__chevron {
    transform: rotate(180deg);
}

.nav-submenu {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 220px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 40;
}

.nav-item--open > .nav-submenu,
.nav-item--active > .nav-submenu {
    display: flex;
}

.nav-sublink {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--color-muted);
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-sublink:is(:hover, :focus-visible) {
    background: rgba(0, 86, 179, 0.12);
    color: var(--color-primary);
}

.nav-sublink.is-active {
    background: rgba(0, 86, 179, 0.18);
    color: var(--color-primary);
    box-shadow: inset 0 0 0 1px rgba(0, 86, 179, 0.24);
}

.header-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-surface-elevated);
    color: var(--color-text);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle:is(:hover, :focus-visible) {
    border-color: var(--color-border-strong);
    color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--focus-ring-color);
    outline: none;
}

.theme-toggle.is-dark {
    border-color: var(--color-border-strong);
    background: rgba(76, 156, 255, 0.14);
}

.theme-toggle__icon {
    font-size: 18px;
}

.theme-toggle__icon--dark {
    display: none;
}

.theme-toggle.is-dark .theme-toggle__icon--dark {
    display: inline-flex;
}

.theme-toggle.is-dark .theme-toggle__icon--light {
    display: none;
}

.theme-toggle__label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.user-menu__theme-toggle {
    width: 100%;
    justify-content: flex-start;
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    color: var(--color-muted);
    box-shadow: none;
}

.user-menu__theme-toggle:is(:hover, :focus-visible) {
    background: rgba(0, 86, 179, 0.12);
    color: var(--color-primary);
    box-shadow: none;
}

.user-menu__theme-toggle.is-dark {
    border: none;
    background: rgba(76, 156, 255, 0.14);
    color: var(--color-primary);
}

.user-menu {
    position: relative;
}

.user-menu__trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: rgba(0, 86, 179, 0.06);
    color: var(--color-muted);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.user-menu__trigger:is(:hover, :focus-visible) {
    background: rgba(0, 86, 179, 0.12);
    color: var(--color-primary);
}

.user-display-name-wrapper {
    display: inline-flex;
    align-items: center;
}

.user-menu__chevron {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.user-menu__dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    min-width: 220px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.25rem;
    z-index: 50;
}

.user-menu.is-open .user-menu__dropdown {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-menu.is-open .user-menu__trigger {
    background: rgba(0, 86, 179, 0.18);
    color: var(--color-primary);
    box-shadow: inset 0 0 0 1px rgba(0, 86, 179, 0.24);
}

.user-menu.is-open .user-menu__chevron {
    transform: rotate(180deg);
}

.user-menu__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--color-muted);
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.user-menu__link:is(:hover, :focus-visible) {
    background: rgba(0, 86, 179, 0.12);
    color: var(--color-primary);
}

.user-menu__link.is-active {
    background: rgba(0, 86, 179, 0.18);
    color: var(--color-primary);
    box-shadow: inset 0 0 0 1px rgba(0, 86, 179, 0.24);
}

.user-menu__section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem 0.75rem 0.5rem;
    border-top: 1px solid var(--color-border);
}

.user-menu__section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
}

.user-menu__section-helper {
    font-size: 0.75rem;
    color: var(--color-muted);
    line-height: 1.4;
}

.user-menu__locale-options {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-menu__locale-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-muted);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.user-menu__locale-button:is(:hover, :focus-visible) {
    background: rgba(0, 86, 179, 0.12);
    color: var(--color-primary);
}

.user-menu__locale-button.is-active {
    background: rgba(0, 86, 179, 0.18);
    color: var(--color-primary);
    border-color: rgba(0, 86, 179, 0.24);
    box-shadow: inset 0 0 0 1px rgba(0, 86, 179, 0.24);
}

.user-menu__locale-button.is-active .user-menu__locale-code {
    color: var(--color-primary);
}

.user-menu__locale-button[disabled] {
    cursor: progress;
    opacity: 0.7;
}

.user-menu__locale-label {
    font-size: 0.85rem;
}

.user-menu__locale-code {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-muted);
}

.user-display {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-muted);
    font-weight: 500;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.site-footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    margin-top: 2rem;
    padding: 1.5rem 2.5rem;
    color: var(--color-muted);
    font-size: 0.875rem;
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem 2rem;
}

.site-footer__section {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.site-footer__copyright {
    font-weight: 500;
}

.site-footer__year {
    color: var(--color-text);
}

.site-footer__created-by {
    gap: 0.75rem;
}

.site-footer__logo {
    height: 24px;
    width: auto;
    display: inline-block;
    filter: brightness(0) saturate(100%) invert(15%) sepia(67%) saturate(2864%) hue-rotate(203deg) brightness(93%) contrast(95%);
}

.site-footer__link {
    color: var(--color-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.site-footer__label {
    color: var(--color-muted);
    font-weight: 500;
}

.site-footer__support {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.site-footer__support-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.site-footer__copy-email {
    border: 1px solid var(--color-border-strong);
    border-radius: 999px;
    background: transparent;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.35rem 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.site-footer__copy-email:hover,
.site-footer__copy-email:focus {
    background: var(--color-primary);
    color: var(--color-surface);
    border-color: var(--color-primary);
}

.site-footer__copy-email:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.site-footer__support-feedback {
    color: var(--color-muted);
    font-size: 0.75rem;
    min-height: 1em;
}

@media (max-width: 720px) {
    .site-footer {
        padding: 1.5rem 1.5rem 2rem;
    }

    .site-footer__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .site-footer__support {
        width: 100%;
    }

    .site-footer__support-actions {
        justify-content: flex-start;
    }
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.65rem 1.2rem;
    border: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn span.material-icons-outlined {
    font-size: 22px;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.btn-primary:is(:hover, :focus-visible) {
    background: #004a99;
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(0, 86, 179, 0.12);
    color: var(--color-primary);
}

.btn-secondary:is(:hover, :focus-visible) {
    background: rgba(0, 86, 179, 0.18);
}

.btn-logout {
    background: var(--color-surface);
    color: var(--color-primary);
    border: 1px solid rgba(0, 86, 179, 0.24);
    box-shadow: none;
}

.btn-logout:is(:hover, :focus-visible) {
    background: rgba(0, 86, 179, 0.08);
}

/* ============================================================================
   MAIN CONTENT
   ============================================================================ */

.app-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 2rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

@media (min-width: 1440px) {
    .app-main {
        max-width: min(1600px, 90vw);
    }
}

.hero {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    padding: 2.5rem;
    display: flex;
    gap: 2.5rem;
    align-items: stretch;
}

.hero-content {
    flex: 1 1 55%;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hero-content h2 {
    font-size: 2rem;
    font-weight: 600;
}

.hero-content p {
    color: var(--color-muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-highlights {
    flex: 1 1 35%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.highlight-card {
    display: flex;
    gap: 1rem;
    background: rgba(0, 86, 179, 0.06);
    border-radius: var(--radius-md);
    padding: 1.1rem 1.3rem;
    border: 1px solid rgba(0, 86, 179, 0.15);
}

.highlight-card--updated {
    position: relative;
    transform-origin: center;
    animation: dashboard-highlight-glow 1.4s ease-out, dashboard-highlight-wiggle 0.4s ease-in-out 0.1s 2 alternate;
}

.highlight-card--updated,
.highlight-card--updated-static {
    box-shadow: 0 12px 28px rgba(92, 107, 192, 0.2), 0 0 0 4px rgba(92, 107, 192, 0.18);
    border-color: rgba(92, 107, 192, 0.45);
}

.highlight-card--updated-static {
    transition: box-shadow 0.4s ease;
}

@keyframes dashboard-highlight-glow {
    0% {
        box-shadow: 0 8px 18px rgba(92, 107, 192, 0.05), 0 0 0 0 rgba(92, 107, 192, 0.05);
    }
    40% {
        box-shadow: 0 16px 36px rgba(92, 107, 192, 0.3), 0 0 0 10px rgba(92, 107, 192, 0.18);
    }
    100% {
        box-shadow: 0 12px 28px rgba(92, 107, 192, 0.0), 0 0 0 0 rgba(92, 107, 192, 0.0);
    }
}

@keyframes dashboard-highlight-wiggle {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(1.8deg);
    }
    50% {
        transform: rotate(0deg);
    }
    75% {
        transform: rotate(-1.8deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .highlight-card--updated {
        animation: none;
    }
}

.highlight-icon {
    font-size: 28px;
}

.highlight-copy h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.highlight-copy p {
    color: var(--color-muted);
    font-size: 0.95rem;
}

.success {
    color: var(--color-success);
}

.warning {
    color: var(--color-warning);
}

.danger {
    color: var(--color-danger);
}

.dashboard-grid {
    display: grid;
    gap: 1.75rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.action-list,
.status-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.action-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
    border-radius: var(--radius-md);
    background: rgba(0, 86, 179, 0.05);
    color: var(--color-primary);
    transition: background 0.2s ease, transform 0.2s ease;
}

.action-link:is(:hover, :focus-visible) {
    background: rgba(0, 86, 179, 0.12);
    transform: translateX(4px);
}

.status-list li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--color-muted);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04);
}

.next-steps {
    counter-reset: steps;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    color: var(--color-muted);
    padding-left: 1.5rem;
}

.next-steps li {
    counter-increment: steps;
    position: relative;
}

.next-steps li::before {
    content: counter(steps);
    position: absolute;
    left: -1.5rem;
    top: 0.1rem;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    background: rgba(0, 86, 179, 0.12);
    color: var(--color-primary);
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 1200px) {
    .site-header {
        padding: 1.1rem 2rem;
    }
}

@media (max-width: 1040px) {
    .site-header {
        gap: 1rem;
    }
}

@media (max-width: 960px) {
    .site-header {
        padding: 1rem 1.5rem;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .primary-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        justify-content: center;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 12px 24px rgba(0, 30, 77, 0.12);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-1rem);
        transition: opacity 0.2s ease, transform 0.2s ease;
        z-index: 55;
    }

    .primary-nav.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.25rem;
        gap: 0.25rem;
    }

    .nav-link {
        width: 100%;
        justify-content: flex-start;
    }

    .nav-item--has-children {
        width: 100%;
        flex-direction: column;
    }

    .nav-item--has-children > .nav-link {
        justify-content: space-between;
    }

    .nav-item--has-children .nav-submenu {
        position: static;
        min-width: unset;
        border: none;
        box-shadow: none;
        padding: 0.25rem 0 0.5rem 1rem;
    }

    .header-actions {
        margin-left: 0;
    }
}

@media (max-width: 900px) {
    .hero {
        flex-direction: column;
    }

    .hero-highlights {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .highlight-card {
        flex: 1 1 220px;
    }
}

@media (max-width: 640px) {
    .site-header {
        gap: 0.75rem;
    }

    .header-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.5rem;
    }

    .user-menu__trigger {
        width: 100%;
        justify-content: space-between;
    }

    .app-main {
        padding: 2rem 1.25rem 2.5rem;
    }

    .hero {
        padding: 1.75rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
