:root {
    color-scheme: dark;

    /* ======================================================================
       INFOPATH V3.5 — UNIFIED DARK LIQUID GLASS × AURORA DESIGN SYSTEM
       Single source of truth for Dashboard, Hubs, Research & Management UI
       ====================================================================== */
    --aurora-navy: #081D2C;
    --aurora-midnight: #0B293D;
    --aurora-ocean: #10364C;
    --aurora-surface-hi: #17475B;
    --aurora-teal: #24B6C7;
    --aurora-cyan: #43CDDA;
    --aurora-aqua: #A5F3FC;
    --aurora-ice: #E7F8FF;
    --aurora-white: #FFFFFF;

    /* Semantic & Action Palette */
    --teal-deep: #148C98;
    --teal: #24B6C7;
    --teal-action: #1796A5;
    --teal-action-hover: #24B6C7;
    --cyan-accent: #43CDDA;
    --ice-blue: #E7F8FF;
    --light-glass: rgba(16, 54, 76, 0.82);
    --dark-text: #081D2C;
    --glass-blur: blur(22px) saturate(165%);
    --shadow-glass-md: var(--shadow-card);
    --shadow-glass-lg: var(--shadow-shell);
    --success: #34D399;
    --warning: #FBBF24;
    --danger: #FB7185;

    /* Unified Dark Liquid Glass Surfaces */
    --glass-dark: rgba(11, 41, 61, 0.72);
    --glass-dark-strong: rgba(8, 29, 44, 0.90);
    --glass-dark-border: rgba(125, 205, 225, 0.24);
    --glass-dark-hover: rgba(23, 71, 91, 0.82);

    --glass-light: rgba(16, 54, 76, 0.76);
    --glass-light-strong: rgba(16, 54, 76, 0.84);
    --glass-light-solid: #10364C;
    --glass-light-border: rgba(125, 205, 225, 0.22);
    --glass-blur-shell: blur(24px) saturate(170%);
    --glass-blur-card: blur(20px) saturate(155%);

    /* Soft Optical Shadows (Refined Rim, Zero Glare) */
    --shadow-shell:
        0 18px 42px rgba(3, 14, 24, 0.42),
        inset 0 1px 0 rgba(215, 245, 255, 0.22),
        inset 0 -6px 16px rgba(36, 182, 199, 0.08);
    --shadow-card:
        0 14px 34px rgba(3, 14, 24, 0.34),
        inset 0 1px 0 rgba(215, 245, 255, 0.20),
        inset 0 -6px 16px rgba(36, 182, 199, 0.06);
    --shadow-card-hover:
        0 20px 44px rgba(3, 14, 24, 0.46),
        0 0 22px rgba(67, 205, 218, 0.14),
        inset 0 1.5px 1px rgba(215, 245, 255, 0.30);
    --shadow-cyan: 0 10px 26px rgba(67, 205, 218, 0.34);

    /* Typography Ink Tokens (WCAG AA+ on Dark Glass) */
    --ink-primary: #F0F8FF;
    --ink-secondary: #AACAD8;
    --ink-muted: #86A8B9;

    --ink-on-dark: #F0F8FF;
    --ink-on-dark-soft: #D7EEF7;
    --ink-on-dark-muted: #AACAD8;

    /* Spacing Scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;

    /* Unified Workspace Tokens (All Inner Pages Match Dashboard Dark Liquid Glass) */
    --ip-bg: #081D2C;
    --ip-sidebar: rgba(11, 41, 61, 0.72);
    --ip-panel: rgba(16, 54, 76, 0.80);
    --ip-hover: rgba(23, 71, 91, 0.88);
    --ip-border: rgba(125, 205, 225, 0.22);
    --ip-control-border: rgba(125, 205, 225, 0.34);
    --ip-primary: #24B6C7;
    --ip-link: #6CE2F0;
    --ip-secondary: #82E9F7;
    --ip-lavender: rgba(23, 71, 91, 0.74);
    --ip-control: rgba(8, 29, 44, 0.88);
    --ip-stripe: rgba(11, 41, 61, 0.62);
    --ip-fill: #189AA8;
    --ip-fill-hover: #24B6C7;
    --ip-fill-active: #147E8B;

    --ip-text: #F0F8FF;
    --ip-muted: #AACAD8;
    --ip-muted-soft: #86A8B9;

    /* Semantic Badge Tones (Dark-Glass Native, High Contrast) */
    --ip-mint: rgba(52, 211, 153, 0.18);
    --ip-sky: rgba(36, 182, 199, 0.20);
    --ip-peach: rgba(251, 146, 60, 0.20);
    --ip-cream: rgba(251, 191, 36, 0.18);
    --ip-rose: rgba(251, 113, 133, 0.20);
    --ip-accent: #24B6C7;
    --ip-sky-text: #8AEBF7;
    --ip-peach-text: #FDBA74;
    --ip-success: #34D399;
    --ip-success-text: #6EE7B7;
    --ip-warning: #FBBF24;
    --ip-warning-text: #FDE68A;
    --ip-danger: #FB7185;
    --ip-danger-text: #FDA4AF;

    /* Typography, Radii & Motion */
    --ip-font: "Be Vietnam Pro", Inter, system-ui, "Segoe UI", sans-serif;
    --ip-font-display: "Be Vietnam Pro", Inter, system-ui, sans-serif;
    --ip-radius: 20px;
    --ip-radius-small: 12px;
    --ip-radius-hero: 22px;
    --ip-motion-fast: 160ms cubic-bezier(.22, .68, .28, 1);
    --ip-motion: 240ms cubic-bezier(.22, .68, .28, 1);
    --ip-motion-slow: 340ms cubic-bezier(.22, .68, .28, 1);
    --ip-shadow-hover: var(--shadow-card-hover);
}

html {
    scroll-padding-top: 90px;
    background-color: #081D2C;
}

[id] {
    scroll-margin-top: 90px;
}

.ip-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
}

/* Global Native Select & Option Fix (Chrome, Edge, Firefox — Always Readable) */
select {
    color-scheme: dark;
    background-color: #0B273A;
    color: #F0F8FF;
}

select option,
select optgroup {
    background-color: #0B2538;
    color: #F0F8FF;
}

select option:checked {
    background-color: #175B73;
    color: #FFFFFF;
}

select option:disabled {
    color: #7C9EB0;
}

/* Liquid Glass Pill Button */
.ip-button,
.ip-shell .ip-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 9px 18px;
    border: 1px solid rgba(165, 243, 252, 0.48);
    border-radius: 999px;
    background: linear-gradient(
        135deg,
        rgba(24, 154, 168, 0.92) 0%,
        rgba(36, 182, 199, 0.88) 54%,
        rgba(67, 205, 218, 0.78) 100%
    );
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    color: #FFFFFF;
    font: 700 0.84rem/1.3 var(--ip-font);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow:
        0 10px 24px rgba(4, 22, 36, 0.34),
        inset 0 1.5px 1px rgba(255, 255, 255, 0.56),
        inset 0 -4px 10px rgba(7, 28, 44, 0.24);
    transition: background-color var(--ip-motion), color var(--ip-motion), border-color var(--ip-motion), transform var(--ip-motion), box-shadow var(--ip-motion);
}

.ip-button:hover,
.ip-shell .ip-button:hover {
    background: linear-gradient(
        135deg,
        rgba(36, 182, 199, 0.96) 0%,
        rgba(67, 205, 218, 0.92) 56%,
        rgba(120, 232, 242, 0.86) 100%
    );
    border-color: rgba(255, 255, 255, 0.82);
    color: #FFFFFF;
    transform: translateY(-1.5px);
    box-shadow:
        0 14px 30px rgba(67, 205, 218, 0.30),
        inset 0 2px 1.5px rgba(255, 255, 255, 0.72);
}

.ip-button:active,
.ip-shell .ip-button:active {
    transform: translateY(0);
}

.ip-button .ip-icon {
    width: 16px;
    height: 16px;
}

.ip-button--secondary,
.ip-shell .ip-button--secondary {
    border-color: rgba(125, 205, 225, 0.34);
    background: rgba(16, 54, 76, 0.82);
    color: #F0F8FF;
    box-shadow:
        0 6px 16px rgba(4, 18, 30, 0.24),
        inset 0 1px 0 rgba(215, 245, 255, 0.24);
}

.ip-button--secondary:hover,
.ip-shell .ip-button--secondary:hover,
.ip-shell .ip-button--secondary:active {
    border-color: rgba(108, 226, 240, 0.68);
    background: rgba(23, 71, 91, 0.94);
    color: #FFFFFF;
    box-shadow: 0 10px 22px rgba(4, 18, 30, 0.34);
}

.ip-button:disabled,
.ip-button[aria-disabled="true"],
.ip-button[aria-busy="true"] {
    opacity: .55;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.ip-button[aria-busy="true"]::before {
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    content: "";
    animation: ip-spin .8s linear infinite;
}

@keyframes ip-spin {
    to { transform: rotate(1turn); }
}

.ip-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid rgba(125, 205, 225, 0.30);
    border-radius: 999px;
    background: var(--ip-sky);
    color: var(--ip-sky-text);
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.4;
}

.ip-badge--success,
.ip-toast--success {
    border-color: rgba(52, 211, 153, 0.40);
    background: var(--ip-mint);
    color: var(--ip-success-text);
}

.ip-badge--warning {
    border-color: rgba(251, 191, 36, 0.42);
    background: var(--ip-cream);
    color: var(--ip-warning-text);
}

.ip-badge--danger {
    border-color: rgba(251, 113, 133, 0.40);
    background: var(--ip-rose);
    color: var(--ip-danger-text);
}

.ip-empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: clamp(20px, 4vw, 36px) 16px;
    border: 1px dashed var(--ip-control-border);
    border-radius: var(--ip-radius);
    background: rgba(11, 41, 61, 0.68);
    color: var(--ip-muted);
    text-align: center;
}

.ip-loading {
    position: fixed;
    z-index: 35;
    inset-inline-end: clamp(16px, 3vw, 28px);
    inset-block-end: clamp(16px, 3vw, 24px);
    display: grid;
    align-content: start;
    gap: 8px;
    width: min(250px, calc(100% - 32px));
    padding: 14px;
    border: 1px solid var(--glass-dark-border);
    border-radius: 16px;
    background: var(--glass-dark-strong);
    backdrop-filter: var(--glass-blur-shell);
    -webkit-backdrop-filter: var(--glass-blur-shell);
    color: var(--ink-on-dark-soft);
    font-size: .8125rem;
    box-shadow: var(--shadow-shell);
}

.ip-loading[hidden] {
    display: none;
}

.ip-skeleton {
    height: 8px;
    border-radius: 999px;
    background: rgba(165, 243, 252, 0.25);
    animation: ip-pulse 1.15s ease-in-out infinite alternate;
}

.ip-skeleton + .ip-skeleton {
    width: 65%;
}

@keyframes ip-pulse {
    to { opacity: .45; }
}

.ip-shell :focus-visible,
.ip-button:focus-visible,
.ip-skip:focus-visible {
    outline: 2px solid var(--aurora-cyan);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .ip-button {
        transition: none;
    }

    .ip-button[aria-busy="true"]::before,
    .ip-skeleton {
        animation: none;
    }
}
