/* =========================================================
   EVISCHURCH — App shell
   Sidebar compacte type rail
   Desktop : icônes seules + expand au hover
   Mobile : drawer
   ========================================================= */

:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --text: rgba(50, 49, 47);
    --muted: rgba(36, 55, 68, 0.58);
    --border: rgba(36, 55, 68, 0.12);

    --primary: #B89A7A;
    --primary-soft: rgba(184, 154, 122, 0.10);
    --primary-soft-2: rgba(184, 154, 122, 0.16);

    --radius-xl: 22px;
    --radius-lg: 18px;
    --radius-md: 16px;
    --radius-sm: 14px;

    --shadow:
        0 1px 2px rgba(36, 55, 68, 0.10),
        0 12px 32px rgba(36, 55, 68, 0.06);

    --shadow-strong:
        0 2px 4px rgba(36, 55, 68, 0.05),
        0 22px 52px rgba(36, 55, 68, 0.10);

    /* =============================================
       SPACING SYSTEM — 8px base unit
       Used for padding, margin, gaps
       ============================================= */
    --space-xs: 4px;    /* 0.5x base — micro-spacing */
    --space-sm: 8px;    /* 1x base — compact spacing */
    --space-md: 12px;   /* 1.5x base — standard spacing */
    --space-lg: 16px;   /* 2x base — comfortable spacing */
    --space-xl: 24px;   /* 3x base — generous spacing */
    --space-2xl: 32px;  /* 4x base — section spacing */
    --space-3xl: 40px;  /* 5x base — page section spacing */

    /* Gap variants (for flexbox/grid) */
    --gap-xs: var(--space-xs);
    --gap-sm: var(--space-sm);
    --gap-md: var(--space-md);
    --gap-lg: var(--space-lg);

    /* Component-specific spacing */
    --sidebar-rail-w: 88px;
    --sidebar-open-w: 260px;
    --topbar-mobile-h: 72px;
    --topbar-mobile-px: var(--space-md);
    --mobile-drawer-gap: var(--gap-sm);

    /* =============================================
       TYPOGRAPHY SYSTEM — Notion / Apple feel
       Partagé sur toute l'application
       ============================================= */

    /* Tailles */
    --t-xs: 11px;
    --t-sm: 12px;
    --t-base: 13px;
    --t-md: 14px;
    --t-lg: 16px;
    --t-xl: 18px;
    --t-2xl: 20px;
    --t-3xl: 24px;
    --t-4xl: 30px;

    /* Poids */
    --fw-normal: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;

    /* Letter-spacing (Apple-like négatif) */
    --ls-tight: -0.03em;
    --ls-snug: -0.02em;
    --ls-normal: -0.01em;
    --ls-wide: 0.04em;

    /* Couleurs de texte sémantiques */
    --t-strong: rgba(50, 49, 47);
    --t-base-c: rgba(50, 49, 47);
    --t-muted: #64748B;
    --t-faint: #94A3B8;
    --t-link: var(--primary);

    /* Boutons — géométrie */
    --btn-h: 36px;
    --btn-radius: 8px;
    --btn-px: var(--space-md);
    --btn-py: var(--space-sm);
    --btn-fs: var(--t-base);
    --btn-fw: var(--fw-medium);
    --btn-ls: var(--ls-normal);

    /* Inputs */
    --input-radius: 10px;
    --input-px: var(--space-md);
    --input-py: 10px;
    --input-border: #E2E8F0;
    --input-fs: var(--t-md);

    /* Cards / surfaces */
    --card-radius: 12px;
    --card-border: #F1F5F9;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .04);
}

/* =========================
   Base
   ========================= */

html {
    overflow-y: scroll;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body.is-app {
    margin: 0;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.no-scroll {
    overflow: hidden;
}

* {
    box-sizing: border-box;
}

a,
button,
input,
textarea,
select {
    font: inherit;
}

/* =========================
   Layout
   ========================= */

.dash {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-open-w) minmax(0, 1fr);
    grid-template-areas: "sidebar main";
    gap: 0;
    padding: 0;
    background: #ffffff;
    transition: none;
}

/* =========================
   Topbar
   Desktop hidden
   ========================= */

.topbar {
    display: none !important;
    grid-area: topbar;
    position: sticky;
    top: 10px;
    z-index: 30;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.topbar-logo {
    display: none;
    height: 70px;
    object-fit: contain;
    padding: 10px 20px 10px 0;
    flex-shrink: 0;
}

.topbarLeft {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.topbarRight {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topTitle {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.topSub {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link {
    color: inherit;
    text-decoration: none;
}

.logoutLink {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    font-weight: 700;
}

.logoutLink:hover {
    background: rgba(36, 55, 68, 0.10);
}

/* =========================
   UNIFIED BUTTON SYSTEM
   ========================= */

/* Base Button Component */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--btn-h);
    padding: var(--btn-py) var(--btn-px);
    border-radius: var(--btn-radius);
    border: 1px solid transparent;
    background: var(--primary);
    color: white;
    font-size: var(--btn-fs);
    font-weight: var(--btn-fw);
    letter-spacing: var(--btn-ls);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    gap: var(--gap-sm);
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
    opacity: 0.85;
}

.btn:disabled,
.btn.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Button Variants */
.btn--primary {
    background: var(--primary);
    color: white;
    border-color: transparent;
}

.btn--primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 2px 8px rgba(184, 154, 122, 0.24);
}

.btn--secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.btn--secondary:hover {
    background: var(--primary-light);
    border-color: var(--primary-dark);
    color: var(--primary-dark);
}

.btn--ghost {
    background: transparent;
    color: var(--text);
    border-color: transparent;
}

.btn--ghost:hover {
    background: rgba(36, 55, 68, 0.10);
}

.btn--outline {
    background: #fff !important;
    color: #000 !important;
    border: 2px solid #000 !important;
}

.btn--outline:hover {
    background: #f5f5f5 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #000 !important;
}

.btn--ghost-brown {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 8px;
}

.btn--ghost-brown:hover {
    background: var(--primary-dark);
    color: #fff;
    border-color: var(--primary-dark);
}

.btn--danger {
    background: #dc2626;
    color: white;
}

.btn--danger:hover {
    background: #b91c1c;
}

.btn--soft {
    background: var(--primary-soft);
    color: var(--primary-dark);
    border-color: var(--primary-border);
}

.btn--soft:hover {
    background: var(--primary-dark);
    color: #fff;
}

/* Button Sizes */
.btn--small {
    min-height: 32px;
    padding: var(--space-xs) var(--space-md);
    font-size: 12px;
}

.btn--large {
    min-height: 44px;
    padding: var(--space-md) var(--space-lg);
    font-size: 14px;
}

/* Icon Button Variants */
.btn--icon-only {
    min-width: var(--btn-h);
    padding: 0;
}

/* Round icon button (square, subtle border) */
.btn--icon {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(36, 55, 68, 0.12);
    background: #fff;
    color: rgba(36, 55, 68, .68);
}
.btn--icon:hover {
    background: rgba(36, 55, 68, 0.10);
    border-color: rgba(36, 55, 68, .14);
}
.btn--icon .material-symbols-outlined {
    font-size: 18px;
}

/* Soft danger (light red surface) */
.btn--danger-soft {
    background: rgba(239, 68, 68, .05);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, .2);
}
.btn--danger-soft:hover {
    background: rgba(239, 68, 68, .1);
    border-color: rgba(239, 68, 68, .3);
}

/* Warning (amber) */
.btn--warning {
    background: #f59e0b;
    color: #fff;
    border-color: #f59e0b;
}
.btn--warning:hover {
    background: #d97706;
    border-color: #d97706;
}

.btn .material-symbols-outlined {
    font-size: 20px;
    flex-shrink: 0;
}

/* Full Width Button */
.btn--block {
    width: 100%;
}

/* Google sign-in button (white surface, subtle border, brand icon) */
.btn--google {
    min-height: 46px;
    border-radius: 14px;
    background: #fff;
    color: #1A1A1A;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: 1.5px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.btn--google:hover {
    transform: translateY(-1px);
    border-color: #c5d0e6;
    box-shadow: 0 3px 12px rgba(66, 133, 244, 0.14);
    background: #fff;
}

.btn--google svg {
    flex-shrink: 0;
}

/* Keep hidden attribute effective on .btn (base sets display) */
.btn[hidden] {
    display: none;
}

/* Legacy compatibility (deprecated - use .btn instead) */
.iconBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    cursor: pointer;
    color: var(--text);
}

.iconBtn:hover {
    background: rgba(36, 55, 68, 0.10);
}

.burger {
    display: none;
}

.closeBtn {
    display: none;
}

/* =========================
   Sidebar
   Only visible on authenticated app pages (body.is-app)
   ========================= */

body:not(.is-app) .sidebar {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
    height: 0;
    width: 0;
    overflow: hidden;
}

.sidebar {
    grid-area: sidebar;
    background: #FAFAFA;
    border: none;
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 100vh;
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-open-w);
    top: 0;
    overflow: hidden;
    color: rgba(50, 48, 46);
    border-right: 1px solid #E5E7EB;
}

.sidebar--rail {
    padding: 0 12px 12px 12px;
    transition: none;
    cursor: default;
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}



/* =========================
   Sidebar header
   ========================= */

.sidebarHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-inline: -12px;
    padding: 8px 8px 4px;
}

.appSwitcher {
    position: relative;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.appSwitcherTrigger {
    width: 100%;
    box-sizing: border-box;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 8px;
    border: 1px solid #e8e8e8;
    border-radius: 15px;
    background: #fff;
    color: #171717;
    text-align: left;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.appSwitcherTrigger:hover,
.appSwitcherTrigger[aria-expanded="true"] {
    border-color: #e2c4af;
    background: #fffcfa;
    box-shadow: 0 6px 18px rgba(57, 43, 32, .08);
}

.appSwitcherCurrent,
.appSwitcherOptionText {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.appSwitcherCurrent strong,
.appSwitcherOptionText strong {
    overflow: hidden;
    font-size: 14.5px;
    font-weight: 650;
    line-height: 1.18;
    text-overflow: clip;
    white-space: nowrap;
}

.appSwitcherCurrent small,
.appSwitcherOptionText small {
    overflow: hidden;
    color: #737373;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
    text-overflow: clip;
    white-space: nowrap;
}

.appSwitcherProductMark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--app-color) 22%, #fff);
    border-radius: 12px;
    background: color-mix(in srgb, var(--app-color) 8%, #fff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 2px 6px rgba(15, 23, 42, .06);
}

.product-switcher__icon-image {
    width: 78%;
    height: 78%;
    display: block;
    object-fit: contain;
}

.evis-product-logo {
    color: var(--product-color);
}

.appSwitcherProductMark--home {
    padding: 3px;
    border: 1px solid rgba(130, 98, 70, .16);
    background: #f9f5ee;
    box-shadow: inset 0 0 0 1px rgba(130, 98, 70, .16), 0 3px 8px rgba(57, 43, 32, .08);
}

.appSwitcherProductMark--home img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.appSwitcherChevron {
    width: 10px;
    height: 16px;
    position: relative;
    flex: 0 0 10px;
    margin-left: 1px;
}

.appSwitcherChevron::before,
.appSwitcherChevron::after {
    position: absolute;
    left: 0;
    width: 10px;
    height: 8px;
    background: #171717;
    content: "";
    clip-path: polygon(0 60%, 50% 0, 100% 60%, 100% 82%, 50% 24%, 0 82%);
}

.appSwitcherChevron::before {
    top: 0;
}

.appSwitcherChevron::after {
    bottom: 0;
    clip-path: polygon(0 40%, 50% 100%, 100% 40%, 100% 18%, 50% 76%, 0 18%);
}

.appSwitcherMenu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 7px);
    left: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 36px rgba(15, 23, 42, .14);
    animation: appSwitcherEnter .16s ease-out;
}

@keyframes appSwitcherEnter {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.appSwitcherOption {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 60px;
    padding: 7px;
    border-radius: 11px;
    color: #171717;
    text-decoration: none;
    transition: background .15s ease;
}

.appSwitcherOption:hover {
    background: #fafafa;
}

.appSwitcherOption.is-active {
    background: color-mix(in srgb, var(--app-color) 9%, #fff);
}

.appSwitcherOption:focus-visible,
.appSwitcherTrigger:focus-visible {
    outline: 3px solid rgba(52, 120, 246, .28);
    outline-offset: 2px;
}

.appSwitcherDivider {
    height: 1px;
    margin: 7px 5px;
    background: #e9e6e2;
}

.appModuleChangeToast {
    position: fixed;
    z-index: 3000;
    top: 18px;
    right: 50%;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: min(320px, calc(100vw - 32px));
    padding: 11px 18px 11px 13px;
    border: 1px solid rgba(52, 211, 153, .32);
    border-radius: 999px;
    color: #047857;
    background: rgba(236, 253, 245, .96);
    box-shadow: 0 14px 32px rgba(5, 150, 105, .18), 0 3px 10px rgba(15, 23, 42, .08);
    backdrop-filter: blur(12px);
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transform: translate(50%, -10px);
    transition: opacity .16s ease, transform .16s ease;
}

.appModuleChangeToast.is-visible {
    opacity: 1;
    transform: translate(50%, 0);
}

.appModuleChangeToast .material-symbols-outlined {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #10b981;
    font-size: 16px;
}

.appModuleChangeToast__content {
    display: block;
    min-width: 0;
}

.appModuleChangeToast__content span {
    font-size: 13px;
    line-height: 1.3;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .appModuleChangeToast {
        top: 12px;
        max-width: calc(100vw - 24px);
        padding-right: 15px;
        padding-left: 10px;
    }

    .appModuleChangeToast__content span {
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.brandCard {
    flex: 1;
    min-width: 0;
    height: 128px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.brandCardIcon {
    width: 100%;
    max-height: 118px;
    height: auto;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.brandCardName {
    font-size: 31px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.055em;
    color: #1A1A1A;
}

/* =========================
   Sections / labels
   ========================= */

.sideSection {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sideSection:first-of-type {
    margin-top: 8px;
}

.sideSection:nth-of-type(2) {
    flex: 1;
}

.sideLabel {
    opacity: 1;
    height: auto;
    overflow: visible;
    padding: 10px 12px 6px 12px;
    margin: 0 0 4px 0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9CA3AF;
    transition: none;
}

/* =========================
   Nav items
   ========================= */

.sideItem {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    min-height: 44px;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #000000;
    transition: all 0.15s ease;
    cursor: pointer;
}

.sideItem:hover {
    background: #F3F4F6;
    color: #000000;
}

.sideItem.is-active {
    background: #E5E7EB;
    color: #000000;
    border: none;
}

.sideItem.is-active:hover {
    background: #D1D5DB;
    color: #000000;
    border: none;
}

.sideIcon,
.sideItem .material-symbols-outlined {
    font-size: 20px !important;
    min-width: 20px;
    color: inherit;
}

.sideItem.is-active .sideIcon {
    color: #000000;
}

.sideItem .sideIcon--accompagnement,
.sideItem.is-active .sideIcon--accompagnement {
    color: #dc2626;
}

.sideText {
    opacity: 1;
    width: auto;
    overflow: visible;
    white-space: nowrap;
    transform: translateX(0);
    transition: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: inherit;
}

/* Supprimer le tooltip */
.sideItem::after {
    display: none;
}

.sideGroup {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sideGroupToggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 6px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #000000;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.sideGroupToggle:hover,
.sideGroup.is-active .sideGroupToggle {
    background: #F3F4F6;
    color: #000000;
}

.sideGroupChevron {
    margin-left: auto;
    font-size: 18px !important;
    transition: transform 0.2s ease;
}

.sideGroup.is-open .sideGroupChevron {
    transform: rotate(180deg);
}

.sideSubmenu {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.2s ease, opacity 0.2s ease;
}

.sideGroup.is-open .sideSubmenu {
    max-height: 220px;
    opacity: 1;
}

.sideSubItem {
    display: flex;
    align-items: center;
    min-height: 36px;
    margin-left: 32px;
    padding: 5px 12px;
    border-radius: 7px;
    color: #000000;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.sideSubIcon {
    flex: none;
    margin-right: 8px;
    font-size: 18px;
    line-height: 1;
}

.sideSubItem:hover {
    background: #F3F4F6;
    color: #000000;
}

.sideSubItem.is-active {
    background: #E5E7EB;
    color: #000000;
}

/* =========================
   Footer sidebar
   ========================= */

.sideFooter {
    margin-top: auto;
    padding: 12px 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.userMini {
    display: none;
}

.userMini {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 44px;
    padding: 6px 12px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.userMini:hover {
    background: #F3F4F6;
}

.avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    border: 1px solid #D1D5DB;
    background: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: #6B7280;
}

.userMeta {
    opacity: 1;
    width: auto;
    overflow: visible;
    pointer-events: auto;
    white-space: nowrap;
    transition: none;
}

.userName {
    font-size: 13px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: rgba(50, 48, 46);
}

.userRole {
    margin-top: 1px;
    font-size: 11px;
    line-height: 1.3;
    font-weight: 500;
    color: #9CA3AF;
}

.logoutBtn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 44px;
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    background: transparent;
    text-decoration: none;
    color: #000000;
    font-weight: 600;
    font-size: 13px;
    overflow: hidden;
    transition: all 0.15s ease;
    cursor: pointer;
    margin-bottom: 12px;
}

.logoutBtn:hover {
    background: #F3F4F6;
    color: #000000;
}

/* =========================
   Main
   ========================= */

.main {
    grid-area: main;
    min-width: 0;
    background: var(--surface);
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 24px 24px 24px;
    overflow: auto;
    height: 100vh;
    color: rgba(50, 48, 46);
}

.main.main--planning {
    background: #F7F8FA;
}

.page {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
}

/* =========================
   Overlay mobile
   ========================= */

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 80;
}

.overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* =========================
   Mobile
   ========================= */

@media (max-width: 900px) {
    .dash {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        grid-template-areas:
            "topbar"
            "main";
        padding: 0;
    }

    .topbar {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        justify-content: flex-start;
        align-items: center;
        height: var(--topbar-mobile-h);
        padding: 0 var(--topbar-mobile-px);
        background: var(--surface);
        border: 0;
        border-bottom: 1px solid var(--border);
        box-shadow: none;
        border-radius: 0;
        backdrop-filter: none;
    }

    .topbar-logo {
        display: block;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        height: calc(var(--topbar-mobile-h) - 12px);
        max-height: calc(var(--topbar-mobile-h) - 12px);
        width: auto;
        padding: 0;
        pointer-events: none;
    }

    .burger {
        display: inline-flex;
        width: 42px;
        height: 42px;
        border: 0;
        border-radius: 10px;
        background: transparent;
        box-shadow: none;
    }

    .closeBtn {
        display: none;
    }

    .sidebar {
        position: fixed;
        top: 12px;
        left: 12px;
        bottom: 12px;
        width: 78vw;
        max-width: 320px;
        height: calc(100vh - 24px);
        z-index: 1001;
        transform: translateX(-115%);
        transition: transform 0.24s ease, opacity 0.24s ease;
        opacity: 0;
        border-radius: 20px;
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
        padding: 14px;
        overflow: hidden;
        overscroll-behavior: contain;
    }

    .main {
        margin-left: 0;
    }

    .overlay {
        inset: 0;
        z-index: 1000;
        background: rgba(0, 0, 0, 0.35);
    }

    .sidebar.is-open {
        transform: translateX(0);
        opacity: 1;
    }

    .sidebarHeader {
        margin-inline: -14px;
        padding: 8px 8px 14px;
    }

    .appSwitcher {
        width: 100%;
    }

    .brandCard {
        height: 112px;
    }

    .brandCardIcon {
        max-height: 102px;
    }

    .sideLabel {
        opacity: 1;
        height: auto;
        padding: 10px 10px 6px 10px;
    }

    .sideItem {
        justify-content: flex-start;
        padding: 0 14px;
    }

    .sideText {
        opacity: 1;
        width: auto;
        transform: none;
    }

    .sideItem::after {
        display: none;
    }

    .userMini {
        justify-content: flex-start;
    }

    .userMeta {
        opacity: 1;
        width: auto;
        pointer-events: auto;
        white-space: normal;
    }

    .logoutBtn {
        opacity: 1 !important;
        width: 100% !important;
        pointer-events: auto !important;
    }

    .main {
        height: auto;
        min-height: calc(100vh - var(--topbar-mobile-h));
        margin-top: var(--topbar-mobile-h);
        padding: 20px 12px 12px;
    }
}

/* Primary color tokens are centralized in colors.css; do not redefine them here. */

/* ─── SPA Skeleton loader ─────────────────────────────────────────────────── */
.spaSkeleton {
    padding: 24px;
    display: grid;
    gap: 0;
}

.spaSkeletonBar {
    border-radius: 10px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: spaShimmer 1.2s infinite;
}

@keyframes spaShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}