:root {
    --cream: #faf5ee;
    --cream-d: #ede0cc;
    --cream-dd: #d8ccba;
    --brown: #1e140c;
    --brown-m: #2a1f14;
    --brown-l: #3d2e1f;
    --terra: #c8582a;
    --terra-l: #d4724c;
    --terra-ll: #e8a080;
    --terra-bg: rgba(200, 88, 42, 0.06);
    --sage: #6b9b7a;
    --sage-d: #4a7a5a;
    --sage-bg: rgba(107, 155, 122, 0.08);
    --champ: #e8d5a8;
    --champ-bg: rgba(232, 213, 168, 0.2);
    --red: #c0392b;
    --red-bg: rgba(192, 57, 43, 0.06);
    --txt: #2c2016;
    --txt-m: #5a4a38;
    --txt-l: #8b7a68;
    --txt-xl: #b0a090;
    --shadow-sm: 0 1px 4px rgba(44, 32, 22, 0.06);
    --shadow-md: 0 4px 20px rgba(44, 32, 22, 0.08);
    --shadow-lg: 0 12px 40px rgba(44, 32, 22, 0.12);
    --radius: 6px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: "Jost", sans-serif;
    background: var(--cream);
    color: var(--txt);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════
   PASSWORD SCREEN
══════════════════════════════════════ */
#admin-pwd {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: radial-gradient(ellipse at 30% 40%, #2a1f14 0%, #1e140c 55%, #0e0906 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    transition:
        opacity 0.8s ease,
        transform 0.8s ease;
    padding: 20px;
}
#admin-pwd.hide {
    opacity: 0;
    transform: scale(1.02);
    pointer-events: none;
}
.pwd-monogram {
    font-family: "Cormorant Garamond", serif;
    font-weight: 300;
    font-size: 1.1rem;
    color: var(--champ);
    letter-spacing: 12px;
    text-transform: uppercase;
    opacity: 0.5;
}
#admin-pwd h1 {
    font-family: "Cormorant Garamond", serif;
    font-weight: 300;
    font-size: 2.4rem;
    color: var(--cream);
    letter-spacing: 3px;
    text-align: center;
}
#admin-pwd h1 em {
    color: var(--terra-l);
    font-style: italic;
}
.pwd-divider {
    width: 40px;
    height: 1px;
    background: var(--terra);
    opacity: 0.5;
}
#admin-pwd .pwd-label {
    font-size: 0.62rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: rgba(232, 213, 168, 0.35);
    font-weight: 200;
}
.pwd-field {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 280px;
}
#admin-pwd input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 16px 28px;
    text-align: center;
    letter-spacing: 8px;
    font-family: "Jost", sans-serif;
    font-weight: 300;
    font-size: 1rem;
    color: var(--cream);
    outline: none;
    width: 100%;
    transition: var(--transition);
}
#admin-pwd input:focus {
    border-color: rgba(200, 88, 42, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(200, 88, 42, 0.1);
}
#admin-pwd button {
    background: linear-gradient(135deg, var(--terra), var(--terra-l));
    border: none;
    color: var(--cream);
    padding: 14px 48px;
    border-radius: var(--radius);
    font-family: "Jost", sans-serif;
    font-weight: 300;
    font-size: 0.62rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(200, 88, 42, 0.3);
    width: 100%;
}
#admin-pwd button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(200, 88, 42, 0.4);
}
.pwd-error {
    color: var(--terra-l);
    font-size: 0.82rem;
    opacity: 0;
    transition: opacity 0.3s;
    height: 20px;
}

/* ══════════════════════════════════════
   SIDEBAR LAYOUT
══════════════════════════════════════ */
/* Password screen hidden by default — shown only for legacy single-tenant */
#admin-pwd {
    display: none !important;
}
#app {
    display: none;
    min-height: 100vh;
}
.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--brown);
    color: var(--cream);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    transition:
        width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.sidebar-brand {
    padding: 14px 12px 14px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s;
}
.sidebar-brand:hover {
    background: rgba(255, 255, 255, 0.03);
}
.sidebar-brand-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.sidebar-brand h2 {
    font-family: "Cormorant Garamond", serif;
    font-weight: 300;
    font-size: 1.1rem;
    color: var(--cream);
    letter-spacing: 1px;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-brand h2 em {
    color: var(--terra-l);
    font-style: italic;
}
.sidebar-brand-sub {
    font-size: 0.46rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--txt-xl);
    font-weight: 200;
    white-space: nowrap;
    overflow: hidden;
    display: block;
    margin-bottom: 5px;
}
/* Avatar in brand */
.sidebar-brand .profile-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.6rem;
    flex-shrink: 0;
    margin-top: 1px;
}
/* Badges row */
.sidebar-brand-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.sidebar-brand .profile-plan {
    font-size: 0.46rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(184, 149, 106, 0.18);
    color: var(--terra-l);
    padding: 1px 6px;
    border-radius: 20px;
    font-weight: 600;
}
.sidebar-brand .profile-countdown {
    font-size: 0.46rem;
    letter-spacing: 0.05em;
    background: rgba(196, 145, 138, 0.18);
    color: #c4918a;
    padding: 1px 6px;
    border-radius: 20px;
    font-weight: 600;
}
/* Collapsed: avatar only, hide text */
.sidebar.collapsed .sidebar-brand-info {
    display: none;
}
.sidebar.collapsed .sidebar-brand {
    justify-content: center;
    gap: 0;
}

.sidebar-collapse-btn {
    flex-shrink: 0;
    align-self: flex-start;
    position: static;
    transform: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(250, 245, 238, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.sidebar-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--cream);
    border-color: rgba(255, 255, 255, 0.2);
}

.sidebar-nav {
    flex: 1;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow-y: auto;
    overflow-x: hidden;
}
.sidebar-nav::-webkit-scrollbar {
    width: 3px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* Section labels */
/* ═══ COLLAPSIBLE NAV GROUPS ═══ */
.nav-group {
    /* no visual wrapper — transparent container */
}

.nav-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px 5px;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s;
}
.nav-group-header:hover .nav-group-label {
    color: rgba(250, 245, 238, 0.8);
}
.nav-group-header:hover .nav-chevron {
    color: rgba(250, 245, 238, 0.6);
}

.nav-group-label {
    font-size: 0.5rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(250, 245, 238, 0.45);
    font-weight: 400;
    white-space: nowrap;
    transition: color 0.2s;
}

.nav-chevron {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
    color: rgba(250, 245, 238, 0.3);
    transition:
        transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.2s;
}

.nav-group-items {
    overflow: hidden;
    max-height: 400px;
    opacity: 1;
    transition:
        max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.22s ease;
}

/* Collapsed state */
.nav-group.collapsed .nav-group-items {
    max-height: 0;
    opacity: 0;
}
.nav-group.collapsed .nav-chevron {
    transform: rotate(-90deg);
}

/* Divider between groups */
.nav-group + .nav-group {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* Keep old class working for any legacy references */
.nav-section-label {
    font-size: 0.5rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(250, 245, 238, 0.5);
    font-weight: 400;
    padding: 14px 20px 5px;
    white-space: nowrap;
    overflow: hidden;
    transition:
        opacity 0.2s,
        padding 0.3s;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    font-size: 0.74rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    color: rgba(250, 245, 238, 0.55);
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
    background: transparent;
    border: none;
    appearance: none;
    -webkit-appearance: none;
    font-family: "Jost", sans-serif;
}
.nav-item:hover {
    color: var(--cream);
    background: rgba(255, 255, 255, 0.04);
}
.nav-item.active {
    color: var(--cream);
    background: rgba(200, 88, 42, 0.1);
    border-left-color: var(--terra);
}
.nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.6;
    min-width: 18px;
}
.nav-item.active svg {
    opacity: 1;
}
.nav-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition:
        opacity 0.2s,
        width 0.3s;
}
.nav-logout {
    margin-top: auto;
    color: rgba(255, 255, 255, 0.35);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 12px;
}
.nav-logout:hover {
    color: var(--red);
    background: rgba(220, 38, 38, 0.08);
}

/* ═══ SIDEBAR PROFILE ═══ */
.sidebar-profile {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.25s;
    position: relative;
    overflow: visible;
    flex-shrink: 0;
}
.sidebar-profile:hover {
    background: rgba(255, 255, 255, 0.04);
}
.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, #9a7a52 0%, var(--gold) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Cormorant Garamond", serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    box-shadow:
        0 2px 8px rgba(184, 149, 106, 0.4),
        0 0 0 2px rgba(184, 149, 106, 0.25);
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}
.sidebar-profile:hover .profile-avatar {
    transform: scale(1.05);
    box-shadow: 0 4px 14px rgba(184, 149, 106, 0.45);
}
.profile-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.profile-name {
    font-family: "Cormorant Garamond", serif;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--cream);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
    line-height: 1.2;
}
.profile-email {
    font-size: 0.58rem;
    color: rgba(250, 245, 238, 0.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
    font-weight: 300;
}
.profile-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
}
.profile-plan {
    font-size: 0.48rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
    background: rgba(184, 149, 106, 0.18);
    color: var(--gold);
    padding: 2px 7px;
    border-radius: 100px;
    border: 1px solid rgba(184, 149, 106, 0.25);
}
.profile-plan.premium {
    background: linear-gradient(90deg, rgba(184, 149, 106, 0.25), rgba(232, 213, 176, 0.2));
    color: var(--champ);
    border-color: rgba(232, 213, 176, 0.35);
}
.profile-countdown {
    font-size: 0.48rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--terra-l);
    background: rgba(196, 145, 138, 0.12);
    padding: 2px 7px;
    border-radius: 100px;
    border: 1px solid rgba(196, 145, 138, 0.2);
}
.profile-chevron {
    color: rgba(250, 245, 238, 0.2);
    flex-shrink: 0;
    transition:
        transform 0.25s,
        color 0.25s;
}
.sidebar-profile.open .profile-chevron {
    transform: rotate(180deg);
    color: rgba(250, 245, 238, 0.5);
}

/* Profile popover */
.profile-menu {
    position: fixed;
    left: 12px;
    width: 236px;
    background: #2a1d14;
    border: 1px solid rgba(184, 149, 106, 0.2);
    border-radius: 10px;
    padding: 6px;
    z-index: 9999;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.04);
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition:
        opacity 0.2s,
        transform 0.2s;
    max-height: 80vh;
    overflow-y: auto;
}
.profile-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}
.profile-menu-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 10px;
    border-bottom: 1px solid rgba(184, 149, 106, 0.2);
    margin-bottom: 2px;
}
.profile-menu-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, #9a7a52 0%, var(--gold) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Cormorant Garamond", serif;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    box-shadow:
        0 2px 8px rgba(184, 149, 106, 0.4),
        0 0 0 2px rgba(184, 149, 106, 0.25);
}
.profile-menu-name {
    font-family: "Cormorant Garamond", serif;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--cream);
    letter-spacing: 0.3px;
}
.profile-menu-email {
    font-size: 0.6rem;
    color: rgba(250, 245, 238, 0.6);
    margin-top: 1px;
}
.profile-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: 4px 0;
}
.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 0.68rem;
    font-weight: 400;
    color: rgba(250, 245, 238, 0.9);
    background: rgba(255, 255, 255, 0.06);
    transition:
        background 0.2s,
        color 0.2s;
    text-align: left;
    margin-bottom: 2px;
}
.profile-menu-item:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--cream);
}
.profile-menu-item svg {
    opacity: 0.85;
    flex-shrink: 0;
}
.profile-menu-item:hover svg {
    opacity: 1;
}
.profile-menu-logout {
    color: var(--terra-l);
    background: rgba(196, 145, 138, 0.12);
}
.profile-menu-logout:hover {
    background: rgba(196, 145, 138, 0.2);
    color: var(--cream);
}

/* Profile popover — extended stats */
.profile-menu-couple {
    font-family: "Cormorant Garamond", serif;
    font-size: 0.72rem;
    font-style: italic;
    color: rgba(184, 149, 106, 0.7);
    letter-spacing: 0.3px;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-menu-since {
    font-size: 0.52rem;
    color: rgba(250, 245, 238, 0.22);
    font-weight: 300;
    letter-spacing: 0.04em;
    margin-top: 2px;
}
.profile-stats {
    padding: 10px 10px 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin: 4px 0;
}
.profile-stat-row {
    display: flex;
    align-items: center;
    gap: 5px;
}
.profile-stat-venue {
    font-size: 0.6rem;
    color: rgba(250, 245, 238, 0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.02em;
}
.profile-completion-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.profile-ring-wrap {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}
.profile-ring-pct {
    position: absolute;
    font-size: 0.48rem;
    font-weight: 500;
    color: var(--gold);
    letter-spacing: 0.02em;
}
.profile-completion-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.profile-stat-title {
    font-size: 0.55rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(250, 245, 238, 0.55);
}
.profile-stat-sub {
    font-size: 0.6rem;
    color: rgba(250, 245, 238, 0.7);
    font-style: italic;
    font-family: "Cormorant Garamond", serif;
}
.profile-guest-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.profile-bar-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.profile-stat-count {
    font-size: 0.58rem;
    color: rgba(184, 149, 106, 0.75);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}
.profile-mini-bar {
    height: 2px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 2px;
    overflow: hidden;
}
.profile-mini-bar-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--gold), var(--champ));
    transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.profile-mini-bar-fill.storage {
    background: linear-gradient(90deg, var(--sage), rgba(143, 168, 135, 0.55));
}

/* Collapsed sidebar — avatar only */
.sidebar.collapsed .sidebar-profile {
    padding: 10px 0;
    justify-content: center;
}
.sidebar.collapsed .profile-info,
.sidebar.collapsed .profile-chevron {
    display: none;
}
.sidebar.collapsed .profile-menu {
    left: 72px;
    width: 220px;
}

.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.6rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(250, 245, 238, 0.2);
    font-weight: 200;
    cursor: pointer;
    transition:
        color 0.3s ease,
        background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
}
.sidebar-footer svg {
    opacity: 0.4;
    transition: opacity 0.25s ease;
    flex-shrink: 0;
}
.sidebar-footer:hover svg {
    opacity: 0.7;
}
.sidebar-footer:hover {
    color: rgba(250, 245, 238, 0.5);
    background: rgba(255, 255, 255, 0.03);
}

/* ── Collapsed sidebar state ── */
.sidebar.collapsed {
    width: 64px;
}
.sidebar.collapsed .sidebar-brand h2,
.sidebar.collapsed .sidebar-brand-sub,
.sidebar.collapsed .owner-badge,
.sidebar.collapsed .sidebar-footer-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}
.sidebar.collapsed .sidebar-brand {
    padding: 12px 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
}
.sidebar.collapsed .sidebar-collapse-btn {
    position: static;
    transform: none;
    display: flex;
    align-self: auto;
}
.sidebar.collapsed .sidebar-collapse-btn svg {
    transform: rotate(180deg);
}
.sidebar.collapsed .nav-section-label {
    opacity: 0;
    height: 0;
    padding: 0 20px;
    overflow: hidden;
    margin: 0;
}
/* In icon-only collapsed mode: hide group headers, always show all items */
.sidebar.collapsed .nav-group-header {
    display: none;
}
.sidebar.collapsed .nav-group-items {
    max-height: 400px !important;
    opacity: 1 !important;
}
.sidebar.collapsed .nav-group + .nav-group {
    border-top: none;
}
.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px 0;
    border-left-width: 0;
}
.sidebar.collapsed .nav-item span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    position: absolute;
}
.sidebar.collapsed .nav-item.active {
    background: rgba(200, 88, 42, 0.15);
    border-left: 0;
}
.sidebar.collapsed .nav-item svg {
    margin: 0;
}
.sidebar.collapsed .sidebar-footer {
    justify-content: center;
    padding: 14px 0;
}
.sidebar.collapsed .sidebar-about {
    width: 260px;
}
/* Tooltip on collapsed items */
.sidebar.collapsed .nav-item {
    position: relative;
}
.sidebar.collapsed .nav-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 64px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--brown);
    color: var(--cream);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.68rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 100;
    letter-spacing: 0.5px;
    font-weight: 300;
}
.sidebar.collapsed .nav-item:hover::after {
    opacity: 1;
}

/* About Preagos sliding panel */
.sidebar-about {
    position: absolute;
    inset: 0;
    background: var(--brown);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
}
.sidebar-about.open {
    transform: translateX(0);
}
.about-back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 20px 24px;
    background: none;
    border: none;
    color: rgba(250, 245, 238, 0.5);
    font-size: 0.7rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 300;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.25s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.about-back:hover {
    color: var(--cream);
}
.about-back svg {
    opacity: 0.6;
    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}
.about-back:hover svg {
    transform: translateX(-3px);
    opacity: 1;
}
.about-content {
    flex: 1;
    padding: 32px 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.about-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--terra) 0%, var(--terra-l) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.6rem;
    font-weight: 300;
    color: #fff;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(200, 88, 42, 0.25);
}
.about-title {
    font-family: "Cormorant Garamond", serif;
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--cream);
    letter-spacing: 2px;
    margin: 0 0 4px;
}
.about-tagline {
    font-size: 0.6rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--terra-l);
    font-weight: 400;
    margin: 0;
}
.about-sep {
    width: 40px;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 20px auto;
}
.about-desc {
    font-size: 0.72rem;
    line-height: 1.7;
    color: rgba(250, 245, 238, 0.45);
    font-weight: 300;
    margin: 0 0 14px;
}
.about-credit {
    font-size: 0.72rem;
    line-height: 1.6;
    color: rgba(250, 245, 238, 0.6);
    font-weight: 300;
    margin: 0;
}
.about-credit strong {
    color: var(--terra-l);
    font-weight: 500;
}
.about-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 20px;
    background: rgba(200, 88, 42, 0.12);
    border: 1px solid rgba(200, 88, 42, 0.3);
    color: var(--terra-l);
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-decoration: none;
    font-weight: 400;
    transition: all 0.25s ease;
}
.about-link:hover {
    background: rgba(200, 88, 42, 0.2);
    border-color: rgba(200, 88, 42, 0.5);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200, 88, 42, 0.2);
}
.about-contact {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.about-contact span {
    font-size: 0.6rem;
    letter-spacing: 1px;
    color: rgba(250, 245, 238, 0.25);
    font-weight: 200;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 36px 40px;
    min-width: 0; /* allow flex child to shrink below content width */
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    transition: opacity 0.3s;
}
.sidebar-overlay.show {
    display: block;
    opacity: 1;
}
.mob-menu-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 35;
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    background: var(--brown);
    border: none;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.mob-menu-btn span {
    width: 20px;
    height: 1.5px;
    background: var(--cream);
    border-radius: 1px;
    transition: var(--transition);
}

/* Platform Admin switch — only visible for platform admins */
.nav-platform-admin { display: none !important; }
html.is-platform-admin .nav-platform-admin {
    display: flex !important;
    margin-top: 8px;
    border-top: 1px solid var(--cream-d);
    padding-top: 8px;
}
html.is-platform-admin .nav-platform-admin span { color: var(--gold); }
html.is-platform-admin .nav-platform-admin svg { stroke: var(--gold); }

/* Impersonation banner */
.impersonation-banner {
    position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
    background: #2C1810;
    color: #F5EFE4;
    border-bottom: 2px solid var(--gold, #B8956A);
}
.impersonation-inner {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 20px;
    font-family: var(--body); font-size: 0.78rem;
    max-width: 1400px; margin: 0 auto;
}
.impersonation-inner svg { flex-shrink: 0; stroke: var(--gold, #B8956A); }
.impersonation-inner strong { margin-right: auto; color: var(--gold, #B8956A); }
.impersonation-exit {
    background: var(--gold, #B8956A); color: #fff; border: none;
    padding: 5px 14px; border-radius: 100px;
    font-size: 0.7rem; font-weight: 600; cursor: pointer;
    letter-spacing: .03em; white-space: nowrap;
    transition: background .2s;
}
.impersonation-exit:hover { background: var(--gold-d, #9A7A52); }
html.is-impersonating #app { padding-top: 40px; }
html.is-impersonating .sidebar { top: 40px; }
/* Push all full-page overlays (seating, messages, QR, CMS editor) below the banner */
html.is-impersonating #tab-seating.active,
html.is-impersonating #tab-messages.active,
html.is-impersonating #tab-qrcode.active,
html.is-impersonating .cms-editor { top: 40px; }

@media (max-width: 768px) {
    .impersonation-inner { padding: 6px 12px; font-size: 0.7rem; }
    .impersonation-exit { padding: 4px 10px; font-size: 0.64rem; }
    html.is-impersonating #app { padding-top: 36px; }
    html.is-impersonating #tab-seating.active,
    html.is-impersonating #tab-messages.active,
    html.is-impersonating #tab-qrcode.active,
    html.is-impersonating .cms-editor { top: 36px; }
}

