:root {
    --orama-royal-blue: #12379B;
    --orama-horizon-blue: #2F5FD0;
    --orama-deep-navy: #0B1F5E;
    --orama-observatory-white: #F7F7F5;
    --orama-silver-lens: #C8CEDA;
    --orama-gold-accent: #D4A437;
    --orama-success: #2E8B57;
    --orama-warning: #D4A437;
    --orama-danger: #A94442;
    --orama-white: #FFFFFF;
    --orama-ink: #0F1B3D;
    --orama-muted-blue: #5A6E96;
    --orama-border-soft: rgba(200, 206, 218, 0.72);
    --orama-border-strong: rgba(11, 31, 94, 0.12);
    --orama-shadow-xs: 0 8px 20px rgba(11, 31, 94, 0.06);
    --orama-shadow-sm: 0 16px 32px rgba(11, 31, 94, 0.08);
    --orama-shadow-md: 0 24px 52px rgba(11, 31, 94, 0.11);
    --orama-shadow-lg: 0 32px 72px rgba(11, 31, 94, 0.14);
    --radius-xs: 10px;
    --radius-sm: 14px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --sidebar-width: 248px;
    --page-max-width: 1540px;
    --topbar-height: 84px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 28px;
    --space-8: 32px;
    --space-9: 40px;
    --space-10: 48px;
    --text-xs: 12px;
    --text-sm: 13px;
    --text-md: 14px;
    --text-lg: 16px;
    --text-xl: 18px;
    --text-2xl: 24px;
    --text-3xl: 32px;
    --font-brand: "Cinzel", "Playfair Display", serif;
    --font-ui: "Inter", "Montserrat", sans-serif;

    /* Compatibility aliases for current templates */
    --orama-blue-950: var(--orama-deep-navy);
    --orama-blue-900: var(--orama-royal-blue);
    --orama-blue-800: var(--orama-horizon-blue);
    --orama-blue-700: #4C70D8;
    --orama-gold-500: var(--orama-gold-accent);
    --orama-gold-100: #F6E9C7;
    --orama-slate-950: var(--orama-ink);
    --orama-slate-800: #334768;
    --orama-slate-700: var(--orama-muted-blue);
    --orama-slate-500: #8793AA;
    --orama-slate-300: #D9DFEA;
    --orama-slate-200: #E8EDF5;
    --orama-slate-100: #F4F7FB;
    --color-bg: var(--orama-observatory-white);
    --color-surface: var(--orama-white);
    --color-surface-muted: #F9FBFF;
    --color-text: var(--orama-ink);
    --color-text-secondary: var(--orama-muted-blue);
    --color-text-muted: #8A95AA;
    --color-border: var(--orama-silver-lens);
    --color-border-light: var(--orama-border-soft);
    --color-primary: var(--orama-royal-blue);
    --color-primary-hover: var(--orama-horizon-blue);
    --color-sidebar: var(--orama-deep-navy);
    --shadow-soft: var(--orama-shadow-sm);
    --shadow-md: var(--orama-shadow-md);
    --t: all 0.22s ease;
    --t-slow: all 0.32s ease;
    --sp-2: var(--space-2);
    --sp-3: var(--space-3);
    --sp-4: var(--space-4);
    --sp-5: var(--space-5);
    --sp-6: var(--space-6);
    --r-md: var(--radius-md);
    --r-lg: var(--radius-lg);
    --r-full: 999px;
}

.compact-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 6px 0 18px;
}

.compact-toolbar h2 {
    margin: 0 0 6px;
    font-size: clamp(26px, 2.4vw, 32px);
    line-height: 1.02;
    color: var(--orama-blue-900);
}

.compact-toolbar p {
    margin: 0;
    color: var(--orama-slate-700);
    max-width: 54ch;
    line-height: 1.55;
}

.toolbar-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.toolbar-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(47, 95, 208, 0.08);
    border: 1px solid rgba(47, 95, 208, 0.12);
    color: var(--orama-blue-800);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.compact-intro {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 10px 0 18px;
}

.compact-intro-card {
    padding: 18px 20px;
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 253, 0.96));
    border: 1px solid rgba(200, 206, 218, 0.92);
    box-shadow: 0 18px 36px rgba(11, 31, 94, 0.06);
}

.compact-intro-card strong {
    display: block;
    margin: 0 0 8px;
    color: var(--orama-blue-900);
    font-size: 20px;
    line-height: 1.12;
}

.compact-intro-card p {
    margin: 0;
    color: var(--orama-slate-700);
    line-height: 1.55;
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin: 0 0 18px;
}

.insight-card {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    padding: 18px 20px;
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(212, 164, 55, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 249, 253, 0.97));
    border: 1px solid rgba(200, 206, 218, 0.92);
    box-shadow: 0 20px 38px rgba(11, 31, 94, 0.07);
}

.insight-card::after {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--orama-blue-700), var(--orama-blue-500), rgba(212, 164, 55, 0.9));
}

.insight-card > span {
    display: block;
    margin: 0 0 12px;
    color: var(--orama-slate-700);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.insight-card > strong {
    display: block;
    margin: 0 0 10px;
    color: var(--orama-blue-900);
    font-size: clamp(30px, 3vw, 38px);
    line-height: 1;
    font-family: "Cinzel", "Playfair Display", serif;
}

.insight-card > p {
    margin: 0;
    color: var(--orama-slate-700);
    line-height: 1.5;
    font-size: 13px;
}

.quick-filter-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.quick-filter-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(247, 249, 253, 0.96);
    border: 1px solid rgba(200, 206, 218, 0.88);
    color: var(--orama-blue-800);
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(11, 31, 94, 0.04);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.quick-filter-link:hover {
    transform: translateY(-1px);
    border-color: rgba(47, 95, 208, 0.22);
    box-shadow: 0 14px 24px rgba(11, 31, 94, 0.08);
}

.quick-filter-link--active {
    background: linear-gradient(135deg, rgba(18, 55, 155, 0.12), rgba(47, 95, 208, 0.08));
    border-color: rgba(18, 55, 155, 0.22);
    color: var(--orama-blue-900);
}

.quick-filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(18, 55, 155, 0.1);
    color: var(--orama-blue-900);
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 980px) {
    .compact-toolbar {
        flex-direction: column;
    }

    .compact-intro {
        grid-template-columns: 1fr;
    }
}

html {
    background: var(--color-bg);
    color: var(--color-text);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(47, 95, 208, 0.08), transparent 22%),
        radial-gradient(circle at top left, rgba(212, 164, 55, 0.06), transparent 18%),
        linear-gradient(180deg, #FCFCFA 0%, var(--orama-observatory-white) 100%);
    color: var(--color-text);
    font-family: var(--font-ui);
    font-size: var(--text-md);
    line-height: 1.55;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

body.theme-dark {
    --color-bg: #000000;
    --color-surface: #1C1C1E;
    --color-surface-muted: #2C2C2E;
    --color-text: #F5F5F7;
    --color-text-secondary: #D1D1D6;
    --color-text-muted: #8E8E93;
    --color-border: rgba(255, 255, 255, 0.16);
    --color-border-light: rgba(255, 255, 255, 0.11);
    background:
        radial-gradient(circle at top right, rgba(10, 132, 255, 0.12), transparent 20%),
        linear-gradient(180deg, #000000 0%, #111113 100%);
}

@media (prefers-color-scheme: dark) {
    body.theme-system {
        --color-bg: #000000;
        --color-surface: #1C1C1E;
        --color-surface-muted: #2C2C2E;
        --color-text: #F5F5F7;
        --color-text-secondary: #D1D1D6;
        --color-text-muted: #8E8E93;
        --color-border: rgba(255, 255, 255, 0.16);
        --color-border-light: rgba(255, 255, 255, 0.11);
        background:
            radial-gradient(circle at top right, rgba(10, 132, 255, 0.12), transparent 20%),
            linear-gradient(180deg, #000000 0%, #111113 100%);
    }
}

body.sidebar-lock {
    overflow: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    color: var(--color-text);
}

h1,
.brand-mark {
    font-family: var(--font-brand);
    letter-spacing: -0.02em;
}

p {
    margin: 0;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    align-items: stretch;
}

.sidebar {
    position: sticky;
    top: 0;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    padding: 22px 18px 18px;
    background:
        radial-gradient(circle at top left, rgba(212, 164, 55, 0.16), transparent 24%),
        linear-gradient(180deg, #0E2463 0%, #0B1F5E 46%, #081844 100%);
    color: rgba(255, 255, 255, 0.92);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04);
    transition: transform .28s ease, opacity .22s ease, box-shadow .22s ease;
}

@media (min-width: 1101px) {
    .app-shell.sidebar-collapsed {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-shell.sidebar-collapsed .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: var(--sidebar-width);
        height: 100vh;
        transform: translateX(calc(-1 * var(--sidebar-width) - 28px));
        opacity: 0;
        pointer-events: none;
        box-shadow: none;
    }

    .app-shell.sidebar-collapsed .main-panel {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
    .app-shell.sidebar-collapsed .page-section-menu__sheet {
        left: 24px;
    }
}

.sidebar-main {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    gap: var(--space-6);
}

.sidebar-close,
.menu-toggle {
    border: 0;
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--t);
}
.menu-toggle__glyph {
    font-size: 1.18rem;
    line-height: 1;
    transform: translateY(-1px);
}

.sidebar-close:hover,
.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.topbar .menu-toggle {
    background: rgba(18, 55, 155, 0.08);
    color: var(--color-primary);
    border: 1px solid rgba(18, 55, 155, 0.10);
}

.topbar .menu-toggle:hover {
    background: rgba(18, 55, 155, 0.14);
}

.sidebar-close {
    display: none;
    align-self: flex-end;
}
.sidebar-rail-toggle {
    position: fixed;
    left: calc(var(--sidebar-width) + 2px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 80;
    border: 1px solid rgba(18, 55, 155, 0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(243,247,255,0.98));
    color: var(--color-primary);
    width: 24px;
    height: 88px;
    border-radius: 999px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    box-shadow: 0 16px 32px rgba(17, 34, 84, 0.12);
    transition: var(--t);
}
.sidebar-rail-toggle:hover {
    transform: translateY(-50%) translateX(2px);
}
.sidebar-rail-toggle__line {
    width: 1px;
    height: 34px;
    background: rgba(18, 55, 155, 0.2);
}
.sidebar-rail-toggle__chevron {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
}
.app-shell.sidebar-collapsed .sidebar-rail-toggle {
    left: 8px;
}
.app-shell.sidebar-collapsed .sidebar-rail-toggle__chevron {
    transform: scaleX(-1);
}
.page-section-menu {
    position: fixed;
    inset: 0;
    z-index: 2200;
    pointer-events: none;
}
.page-section-menu__sheet {
    position: absolute;
    left: var(--page-section-menu-left, 76px);
    top: var(--page-section-menu-top, 104px);
    width: min(360px, calc(100vw - 40px));
    max-height: min(72vh, calc(100vh - 132px));
    overflow: auto;
    border-radius: 24px;
    border: 1px solid rgba(33, 74, 166, 0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.99), rgba(245,249,255,0.99));
    box-shadow: 0 22px 48px rgba(16, 34, 84, 0.18);
    padding: 1rem;
    display: grid;
    gap: 0.85rem;
    pointer-events: auto;
}
.page-section-menu__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}
.page-section-menu__top h3 {
    margin: 0.2rem 0 0;
    color: var(--ink-strong);
}
.page-section-menu__close {
    border: 0;
    outline: none;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: rgba(18, 55, 155, 0.08);
    color: var(--color-primary);
    font-size: 1.2rem;
}
.page-section-menu__list {
    display: grid;
    gap: 0.5rem;
}
.page-section-menu__link {
    display: grid;
    gap: 0.18rem;
    padding: 0.75rem 0.9rem;
    border-radius: 16px;
    border: 1px solid rgba(33, 74, 166, 0.1);
    background: rgba(255,255,255,0.98);
    color: var(--ink-strong);
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(17, 34, 84, 0.05);
}
.page-section-menu__link:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(17, 34, 84, 0.09);
}
.page-section-menu__meta {
    color: var(--ink-soft);
    font-size: 0.86rem;
}
.page-utility-fab {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1500;
    display: grid;
    gap: 0.7rem;
}
.page-utility-fab__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 42px;
    min-width: 118px;
    padding: 0 0.95rem;
    border-radius: 16px;
    border: 1px solid rgba(33, 74, 166, 0.14);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,248,255,0.98));
    color: var(--color-primary);
    font-size: 0.83rem;
    font-weight: 800;
    box-shadow: 0 18px 36px rgba(16, 34, 84, 0.14);
    cursor: pointer;
    transition: var(--t);
}
.page-utility-fab__button:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 40px rgba(16, 34, 84, 0.18);
}
.page-utility-fab__button--ghost {
    min-width: 102px;
}

.brand-logo-sticky {
    position: relative;
    z-index: 3;
    padding-bottom: 8px;
    background:
        linear-gradient(180deg, rgba(11, 31, 94, 0.96), rgba(11, 31, 94, 0.92) 76%, rgba(11, 31, 94, 0.84));
}

.brand-logo-sticky .brand-logo-wrap {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(214, 224, 240, 0.92);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.82),
        0 16px 30px rgba(4, 12, 35, 0.18);
}

.brand-logo-wrap {
    border-radius: var(--radius-lg);
    padding: 10px 8px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(214, 224, 240, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.brand-logo-wrap img {
    width: min(100%, 340px);
    margin: 0 auto;
    display: block;
}

.brand-copy {
    display: grid;
    gap: 4px;
    color: rgba(255, 255, 255, 0.72);
    font-size: var(--text-sm);
    line-height: 1.5;
}

.brand-copy span {
    display: block;
    font-size: 12px;
    max-width: 24ch;
    opacity: 0.88;
}

.sidebar-nav-preface {
    padding: 2px 2px 8px;
}

.sidebar-nav {
    display: grid;
    flex: 1 1 auto;
    align-content: start;
    gap: 18px;
    overflow-y: auto;
    padding-right: 2px;
    scrollbar-width: thin;
}

.sidebar-nav-group {
    display: grid;
    gap: 10px;
}

.sidebar-nav-label {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.56);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 11px;
    font-weight: 800;
}

.sidebar-nav-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.sidebar-nav-stack {
    display: grid;
    gap: 6px;
}

.sidebar-submenu {
    display: grid;
    gap: 8px;
}

.sidebar-submenu__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    list-style: none;
    transition: var(--t);
}

.sidebar-submenu__summary::-webkit-details-marker {
    display: none;
}

.sidebar-submenu__summary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateX(1px);
}

.sidebar-submenu.is-active .sidebar-submenu__summary,
.sidebar-submenu[open] .sidebar-submenu__summary {
    color: white;
    background:
        linear-gradient(135deg, rgba(47, 95, 208, 0.24), rgba(212, 164, 55, 0.14)),
        rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 164, 55, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sidebar-submenu__chevron {
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
    margin-right: 4px;
    opacity: 0.92;
}

.sidebar-submenu[open] .sidebar-submenu__chevron {
    transform: rotate(225deg);
    margin-top: 2px;
}

.sidebar-submenu__links {
    display: grid;
    gap: 6px;
    padding-left: 16px;
}

.nav-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
    border: 1px solid transparent;
    transition: var(--t);
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateX(1px);
}

.nav-link.active {
    color: white;
    background:
        linear-gradient(135deg, rgba(47, 95, 208, 0.24), rgba(212, 164, 55, 0.14)),
        rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 164, 55, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-link--sub {
    min-height: 40px;
    padding-left: 18px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.03);
}

.nav-link--sub:hover {
    transform: translateX(0);
}

.sidebar-overlay {
    display: none;
}

.sidebar-logout-form {
    display: none;
    margin: auto 0 0;
}

.mobile-bottom-nav {
    display: none;
}

.mobile-section-toggle,
.mobile-row-toggle-cell {
    display: none;
}

.main-panel {
    min-width: 0;
    padding: 18px 24px 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.topbar {
    position: sticky;
    top: 16px;
    z-index: 40;
    min-height: var(--topbar-height);
    padding: 18px 22px;
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(247, 250, 255, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.68);
    box-shadow: var(--orama-shadow-xs);
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

body.theme-dark .topbar {
    background: linear-gradient(180deg, rgba(28, 28, 30, 0.98), rgba(24, 24, 26, 0.96));
    border-color: rgba(255, 255, 255, 0.08);
}

.topbar-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.topbar-title {
    min-width: 0;
}

.topbar-title h1 {
    font-size: clamp(26px, 2.5vw, 34px);
    line-height: 1.05;
}

.topbar-title p {
    margin-top: 6px;
    color: var(--color-text-secondary);
    font-size: var(--text-md);
}

.topbar-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.topbar-utility {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 20px;
    background: rgba(18, 55, 155, 0.05);
    border: 1px solid rgba(18, 55, 155, 0.08);
}

.topbar-utility__button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(18, 55, 155, 0.12);
    color: var(--color-primary);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: var(--t);
}

.topbar-utility__button:hover {
    background: rgba(18, 55, 155, 0.18);
    transform: translateY(-1px);
}

.topbar-utility__button--ghost {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(18, 55, 155, 0.10);
}

.topbar-utility__button[hidden] {
    display: none !important;
}

.app-sync-pill {
    border: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #fff4df;
    color: #a56800;
    box-shadow: inset 0 0 0 1px rgba(212, 164, 55, 0.24);
    cursor: default;
}

.app-sync-pill__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.36);
}

.app-sync-pill--online {
    background: rgba(46, 139, 87, 0.12);
    color: var(--orama-success);
    box-shadow: inset 0 0 0 1px rgba(46, 139, 87, 0.2);
}

.app-sync-pill--offline {
    background: rgba(169, 68, 66, 0.12);
    color: var(--orama-danger);
    box-shadow: inset 0 0 0 1px rgba(169, 68, 66, 0.2);
}

.app-sync-pill--updating {
    background: rgba(212, 164, 55, 0.16);
    color: #b67800;
    box-shadow: inset 0 0 0 1px rgba(212, 164, 55, 0.28);
}

.app-sync-pill--updating .app-sync-pill__dot {
    animation: appSyncDotBlink 0.82s step-end infinite;
}

@keyframes appSyncDotBlink {
    0%,
    100% {
        box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.34);
        opacity: 1;
    }
    50% {
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
        opacity: 0.28;
    }
}

.app-sync-float-indicator {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translate3d(-50%, calc(-50% + 10px), 0) scale(0.94);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 60;
}

.app-sync-float-indicator::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow:
        0 24px 50px rgba(12, 32, 84, 0.18),
        inset 0 0 0 1px rgba(42, 89, 196, 0.12);
    backdrop-filter: blur(8px);
}

.app-sync-float-indicator__magnifier {
    position: relative;
    width: 34px;
    height: 34px;
    color: #1f4fbf;
    z-index: 1;
    animation: appSyncFloatMagnifierScan 0.92s ease-in-out infinite;
}

.app-sync-float-indicator__glass {
    position: absolute;
    inset: 0 auto auto 0;
    width: 24px;
    height: 24px;
    border: 4px solid currentColor;
    border-radius: 999px;
    background: transparent;
}

.app-sync-float-indicator__handle {
    position: absolute;
    right: 0;
    bottom: 2px;
    width: 15px;
    height: 5px;
    border-radius: 999px;
    background: currentColor;
    transform: rotate(45deg);
    transform-origin: right center;
}

.app-sync-float-indicator.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate3d(-50%, -50%, 0) scale(1);
}

@keyframes appSyncFloatMagnifierScan {
    0% {
        transform: translate3d(-2px, 0, 0) rotate(-8deg) scale(0.96);
    }
    50% {
        transform: translate3d(2px, -1px, 0) rotate(8deg) scale(1);
    }
    100% {
        transform: translate3d(-2px, 0, 0) rotate(-8deg) scale(0.96);
    }
}

.sync-job-pill {
    border: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: rgba(212, 164, 55, 0.16);
    color: #b67800;
    box-shadow: inset 0 0 0 1px rgba(212, 164, 55, 0.28);
    cursor: default;
    max-width: 280px;
}

.sync-job-pill[hidden] {
    display: none;
}

.sync-job-pill__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: currentColor;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.36);
    flex: 0 0 auto;
}

.sync-job-pill__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sync-job-pill--running {
    background: rgba(212, 164, 55, 0.16);
    color: #b67800;
    box-shadow: inset 0 0 0 1px rgba(212, 164, 55, 0.28);
}

.sync-job-pill--completed {
    background: rgba(46, 139, 87, 0.12);
    color: var(--orama-success);
    box-shadow: inset 0 0 0 1px rgba(46, 139, 87, 0.2);
}

.sync-job-pill--error {
    background: rgba(169, 68, 66, 0.12);
    color: var(--orama-danger);
    box-shadow: inset 0 0 0 1px rgba(169, 68, 66, 0.2);
}

.search-shell {
    min-width: min(320px, 38vw);
}

.search-shell input {
    width: 100%;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid var(--color-border-light);
    background: rgba(255, 255, 255, 0.84);
    color: var(--color-text);
    transition: var(--t);
}

body.theme-dark .search-shell input {
    background: rgba(44, 44, 46, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
}

.search-shell input:focus {
    outline: none;
    border-color: rgba(18, 55, 155, 0.35);
    box-shadow: 0 0 0 4px rgba(47, 95, 208, 0.10);
}

.topbar-language,
.status-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(18, 55, 155, 0.08);
    color: var(--color-primary);
    border: 1px solid rgba(18, 55, 155, 0.10);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-dot {
    width: 42px;
    padding: 0;
    color: transparent;
    position: relative;
}

.status-dot::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--orama-success);
    box-shadow: 0 0 0 6px rgba(46, 139, 87, 0.12);
}

.notification-shell {
    position: relative;
}

.notification-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 16px;
    background: rgba(18, 55, 155, 0.08);
    color: var(--color-primary);
    font-size: 18px;
    transition: var(--t);
}

.notification-link:hover {
    background: rgba(18, 55, 155, 0.14);
    transform: translateY(-1px);
}

.notification-badge {
    position: absolute;
    right: 8px;
    top: 7px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--orama-danger);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
}

.notification-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 14px);
    width: min(360px, 88vw);
    border-radius: 22px;
    background: var(--color-surface);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--orama-shadow-md);
    padding: 18px;
    display: grid;
    gap: 14px;
    z-index: 120;
}

.notification-panel[hidden] {
    display: none !important;
}

.notification-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.notification-panel__header h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.notification-panel__header p {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}

.notification-panel__list {
    display: grid;
    gap: 10px;
    max-height: 340px;
    overflow: auto;
}

.notification-item {
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border-light);
    transition: var(--t);
}

.notification-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--orama-shadow-xs);
}

.notification-item__link {
    display: grid;
    gap: 4px;
}

.notification-item strong {
    font-size: var(--text-sm);
}

.notification-item span,
.notification-empty {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}

.notification-item__ignore {
    justify-self: flex-start;
    border: 0;
    background: transparent;
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 700;
    padding: 0;
    cursor: pointer;
}

.notification-item__ignore:hover {
    text-decoration: underline;
}

.notification-item--danger {
    border-color: rgba(169, 68, 66, 0.16);
}

.notification-item--gold {
    border-color: rgba(212, 164, 55, 0.18);
}

.notification-panel__footer {
    display: flex;
    justify-content: flex-end;
}

.profile-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 8px 8px;
    border-radius: 18px;
    background: rgba(18, 55, 155, 0.07);
    border: 1px solid rgba(18, 55, 155, 0.08);
}

.profile-chip strong {
    display: block;
    font-size: var(--text-sm);
}

.profile-chip span {
    display: block;
    font-size: 12px;
    color: var(--color-text-secondary);
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--orama-royal-blue), var(--orama-horizon-blue));
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.logout-form {
    margin: 0;
}

.page-shell {
    width: 100%;
    max-width: var(--page-max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.anchor-section {
    scroll-margin-top: 118px;
}

.messages {
    display: grid;
    gap: 10px;
}

.message {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid transparent;
    background: rgba(18, 55, 155, 0.08);
    color: var(--color-primary);
    box-shadow: var(--orama-shadow-xs);
}

.message.success {
    background: rgba(46, 139, 87, 0.10);
    color: var(--orama-success);
}

.message.warning {
    background: rgba(212, 164, 55, 0.12);
    color: #8B6511;
}

.message.error,
.message.danger {
    background: rgba(169, 68, 66, 0.10);
    color: var(--orama-danger);
}

.crm-flash-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 140;
}

.crm-flash-modal.is-open {
    display: flex;
}

.crm-flash-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 31, 94, 0.38);
    backdrop-filter: blur(8px);
}

.crm-flash-modal__dialog {
    position: relative;
    width: min(100%, 520px);
    border-radius: 24px;
    border: 1px solid rgba(212, 164, 55, 0.22);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,248,255,0.98));
    box-shadow: 0 28px 70px rgba(11, 31, 94, 0.24);
    padding: 1.4rem;
}

.crm-flash-modal__eyebrow {
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.crm-flash-modal__title {
    margin: 0.75rem 0 0.45rem;
    color: #0b1f5e;
    font-size: 1.3rem;
}

.crm-flash-modal__body {
    margin: 0;
    color: #5a6e96;
    line-height: 1.65;
    white-space: pre-wrap;
}

.crm-flash-modal__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.2rem;
}

body.theme-dark .crm-flash-modal__backdrop,
body.theme-dark .crm-confirm__backdrop,
body.theme-dark .carrier-delete-modal__backdrop,
body.theme-dark .assignment-confirm-modal__backdrop,
body.theme-dark .rates-confirm__backdrop {
    background: rgba(0, 0, 0, 0.58) !important;
    backdrop-filter: blur(12px);
}

body.theme-dark .crm-flash-modal__dialog,
body.theme-dark .crm-confirm__dialog,
body.theme-dark .carrier-delete-modal__card,
body.theme-dark .assignment-confirm-modal__card,
body.theme-dark .rates-confirm__dialog {
    background:
        radial-gradient(circle at top right, rgba(10, 132, 255, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(31, 31, 34, 0.98), rgba(20, 20, 22, 0.96)) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    color: #f5f5f7 !important;
}

body.theme-dark .crm-flash-modal__eyebrow,
body.theme-dark .crm-confirm__eyebrow,
body.theme-dark .carrier-delete-modal__eyebrow,
body.theme-dark .assignment-confirm-modal__eyebrow,
body.theme-dark .rates-confirm__eyebrow {
    color: #8ec5ff !important;
}

body.theme-dark .crm-flash-modal__title,
body.theme-dark .crm-confirm__title,
body.theme-dark .carrier-delete-modal__title,
body.theme-dark .assignment-confirm-modal__title,
body.theme-dark .rates-confirm__title {
    color: #f5f5f7 !important;
}

body.theme-dark .crm-flash-modal__body,
body.theme-dark .crm-confirm__body,
body.theme-dark .carrier-delete-modal__body,
body.theme-dark .assignment-confirm-modal__body,
body.theme-dark .rates-confirm__body {
    color: #d0d0d7 !important;
}

@media (prefers-color-scheme: dark) {
    body.theme-system .crm-flash-modal__backdrop,
    body.theme-system .crm-confirm__backdrop,
    body.theme-system .carrier-delete-modal__backdrop,
    body.theme-system .assignment-confirm-modal__backdrop,
    body.theme-system .rates-confirm__backdrop {
        background: rgba(0, 0, 0, 0.58) !important;
        backdrop-filter: blur(12px);
    }

    body.theme-system .crm-flash-modal__dialog,
    body.theme-system .crm-confirm__dialog,
    body.theme-system .carrier-delete-modal__card,
    body.theme-system .assignment-confirm-modal__card,
    body.theme-system .rates-confirm__dialog {
        background:
            radial-gradient(circle at top right, rgba(10, 132, 255, 0.14), transparent 34%),
            linear-gradient(180deg, rgba(31, 31, 34, 0.98), rgba(20, 20, 22, 0.96)) !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        box-shadow:
            0 28px 70px rgba(0, 0, 0, 0.46),
            inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
        color: #f5f5f7 !important;
    }

    body.theme-system .crm-flash-modal__eyebrow,
    body.theme-system .crm-confirm__eyebrow,
    body.theme-system .carrier-delete-modal__eyebrow,
    body.theme-system .assignment-confirm-modal__eyebrow,
    body.theme-system .rates-confirm__eyebrow {
        color: #8ec5ff !important;
    }

    body.theme-system .crm-flash-modal__title,
    body.theme-system .crm-confirm__title,
    body.theme-system .carrier-delete-modal__title,
    body.theme-system .assignment-confirm-modal__title,
    body.theme-system .rates-confirm__title {
        color: #f5f5f7 !important;
    }

    body.theme-system .crm-flash-modal__body,
    body.theme-system .crm-confirm__body,
    body.theme-system .carrier-delete-modal__body,
    body.theme-system .assignment-confirm-modal__body,
    body.theme-system .rates-confirm__body {
        color: #d0d0d7 !important;
    }
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 11px;
    font-weight: 800;
}

.eyebrow::before {
    content: "";
    width: 24px;
    height: 1px;
    background: rgba(18, 55, 155, 0.26);
}

.title-with-help {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.help-badge {
    display: none !important;
}

.help-badge::after {
    content: attr(data-help);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    transform: translateX(-50%);
    min-width: 220px;
    max-width: 320px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(11, 31, 94, 0.96);
    color: white;
    font-size: 12px;
    line-height: 1.55;
    opacity: 0;
    pointer-events: none;
    box-shadow: var(--orama-shadow-sm);
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 80;
}

.help-badge:hover::after,
.help-badge:focus-visible::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

.surface-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(252, 252, 255, 0.94)),
        radial-gradient(circle at top right, rgba(47, 95, 208, 0.08), transparent 24%);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--orama-shadow-sm);
}

.surface-card *,
.metric-card *,
.import-source-card *,
.list-row * {
    min-width: 0;
}

.surface-card,
.metric-card,
.import-source-card,
.list-row {
    overflow-wrap: break-word;
    word-break: normal;
}

.muted,
.cycle-log,
.import-source-meta,
.imports-note,
.field-help,
.sync-path,
.list-row p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.theme-dark .surface-card {
    background:
        linear-gradient(180deg, rgba(28, 28, 30, 0.98), rgba(22, 22, 24, 0.96)),
        radial-gradient(circle at top right, rgba(10, 132, 255, 0.12), transparent 24%);
}

.metrics-grid,
.content-grid {
    display: grid;
    gap: 18px;
}

.metrics-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.metrics-grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.content-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-card {
    display: grid;
    gap: 10px;
    padding: 20px;
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 255, 0.94)),
        radial-gradient(circle at top right, rgba(47, 95, 208, 0.08), transparent 34%);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--orama-shadow-xs);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.metric-card h3 {
    font-size: 14px;
    font-weight: 700;
}

.metric-card strong {
    font-family: var(--font-brand);
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1;
    color: var(--color-primary);
}

.metric-card p {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}

@media (hover: hover) {
    .metric-card:hover,
    .surface-card:hover {
        border-color: rgba(18, 55, 155, 0.18);
        box-shadow: 0 22px 44px rgba(11, 31, 94, 0.10);
        transform: translateY(-1px);
    }
}

.metric-chip,
.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(18, 55, 155, 0.08);
    color: var(--color-primary);
}

.tag--success {
    background: rgba(46, 139, 87, 0.12);
    color: var(--orama-success);
}

.tag--gold {
    background: rgba(212, 164, 55, 0.16);
    color: #8B6511;
}

.tag--danger {
    background: rgba(169, 68, 66, 0.12);
    color: var(--orama-danger);
}

.list-stack {
    display: grid;
    gap: 12px;
}

.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(18, 55, 155, 0.04);
    border: 1px solid rgba(18, 55, 155, 0.08);
}

.muted {
    color: var(--color-text-secondary);
}

.inline-actions,
.form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
}

.action-button,
.action-link,
.quick-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: rgba(18, 55, 155, 0.08);
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 700;
    transition: var(--t);
    white-space: nowrap;
}

.action-button:hover,
.action-link:hover,
.quick-action:hover {
    transform: translateY(-1px);
    box-shadow: var(--orama-shadow-xs);
    background: rgba(18, 55, 155, 0.12);
}

.action-button--primary,
.action-link--primary,
.quick-action {
    background: linear-gradient(135deg, var(--orama-royal-blue), var(--orama-horizon-blue));
    color: white;
    border-color: transparent;
    box-shadow: 0 16px 28px rgba(18, 55, 155, 0.18);
}

.action-button--primary:hover,
.action-link--primary:hover,
.quick-action:hover {
    background: linear-gradient(135deg, var(--orama-horizon-blue), #5178E2);
}

.excel-export-button {
    gap: 0;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 12px;
    border-color: rgba(16, 124, 65, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 247, 242, 0.98));
    color: #1d6f42 !important;
    box-shadow:
        0 12px 24px rgba(16, 124, 65, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.excel-export-button:hover {
    background: linear-gradient(180deg, rgba(248, 255, 251, 1), rgba(226, 245, 233, 1));
    color: #185c37 !important;
    border-color: rgba(16, 124, 65, 0.24);
    box-shadow:
        0 14px 26px rgba(16, 124, 65, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.excel-export-button .action-icon__svg,
.excel-export-button svg {
    width: 30px !important;
    height: 30px !important;
    flex: 0 0 auto;
}

.excel-export-button:disabled,
.excel-export-button[disabled] {
    opacity: 0.62;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    background: linear-gradient(180deg, rgba(247, 250, 248, 0.98), rgba(232, 239, 234, 0.98));
    color: rgba(24, 92, 55, 0.58) !important;
}

.excel-export-button .action-icon__svg--excel {
    filter: drop-shadow(0 2px 4px rgba(16, 124, 65, 0.10));
    transform: scale(1.08);
    transform-origin: center;
}

table.excel-select-enabled tbody tr {
    transition: background-color 120ms ease, box-shadow 120ms ease;
}

table.excel-select-enabled tbody tr.is-row-selected > td {
    background: rgba(47, 94, 214, 0.12) !important;
    box-shadow: inset 0 1px 0 rgba(47, 94, 214, 0.08), inset 0 -1px 0 rgba(47, 94, 214, 0.08);
}

table.excel-select-enabled tbody tr.is-row-selected:hover > td {
    background: rgba(47, 94, 214, 0.16) !important;
}

body.theme-dark .excel-export-button {
    border-color: rgba(58, 199, 120, 0.28);
    background: linear-gradient(180deg, rgba(26, 35, 29, 0.98), rgba(21, 30, 25, 0.96));
    color: #7ce5a8 !important;
    box-shadow:
        0 16px 28px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.theme-dark .excel-export-button:hover {
    background: linear-gradient(180deg, rgba(30, 43, 34, 1), rgba(24, 36, 28, 1));
    color: #a4f1c4 !important;
    border-color: rgba(90, 220, 145, 0.34);
}

body.theme-dark .excel-export-button:disabled,
body.theme-dark .excel-export-button[disabled] {
    background: linear-gradient(180deg, rgba(30, 36, 32, 0.96), rgba(24, 30, 26, 0.96));
    color: rgba(124, 229, 168, 0.42) !important;
}

body.theme-dark table.excel-select-enabled tbody tr.is-row-selected > td {
    background: rgba(83, 130, 255, 0.18) !important;
    box-shadow: inset 0 1px 0 rgba(116, 156, 255, 0.14), inset 0 -1px 0 rgba(116, 156, 255, 0.14);
}

.create-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--orama-royal-blue), var(--orama-horizon-blue));
    color: #fff !important;
    border: 1px solid transparent;
    box-shadow: 0 14px 26px rgba(18, 55, 155, 0.18);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.create-cta:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--orama-horizon-blue), #5178E2);
    color: #fff !important;
    box-shadow: 0 18px 30px rgba(18, 55, 155, 0.22);
}

.create-cta__icon {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    flex: 0 0 auto;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-shell {
    display: grid;
    gap: 18px;
}

.form-shell form {
    display: grid;
    gap: 18px;
}

.form-shell .form-grid .form-field {
    min-width: 0;
    max-width: none;
    width: 100%;
}

.form-shell .form-grid .form-field--full {
    grid-column: 1 / -1;
}

.form-shell .form-grid .field-input,
.form-shell .form-grid .field-select,
.form-shell .form-grid input:not([type="checkbox"]):not([type="radio"]),
.form-shell .form-grid select,
.form-shell .form-grid textarea {
    min-height: 42px;
}

.form-shell .form-grid textarea {
    min-height: 120px;
}

.form-shell .form-actions {
    overflow: visible;
}

.filters-panel {
    padding: 18px 20px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--color-border-light);
    box-shadow: var(--orama-shadow-xs);
}

.filters-panel form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.filters-panel h3 {
    margin-bottom: 12px;
    font-size: 15px;
}

.filter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    flex: 1 1 auto;
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-top: 0;
    margin-left: auto;
}

.filters-panel h3 {
    margin: 0 0 8px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}

.form-field {
    display: grid;
    gap: 6px;
    flex: 0 1 148px;
    min-width: 108px;
    max-width: 210px;
}

.form-field--full {
    flex: 1 1 100%;
    max-width: none;
}

.form-field > label {
    font-size: 11px;
    font-weight: 800;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.required-indicator {
    color: var(--orama-danger);
    font-size: 13px;
    line-height: 1;
}

.field-input,
.field-select,
.form-field input,
.form-field select,
.form-field textarea,
.search-shell input,
input[type="text"],
input[type="email"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="password"],
textarea,
select {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 12px;
    border: 1px solid var(--color-border-light);
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-text);
    transition: var(--t);
}

textarea,
.form-field textarea {
    min-height: 110px;
    resize: vertical;
}

body.theme-dark .field-input,
body.theme-dark .field-select,
body.theme-dark .form-field input,
body.theme-dark .form-field select,
body.theme-dark .form-field textarea,
body.theme-dark input[type="text"],
body.theme-dark input[type="email"],
body.theme-dark input[type="search"],
body.theme-dark input[type="number"],
body.theme-dark input[type="date"],
body.theme-dark input[type="datetime-local"],
body.theme-dark input[type="time"],
body.theme-dark input[type="password"],
body.theme-dark textarea,
body.theme-dark select {
    background: rgba(44, 44, 46, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
}

.field-input:focus,
.field-select:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(18, 55, 155, 0.34);
    box-shadow: 0 0 0 4px rgba(47, 95, 208, 0.12);
}

.field-help {
    color: var(--color-text-secondary);
    font-size: 12px;
}

.field-errors,
.errorlist {
    margin: 0;
    padding-left: 18px;
    color: var(--orama-danger);
    font-size: 12px;
}

.table-shell {
    overflow-x: auto;
}

.table-scroll {
    max-height: min(68vh, 780px);
    overflow: auto;
    border: 1px solid rgba(18, 55, 155, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    scrollbar-width: thin;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 640px;
    font-size: 13px;
}

.data-table thead th {
    position: sticky;
    top: 0;
    background: #f5f8ff;
    color: var(--color-primary);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    z-index: 2;
    box-shadow: inset 0 -1px 0 rgba(18, 55, 155, 0.08);
}

.data-table thead th.table-sortable-head {
    cursor: pointer;
    user-select: none;
    padding-right: 22px;
    position: sticky;
}

.data-table thead th.table-sortable-head::after {
    content: "\2195";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    opacity: 0.48;
    line-height: 1;
    pointer-events: none;
}

.data-table thead th.table-sortable-head[data-sort-direction="asc"]::after {
    content: "\2191";
    opacity: 1;
}

.data-table thead th.table-sortable-head[data-sort-direction="desc"]::after {
    content: "\2193";
    opacity: 1;
}

.data-table thead th.table-sortable-head > a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    max-width: 100%;
}

.data-table th,
.data-table td {
    padding: 8px 9px;
    text-align: left;
    border-bottom: 1px solid rgba(18, 55, 155, 0.08);
    vertical-align: top;
}

.data-table td .inline-actions,
.data-table td .form-actions {
    flex-wrap: nowrap;
}

.table-actions-strip,
.cycle-inline-actions,
.import-source-actions,
.table-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.table-actions-strip {
    gap: 4px;
}

.table-actions-strip > *,
.cycle-inline-actions > * {
    flex: 0 0 auto;
}

.table-actions-strip .action-icon,
.cycle-inline-actions .action-icon,
.import-source-actions .action-icon,
.table-toolbar-actions .action-icon,
.filter-actions .action-icon,
.inline-actions .action-icon {
    min-width: 34px;
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
    border-radius: 12px;
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(236, 241, 252, 0.96));
    border-color: rgba(18, 55, 155, 0.10);
    color: var(--orama-royal-blue);
    box-shadow: 0 10px 18px rgba(11, 31, 94, 0.08);
}

.table-actions-strip .action-icon__label,
.cycle-inline-actions .action-icon__label,
.import-source-actions .action-icon__label,
.table-toolbar-actions .action-icon__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.filter-actions .action-icon__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.table-actions-strip .field-input,
.table-actions-strip .field-select {
    min-height: 34px;
    min-width: 104px;
    max-width: 152px;
}

.table-actions-strip form,
.cycle-inline-actions form {
    display: inline-flex;
    margin: 0;
}

.data-table td[data-label="Acciones"] {
    min-width: 112px;
}

.table-actions-strip .cycle-action-note,
.cycle-inline-actions .cycle-action-note {
    white-space: nowrap;
}

.data-table tbody tr {
    background: rgba(255, 255, 255, 0.76);
    transition: var(--t);
}

body.theme-dark .data-table tbody tr {
    background: rgba(255, 255, 255, 0.03);
}

.data-table tbody tr:hover {
    background: rgba(47, 95, 208, 0.05);
}

.table-toolbar,
.compact-toolbar,
.client-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    position: static;
    overflow: visible;
}

.metric-card::before,
.finance-panel::before,
.finance-chip-card::before,
.finance-side-card::before,
.summary-card::before,
.source-dashboard-card::before,
.command-stat::before,
.finance-pill::before,
.quick-summary-card::before,
.pipeline-row::before,
.compact-intro-card::before,
.record-card::before,
.client-summary-card::before,
.insight-card::before,
.list-card::before,
.import-source-card::before,
.pipeline-card::before,
.cycle-pipeline-card::before,
.chart-shell::after,
.surface-card[data-mobile-section-title]::before {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    top: 0;
    width: auto;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: var(--card-accent, #21a7d8);
    pointer-events: none;
}

.table-toolbar p,
.compact-toolbar p,
.client-toolbar p {
    color: var(--color-text-secondary);
}

.action-icon {
    width: 32px;
    min-width: 32px;
    padding: 0;
    border-radius: 10px;
}

.action-icon .action-icon__svg {
    width: 14px;
    height: 14px;
    display: block;
    transition: transform .18s ease, color .18s ease, opacity .18s ease;
}

.action-icon .action-icon__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.action-button.action-icon:hover,
.action-link.action-icon:hover {
    background: linear-gradient(180deg, rgba(245, 248, 255, 1), rgba(223, 233, 252, 1));
    border-color: rgba(18, 55, 155, 0.18);
    color: var(--orama-horizon-blue);
    box-shadow: 0 14px 24px rgba(18, 55, 155, 0.14);
}

.action-button.action-icon:hover .action-icon__svg,
.action-link.action-icon:hover .action-icon__svg {
    transform: scale(1.05);
}

.action-button.action-icon:disabled,
.action-button.action-icon[disabled] {
    opacity: 0.46;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    background: linear-gradient(180deg, rgba(246, 247, 251, 0.96), rgba(237, 239, 245, 0.96));
    border-color: rgba(136, 149, 172, 0.18);
    color: rgba(90, 110, 150, 0.72);
}

.action-button.action-icon:disabled .action-icon__svg,
.action-button.action-icon[disabled] .action-icon__svg {
    opacity: 0.72;
}

.action-button--primary.action-icon {
    background: linear-gradient(135deg, var(--orama-royal-blue), var(--orama-horizon-blue));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 16px 26px rgba(18, 55, 155, 0.22);
}

.action-button--primary.action-icon:hover {
    background: linear-gradient(135deg, var(--orama-horizon-blue), #5178E2);
    color: #fff;
}

.field-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(18, 55, 155, 0.14);
    background: linear-gradient(180deg, rgba(247, 249, 253, 0.98), rgba(239, 243, 249, 0.98));
    display: inline-block;
    margin: 0;
    cursor: pointer;
    transition: var(--t);
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
    vertical-align: middle;
}

.field-checkbox::after {
    content: "";
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: #fff;
    position: absolute;
    top: 3px;
    left: 3px;
    border: 1px solid rgba(18, 55, 155, 0.1);
    box-shadow: 0 4px 10px rgba(18, 55, 155, 0.12);
    transition: transform .18s ease, background .18s ease;
}

.field-checkbox:checked {
    border-color: rgba(47, 95, 208, 0.22);
    background: linear-gradient(135deg, rgba(47, 95, 208, 0.12), rgba(47, 95, 208, 0.18));
}

.field-checkbox:checked::after {
    transform: translateX(20px);
    background: linear-gradient(135deg, var(--orama-blue-800), var(--orama-horizon-blue));
    border-color: rgba(18, 55, 155, 0.14);
}

.field-checkbox:focus-visible {
    outline: 3px solid rgba(47, 95, 208, 0.18);
    outline-offset: 3px;
}

.data-table .field-checkbox,
.cycle-card-list-head .field-checkbox,
.cycle-card-list-row .field-checkbox,
input.field-checkbox[type="checkbox"][data-select-all],
input.field-checkbox[type="checkbox"][data-select-item] {
    appearance: auto;
    -webkit-appearance: checkbox;
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(18, 55, 155, 0.18);
    background: #fff;
    box-shadow: none;
    padding: 0;
    position: static;
}

.data-table .field-checkbox::after,
.cycle-card-list-head .field-checkbox::after,
.cycle-card-list-row .field-checkbox::after,
input.field-checkbox[type="checkbox"][data-select-all]::after,
input.field-checkbox[type="checkbox"][data-select-item]::after {
    content: none;
}

.data-table .field-checkbox:checked,
.cycle-card-list-head .field-checkbox:checked,
.cycle-card-list-row .field-checkbox:checked,
input.field-checkbox[type="checkbox"][data-select-all]:checked,
input.field-checkbox[type="checkbox"][data-select-item]:checked {
    background: #fff;
    border-color: rgba(18, 55, 155, 0.3);
}

.checkbox-shell {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--orama-slate-700);
    font-size: 0.78rem;
    font-weight: 500;
    width: fit-content;
}

.checkbox-shell span {
    line-height: 1.1;
    color: var(--orama-slate-700);
}

.form-field--checkbox {
    align-content: start;
    gap: 10px;
}

.form-field__checkbox-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}

.form-field--checkbox .checkbox-shell {
    margin-top: 0;
    min-height: 42px;
    padding-inline: 0;
    width: fit-content;
    justify-self: start;
}

.form-field--checkbox input.field-checkbox[type="checkbox"] {
    width: 46px;
    min-width: 46px;
    max-width: 46px;
    height: 26px;
    min-height: 26px;
    max-height: 26px;
    flex: 0 0 46px;
}

.chart-shell {
    position: relative;
    overflow: hidden;
    min-height: 260px;
    padding: 14px;
    border-radius: 22px;
    background:
        radial-gradient(circle at top right, rgba(47, 95, 208, 0.10), transparent 30%),
        linear-gradient(180deg, rgba(247, 249, 252, 0.98), rgba(255, 255, 255, 0.94));
    border: 1px solid var(--color-border-light);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.chart-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(18, 55, 155, 0.035) 1px, transparent 1px),
        linear-gradient(0deg, rgba(18, 55, 155, 0.025) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.38), transparent 72%);
}

.chart-shell::after {
    z-index: 2;
}

.metric-card,
.finance-panel,
.finance-chip-card,
.finance-side-card,
.summary-card,
.source-dashboard-card,
.command-stat,
.finance-pill,
.quick-summary-card,
.pipeline-row,
.compact-intro-card,
.record-card,
.client-summary-card,
.insight-card,
.list-card,
.import-source-card,
.pipeline-card,
.cycle-pipeline-card,
.surface-card[data-mobile-section-title],
.chart-shell {
    position: relative;
    overflow: hidden;
    --card-accent: #21a7d8;
}

.metric-card,
.summary-card,
.quick-summary-card,
.source-dashboard-card {
    --card-accent: #0f9d8a;
}

.metric-card--link,
.pipeline-row,
.compact-intro-card,
.record-card,
.client-summary-card,
.insight-card,
.list-card,
.import-source-card,
.cycle-pipeline-card,
.chart-shell,
.surface-card[data-mobile-section-title] {
    --card-accent: #21a7d8;
}

.finance-panel,
.finance-chip-card,
.finance-side-card,
.finance-pill,
.command-stat {
    --card-accent: #d4a62a;
}

.pipeline-card {
    --card-accent: #21a7d8;
}

.pipeline-card--success {
    --card-accent: #0f9d8a;
}

.pipeline-card--warning {
    --card-accent: #d4a62a;
}

.pipeline-card--danger {
    --card-accent: #d96a4a;
}

.tag--danger,
.status-pill--danger,
.message.error,
.message.danger {
    --card-accent: #d96a4a;
}

.tag--gold,
.status-pill--warning,
.message.warning {
    --card-accent: #d4a62a;
}

.tag--success,
.status-pill--success,
.message.success {
    --card-accent: #0f9d8a;
}

.surface-card > .table-toolbar::before,
.surface-card > .compact-toolbar::before,
.surface-card > .client-toolbar::before,
.table-card::before,
.filters-panel::before,
.dashboard-key-moves::before,
.table-toolbar::before,
.compact-toolbar::before,
.client-toolbar::before {
    content: none !important;
}

.chart-shell canvas {
    position: relative;
    z-index: 1;
    display: block;
}

body.theme-dark .chart-shell {
    background: rgba(255, 255, 255, 0.03);
}

@media (prefers-color-scheme: dark) {
    body.theme-system .topbar {
        background: rgba(28, 28, 30, 0.88);
        border-color: rgba(255, 255, 255, 0.08);
    }

    body.theme-system .search-shell input {
        background: rgba(44, 44, 46, 0.92);
        border-color: rgba(255, 255, 255, 0.08);
    }

    body.theme-system .surface-card {
        background:
            linear-gradient(180deg, rgba(28, 28, 30, 0.98), rgba(22, 22, 24, 0.96)),
            radial-gradient(circle at top right, rgba(10, 132, 255, 0.12), transparent 24%);
    }

    body.theme-system .field-input,
    body.theme-system .field-select,
    body.theme-system .form-field input,
    body.theme-system .form-field select,
    body.theme-system .form-field textarea,
    body.theme-system input[type="text"],
    body.theme-system input[type="email"],
    body.theme-system input[type="search"],
    body.theme-system input[type="number"],
    body.theme-system input[type="date"],
    body.theme-system input[type="datetime-local"],
    body.theme-system input[type="time"],
    body.theme-system input[type="password"],
    body.theme-system textarea,
    body.theme-system select {
        background: rgba(44, 44, 46, 0.92);
        border-color: rgba(255, 255, 255, 0.08);
    }

    body.theme-system .data-table tbody tr {
        background: rgba(255, 255, 255, 0.03);
    }

    body.theme-system .chart-shell {
        background: rgba(255, 255, 255, 0.03);
    }
}

.empty-state {
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px dashed rgba(18, 55, 155, 0.18);
    background: rgba(18, 55, 155, 0.04);
    color: var(--color-text-secondary);
    text-align: center;
}

.results-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(18, 55, 155, 0.08);
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 800;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 18px;
    background:
        radial-gradient(circle at top right, rgba(47, 95, 208, 0.14), transparent 22%),
        radial-gradient(circle at bottom left, rgba(212, 164, 55, 0.10), transparent 20%),
        linear-gradient(180deg, #FBFCFF 0%, var(--orama-observatory-white) 100%);
}

.auth-intro {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: grid;
    place-items: center;
    background: #ffffff;
    overflow: hidden;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.auth-intro__stage {
    position: relative;
    width: min(100vw, 1180px);
    max-width: 100vw;
    max-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #ffffff;
}

.auth-intro__stage::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 56px;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), #ffffff 26%);
    pointer-events: none;
    z-index: 2;
}

.auth-intro__edge-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 0;
    background: #ffffff;
    pointer-events: none;
    z-index: 4;
    display: none;
}

.auth-intro--hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.auth-intro__video {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
    object-position: center center;
    background: #ffffff;
    border: 0;
    outline: 0;
    display: block;
    box-shadow: none;
    transform: none;
    position: relative;
    z-index: 1;
    clip-path: inset(0 0 0 0);
}

.auth-card {
    width: min(100%, 460px);
    padding: 34px 30px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: var(--orama-shadow-lg);
    display: grid;
    gap: 20px;
}

.auth-card--landscape {
    width: min(100%, 1080px);
}

.auth-login-top {
    display: grid;
    gap: 20px;
    align-items: center;
}

.auth-brand {
    display: grid;
    justify-items: center;
    text-align: center;
}

.auth-brand img {
    width: min(100%, 180px);
}

.auth-brand .auth-brand__amaro-logo {
    width: min(100%, 240px);
    mix-blend-mode: multiply;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-credentials {
    display: grid;
    gap: 16px;
}

.auth-hipaa {
    display: grid;
    gap: 12px;
    padding: 16px 16px 14px;
    border-radius: 22px;
    border: 1px solid rgba(18, 55, 155, 0.12);
    background:
        linear-gradient(180deg, rgba(246, 249, 255, 0.96), rgba(241, 245, 255, 0.94)),
        radial-gradient(circle at top right, rgba(47, 95, 208, 0.08), transparent 28%);
}

.auth-hipaa--accepted {
    border-color: rgba(29, 136, 95, 0.28);
    box-shadow: inset 0 0 0 1px rgba(29, 136, 95, 0.08);
}

.auth-hipaa__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    flex-wrap: wrap;
}

.auth-hipaa__headline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.auth-hipaa__toggle {
    width: 24px;
    height: 24px;
    border: 1px solid rgba(18, 55, 155, 0.14);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.58);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    font-weight: 600;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.auth-hipaa__toggle:hover {
    background: rgba(18, 55, 155, 0.10);
    border-color: rgba(18, 55, 155, 0.24);
    transform: translateY(-1px);
}

.auth-hipaa__toggle:focus-visible {
    outline: 2px solid rgba(47, 95, 208, 0.28);
    outline-offset: 2px;
}

.auth-hipaa__toggle span {
    display: inline-block;
    transform: translateY(-1px);
}

.auth-hipaa__body {
    display: grid;
    gap: 12px;
}

.auth-hipaa--collapsed .auth-hipaa__body {
    display: none;
}

.auth-hipaa__intro {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 13px;
    line-height: 1.55;
}

.auth-hipaa__list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
    color: var(--color-text-primary);
    font-size: 13px;
    line-height: 1.5;
}

.auth-hipaa__check {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    font-size: 13px;
    color: var(--color-text-primary);
}

.auth-hipaa__check input {
    margin-top: 2px;
}

.auth-hipaa__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-hipaa__links {
    display: grid;
    gap: 8px;
}

.auth-hipaa__links a {
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.auth-hipaa__links a:hover {
    text-decoration: underline;
}

.auth-hipaa__versions {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(18, 55, 155, 0.06);
    color: var(--color-text-primary);
    font-size: 12px;
    line-height: 1.45;
}

.auth-hipaa__actions .action-button {
    width: auto;
    min-width: 122px;
}

.auth-hipaa-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 120;
}

.auth-hipaa-modal.is-open {
    display: flex;
}

.auth-hipaa-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 20, 44, 0.42);
    backdrop-filter: blur(8px);
}

.auth-hipaa-dialog {
    position: relative;
    width: min(100%, 760px);
    max-height: min(88vh, 920px);
    overflow: auto;
    display: grid;
    gap: 12px;
    padding: 18px 18px 16px;
    border-radius: 26px;
    border: 1px solid rgba(18, 55, 155, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 255, 0.97)),
        radial-gradient(circle at top right, rgba(47, 95, 208, 0.1), transparent 28%);
    box-shadow: 0 30px 80px rgba(11, 31, 94, 0.28);
}

.auth-hipaa__toggle--modal {
    flex: 0 0 auto;
}

.auth-hipaa-dialog .auth-hipaa__body {
    gap: 14px;
}

@media (min-width: 920px) {
    .auth-login-top {
        gap: 22px;
    }

    .auth-credentials {
        max-width: none;
    }

    .auth-form {
        width: 100%;
        max-width: none;
    }
}

.auth-form button {
    width: 100%;
}

@media (max-width: 919px) {
    .auth-card--landscape {
        width: 100%;
    }

    .auth-login-top {
        justify-items: center;
    }

    .auth-credentials {
        width: 100%;
    }

    .auth-brand .auth-brand__amaro-logo {
        width: min(100%, 220px);
    }

    .auth-hipaa {
        padding: 14px 14px 12px;
    }

    .auth-hipaa-dialog {
        padding: 16px 14px 14px;
        max-height: 92vh;
    }
}

@media (max-width: 1280px) {
    :root {
        --sidebar-width: 248px;
    }

    .main-panel {
        padding-inline: 20px;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1600px) {
    :root {
        --page-max-width: 1740px;
        --sidebar-width: 264px;
    }

    .main-panel {
        padding-inline: 30px;
    }

    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .content-grid {
        gap: 22px;
    }
}

@media (max-width: 1100px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: min(86vw, 320px);
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        z-index: 90;
    }

    .app-shell.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-close,
    .sidebar-overlay {
        display: block;
    }
    .sidebar-rail-toggle {
        display: none;
    }

    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(7, 16, 38, 0.36);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease;
        z-index: 80;
    }

    .app-shell.sidebar-open .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .topbar {
        position: static;
        top: auto;
    }

    .topbar,
    .topbar-tools {
        align-items: flex-start;
    }

    .topbar {
        flex-direction: column;
    }
    .page-section-menu__sheet {
        left: 16px !important;
        right: 16px;
        width: auto;
        top: auto;
        bottom: 94px;
        max-height: 62vh;
    }
    .page-utility-fab {
        right: 16px;
        bottom: 94px;
    }

    .topbar-tools {
        width: 100%;
    }

    .search-shell {
        min-width: 0;
        flex: 1 1 260px;
    }
}

@media (max-width: 760px) {
    :root {
        --topbar-height: auto;
    }

    .main-panel {
        padding: 14px 14px 28px;
    }

    .topbar {
        position: static;
        padding: 16px;
        border-radius: 24px;
    }
    .page-utility-fab__button {
        min-width: 0;
        padding-inline: 0.85rem;
    }

    .topbar-title h1 {
        font-size: 24px;
    }

    .form-grid,
    .metrics-grid,
    .metrics-grid--compact {
        grid-template-columns: 1fr;
    }

    .filters-panel form {
        align-items: stretch;
    }

    .filter-grid,
    .form-field {
        flex: 1 1 100%;
        max-width: none;
    }

    .inline-actions,
    .form-actions,
    .filter-actions,
    .table-actions-strip,
    .cycle-inline-actions,
    .import-source-actions,
    .table-toolbar-actions {
        flex-wrap: wrap;
        overflow: visible;
    }

    .filter-actions {
        margin-left: 0;
        margin-top: 8px;
    }

    .table-shell,
    .table-scroll {
        overflow: visible;
        max-height: none;
        border: 0;
        background: transparent;
    }

    .data-table,
    .data-table thead,
    .data-table tbody,
    .data-table tr,
    .data-table th,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody {
        display: grid;
        gap: 12px;
    }

    .data-table tr {
        border: 1px solid var(--color-border-light);
        border-radius: 18px;
        overflow: hidden;
        box-shadow: var(--orama-shadow-xs);
    }

    .data-table td {
        border-bottom: 1px solid rgba(18, 55, 155, 0.08);
    }

    .data-table td:last-child {
        border-bottom: 0;
    }
}

@media (min-width: 761px) and (max-width: 1180px) {
    .main-panel {
        padding: 18px 18px 34px;
    }

    .topbar {
        position: sticky;
        top: 12px;
        align-items: stretch;
    }

    .topbar-tools {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .search-shell {
        flex: 1 1 280px;
        min-width: 240px;
    }

    .metrics-grid,
    .metrics-grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-filter-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    html,
    body {
        overflow-x: hidden;
    }

    html {
        scroll-padding-bottom: calc(92px + env(safe-area-inset-bottom));
    }

    .app-shell {
        display: block;
    }

    .main-panel {
        padding: 10px 10px calc(92px + env(safe-area-inset-bottom));
        gap: 14px;
    }

    .topbar {
        position: sticky;
        top: 8px;
        z-index: 60;
        padding: 12px;
        border-radius: 22px;
        gap: 10px;
        box-shadow: 0 18px 40px rgba(17, 37, 84, 0.12);
    }

    .topbar-heading {
        width: 100%;
        gap: 10px;
    }

    .menu-toggle {
        width: 40px;
        height: 40px;
        min-width: 40px;
        border-radius: 14px;
    }

    .topbar-title .eyebrow {
        font-size: 9px;
        letter-spacing: 0.14em;
        line-height: 1.2;
    }

    .topbar-title .eyebrow::before {
        width: 18px;
    }

    .topbar-title h1 {
        font-size: clamp(22px, 6.5vw, 29px);
        line-height: 0.98;
    }

    .topbar-title p {
        display: none;
    }

    .topbar-tools {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .topbar-tools::-webkit-scrollbar {
        display: none;
    }

    .search-shell {
        flex: 1 1 160px;
        min-width: 150px;
    }

    .search-shell input {
        min-height: 40px;
        padding: 0 12px;
        border-radius: 13px;
        font-size: 14px;
    }

    .topbar-language,
    .app-sync-pill,
    .notification-link,
    .profile-chip {
        flex: 0 0 auto;
        min-height: 40px;
        height: 40px;
    }

    .topbar-language {
        width: 40px;
        padding: 0;
    }

    .app-sync-pill {
        min-width: 58px;
        padding: 0 10px;
        justify-content: center;
    }

    .app-sync-pill__dot {
        width: 8px;
        height: 8px;
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.36);
    }

    .app-sync-pill__label {
        font-size: 11px;
    }

    .notification-link {
        width: 40px;
        border-radius: 14px;
        font-size: 16px;
    }

    .notification-badge {
        right: 3px;
        top: 3px;
    }

    .notification-panel {
        position: fixed;
        inset: 86px 10px auto 10px;
        width: auto;
        max-height: min(68vh, 520px);
        overflow: auto;
    }

    .profile-chip {
        width: 40px;
        padding: 0;
        border-radius: 14px;
        justify-content: center;
    }

    .profile-chip .avatar {
        width: 32px;
        height: 32px;
        border-radius: 12px;
    }

    .profile-chip strong,
    .profile-chip span,
    .logout-form {
        display: none;
    }

    .sidebar {
        width: min(88vw, 330px);
        padding: 16px;
    }

    .sidebar-main {
        gap: 14px;
    }

    .sidebar-close {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }

    .brand-logo-sticky {
        padding-bottom: 6px;
        background: linear-gradient(180deg, rgba(11, 31, 94, 0.76), rgba(11, 31, 94, 0.38) 74%, rgba(11, 31, 94, 0.02));
    }

    .brand-logo-wrap {
        padding: 10px 8px;
        border-radius: 22px;
    }

    .brand-logo-wrap img {
        width: min(100%, 214px);
    }

    .brand-copy span {
        max-width: none;
    }

    .sidebar-nav {
        max-height: calc(100dvh - 184px);
        gap: 16px;
        padding-bottom: 12px;
    }

    .nav-link {
        min-height: 48px;
        font-size: 15px;
    }

    .sidebar-logout-form {
        display: block;
        padding-top: 12px;
    }

    .sidebar-logout-form .action-button {
        width: 100%;
        min-height: 44px;
        background: rgba(255, 255, 255, 0.10);
        color: white;
        border-color: rgba(255, 255, 255, 0.10);
    }

    .mobile-bottom-nav {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        z-index: 70;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
        gap: 6px;
        padding: 8px;
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.88);
        border: 1px solid rgba(217, 224, 235, 0.90);
        box-shadow: 0 18px 46px rgba(17, 37, 84, 0.18);
        backdrop-filter: blur(18px);
    }

    .mobile-bottom-nav__item {
        min-width: 0;
        min-height: 48px;
        border: 0;
        border-radius: 18px;
        background: transparent;
        color: var(--orama-slate-700);
        display: grid;
        place-items: center;
        align-content: center;
        gap: 4px;
        font: inherit;
        font-size: 10px;
        font-weight: 800;
        line-height: 1.1;
        text-align: center;
        cursor: pointer;
    }

    .mobile-bottom-nav__item.active,
    .mobile-bottom-nav__item[aria-expanded="true"] {
        background: rgba(18, 55, 155, 0.10);
        color: var(--orama-royal-blue);
    }

    .mobile-bottom-nav__mark {
        width: 18px;
        height: 18px;
        border-radius: 8px;
        background:
            linear-gradient(135deg, rgba(18, 55, 155, 0.92), rgba(47, 95, 208, 0.82));
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    }

    .mobile-collapsible {
        position: relative;
        transition: padding 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    }

    .mobile-section-toggle {
        display: flex;
        width: 100%;
        min-height: 48px;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin: 0 0 12px;
        padding: 10px 12px;
        border: 1px solid rgba(18, 55, 155, 0.10);
        border-radius: 18px;
        background:
            linear-gradient(135deg, rgba(248, 251, 255, 0.96), rgba(238, 243, 255, 0.86));
        color: var(--orama-blue-900);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
        font: inherit;
        text-align: left;
        cursor: pointer;
        touch-action: manipulation;
    }

    .mobile-section-toggle__label {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 13px;
        font-weight: 900;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .mobile-section-toggle__meta {
        margin-left: auto;
        color: var(--orama-slate-700);
        font-size: 11px;
        font-weight: 800;
        white-space: nowrap;
    }

    .mobile-section-toggle__icon {
        width: 28px;
        height: 28px;
        border-radius: 11px;
        display: inline-grid;
        place-items: center;
        flex: 0 0 auto;
        background: rgba(18, 55, 155, 0.10);
        color: var(--orama-royal-blue);
        font-size: 18px;
        font-weight: 900;
        line-height: 1;
    }

    .mobile-section-collapsed {
        padding: 12px !important;
    }

    .mobile-section-collapsed > :not(.mobile-section-toggle) {
        display: none !important;
    }

    .mobile-section-collapsed .mobile-section-toggle {
        margin-bottom: 0;
    }

    .mobile-collapsible > .eyebrow,
    .mobile-collapsible > .table-toolbar h2,
    .mobile-collapsible > .compact-toolbar h2,
    .mobile-collapsible > .client-toolbar h2,
    .mobile-collapsible > .table-toolbar .eyebrow,
    .mobile-collapsible > .compact-toolbar .eyebrow,
    .mobile-collapsible > .client-toolbar .eyebrow {
        display: none !important;
    }

    .page-shell {
        gap: 16px;
    }

    .surface-card,
    .metric-card,
    .filters-panel,
    .table-card {
        padding: 16px;
        border-radius: 24px;
    }

    .dashboard-filter-card {
        padding: 16px;
        margin-bottom: 12px;
    }

    .dashboard-filter-card .section-kicker {
        align-items: flex-start;
        margin-bottom: 8px;
    }

    .dashboard-filter-card > p {
        display: none;
    }

    .dashboard-filter-card h2 {
        font-size: 20px;
        line-height: 1.1;
        margin-bottom: 12px;
    }

    .dashboard-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .dashboard-filter-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .dashboard-filter-actions .action-link,
    .dashboard-filter-actions .action-button {
        width: 100%;
        min-height: 42px;
    }

    .dashboard-filter-field select,
    .field-input,
    .field-select,
    .form-field input,
    .form-field select,
    .form-field textarea,
    input[type="text"],
    input[type="email"],
    input[type="search"],
    input[type="number"],
    input[type="date"],
    input[type="password"],
    textarea,
    select {
        min-height: 46px;
        font-size: 16px;
    }

    .command-deck {
        padding: 16px;
        border-radius: 24px;
    }

    .command-deck__top,
    .command-deck__stats,
    .content-grid,
    .finance-ribbon,
    .trend-grid,
    .executive-command-grid,
    .priority-grid,
    .radar-strip,
    .recovery-spotlight-grid {
        grid-template-columns: 1fr;
    }

    .command-deck__title h2 {
        max-width: none;
        font-size: 26px;
    }

    .command-deck__period {
        gap: 8px;
    }

    .command-deck__actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .quick-action,
    .action-button,
    .action-link {
        min-height: 42px;
    }

    .metrics-grid,
    .metrics-grid--compact,
    .form-grid,
    .filter-grid {
        grid-template-columns: 1fr;
    }

    .filters-panel form,
    .filter-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .form-field {
        min-width: 0;
        max-width: none;
    }

    .inline-actions,
    .form-actions,
    .filter-actions,
    .table-actions-strip,
    .cycle-inline-actions,
    .import-source-actions,
    .table-toolbar-actions {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 2px;
    }

    .form-actions,
    .filter-actions {
        justify-content: flex-start;
    }

    .table-toolbar,
    .compact-toolbar,
    .client-toolbar,
    .section-kicker {
        align-items: flex-start;
        flex-direction: column;
    }

    .table-shell {
        overflow: visible;
    }

    .data-table tr {
        display: grid;
        gap: 0;
        padding: 8px;
        background: rgba(255, 255, 255, 0.88);
    }

    .data-table td {
        display: grid;
        grid-template-columns: minmax(92px, 0.38fr) minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        padding: 10px 8px;
    }

    .data-table td::before {
        content: attr(data-label);
        color: var(--color-primary);
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .data-table td[colspan] {
        display: block;
    }

    .data-table td[colspan]::before,
    .data-table td:not([data-label])::before {
        content: none;
    }

    .data-table td[data-label="Acciones"],
    .data-table td[data-label="Actions"] {
        grid-template-columns: 1fr;
    }

    .data-table td[data-label="Acciones"]::before,
    .data-table td[data-label="Actions"]::before {
        margin-bottom: 4px;
    }

    .surface-card strong,
    .surface-card .muted,
    .surface-card p,
    .list-row strong,
    .list-row .muted,
    .list-row p {
        word-break: normal;
        overflow-wrap: normal;
        hyphens: none;
    }

    .list-row strong {
        font-size: 14px;
        line-height: 1.24;
    }

    .list-row .muted,
    .list-row p {
        font-size: 12px;
        line-height: 1.45;
    }

    .dashboard-finance-panel .list-row {
        align-items: flex-start;
    }

    .dashboard-finance-panel .list-row strong,
    .dashboard-finance-panel .list-row .muted {
        white-space: normal;
    }

    .mobile-row-toggle-cell {
        display: block !important;
        padding: 0 0 8px !important;
        border-bottom: 0 !important;
    }

    .mobile-row-toggle {
        width: 100%;
        min-height: 46px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 12px;
        border: 1px solid rgba(18, 55, 155, 0.10);
        border-radius: 16px;
        background: rgba(18, 55, 155, 0.06);
        color: var(--orama-blue-900);
        font: inherit;
        cursor: pointer;
        touch-action: manipulation;
    }

    .mobile-row-toggle__title {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 13px;
        font-weight: 900;
    }

    .mobile-row-toggle__meta {
        flex: 0 0 auto;
        padding: 6px 9px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.72);
        color: var(--orama-royal-blue);
        font-size: 11px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .mobile-row-collapsed .mobile-row-extra {
        display: none !important;
    }

    .dashboard-chart {
        height: 220px !important;
    }

    .chart-shell {
        min-height: 220px;
        padding: 10px;
        border-radius: 18px;
    }
}

@media (max-width: 420px) {
    .main-panel {
        padding-inline: 8px;
    }

    .topbar {
        padding: 10px;
    }

    .search-shell {
        min-width: 134px;
    }

    .topbar-language,
    .notification-link,
    .profile-chip {
        width: 38px;
        min-height: 38px;
        height: 38px;
    }

    .app-sync-pill {
        min-width: 54px;
        min-height: 38px;
        height: 38px;
        padding: 0 8px;
    }

    .mobile-bottom-nav {
        left: 8px;
        right: 8px;
        bottom: calc(8px + env(safe-area-inset-bottom));
    }
}

@media (orientation: landscape) and (max-height: 560px) and (max-width: 1180px) {
    html {
        scroll-padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }

    .app-shell {
        display: block;
    }

    .main-panel {
        padding: 8px 10px calc(70px + env(safe-area-inset-bottom));
        gap: 10px;
    }

    .topbar {
        position: sticky;
        top: 6px;
        z-index: 60;
        min-height: 0;
        padding: 8px 10px;
        border-radius: 18px;
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .topbar-heading {
        width: auto;
        flex: 0 1 38%;
        gap: 8px;
    }

    .menu-toggle {
        width: 36px;
        height: 36px;
        min-width: 36px;
        border-radius: 12px;
    }

    .topbar-title .eyebrow {
        display: none;
    }

    .topbar-title h1 {
        font-size: clamp(19px, 4vw, 26px);
        line-height: 1;
        white-space: nowrap;
    }

    .topbar-title p {
        display: none;
    }

    .topbar-tools {
        flex: 1 1 auto;
        width: auto;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 7px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .topbar-tools::-webkit-scrollbar {
        display: none;
    }

    .search-shell {
        min-width: 180px;
        flex: 1 1 220px;
    }

    .search-shell input,
    .topbar-language,
    .app-sync-pill,
    .notification-link,
    .profile-chip {
        min-height: 36px;
        height: 36px;
    }

    .search-shell input {
        border-radius: 12px;
        font-size: 14px;
    }

    .topbar-language,
    .notification-link,
    .profile-chip {
        width: 36px;
        padding: 0;
        border-radius: 13px;
    }

    .profile-chip {
        justify-content: center;
    }

    .profile-chip .avatar {
        width: 30px;
        height: 30px;
        border-radius: 11px;
    }

    .profile-chip strong,
    .profile-chip span,
    .logout-form {
        display: none;
    }

    .app-sync-pill {
        min-width: 54px;
        padding: 0 8px;
    }

    .notification-panel {
        position: fixed;
        inset: 58px 10px auto auto;
        width: min(360px, 55vw);
        max-height: calc(100dvh - 82px);
        overflow: auto;
    }

    .sidebar {
        width: min(76vw, 318px);
        padding: 12px;
    }

    .brand-logo-wrap {
        padding: 9px 7px;
        border-radius: 18px;
    }

    .brand-logo-wrap img {
        width: min(100%, 216px);
    }

    .sidebar-nav {
        max-height: calc(100dvh - 158px);
        gap: 12px;
    }

    .nav-link {
        min-height: 40px;
        font-size: 13px;
    }

    .sidebar-logout-form {
        display: block;
        padding-top: 8px;
    }

    .mobile-bottom-nav {
        position: fixed;
        left: max(10px, env(safe-area-inset-left));
        right: max(10px, env(safe-area-inset-right));
        bottom: calc(7px + env(safe-area-inset-bottom));
        z-index: 70;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
        gap: 6px;
        padding: 6px;
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(217, 224, 235, 0.92);
        box-shadow: 0 16px 38px rgba(17, 37, 84, 0.16);
        backdrop-filter: blur(18px);
    }

    .mobile-bottom-nav__item {
        min-height: 40px;
        border-radius: 15px;
        font-size: 10px;
    }

    .mobile-bottom-nav__mark {
        display: none;
    }

    .page-shell {
        gap: 10px;
    }

    .surface-card,
    .metric-card,
    .filters-panel,
    .table-card {
        padding: 12px;
        border-radius: 18px;
    }

    .mobile-section-toggle {
        min-height: 38px;
        margin-bottom: 8px;
        padding: 6px 8px;
        border-radius: 14px;
    }

    .mobile-section-toggle__label {
        font-size: 11px;
    }

    .mobile-section-toggle__meta {
        display: none;
    }

    .mobile-section-toggle__icon {
        width: 24px;
        height: 24px;
        border-radius: 9px;
    }

    .mobile-section-collapsed {
        padding: 8px !important;
    }

    .dashboard-filter-card {
        padding: 12px;
        margin-bottom: 8px;
    }

    .dashboard-filter-card h2 {
        font-size: 18px;
        margin-bottom: 8px;
    }

    .dashboard-filter-form {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .dashboard-filter-actions {
        grid-column: auto;
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .dashboard-filter-actions .action-link,
    .dashboard-filter-actions .action-button,
    .dashboard-filter-field select,
    .field-input,
    .field-select,
    .form-field input,
    .form-field select,
    .form-field textarea,
    input[type="text"],
    input[type="email"],
    input[type="search"],
    input[type="number"],
    input[type="date"],
    input[type="password"],
    textarea,
    select {
        min-height: 38px;
        font-size: 14px;
    }

    .command-deck {
        padding: 12px;
    }

    .command-deck__top {
        grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
        gap: 10px;
    }

    .command-deck__title h2 {
        font-size: 22px;
        margin-bottom: 6px;
    }

    .command-deck__title p,
    .command-stat p,
    .metric-card p,
    .finance-pill p {
        display: none;
    }

    .command-deck__period {
        margin-top: 8px;
    }

    .command-deck__actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 8px;
    }

    .command-deck__stats,
    .metrics-grid,
    .finance-ribbon {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 8px;
    }

    .metrics-grid--compact {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .metric-card {
        min-height: 92px;
        gap: 6px;
    }

    .metric-card h3,
    .command-stat span,
    .finance-pill span {
        font-size: 11px;
        line-height: 1.2;
    }

    .metric-card strong,
    .command-stat strong,
    .finance-pill strong {
        font-size: clamp(21px, 4.2vw, 30px);
    }

    .metric-chip,
    .tag {
        min-height: 24px;
        padding: 0 8px;
        font-size: 9px;
    }

    .content-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px;
    }

    .trend-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 10px;
    }

    .trend-card {
        padding: 12px;
    }

    .trend-card__header {
        gap: 8px;
        margin-bottom: 4px;
    }

    .trend-card__header h3 {
        font-size: 14px;
    }

    .trend-value {
        font-size: clamp(22px, 4.8vw, 34px);
        margin: 6px 0;
    }

    .trend-comparison-list,
    .list-stack {
        gap: 6px;
    }

    .list-row,
    .pipeline-row {
        padding: 9px 10px;
        border-radius: 13px;
    }

    .dashboard-chart {
        height: 176px !important;
    }

    .chart-shell {
        min-height: 176px;
        padding: 8px;
        border-radius: 16px;
    }
}

@media (orientation: landscape) and (max-height: 560px) and (max-width: 720px) {
    .command-deck__top,
    .content-grid,
    .trend-grid {
        grid-template-columns: 1fr !important;
    }

    .command-deck__stats,
    .metrics-grid,
    .finance-ribbon {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .dashboard-filter-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (orientation: landscape) and (max-height: 560px) and (max-width: 940px) {
    .page-shell {
        gap: 10px;
        padding-bottom: 66px;
    }

    .content-grid,
    .trend-grid,
    .metrics-grid,
    .command-deck__stats,
    .finance-ribbon {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: 8px;
    }

    .metrics-grid--compact {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    .surface-card,
    .metric-card,
    .filters-panel,
    .table-card {
        padding: 12px;
        border-radius: 18px;
    }

    .mobile-section-toggle {
        min-height: 40px;
        padding: 8px 10px;
    }

    .mobile-section-toggle__label {
        font-size: 11px;
    }

    .topbar {
        padding: 10px;
        border-radius: 0 0 20px 20px;
    }

    .dashboard-chart {
        height: 150px !important;
    }

    .chart-shell {
        min-height: 150px;
    }
}

textarea.cycle-comment-field,
.form-field textarea.cycle-comment-field {
    min-height: 40px !important;
    height: 40px !important;
    resize: vertical !important;
    overflow: auto;
    box-sizing: border-box;
}

/* Premium dark theme repair layer.
   Several modules define light surfaces locally, so this layer intentionally wins
   only when the user selected Dark, or when System resolves to dark mode. */
body.theme-dark {
    color-scheme: dark;
    --color-bg: #000000;
    --color-surface: #1c1c1e;
    --color-surface-muted: #2c2c2e;
    --color-text: #f5f5f7;
    --color-text-secondary: #d1d1d6;
    --color-text-muted: #a1a1a8;
    --color-primary: #64a6ff;
    --color-border: rgba(255, 255, 255, 0.16);
    --color-border-light: rgba(255, 255, 255, 0.10);
    --orama-royal-blue: #0a84ff;
    --orama-blue-900: #f5f5f7;
    --orama-blue-800: #d7e7ff;
    --orama-blue-700: #8ec5ff;
    --orama-slate-700: #c7c7cc;
    --ink-strong: #f5f5f7;
    --ink-soft: #b8bac4;
    --dark-panel: #1c1c1e;
    --dark-panel-2: #242426;
    --dark-panel-3: #2c2c2e;
    --dark-line: rgba(255, 255, 255, 0.12);
    --dark-line-soft: rgba(255, 255, 255, 0.08);
    --dark-blue: #0a84ff;
    --dark-blue-soft: rgba(10, 132, 255, 0.18);
    --dark-gold: #ffd60a;
    --dark-green: #30d158;
    --dark-red: #ff453a;
    background:
        radial-gradient(circle at 12% 0%, rgba(10, 132, 255, 0.15), transparent 28%),
        radial-gradient(circle at 92% 6%, rgba(94, 92, 230, 0.13), transparent 30%),
        linear-gradient(180deg, #050506 0%, #000000 100%) !important;
}

body.theme-dark .sidebar {
    background:
        radial-gradient(circle at 18% 0%, rgba(10, 132, 255, 0.20), transparent 30%),
        radial-gradient(circle at 88% 18%, rgba(48, 209, 88, 0.07), transparent 28%),
        linear-gradient(180deg, #15151a 0%, #101114 48%, #050506 100%) !important;
    border-right-color: rgba(255, 255, 255, 0.10) !important;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04), 18px 0 42px rgba(0, 0, 0, 0.42) !important;
}

body.theme-dark .brand-logo-sticky {
    background:
        linear-gradient(180deg, rgba(44, 44, 46, 0.98), rgba(28, 28, 30, 0.94) 76%, rgba(20, 20, 22, 0.88)) !important;
}

body.theme-dark .brand-logo-wrap,
body.theme-dark .sidebar-submenu.is-active .sidebar-submenu__summary,
body.theme-dark .sidebar-submenu[open] .sidebar-submenu__summary,
body.theme-dark .nav-link.active {
    background:
        linear-gradient(180deg, rgba(44, 44, 46, 0.88), rgba(28, 28, 30, 0.72)),
        rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

body.theme-dark .brand-logo-wrap {
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: rgba(214, 224, 240, 0.92) !important;
}

body.theme-dark .nav-link--sub {
    background: rgba(44, 44, 46, 0.42) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

body.theme-dark .nav-link--sub.active {
    background:
        linear-gradient(180deg, rgba(44, 44, 46, 0.88), rgba(28, 28, 30, 0.72)),
        rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
}

body.theme-dark .main-panel {
    background: transparent !important;
}

body.theme-dark .topbar,
body.theme-dark .filters-panel,
body.theme-dark .surface-card,
body.theme-dark .metric-card,
body.theme-dark .finance-card,
body.theme-dark .finance-panel,
body.theme-dark .finance-tab,
body.theme-dark .finance-kpi,
body.theme-dark .finance-chip-card,
body.theme-dark .finance-side-card,
body.theme-dark .summary-card,
body.theme-dark .source-dashboard-card,
body.theme-dark .command-deck,
body.theme-dark .command-stat,
body.theme-dark .finance-pill,
body.theme-dark .quick-summary-card,
body.theme-dark .pipeline-row,
body.theme-dark .compact-intro-card,
body.theme-dark .record-card,
body.theme-dark .client-summary-card,
body.theme-dark .insight-card,
body.theme-dark .list-card,
body.theme-dark .list-row,
body.theme-dark .import-source-card,
body.theme-dark .pipeline-card,
body.theme-dark .cycle-pipeline-card,
body.theme-dark .dashboard-finance-panel,
body.theme-dark .chart-shell,
body.theme-dark .finance-chart-shell,
body.theme-dark .finance-close-month,
body.theme-dark .finance-account-item,
body.theme-dark .finance-type-breakdown,
body.theme-dark .finance-type-breakdown__row,
body.theme-dark .finance-modal__card,
body.theme-dark .page-section-menu__sheet,
body.theme-dark .page-section-menu__link,
body.theme-dark .empty-state,
body.theme-dark .results-summary,
body.theme-dark .table-scroll,
body.theme-dark .finance-table-shell,
body.theme-dark .finance-bank-scroll,
body.theme-dark .finance-reconciliation-scroll {
    background:
        radial-gradient(circle at top right, rgba(10, 132, 255, 0.10), transparent 34%),
        linear-gradient(180deg, rgba(31, 31, 34, 0.98), rgba(20, 20, 22, 0.96)) !important;
    border-color: var(--dark-line) !important;
    color: var(--color-text) !important;
    box-shadow:
        0 24px 54px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.theme-dark .filters-panel,
body.theme-dark .finance-filters,
body.theme-dark .topbar {
    backdrop-filter: none;
}

body.theme-dark .finance-card::before,
body.theme-dark .finance-panel::before,
body.theme-dark .finance-kpi::before,
body.theme-dark .metric-card::before,
body.theme-dark .summary-card::before,
body.theme-dark .command-stat::before,
body.theme-dark .finance-pill::before,
body.theme-dark .insight-card::after {
    opacity: 0.92 !important;
}

body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark h4,
body.theme-dark .topbar-title h1,
body.theme-dark .finance-card strong,
body.theme-dark .metric-card strong,
body.theme-dark .command-stat strong,
body.theme-dark .finance-pill strong,
body.theme-dark .insight-card > strong,
body.theme-dark .compact-intro-card strong,
body.theme-dark .finance-kpi strong,
body.theme-dark .finance-panel__header h2,
body.theme-dark .finance-close-month__name,
body.theme-dark .finance-type-breakdown__row strong,
body.theme-dark .dashboard-finance-legend,
body.theme-dark .data-table td strong {
    color: #ffffff !important;
}

body.theme-dark p,
body.theme-dark span,
body.theme-dark .muted,
body.theme-dark .field-help,
body.theme-dark .topbar-title p,
body.theme-dark .finance-card p,
body.theme-dark .finance-card span,
body.theme-dark .finance-panel__header p,
body.theme-dark .finance-kpi span,
body.theme-dark .finance-mini-note,
body.theme-dark .finance-type-breakdown__row span,
body.theme-dark .compact-intro-card p,
body.theme-dark .insight-card > p,
body.theme-dark .insight-card > span,
body.theme-dark .page-section-menu__meta,
body.theme-dark .list-row p,
body.theme-dark .command-stat p,
body.theme-dark .finance-pill p {
    color: var(--color-text-secondary) !important;
}

body.theme-dark .form-field > label,
body.theme-dark .filters-panel h3,
body.theme-dark .eyebrow,
body.theme-dark .finance-card span,
body.theme-dark .finance-panel__header .eyebrow,
body.theme-dark .finance-type-breakdown__label,
body.theme-dark .data-table thead th,
body.theme-dark .finance-bank-table thead th,
body.theme-dark .finance-reconciliation-table thead th {
    color: #9ecbff !important;
}

body.theme-dark .field-input,
body.theme-dark .field-select,
body.theme-dark .form-field input,
body.theme-dark .form-field select,
body.theme-dark .form-field textarea,
body.theme-dark .search-shell input,
body.theme-dark input[type="text"],
body.theme-dark input[type="email"],
body.theme-dark input[type="search"],
body.theme-dark input[type="number"],
body.theme-dark input[type="date"],
body.theme-dark input[type="datetime-local"],
body.theme-dark input[type="time"],
body.theme-dark input[type="password"],
body.theme-dark textarea,
body.theme-dark select,
body.theme-dark .finance-month-picker__trigger,
body.theme-dark .finance-month-picker__panel,
body.theme-dark .finance-month-picker__option,
body.theme-dark .finance-month-picker__button,
body.theme-dark .finance-code {
    background: rgba(44, 44, 46, 0.96) !important;
    border-color: var(--dark-line) !important;
    color: #f5f5f7 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder,
body.theme-dark .search-shell input::placeholder {
    color: rgba(235, 235, 245, 0.48) !important;
}

body.theme-dark .field-input:focus,
body.theme-dark .field-select:focus,
body.theme-dark .form-field input:focus,
body.theme-dark .form-field select:focus,
body.theme-dark .form-field textarea:focus,
body.theme-dark .search-shell input:focus {
    border-color: rgba(10, 132, 255, 0.62) !important;
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.18) !important;
    outline: none !important;
}

body.theme-dark .topbar-utility,
body.theme-dark .topbar-language,
body.theme-dark .status-dot,
body.theme-dark .notification-link,
body.theme-dark .topbar-utility__button,
body.theme-dark .topbar .menu-toggle,
body.theme-dark .sidebar-rail-toggle,
body.theme-dark .page-utility-fab__button,
body.theme-dark .mobile-bottom-nav,
body.theme-dark .action-button--light,
body.theme-dark .finance-action-button--muted,
body.theme-dark .finance-month-picker__action,
body.theme-dark .finance-tab__count,
body.theme-dark .metric-chip,
body.theme-dark .tag,
body.theme-dark .finance-status,
body.theme-dark .quick-filter-link {
    background: rgba(44, 44, 46, 0.88) !important;
    border-color: var(--dark-line) !important;
    color: #d7e7ff !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

body.theme-dark .topbar-utility__button:hover {
    background: rgba(58, 58, 60, 0.96) !important;
    color: #ffffff !important;
}

body.theme-dark .mobile-bottom-nav {
    background: rgba(28, 28, 30, 0.86) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.44) !important;
    backdrop-filter: blur(22px) saturate(1.2);
}

body.theme-dark .mobile-bottom-nav__item {
    color: rgba(245, 245, 247, 0.72) !important;
}

body.theme-dark .mobile-bottom-nav__item.active,
body.theme-dark .mobile-bottom-nav__item[aria-expanded="true"] {
    background: rgba(10, 132, 255, 0.18) !important;
    color: #ffffff !important;
}

body.theme-dark .mobile-bottom-nav__mark {
    background: linear-gradient(135deg, #0a84ff, #64a6ff) !important;
    box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.14) !important;
}

body.theme-dark .action-button,
body.theme-dark .create-cta,
body.theme-dark .finance-action-button,
body.theme-dark .finance-month-picker__button--primary {
    box-shadow: 0 14px 28px rgba(10, 132, 255, 0.20) !important;
}

body.theme-dark .data-table,
body.theme-dark .finance-bank-table,
body.theme-dark .finance-reconciliation-table {
    color: var(--color-text) !important;
}

body.theme-dark .data-table thead th,
body.theme-dark .finance-bank-table thead th,
body.theme-dark .finance-reconciliation-table thead th {
    background: rgba(28, 28, 30, 0.98) !important;
    box-shadow: inset 0 -1px 0 var(--dark-line) !important;
}

body.theme-dark .data-table tbody tr,
body.theme-dark .finance-bank-table tbody tr,
body.theme-dark .finance-reconciliation-table tbody tr {
    background: rgba(28, 28, 30, 0.72) !important;
}

body.theme-dark .data-table tbody tr:hover,
body.theme-dark .finance-bank-table tbody tr:hover,
body.theme-dark .finance-reconciliation-table tbody tr:hover,
body.theme-dark .finance-type-breakdown__row:hover {
    background: rgba(10, 132, 255, 0.12) !important;
}

body.theme-dark .data-table th,
body.theme-dark .data-table td,
body.theme-dark .finance-bank-table th,
body.theme-dark .finance-bank-table td,
body.theme-dark .finance-reconciliation-table th,
body.theme-dark .finance-reconciliation-table td,
body.theme-dark .finance-chart-list__row,
body.theme-dark .finance-kpi,
body.theme-dark .finance-account-item,
body.theme-dark .list-row {
    border-color: var(--dark-line-soft) !important;
}

body.theme-dark .chart-shell::before,
body.theme-dark .finance-chart-shell::before {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px) !important;
}

body.theme-dark .app-sync-float-indicator::before {
    background: rgba(28, 28, 30, 0.92) !important;
    box-shadow:
        0 28px 54px rgba(0, 0, 0, 0.52),
        inset 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
}

body.theme-dark .app-sync-float-indicator__magnifier {
    color: #0a84ff !important;
}

body.theme-dark .performance-card,
body.theme-dark .table-card,
body.theme-dark .quick-report-card,
body.theme-dark .report-row,
body.theme-dark .priority-card,
body.theme-dark .pipeline-column,
body.theme-dark .priority-item,
body.theme-dark .portfolio-kpi-card,
body.theme-dark .portfolio-status-card,
body.theme-dark .portfolio-review-panel,
body.theme-dark .portfolio-empty,
body.theme-dark .enrollment-day-month,
body.theme-dark .premium-multiselect__panel,
body.theme-dark .premium-modal__card,
body.theme-dark .agent-progress-row,
body.theme-dark .page-rhythm,
body.theme-dark .record-meta div {
    background:
        radial-gradient(circle at top right, rgba(10, 132, 255, 0.10), transparent 34%),
        linear-gradient(180deg, rgba(31, 31, 34, 0.98), rgba(20, 20, 22, 0.96)) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f5f5f7 !important;
    box-shadow:
        0 22px 46px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

body.theme-dark .toolbar-chip,
body.theme-dark .pipeline-column-count,
body.theme-dark .comparison-pill--flat,
body.theme-dark .status-chip,
body.theme-dark .portfolio-review-toggle,
body.theme-dark .premium-multiselect__trigger,
body.theme-dark .premium-multiselect__option,
body.theme-dark .enrollment-day-chip,
body.theme-dark .enrollment-day-cell,
body.theme-dark .portfolio-inline-link__icon {
    background: rgba(44, 44, 46, 0.94) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #d7e7ff !important;
}

body.theme-dark .premium-multiselect__trigger::after {
    border-right-color: rgba(215, 231, 255, 0.88) !important;
    border-bottom-color: rgba(215, 231, 255, 0.88) !important;
}

body.theme-dark .premium-multiselect__option:hover,
body.theme-dark .portfolio-review-toggle:hover {
    background: rgba(10, 132, 255, 0.14) !important;
}

body.theme-dark .comparison-pill--up,
body.theme-dark .priority-item--success,
body.theme-dark .pipeline-card--success {
    background: rgba(48, 209, 88, 0.14) !important;
    border-color: rgba(48, 209, 88, 0.24) !important;
    color: #d9ffe4 !important;
}

body.theme-dark .comparison-pill--down,
body.theme-dark .priority-item--danger,
body.theme-dark .pipeline-card--danger {
    background: rgba(255, 69, 58, 0.14) !important;
    border-color: rgba(255, 69, 58, 0.24) !important;
    color: #ffd7d4 !important;
}

body.theme-dark .priority-item--warning,
body.theme-dark .pipeline-card--warning,
body.theme-dark .status-chip--warning {
    background: rgba(255, 214, 10, 0.16) !important;
    border-color: rgba(255, 214, 10, 0.26) !important;
    color: #fff1a8 !important;
}

body.theme-dark .portfolio-drop-table thead th {
    background: linear-gradient(180deg, rgba(35, 35, 38, 0.98), rgba(23, 23, 25, 0.98)) !important;
    border-bottom-color: rgba(255, 255, 255, 0.12) !important;
    color: #9ecbff !important;
}

body.theme-dark .portfolio-drop-table tbody tr,
body.theme-dark .portfolio-drop-table tbody tr:nth-child(even),
body.theme-dark .portfolio-review-row td,
body.theme-dark .portfolio-detail-grid div {
    background: rgba(24, 24, 27, 0.98) !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
    color: #f5f5f7 !important;
}

body.theme-dark .portfolio-drop-table tbody tr:hover {
    background: rgba(34, 34, 38, 0.98) !important;
    box-shadow: inset 0 0 0 1px rgba(100, 166, 255, 0.20) !important;
}

body.theme-dark .portfolio-drop-table strong,
body.theme-dark .portfolio-kpi-card strong,
body.theme-dark .portfolio-status-card__top h3,
body.theme-dark .performance-card strong,
body.theme-dark .quick-report-card strong,
body.theme-dark .report-row strong,
body.theme-dark .priority-card h3,
body.theme-dark .pipeline-column h3,
body.theme-dark .priority-item strong,
body.theme-dark .pipeline-card strong,
body.theme-dark .enrollment-day-month-title,
body.theme-dark .premium-modal__title,
body.theme-dark .agent-progress-row strong,
body.theme-dark .page-rhythm strong {
    color: #ffffff !important;
}

body.theme-dark .portfolio-kpi-card span,
body.theme-dark .portfolio-kpi-card p,
body.theme-dark .portfolio-status-card__meta,
body.theme-dark .report-meta,
body.theme-dark .quick-report-card p,
body.theme-dark .priority-card p,
body.theme-dark .priority-meta,
body.theme-dark .pipeline-meta,
body.theme-dark .record-meta span,
body.theme-dark .enrollment-day-legend,
body.theme-dark .enrollment-day-weekday,
body.theme-dark .premium-modal__body,
body.theme-dark .portfolio-empty,
body.theme-dark .page-rhythm p {
    color: #c7c7cc !important;
}

body.theme-dark .enrollment-day-cell {
    color: #f5f5f7 !important;
}

body.theme-dark .enrollment-day-cell.is-selected,
body.theme-dark .status-chip--success,
body.theme-dark .enrollment-day-legend__swatch,
body.theme-dark .enrollment-chart-day-manager > label::before {
    background: rgba(48, 209, 88, 0.18) !important;
    border-color: rgba(48, 209, 88, 0.34) !important;
    color: #dbffe6 !important;
}

body.theme-dark .enrollment-day-cell.is-outside,
body.theme-dark .enrollment-day-cell[disabled] {
    background: rgba(58, 58, 60, 0.42) !important;
    color: rgba(235, 235, 245, 0.38) !important;
}

body.theme-dark .premium-modal__backdrop {
    background: rgba(0, 0, 0, 0.56) !important;
}

body.theme-dark .app-sync-pill--online,
body.theme-dark .sync-job-pill--completed {
    background: rgba(48, 209, 88, 0.16) !important;
    color: #7ff0a4 !important;
    box-shadow: inset 0 0 0 1px rgba(48, 209, 88, 0.26) !important;
}

body.theme-dark .app-sync-pill--updating,
body.theme-dark .sync-job-pill--running,
body.theme-dark .tag--gold,
body.theme-dark .status-pill--warning,
body.theme-dark .message.warning {
    background: rgba(255, 214, 10, 0.16) !important;
    color: #ffe066 !important;
    box-shadow: inset 0 0 0 1px rgba(255, 214, 10, 0.26) !important;
}

body.theme-dark .app-sync-pill--offline,
body.theme-dark .sync-job-pill--error,
body.theme-dark .tag--danger,
body.theme-dark .status-pill--danger,
body.theme-dark .message.error,
body.theme-dark .message.danger {
    background: rgba(255, 69, 58, 0.14) !important;
    color: #ff8a82 !important;
    box-shadow: inset 0 0 0 1px rgba(255, 69, 58, 0.24) !important;
}

body.theme-dark .tag--success,
body.theme-dark .status-pill--success,
body.theme-dark .message.success {
    background: rgba(48, 209, 88, 0.14) !important;
    color: #7ff0a4 !important;
    box-shadow: inset 0 0 0 1px rgba(48, 209, 88, 0.24) !important;
}

body.theme-dark .finance-amount--in,
body.theme-dark .finance-amount--out,
body.theme-dark .finance-score,
body.theme-dark .finance-chart-list__value,
body.theme-dark .finance-type-breakdown__total {
    color: #ffffff !important;
}

body.theme-dark .finance-close-month--green,
body.theme-dark .finance-close-month--yellow,
body.theme-dark .finance-close-month--red {
    background:
        radial-gradient(circle at top right, rgba(10, 132, 255, 0.09), transparent 34%),
        linear-gradient(180deg, rgba(31, 31, 34, 0.98), rgba(20, 20, 22, 0.96)) !important;
}

@media (prefers-color-scheme: dark) {
    body.theme-system {
        color-scheme: dark;
        --color-bg: #000000;
        --color-surface: #1c1c1e;
        --color-surface-muted: #2c2c2e;
        --color-text: #f5f5f7;
        --color-text-secondary: #d1d1d6;
        --color-text-muted: #a1a1a8;
        --color-primary: #64a6ff;
        --color-border: rgba(255, 255, 255, 0.16);
        --color-border-light: rgba(255, 255, 255, 0.10);
        --orama-royal-blue: #0a84ff;
        --orama-blue-900: #f5f5f7;
        --orama-blue-800: #d7e7ff;
        --orama-blue-700: #8ec5ff;
        --orama-slate-700: #c7c7cc;
        --ink-strong: #f5f5f7;
        --ink-soft: #b8bac4;
        --dark-panel: #1c1c1e;
        --dark-panel-2: #242426;
        --dark-panel-3: #2c2c2e;
        --dark-line: rgba(255, 255, 255, 0.12);
        --dark-line-soft: rgba(255, 255, 255, 0.08);
        --dark-blue: #0a84ff;
        --dark-blue-soft: rgba(10, 132, 255, 0.18);
        --dark-gold: #ffd60a;
        --dark-green: #30d158;
        --dark-red: #ff453a;
        background:
            radial-gradient(circle at 12% 0%, rgba(10, 132, 255, 0.15), transparent 28%),
            radial-gradient(circle at 92% 6%, rgba(94, 92, 230, 0.13), transparent 30%),
            linear-gradient(180deg, #050506 0%, #000000 100%) !important;
    }

    body.theme-system .sidebar {
        background:
            radial-gradient(circle at 18% 0%, rgba(10, 132, 255, 0.20), transparent 30%),
            radial-gradient(circle at 88% 18%, rgba(48, 209, 88, 0.07), transparent 28%),
            linear-gradient(180deg, #15151a 0%, #101114 48%, #050506 100%) !important;
        border-right-color: rgba(255, 255, 255, 0.10) !important;
        box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.04), 18px 0 42px rgba(0, 0, 0, 0.42) !important;
    }

    body.theme-system .brand-logo-sticky {
        background:
            linear-gradient(180deg, rgba(44, 44, 46, 0.98), rgba(28, 28, 30, 0.94) 76%, rgba(20, 20, 22, 0.88)) !important;
    }

    body.theme-system .brand-logo-wrap,
    body.theme-system .sidebar-submenu.is-active .sidebar-submenu__summary,
    body.theme-system .sidebar-submenu[open] .sidebar-submenu__summary,
    body.theme-system .nav-link.active {
        background:
            linear-gradient(180deg, rgba(44, 44, 46, 0.88), rgba(28, 28, 30, 0.72)),
            rgba(255, 255, 255, 0.04) !important;
        border-color: rgba(255, 255, 255, 0.12) !important;
    }

    body.theme-system .brand-logo-wrap {
        background: rgba(255, 255, 255, 0.98) !important;
        border-color: rgba(214, 224, 240, 0.92) !important;
    }

    body.theme-system .nav-link--sub {
        background: rgba(44, 44, 46, 0.42) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
    }

    body.theme-system .nav-link--sub.active {
        background:
            linear-gradient(180deg, rgba(44, 44, 46, 0.88), rgba(28, 28, 30, 0.72)),
            rgba(255, 255, 255, 0.04) !important;
        border-color: rgba(255, 255, 255, 0.18) !important;
    }

    body.theme-system .main-panel {
        background: transparent !important;
    }

    body.theme-system .topbar,
    body.theme-system .filters-panel,
    body.theme-system .surface-card,
    body.theme-system .metric-card,
    body.theme-system .finance-card,
    body.theme-system .finance-panel,
    body.theme-system .finance-tab,
    body.theme-system .finance-kpi,
    body.theme-system .finance-chip-card,
    body.theme-system .finance-side-card,
    body.theme-system .summary-card,
    body.theme-system .source-dashboard-card,
    body.theme-system .command-deck,
    body.theme-system .command-stat,
    body.theme-system .finance-pill,
    body.theme-system .quick-summary-card,
    body.theme-system .pipeline-row,
    body.theme-system .compact-intro-card,
    body.theme-system .record-card,
    body.theme-system .client-summary-card,
    body.theme-system .insight-card,
    body.theme-system .list-card,
    body.theme-system .list-row,
    body.theme-system .import-source-card,
    body.theme-system .pipeline-card,
    body.theme-system .cycle-pipeline-card,
    body.theme-system .dashboard-finance-panel,
    body.theme-system .chart-shell,
    body.theme-system .finance-chart-shell,
    body.theme-system .finance-close-month,
    body.theme-system .finance-account-item,
    body.theme-system .finance-type-breakdown,
    body.theme-system .finance-type-breakdown__row,
    body.theme-system .finance-modal__card,
    body.theme-system .page-section-menu__sheet,
    body.theme-system .page-section-menu__link,
    body.theme-system .empty-state,
    body.theme-system .results-summary,
    body.theme-system .table-scroll,
    body.theme-system .finance-table-shell,
    body.theme-system .finance-bank-scroll,
    body.theme-system .finance-reconciliation-scroll {
        background:
            radial-gradient(circle at top right, rgba(10, 132, 255, 0.10), transparent 34%),
            linear-gradient(180deg, rgba(31, 31, 34, 0.98), rgba(20, 20, 22, 0.96)) !important;
        border-color: var(--dark-line) !important;
        color: var(--color-text) !important;
        box-shadow:
            0 24px 54px rgba(0, 0, 0, 0.38),
            inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    }

    body.theme-system .filters-panel,
    body.theme-system .finance-filters,
    body.theme-system .topbar {
        backdrop-filter: none;
    }

    body.theme-system .finance-card::before,
    body.theme-system .finance-panel::before,
    body.theme-system .finance-kpi::before,
    body.theme-system .metric-card::before,
    body.theme-system .summary-card::before,
    body.theme-system .command-stat::before,
    body.theme-system .finance-pill::before,
    body.theme-system .insight-card::after {
        opacity: 0.92 !important;
    }

    body.theme-system h1,
    body.theme-system h2,
    body.theme-system h3,
    body.theme-system h4,
    body.theme-system .topbar-title h1,
    body.theme-system .finance-card strong,
    body.theme-system .metric-card strong,
    body.theme-system .command-stat strong,
    body.theme-system .finance-pill strong,
    body.theme-system .insight-card > strong,
    body.theme-system .compact-intro-card strong,
    body.theme-system .finance-kpi strong,
    body.theme-system .finance-panel__header h2,
    body.theme-system .finance-close-month__name,
    body.theme-system .finance-type-breakdown__row strong,
    body.theme-system .dashboard-finance-legend,
    body.theme-system .data-table td strong {
        color: #ffffff !important;
    }

    body.theme-system p,
    body.theme-system span,
    body.theme-system .muted,
    body.theme-system .field-help,
    body.theme-system .topbar-title p,
    body.theme-system .finance-card p,
    body.theme-system .finance-card span,
    body.theme-system .finance-panel__header p,
    body.theme-system .finance-kpi span,
    body.theme-system .finance-mini-note,
    body.theme-system .finance-type-breakdown__row span,
    body.theme-system .compact-intro-card p,
    body.theme-system .insight-card > p,
    body.theme-system .insight-card > span,
    body.theme-system .page-section-menu__meta,
    body.theme-system .list-row p,
    body.theme-system .command-stat p,
    body.theme-system .finance-pill p {
        color: var(--color-text-secondary) !important;
    }

    body.theme-system .form-field > label,
    body.theme-system .filters-panel h3,
    body.theme-system .eyebrow,
    body.theme-system .finance-card span,
    body.theme-system .finance-panel__header .eyebrow,
    body.theme-system .finance-type-breakdown__label,
    body.theme-system .data-table thead th,
    body.theme-system .finance-bank-table thead th,
    body.theme-system .finance-reconciliation-table thead th {
        color: #9ecbff !important;
    }

    body.theme-system .field-input,
    body.theme-system .field-select,
    body.theme-system .form-field input,
    body.theme-system .form-field select,
    body.theme-system .form-field textarea,
    body.theme-system .search-shell input,
    body.theme-system input[type="text"],
    body.theme-system input[type="email"],
    body.theme-system input[type="search"],
    body.theme-system input[type="number"],
    body.theme-system input[type="date"],
    body.theme-system input[type="datetime-local"],
    body.theme-system input[type="time"],
    body.theme-system input[type="password"],
    body.theme-system textarea,
    body.theme-system select,
    body.theme-system .finance-month-picker__trigger,
    body.theme-system .finance-month-picker__panel,
    body.theme-system .finance-month-picker__option,
    body.theme-system .finance-month-picker__button,
    body.theme-system .finance-code {
        background: rgba(44, 44, 46, 0.96) !important;
        border-color: var(--dark-line) !important;
        color: #f5f5f7 !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
    }

    body.theme-system input::placeholder,
    body.theme-system textarea::placeholder,
    body.theme-system .search-shell input::placeholder {
        color: rgba(235, 235, 245, 0.48) !important;
    }

    body.theme-system .field-input:focus,
    body.theme-system .field-select:focus,
    body.theme-system .form-field input:focus,
    body.theme-system .form-field select:focus,
    body.theme-system .form-field textarea:focus,
    body.theme-system .search-shell input:focus {
        border-color: rgba(10, 132, 255, 0.62) !important;
        box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.18) !important;
        outline: none !important;
    }

    body.theme-system .topbar-utility,
    body.theme-system .topbar-language,
    body.theme-system .status-dot,
    body.theme-system .notification-link,
    body.theme-system .topbar .menu-toggle,
    body.theme-system .sidebar-rail-toggle,
    body.theme-system .page-utility-fab__button,
    body.theme-system .mobile-bottom-nav,
    body.theme-system .action-button--light,
    body.theme-system .finance-action-button--muted,
    body.theme-system .finance-month-picker__action,
    body.theme-system .finance-tab__count,
    body.theme-system .metric-chip,
    body.theme-system .tag,
    body.theme-system .finance-status,
    body.theme-system .quick-filter-link {
        background: rgba(44, 44, 46, 0.88) !important;
        border-color: var(--dark-line) !important;
        color: #d7e7ff !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    }

    body.theme-system .mobile-bottom-nav {
        background: rgba(28, 28, 30, 0.86) !important;
        border-color: rgba(255, 255, 255, 0.14) !important;
        box-shadow: 0 20px 48px rgba(0, 0, 0, 0.44) !important;
        backdrop-filter: blur(22px) saturate(1.2);
    }

    body.theme-system .mobile-bottom-nav__item {
        color: rgba(245, 245, 247, 0.72) !important;
    }

    body.theme-system .mobile-bottom-nav__item.active,
    body.theme-system .mobile-bottom-nav__item[aria-expanded="true"] {
        background: rgba(10, 132, 255, 0.18) !important;
        color: #ffffff !important;
    }

    body.theme-system .mobile-bottom-nav__mark {
        background: linear-gradient(135deg, #0a84ff, #64a6ff) !important;
        box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.14) !important;
    }

    body.theme-system .action-button,
    body.theme-system .create-cta,
    body.theme-system .finance-action-button,
    body.theme-system .finance-month-picker__button--primary {
        box-shadow: 0 14px 28px rgba(10, 132, 255, 0.20) !important;
    }

    body.theme-system .data-table,
    body.theme-system .finance-bank-table,
    body.theme-system .finance-reconciliation-table {
        color: var(--color-text) !important;
    }

    body.theme-system .data-table thead th,
    body.theme-system .finance-bank-table thead th,
    body.theme-system .finance-reconciliation-table thead th {
        background: rgba(28, 28, 30, 0.98) !important;
        box-shadow: inset 0 -1px 0 var(--dark-line) !important;
    }

    body.theme-system .data-table tbody tr,
    body.theme-system .finance-bank-table tbody tr,
    body.theme-system .finance-reconciliation-table tbody tr {
        background: rgba(28, 28, 30, 0.72) !important;
    }

    body.theme-system .data-table tbody tr:hover,
    body.theme-system .finance-bank-table tbody tr:hover,
    body.theme-system .finance-reconciliation-table tbody tr:hover,
    body.theme-system .finance-type-breakdown__row:hover {
        background: rgba(10, 132, 255, 0.12) !important;
    }

    body.theme-system .data-table th,
    body.theme-system .data-table td,
    body.theme-system .finance-bank-table th,
    body.theme-system .finance-bank-table td,
    body.theme-system .finance-reconciliation-table th,
    body.theme-system .finance-reconciliation-table td,
    body.theme-system .finance-chart-list__row,
    body.theme-system .finance-kpi,
    body.theme-system .finance-account-item,
    body.theme-system .list-row {
        border-color: var(--dark-line-soft) !important;
    }

    body.theme-system .chart-shell::before,
    body.theme-system .finance-chart-shell::before {
        background:
            linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
            linear-gradient(0deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px) !important;
    }

    body.theme-system .app-sync-pill--online,
    body.theme-system .sync-job-pill--completed {
        background: rgba(48, 209, 88, 0.16) !important;
        color: #7ff0a4 !important;
        box-shadow: inset 0 0 0 1px rgba(48, 209, 88, 0.26) !important;
    }

    body.theme-system .app-sync-pill--updating,
    body.theme-system .sync-job-pill--running,
    body.theme-system .tag--gold,
    body.theme-system .status-pill--warning,
    body.theme-system .message.warning {
        background: rgba(255, 214, 10, 0.16) !important;
        color: #ffe066 !important;
        box-shadow: inset 0 0 0 1px rgba(255, 214, 10, 0.26) !important;
    }

    body.theme-system .app-sync-pill--offline,
    body.theme-system .sync-job-pill--error,
    body.theme-system .tag--danger,
    body.theme-system .status-pill--danger,
    body.theme-system .message.error,
    body.theme-system .message.danger {
        background: rgba(255, 69, 58, 0.14) !important;
        color: #ff8a82 !important;
        box-shadow: inset 0 0 0 1px rgba(255, 69, 58, 0.24) !important;
    }

    body.theme-system .tag--success,
    body.theme-system .status-pill--success,
    body.theme-system .message.success {
        background: rgba(48, 209, 88, 0.14) !important;
        color: #7ff0a4 !important;
        box-shadow: inset 0 0 0 1px rgba(48, 209, 88, 0.24) !important;
    }

    body.theme-system .finance-amount--in,
    body.theme-system .finance-amount--out,
    body.theme-system .finance-score,
    body.theme-system .finance-chart-list__value,
    body.theme-system .finance-type-breakdown__total {
        color: #ffffff !important;
    }

    body.theme-system .finance-close-month--green,
    body.theme-system .finance-close-month--yellow,
    body.theme-system .finance-close-month--red {
        background:
            radial-gradient(circle at top right, rgba(10, 132, 255, 0.09), transparent 34%),
            linear-gradient(180deg, rgba(31, 31, 34, 0.98), rgba(20, 20, 22, 0.96)) !important;
    }
}

body.theme-dark .mobile-section-toggle {
    background:
        radial-gradient(circle at top right, rgba(10, 132, 255, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(36, 36, 38, 0.98), rgba(28, 28, 30, 0.96)) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f5f5f7 !important;
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

body.theme-dark .mobile-section-toggle__label,
body.theme-dark .mobile-section-toggle__meta {
    color: #f5f5f7 !important;
}

body.theme-dark .mobile-section-toggle__icon,
body.theme-dark .mobile-row-toggle__meta {
    background: rgba(10, 132, 255, 0.16) !important;
    border: 1px solid rgba(10, 132, 255, 0.22) !important;
    color: #9fc8ff !important;
}

body.theme-dark .action-button.action-icon:not(.action-button--primary),
body.theme-dark .action-button.action-button--secondary:not(.action-button--primary),
body.theme-dark .bulk-audit-trigger {
    background:
        radial-gradient(circle at top right, rgba(10, 132, 255, 0.10), transparent 42%),
        linear-gradient(180deg, rgba(44, 44, 46, 0.96), rgba(31, 31, 34, 0.96)) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #d7e7ff !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 12px 24px rgba(0, 0, 0, 0.24) !important;
}

body.theme-dark .action-button.action-icon:not(.action-button--primary):disabled,
body.theme-dark .action-button.action-button--secondary:not(.action-button--primary):disabled,
body.theme-dark .bulk-audit-trigger:disabled {
    background: linear-gradient(180deg, rgba(44, 44, 46, 0.68), rgba(31, 31, 34, 0.66)) !important;
    color: rgba(215, 231, 255, 0.42) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

body.theme-dark .cycle-card-list-head tr,
body.theme-dark .cycle-card-list-head th {
    background: rgba(28, 28, 30, 0.96) !important;
    color: #d7e7ff !important;
}

body.theme-dark .cycle-card-list-row,
body.theme-dark .cycle-card-list-row td {
    background: rgba(31, 31, 34, 0.72) !important;
    color: #f5f5f7 !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
}

body.theme-dark .field-checkbox {
    background: rgba(44, 44, 46, 0.96) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

body.theme-dark .field-checkbox::after {
    border-color: #f5f5f7 !important;
}

body.theme-dark .field-checkbox:checked {
    background: linear-gradient(135deg, #0a84ff, #2f5fd0) !important;
    border-color: rgba(10, 132, 255, 0.9) !important;
}

@media (prefers-color-scheme: dark) {
    body.theme-system .mobile-section-toggle {
        background:
            radial-gradient(circle at top right, rgba(10, 132, 255, 0.12), transparent 36%),
            linear-gradient(180deg, rgba(36, 36, 38, 0.98), rgba(28, 28, 30, 0.96)) !important;
        border-color: rgba(255, 255, 255, 0.12) !important;
        color: #f5f5f7 !important;
        box-shadow:
            0 14px 30px rgba(0, 0, 0, 0.30),
            inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    }

    body.theme-system .mobile-section-toggle__label,
    body.theme-system .mobile-section-toggle__meta {
        color: #f5f5f7 !important;
    }

    body.theme-system .mobile-section-toggle__icon,
    body.theme-system .mobile-row-toggle__meta {
        background: rgba(10, 132, 255, 0.16) !important;
        border: 1px solid rgba(10, 132, 255, 0.22) !important;
        color: #9fc8ff !important;
    }

    body.theme-system .action-button.action-icon:not(.action-button--primary),
    body.theme-system .action-button.action-button--secondary:not(.action-button--primary),
    body.theme-system .bulk-audit-trigger {
        background:
            radial-gradient(circle at top right, rgba(10, 132, 255, 0.10), transparent 42%),
            linear-gradient(180deg, rgba(44, 44, 46, 0.96), rgba(31, 31, 34, 0.96)) !important;
        border-color: rgba(255, 255, 255, 0.12) !important;
        color: #d7e7ff !important;
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.05),
            0 12px 24px rgba(0, 0, 0, 0.24) !important;
    }

    body.theme-system .action-button.action-icon:not(.action-button--primary):disabled,
    body.theme-system .action-button.action-button--secondary:not(.action-button--primary):disabled,
    body.theme-system .bulk-audit-trigger:disabled {
        background: linear-gradient(180deg, rgba(44, 44, 46, 0.68), rgba(31, 31, 34, 0.66)) !important;
        color: rgba(215, 231, 255, 0.42) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
        box-shadow: none !important;
    }

    body.theme-system .cycle-card-list-head tr,
    body.theme-system .cycle-card-list-head th {
        background: rgba(28, 28, 30, 0.96) !important;
        color: #d7e7ff !important;
    }

    body.theme-system .cycle-card-list-row,
    body.theme-system .cycle-card-list-row td {
        background: rgba(31, 31, 34, 0.72) !important;
        color: #f5f5f7 !important;
        border-color: rgba(255, 255, 255, 0.10) !important;
    }

    body.theme-system .field-checkbox {
        background: rgba(44, 44, 46, 0.96) !important;
        border-color: rgba(255, 255, 255, 0.18) !important;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
    }

    body.theme-system .field-checkbox::after {
        border-color: #f5f5f7 !important;
    }

    body.theme-system .field-checkbox:checked {
        background: linear-gradient(135deg, #0a84ff, #2f5fd0) !important;
        border-color: rgba(10, 132, 255, 0.9) !important;
    }
}

body.theme-dark .compact-intro-card,
body.theme-dark .table-note,
body.theme-dark .client-summary-card,
body.theme-dark .premium-multiselect__trigger,
body.theme-dark .premium-multiselect__panel,
body.theme-dark .detail-card,
body.theme-dark .timeline-card,
body.theme-dark .list-card,
body.theme-dark .detail-meta-grid div,
body.theme-dark .next-step-item,
body.theme-dark .timeline-item,
body.theme-dark .mini-item,
body.theme-dark .alert-item,
body.theme-dark .dossier-item,
body.theme-dark .detail-note,
body.theme-dark .agenda-shell,
body.theme-dark .agenda-stat,
body.theme-dark .agenda-day,
body.theme-dark .agenda-item,
body.theme-dark .agenda-empty,
body.theme-dark .cycle-pipeline-card,
body.theme-dark .rates-confirm__dialog,
body.theme-dark .premium-modal__card {
    background:
        radial-gradient(circle at top right, rgba(10, 132, 255, 0.10), transparent 34%),
        linear-gradient(180deg, rgba(36, 36, 38, 0.98), rgba(28, 28, 30, 0.96)) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f5f5f7 !important;
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

body.theme-dark .compact-intro-card strong,
body.theme-dark .table-note strong,
body.theme-dark .client-summary-card strong,
body.theme-dark .detail-card h2,
body.theme-dark .timeline-card h2,
body.theme-dark .list-card h2,
body.theme-dark .agenda-stat strong,
body.theme-dark .agenda-day-head strong,
body.theme-dark .agenda-item strong,
body.theme-dark .cycle-pipeline-card strong,
body.theme-dark .rates-confirm__title,
body.theme-dark .premium-modal__title {
    color: #f5f5f7 !important;
}

body.theme-dark .compact-intro-card p,
body.theme-dark .table-note p,
body.theme-dark .client-summary-card span,
body.theme-dark .premium-multiselect__summary,
body.theme-dark .premium-multiselect__option span,
body.theme-dark .detail-description,
body.theme-dark .detail-meta-grid span,
body.theme-dark .timeline-meta,
body.theme-dark .mini-meta,
body.theme-dark .dossier-meta,
body.theme-dark .detail-note,
body.theme-dark .agenda-header p,
body.theme-dark .agenda-stat span,
body.theme-dark .agenda-day-head span,
body.theme-dark .agenda-item p,
body.theme-dark .agenda-empty,
body.theme-dark .cycle-pipeline-caption,
body.theme-dark .rates-confirm__body,
body.theme-dark .premium-modal__body,
body.theme-dark .premium-modal__eyebrow {
    color: #a1a1aa !important;
}

body.theme-dark .toolbar-chip,
body.theme-dark .agenda-count,
body.theme-dark .detail-kicker,
body.theme-dark .detail-status-pill,
body.theme-dark .premium-multiselect__action {
    background: rgba(10, 132, 255, 0.16) !important;
    border-color: rgba(10, 132, 255, 0.20) !important;
    color: #9ecbff !important;
}

body.theme-dark .premium-multiselect__panel,
body.theme-dark .premium-multiselect__actions {
    border-color: rgba(255, 255, 255, 0.12) !important;
}

body.theme-dark .premium-multiselect__trigger::after {
    color: #9ecbff !important;
}

body.theme-dark .agenda-day--weekend,
body.theme-dark .alert-item--warning {
    background:
        radial-gradient(circle at top right, rgba(212, 164, 55, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(36, 36, 38, 0.98), rgba(28, 28, 30, 0.96)) !important;
}

body.theme-dark .alert-item--danger {
    background:
        radial-gradient(circle at top right, rgba(220, 38, 38, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(36, 36, 38, 0.98), rgba(28, 28, 30, 0.96)) !important;
}

body.theme-dark .alert-item--success {
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(36, 36, 38, 0.98), rgba(28, 28, 30, 0.96)) !important;
}

@media (prefers-color-scheme: dark) {
    body.theme-system .compact-intro-card,
    body.theme-system .table-note,
    body.theme-system .client-summary-card,
    body.theme-system .premium-multiselect__trigger,
    body.theme-system .premium-multiselect__panel,
    body.theme-system .detail-card,
    body.theme-system .timeline-card,
    body.theme-system .list-card,
    body.theme-system .detail-meta-grid div,
    body.theme-system .next-step-item,
    body.theme-system .timeline-item,
    body.theme-system .mini-item,
    body.theme-system .alert-item,
    body.theme-system .dossier-item,
    body.theme-system .detail-note,
    body.theme-system .agenda-shell,
    body.theme-system .agenda-stat,
    body.theme-system .agenda-day,
    body.theme-system .agenda-item,
    body.theme-system .agenda-empty,
    body.theme-system .cycle-pipeline-card,
    body.theme-system .rates-confirm__dialog,
    body.theme-system .premium-modal__card {
        background:
            radial-gradient(circle at top right, rgba(10, 132, 255, 0.10), transparent 34%),
            linear-gradient(180deg, rgba(36, 36, 38, 0.98), rgba(28, 28, 30, 0.96)) !important;
        border-color: rgba(255, 255, 255, 0.12) !important;
        color: #f5f5f7 !important;
        box-shadow:
            0 18px 42px rgba(0, 0, 0, 0.28),
            inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
    }

    body.theme-system .compact-intro-card strong,
    body.theme-system .table-note strong,
    body.theme-system .client-summary-card strong,
    body.theme-system .detail-card h2,
    body.theme-system .timeline-card h2,
    body.theme-system .list-card h2,
    body.theme-system .agenda-stat strong,
    body.theme-system .agenda-day-head strong,
    body.theme-system .agenda-item strong,
    body.theme-system .cycle-pipeline-card strong,
    body.theme-system .rates-confirm__title,
    body.theme-system .premium-modal__title {
        color: #f5f5f7 !important;
    }

    body.theme-system .compact-intro-card p,
    body.theme-system .table-note p,
    body.theme-system .client-summary-card span,
    body.theme-system .premium-multiselect__summary,
    body.theme-system .premium-multiselect__option span,
    body.theme-system .detail-description,
    body.theme-system .detail-meta-grid span,
    body.theme-system .timeline-meta,
    body.theme-system .mini-meta,
    body.theme-system .dossier-meta,
    body.theme-system .detail-note,
    body.theme-system .agenda-header p,
    body.theme-system .agenda-stat span,
    body.theme-system .agenda-day-head span,
    body.theme-system .agenda-item p,
    body.theme-system .agenda-empty,
    body.theme-system .cycle-pipeline-caption,
    body.theme-system .rates-confirm__body,
    body.theme-system .premium-modal__body,
    body.theme-system .premium-modal__eyebrow {
        color: #a1a1aa !important;
    }

    body.theme-system .toolbar-chip,
    body.theme-system .agenda-count,
    body.theme-system .detail-kicker,
    body.theme-system .detail-status-pill,
    body.theme-system .premium-multiselect__action {
        background: rgba(10, 132, 255, 0.16) !important;
        border-color: rgba(10, 132, 255, 0.20) !important;
        color: #9ecbff !important;
    }

    body.theme-system .premium-multiselect__panel,
    body.theme-system .premium-multiselect__actions {
        border-color: rgba(255, 255, 255, 0.12) !important;
    }

    body.theme-system .premium-multiselect__trigger::after {
        color: #9ecbff !important;
    }

    body.theme-system .agenda-day--weekend,
    body.theme-system .alert-item--warning {
        background:
            radial-gradient(circle at top right, rgba(212, 164, 55, 0.12), transparent 34%),
            linear-gradient(180deg, rgba(36, 36, 38, 0.98), rgba(28, 28, 30, 0.96)) !important;
    }

    body.theme-system .alert-item--danger {
        background:
            radial-gradient(circle at top right, rgba(220, 38, 38, 0.12), transparent 34%),
            linear-gradient(180deg, rgba(36, 36, 38, 0.98), rgba(28, 28, 30, 0.96)) !important;
    }

    body.theme-system .alert-item--success {
        background:
            radial-gradient(circle at top right, rgba(34, 197, 94, 0.12), transparent 34%),
            linear-gradient(180deg, rgba(36, 36, 38, 0.98), rgba(28, 28, 30, 0.96)) !important;
    }
}
