/* =============================================================================
   Wed Invites — portal theme
   One set of tokens drives everything (Bootstrap 5 is re-coloured through them).
   Modern, friendly SaaS look: cool light-grey canvas, white cards, violet primary,
   coral highlights, one geometric sans (Plus Jakarta Sans) for everything.
   ============================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --wi-bg: #f7f7fb;
    --wi-surface: #ffffff;
    --wi-surface-2: #f2f1f8;
    --wi-surface-3: #e9e7f3;
    --wi-ink: #16142b;
    --wi-ink-2: #46435e;
    --wi-muted: #77748f;
    --wi-line: #e7e5f0;
    --wi-line-strong: #d6d3e4;

    --wi-primary: #6d4aff;
    --wi-primary-dark: #5534e6;
    --wi-primary-soft: #efebff;
    --wi-primary-rgb: 109, 74, 255;
    --wi-coral: #ff6b5b;
    --wi-coral-soft: #ffeceA;
    --wi-gradient: linear-gradient(135deg, #6d4aff 0%, #a64bf4 55%, #ff6b5b 100%);

    /* Semantic colours (older names kept: "sage" = success, "gold" = warning). */
    --wi-sage: #10a37f;
    --wi-sage-soft: #e3f7f0;
    --wi-gold: #e8890c;
    --wi-gold-soft: #fff3e0;
    --wi-info: #2f7de1;
    --wi-info-soft: #e7f0fd;
    --wi-danger: #e5484d;
    --wi-danger-soft: #fdecec;

    --wi-radius: 16px;
    --wi-radius-sm: 10px;
    --wi-shadow: 0 1px 2px rgba(22, 20, 43, .04), 0 2px 8px rgba(22, 20, 43, .04);
    --wi-shadow-md: 0 4px 16px rgba(22, 20, 43, .08);
    --wi-shadow-lg: 0 24px 60px rgba(22, 20, 43, .16);
    --wi-sidebar-w: 252px;
    --wi-topbar-h: 64px;
    --wi-font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    /* Headings used to be a serif; they are now the same family, just heavier. */
    --wi-serif: var(--wi-font);

    /* Bootstrap */
    --bs-body-bg: var(--wi-bg);
    --bs-body-color: var(--wi-ink);
    --bs-body-font-family: var(--wi-font);
    --bs-body-font-size: .92rem;
    --bs-primary: var(--wi-primary);
    --bs-primary-rgb: var(--wi-primary-rgb);
    --bs-link-color: var(--wi-primary);
    --bs-link-color-rgb: var(--wi-primary-rgb);
    --bs-link-hover-color: var(--wi-primary-dark);
    --bs-border-color: var(--wi-line);
    --bs-border-radius: var(--wi-radius-sm);
    --bs-secondary-color: var(--wi-muted);
    --bs-success: var(--wi-sage);
    --bs-success-rgb: 16, 163, 127;
    --bs-danger: var(--wi-danger);
    --bs-danger-rgb: 229, 72, 77;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--wi-bg); color: var(--wi-ink); font-family: var(--wi-font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; min-height: 100vh; }
h1, h2, h3, .serif { font-family: var(--wi-font); font-weight: 800; letter-spacing: -.025em; color: var(--wi-ink); }
h4, h5, h6 { font-weight: 700; letter-spacing: -.01em; color: var(--wi-ink); }
a { text-decoration: none; }
a:hover { text-decoration: none; }
.text-muted { color: var(--wi-muted) !important; }
.text-xs { font-size: .76rem; }
.text-sm { font-size: .85rem; }
.fw-600 { font-weight: 600; }
.min-w-0 { min-width: 0; }
.mw-520, .mw-700, .mw-900 { max-width: none; }
.text-gradient { background: var(--wi-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
:focus-visible { outline: 2px solid rgba(var(--wi-primary-rgb), .55); outline-offset: 2px; }
::selection { background: rgba(var(--wi-primary-rgb), .18); }

/* ---------- Buttons ---------- */
.btn { --bs-btn-border-radius: 10px; --bs-btn-font-weight: 600; --bs-btn-padding-x: 1.05rem; --bs-btn-padding-y: .55rem; --bs-btn-font-size: .88rem; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; transition: background-color .15s, border-color .15s, box-shadow .15s, transform .15s, color .15s; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { --bs-btn-bg: var(--wi-primary); --bs-btn-border-color: var(--wi-primary); --bs-btn-hover-bg: var(--wi-primary-dark); --bs-btn-hover-border-color: var(--wi-primary-dark); --bs-btn-active-bg: var(--wi-primary-dark); --bs-btn-active-border-color: var(--wi-primary-dark); --bs-btn-disabled-bg: #b9a9ff; --bs-btn-disabled-border-color: #b9a9ff; --bs-btn-focus-shadow-rgb: var(--wi-primary-rgb); box-shadow: 0 1px 2px rgba(22, 20, 43, .1), inset 0 1px 0 rgba(255, 255, 255, .14); }
.btn-primary:hover { box-shadow: 0 6px 16px rgba(var(--wi-primary-rgb), .3); }
.btn-outline-primary { --bs-btn-color: var(--wi-primary); --bs-btn-border-color: #cfc4ff; --bs-btn-hover-bg: var(--wi-primary-soft); --bs-btn-hover-color: var(--wi-primary-dark); --bs-btn-hover-border-color: var(--wi-primary); --bs-btn-active-bg: var(--wi-primary-soft); --bs-btn-active-color: var(--wi-primary-dark); --bs-btn-active-border-color: var(--wi-primary); }
.btn-light, .btn-secondary, .btn-outline-secondary, .btn-outline-light { --bs-btn-bg: var(--wi-surface); --bs-btn-color: var(--wi-ink); --bs-btn-border-color: var(--wi-line-strong); --bs-btn-hover-bg: var(--wi-surface-2); --bs-btn-hover-color: var(--wi-ink); --bs-btn-hover-border-color: #c6c2d8; --bs-btn-active-bg: var(--wi-surface-3); --bs-btn-active-color: var(--wi-ink); --bs-btn-active-border-color: #c6c2d8; --bs-btn-disabled-bg: var(--wi-surface-2); --bs-btn-disabled-color: var(--wi-muted); --bs-btn-disabled-border-color: var(--wi-line); box-shadow: 0 1px 2px rgba(22, 20, 43, .05); }
.btn-danger { --bs-btn-bg: var(--wi-danger); --bs-btn-border-color: var(--wi-danger); --bs-btn-hover-bg: #c93338; --bs-btn-hover-border-color: #c93338; }
.btn-outline-danger { --bs-btn-color: var(--wi-danger); --bs-btn-border-color: #f3c3c5; --bs-btn-hover-bg: var(--wi-danger-soft); --bs-btn-hover-color: var(--wi-danger); --bs-btn-hover-border-color: var(--wi-danger); }
.btn-success { --bs-btn-bg: var(--wi-sage); --bs-btn-border-color: var(--wi-sage); --bs-btn-hover-bg: #0b8a6b; --bs-btn-hover-border-color: #0b8a6b; }
.btn-gradient { background: var(--wi-gradient); color: #fff; border: 0; }
.btn-gradient:hover { color: #fff; filter: brightness(1.05); box-shadow: 0 8px 20px rgba(var(--wi-primary-rgb), .3); }
.btn-lg { --bs-btn-padding-x: 1.5rem; --bs-btn-padding-y: .78rem; --bs-btn-font-size: .98rem; --bs-btn-border-radius: 12px; }
.btn-sm { --bs-btn-padding-x: .75rem; --bs-btn-padding-y: .36rem; --bs-btn-font-size: .8rem; --bs-btn-border-radius: 8px; }
.btn-xs { --bs-btn-padding-x: .55rem; --bs-btn-padding-y: .25rem; --bs-btn-font-size: .76rem; --bs-btn-border-radius: 7px; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 9px; }
.btn-link { --bs-btn-color: var(--wi-primary); --bs-btn-hover-color: var(--wi-primary-dark); padding-left: 0; padding-right: 0; box-shadow: none; }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; font-size: .82rem; color: var(--wi-ink); margin-bottom: .4rem; }
.form-control, .form-select { border: 1px solid var(--wi-line-strong); border-radius: var(--wi-radius-sm); padding: .62rem .85rem; font-size: .92rem; background-color: #fff; color: var(--wi-ink); box-shadow: 0 1px 2px rgba(22, 20, 43, .04); transition: border-color .15s, box-shadow .15s; }
.form-control:hover, .form-select:hover { border-color: #c6c2d8; }
.form-control:focus, .form-select:focus { border-color: var(--wi-primary); box-shadow: 0 0 0 4px rgba(var(--wi-primary-rgb), .14); }
.form-control::placeholder { color: #a9a6bd; }
.form-control-lg { padding: .82rem 1rem; font-size: 1rem; }
.form-hint, .form-text { font-size: .78rem; color: var(--wi-muted); margin-top: .35rem; }
.form-check-input { border-color: var(--wi-line-strong); }
.form-check-input:checked { background-color: var(--wi-primary); border-color: var(--wi-primary); }
.form-check-input:focus { border-color: var(--wi-primary); box-shadow: 0 0 0 4px rgba(var(--wi-primary-rgb), .14); }
.form-switch .form-check-input { width: 2.3em; height: 1.25em; }
.input-group-text { background: var(--wi-surface-2); border-color: var(--wi-line-strong); color: var(--wi-muted); font-size: .86rem; }
.field-error { color: var(--wi-danger); font-size: .78rem; margin-top: .35rem; }
.field-ok { color: var(--wi-sage); font-size: .78rem; margin-top: .35rem; }

/* ---------- Brand mark ---------- */
.brand-mark { width: 32px; height: 32px; border-radius: 10px; background: var(--wi-gradient); color: #fff; display: inline-grid; place-items: center; font-size: .9rem; flex-shrink: 0; box-shadow: 0 4px 12px rgba(var(--wi-primary-rgb), .3); }

/* ---------- Shell ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--wi-sidebar-w); background: var(--wi-surface); border-right: 1px solid var(--wi-line); display: flex; flex-direction: column; z-index: 1040; transition: transform .25s ease, width .2s ease; }
.sidebar-header { height: var(--wi-topbar-h); display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 18px; flex-shrink: 0; }
.sidebar .logo { font-size: 1.08rem; font-weight: 800; letter-spacing: -.02em; color: var(--wi-ink); display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.sidebar .logo:hover { text-decoration: none; }
.sidebar .toggle-btn { color: var(--wi-muted); cursor: pointer; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: .75rem; }
.sidebar .toggle-btn:hover { background: var(--wi-surface-2); color: var(--wi-ink); }
.menu { list-style: none; margin: 0; padding: 8px 12px; overflow-y: auto; flex: 1; }
.menu-label { font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #a3a0b8; padding: 14px 12px 6px; }
.menu-link { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--wi-ink-2); font-weight: 500; font-size: .89rem; cursor: pointer; margin-bottom: 2px; transition: background .12s, color .12s; }
.menu-link:hover { background: var(--wi-surface-2); color: var(--wi-ink); text-decoration: none; }
.menu-link.active { background: var(--wi-primary-soft); color: var(--wi-primary-dark); font-weight: 600; }
.menu-icon { width: 20px; text-align: center; font-size: .92rem; color: #9b98b2; flex-shrink: 0; }
.menu-link:hover .menu-icon { color: var(--wi-ink-2); }
.menu-link.active .menu-icon { color: var(--wi-primary); }
.menu-link.locked { color: #a9a6bd; }
.menu-link .lock { margin-left: auto; font-size: .68rem; color: #c3c0d4; }
.submenu { list-style: none; padding: 0 0 0 14px; margin: 0; display: none; }
.menu-item.active > .submenu, .submenu.active { display: block; }
.submenu-arrow { margin-left: auto; font-size: .62rem; transition: transform .2s; color: #a9a6bd; }
.menu-item.active > .submenu-toggle .submenu-arrow { transform: rotate(180deg); }
.menu-empty { color: var(--wi-muted); font-size: .84rem; padding: 10px 12px; display: block; }
.sidebar-footer { padding: 12px; }
.sidebar-plan { background: linear-gradient(135deg, #f3efff, #fff1ef); border: 1px solid #ebe4ff; border-radius: 14px; padding: 12px 14px; font-size: .8rem; color: var(--wi-ink-2); display: block; }
.sidebar-plan:hover { text-decoration: none; border-color: #d9ceff; }
.sidebar-plan strong { display: block; color: var(--wi-ink); font-size: .86rem; }
.sidebar.collapsed { width: 76px; }
.sidebar.collapsed .menu-text, .sidebar.collapsed .logo span:not(.brand-mark), .sidebar.collapsed .menu-label, .sidebar.collapsed .submenu-arrow, .sidebar.collapsed .sidebar-plan, .sidebar.collapsed .lock { display: none; }
.sidebar.collapsed .sidebar-header { justify-content: center; padding: 0; }
.sidebar.collapsed .logo { display: none; }
.sidebar.collapsed .toggle-btn { transform: rotate(180deg); }
.sidebar.collapsed .menu-link { justify-content: center; }
.sidebar.collapsed .submenu { padding-left: 0; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(22, 20, 43, .45); z-index: 1035; }

.main { margin-left: var(--wi-sidebar-w); min-height: 100vh; transition: margin-left .2s ease; display: flex; flex-direction: column; }
.main.collapsed { margin-left: 76px; }
.topbar { height: var(--wi-topbar-h); background: rgba(247, 247, 251, .85); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--wi-line); display: flex; align-items: center; gap: 12px; padding: 0 28px; position: sticky; top: 0; z-index: 1020; }
.mobile-toggle { display: none; border: 0; background: transparent; font-size: 1.1rem; color: var(--wi-ink); width: 40px; height: 40px; border-radius: 10px; }
.mobile-toggle:hover { background: var(--wi-surface-2); }
.page { padding: 28px 32px 48px; flex: 1; width: 100%; max-width: 1360px; }
.page.page-wide { max-width: none; }

.wedding-switch { display: flex; align-items: center; gap: 10px; background: var(--wi-surface); border: 1px solid var(--wi-line); border-radius: 12px; padding: 5px 12px 5px 6px; cursor: pointer; max-width: 100%; min-width: 0; color: var(--wi-ink); box-shadow: var(--wi-shadow); transition: border-color .15s; }
.wedding-switch:hover { border-color: var(--wi-line-strong); text-decoration: none; }
.wedding-switch .ring { width: 30px; height: 30px; border-radius: 9px; background: var(--wi-primary-soft); color: var(--wi-primary); display: grid; place-items: center; font-size: .8rem; flex-shrink: 0; }
.wedding-switch .ws-text { min-width: 0; line-height: 1.2; text-align: left; }
.wedding-switch .ws-title { font-weight: 700; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; display: block; }
.wedding-switch .ws-sub { font-size: .72rem; color: var(--wi-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; display: block; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--wi-gradient); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; flex-shrink: 0; border: 0; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--wi-line); }
.env-ribbon { background: var(--wi-gold-soft); color: #9a5a00; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.impersonate-bar { background: var(--wi-ink); color: #fff; font-size: .84rem; padding: 8px 28px; display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.impersonate-bar a { color: #c9bbff; font-weight: 600; cursor: pointer; }

/* ---------- Content ---------- */
.content-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.content-header h1, .content-header h4 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; margin: 0; line-height: 1.2; }
.content-header .sub, .breadcrumb { color: var(--wi-muted); font-size: .88rem; margin: 6px 0 0; }
.breadcrumb a, .content-header .sub a { color: var(--wi-muted); }
.content-header .sub a:hover { color: var(--wi-primary); }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section, .card { background: var(--wi-surface); border: 1px solid var(--wi-line); border-radius: var(--wi-radius); box-shadow: var(--wi-shadow); }
.section { padding: 24px; margin-bottom: 20px; }
.section-title { font-family: var(--wi-font); font-size: 1rem; font-weight: 700; letter-spacing: -.01em; margin: 0 0 4px; }
.section-sub { color: var(--wi-muted); font-size: .85rem; margin: 0 0 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section.flush { padding: 0; overflow: hidden; }
.section.flush .section-head { padding: 18px 22px 0; }
hr, .divider { border: 0; border-top: 1px solid var(--wi-line); opacity: 1; margin: 18px 0; }

.stat-card { display: flex; align-items: center; gap: 14px; padding: 18px; margin-bottom: 0; height: 100%; }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1rem; background: var(--wi-primary-soft); color: var(--wi-primary); flex-shrink: 0; }
.stat-icon.sage { background: var(--wi-sage-soft); color: var(--wi-sage); }
.stat-icon.gold { background: var(--wi-gold-soft); color: var(--wi-gold); }
.stat-icon.info { background: var(--wi-info-soft); color: var(--wi-info); }
.stat-icon.danger { background: var(--wi-danger-soft); color: var(--wi-danger); }
.stat-icon.coral { background: var(--wi-coral-soft); color: var(--wi-coral); }
.stat-value { font-size: 1.55rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.stat-label { color: var(--wi-muted); font-size: .8rem; font-weight: 500; }
.event-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--wi-primary-soft); color: var(--wi-primary); flex-shrink: 0; font-size: .92rem; }

/* ---------- Event type picker ---------- */
.type-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.type-chip { position: relative; }
.type-chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.type-chip label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--wi-line-strong); border-radius: 999px; font-size: .84rem; font-weight: 600; color: var(--wi-ink-2); cursor: pointer; background: #fff; transition: all .15s; }
.type-chip label i { color: #9b98b2; font-size: .85rem; transition: color .15s; }
.type-chip label:hover { border-color: #c6c2d8; }
.type-chip input:checked + label { background: var(--wi-primary-soft); border-color: var(--wi-primary); color: var(--wi-primary-dark); }
.type-chip input:checked + label i { color: var(--wi-primary); }
.type-chip input:focus-visible + label { outline: 2px solid rgba(var(--wi-primary-rgb), .55); outline-offset: 2px; }

/* ---------- Tables ---------- */
.table { --bs-table-bg: transparent; --bs-table-color: var(--wi-ink); --bs-table-border-color: var(--wi-line); --bs-table-hover-bg: #faf9fd; margin: 0; font-size: .89rem; }
.table > thead th { font-size: .7rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--wi-muted); border-bottom-width: 1px; padding: 12px 16px; white-space: nowrap; background: #fafafd; }
.table > tbody td { padding: 13px 16px; vertical-align: middle; }
.table > tbody tr:last-child td { border-bottom: 0; }
.toolbar { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.cell-main { font-weight: 600; color: var(--wi-ink); }
.cell-sub { font-size: .79rem; color: var(--wi-muted); }

/* ---------- Chips / badges ---------- */
.chip, .badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 10px; font-size: .72rem; font-weight: 600; line-height: 1.3; background: var(--wi-surface-2); color: var(--wi-ink-2); white-space: nowrap; }
.chip i { font-size: .6rem; }
.chip-success, .badge.bg-success, .text-bg-success { background: var(--wi-sage-soft) !important; color: #0b7a5f !important; }
.chip-danger, .badge.bg-danger, .text-bg-danger { background: var(--wi-danger-soft) !important; color: #b42d32 !important; }
.chip-warning, .badge.bg-warning { background: var(--wi-gold-soft) !important; color: #9a5a00 !important; }
.chip-info, .badge.bg-info { background: var(--wi-info-soft) !important; color: #1f5fb4 !important; }
.chip-primary, .badge.bg-primary { background: var(--wi-primary-soft) !important; color: var(--wi-primary-dark) !important; }
.badge.bg-secondary { background: var(--wi-surface-2) !important; color: var(--wi-ink-2) !important; }

/* ---------- Empty states ---------- */
.empty-state { text-align: center; padding: 52px 20px; }
.empty-state .empty-icon { width: 68px; height: 68px; border-radius: 20px; background: var(--wi-primary-soft); color: var(--wi-primary); display: grid; place-items: center; font-size: 1.5rem; margin: 0 auto 18px; }
.empty-state h3 { font-size: 1.3rem; margin-bottom: 6px; }
.empty-state p { color: var(--wi-muted); max-width: 440px; margin: 0 auto 20px; }

/* ---------- Alerts / notes ---------- */
.note { display: flex; gap: 12px; align-items: flex-start; border-radius: 12px; padding: 13px 16px; font-size: .87rem; background: var(--wi-info-soft); color: #1d4f91; margin-bottom: 18px; border: 1px solid rgba(47, 125, 225, .12); }
.note i { margin-top: 3px; }
.note.note-warning { background: var(--wi-gold-soft); color: #8a4f00; border-color: rgba(232, 137, 12, .15); }
.note.note-success { background: var(--wi-sage-soft); color: #0b6b53; border-color: rgba(16, 163, 127, .15); }
.note.note-danger { background: var(--wi-danger-soft); color: #a3282d; border-color: rgba(229, 72, 77, .15); }
.note a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.alert { border-radius: 12px; border: 0; font-size: .89rem; }

/* ---------- Checklist (dashboard) ---------- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--wi-line); }
.checklist li:last-child { border-bottom: 0; }
.check-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--wi-line-strong); display: grid; place-items: center; font-size: .72rem; color: transparent; flex-shrink: 0; }
.checklist li.done .check-dot { background: var(--wi-sage); border-color: var(--wi-sage); color: #fff; }
.checklist li.done .check-title { color: var(--wi-muted); text-decoration: line-through; }
.checklist li.locked { opacity: .6; }
.check-body { flex: 1; min-width: 0; }
.check-title { font-weight: 700; }
.check-text { font-size: .83rem; color: var(--wi-muted); }
.progress { height: 8px; border-radius: 999px; background: var(--wi-surface-2); }
.progress-bar { background: var(--wi-gradient); border-radius: 999px; }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth-side { background: #120f2a; color: #fff; padding: 44px 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; isolation: isolate; }
.auth-side::before { content: ''; position: absolute; width: 620px; height: 620px; left: -160px; top: -220px; background: radial-gradient(closest-side, rgba(109, 74, 255, .75), transparent); z-index: -1; }
.auth-side::after { content: ''; position: absolute; width: 560px; height: 560px; right: -200px; bottom: -200px; background: radial-gradient(closest-side, rgba(255, 107, 91, .55), transparent); z-index: -1; }
.auth-brand { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; color: inherit; display: inline-flex; align-items: center; gap: 10px; }
.auth-brand:hover { color: inherit; }
.auth-main .auth-brand { color: var(--wi-ink); }
.auth-hero { max-width: 500px; }
.auth-pill { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); margin-bottom: 20px; }
.auth-pill i { color: #ffb4aa; }
.auth-side h2 { font-size: 2.8rem; line-height: 1.06; letter-spacing: -.04em; margin: 0 0 16px; color: #fff; }
.auth-side p { color: rgba(255, 255, 255, .72); max-width: 440px; font-size: 1rem; line-height: 1.6; }
.auth-cards { position: relative; height: 150px; margin: 26px 0 8px; }
.auth-card-demo { position: absolute; display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; background: rgba(255, 255, 255, .96); color: var(--wi-ink); border-radius: 14px; padding: 12px 16px 12px 12px; box-shadow: 0 18px 40px rgba(0, 0, 0, .3); min-width: 220px; animation: wi-float 6s ease-in-out infinite; }
.auth-card-demo i { grid-row: span 2; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--wi-primary-soft); color: var(--wi-primary); }
.auth-card-demo strong { font-size: .88rem; }
.auth-card-demo span { font-size: .74rem; color: var(--wi-muted); }
.auth-card-demo.c1 { left: 0; top: 0; }
.auth-card-demo.c2 { left: 150px; top: 54px; animation-delay: -2s; }
.auth-card-demo.c2 i { background: var(--wi-coral-soft); color: var(--wi-coral); }
.auth-card-demo.c3 { left: 30px; top: 104px; animation-delay: -4s; min-width: 0; }
.auth-card-demo.c3 i { background: var(--wi-sage-soft); color: var(--wi-sage); }
@keyframes wi-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.auth-points { list-style: none; padding: 0; margin: 26px 0 0; }
.auth-points li { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; color: rgba(255, 255, 255, .85); font-weight: 500; font-size: .92rem; }
.auth-points i { width: 26px; height: 26px; border-radius: 8px; background: rgba(255, 255, 255, .1); display: grid; place-items: center; font-size: .72rem; color: #c9bbff; }
.auth-copy { font-size: .8rem; color: rgba(255, 255, 255, .5); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--wi-surface); }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 2rem; letter-spacing: -.035em; margin-bottom: 6px; }
.auth-card .lead { color: var(--wi-muted); font-size: .95rem; margin-bottom: 26px; }
.auth-foot { margin-top: 22px; font-size: .88rem; color: var(--wi-muted); text-align: center; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice label { display: block; border: 1.5px solid var(--wi-line); border-radius: 14px; padding: 14px; cursor: pointer; height: 100%; transition: border-color .15s, background .15s, box-shadow .15s; }
.choice label:hover { border-color: var(--wi-line-strong); }
.choice label strong { display: block; font-size: .92rem; }
.choice label span { font-size: .79rem; color: var(--wi-muted); }
.choice label i { color: var(--wi-primary); margin-bottom: 8px; display: block; }
.choice input:checked + label { border-color: var(--wi-primary); background: var(--wi-primary-soft); box-shadow: 0 0 0 3px rgba(var(--wi-primary-rgb), .1); }
.choice input:focus-visible + label { outline: 2px solid rgba(var(--wi-primary-rgb), .55); outline-offset: 2px; }
.url-preview { background: var(--wi-surface-2); border-radius: var(--wi-radius-sm); padding: 10px 14px; font-size: .85rem; color: var(--wi-ink-2); word-break: break-all; margin-top: 8px; }
.url-preview strong { color: var(--wi-primary-dark); }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; align-items: stretch; }
.price-card { background: var(--wi-surface); border: 1px solid var(--wi-line); border-radius: 20px; padding: 28px 24px; display: flex; flex-direction: column; position: relative; box-shadow: var(--wi-shadow); transition: box-shadow .2s, transform .2s; }
.price-card:hover { box-shadow: var(--wi-shadow-md); }
.price-card.featured { border: 2px solid var(--wi-primary); box-shadow: 0 20px 50px rgba(var(--wi-primary-rgb), .18); }
.price-card .ribbon { position: absolute; top: -13px; left: 24px; background: var(--wi-gradient); color: #fff; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.price-card h3 { font-size: 1.25rem; margin: 0 0 4px; }
.price-card .tagline { color: var(--wi-muted); font-size: .86rem; min-height: 2.6em; }
.price { font-size: 2.3rem; font-weight: 800; letter-spacing: -.04em; margin: 14px 0 2px; line-height: 1; }
.price small { font-size: .88rem; font-weight: 500; letter-spacing: 0; color: var(--wi-muted); }
.price-note { font-size: .78rem; color: var(--wi-muted); margin-bottom: 18px; }
.price-features { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.price-features li { display: flex; gap: 10px; padding: 6px 0; font-size: .88rem; color: var(--wi-ink-2); }
.price-features i { color: var(--wi-sage); margin-top: 4px; font-size: .78rem; }
.seg { display: inline-flex; background: var(--wi-surface-2); border-radius: 12px; padding: 4px; gap: 2px; }
.seg button, .seg a { border: 0; background: transparent; border-radius: 9px; padding: 7px 16px; font-weight: 600; font-size: .86rem; color: var(--wi-muted); cursor: pointer; }
.seg a:hover, .seg button:hover { text-decoration: none; color: var(--wi-ink); }
.seg .active { background: var(--wi-surface); color: var(--wi-ink); box-shadow: 0 1px 3px rgba(22, 20, 43, .12); }

/* ---------- Modal / offcanvas / toast / dropdown ---------- */
.modal-content { border: 0; border-radius: 20px; box-shadow: var(--wi-shadow-lg); }
.modal-header { border-bottom: 0; padding: 22px 24px 6px; }
.modal-title { font-size: 1.2rem; font-weight: 800; letter-spacing: -.02em; }
.modal-body { padding: 14px 24px; }
.modal-footer { border-top: 0; padding: 10px 24px 22px; }
.modal-backdrop.show { opacity: .45; background: #16142b; }
.offcanvas { border-left: 0 !important; box-shadow: var(--wi-shadow-lg); }
.dropdown-menu { border: 1px solid var(--wi-line); border-radius: 14px; box-shadow: var(--wi-shadow-lg); padding: 6px; font-size: .88rem; min-width: 220px; }
.dropdown-item { border-radius: 9px; padding: 8px 12px; color: var(--wi-ink-2); display: flex; align-items: center; gap: 10px; cursor: pointer; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--wi-surface-2); color: var(--wi-ink); text-decoration: none; }
.dropdown-item.active, .dropdown-item:active { background: var(--wi-primary-soft); color: var(--wi-primary-dark); }
.dropdown-item i { width: 16px; text-align: center; color: #9b98b2; }
.dropdown-item.active i { color: var(--wi-primary); }
.dropdown-header { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: #a3a0b8; padding: 8px 12px 4px; font-weight: 700; }
.toast { border: 0; border-radius: 14px; box-shadow: var(--wi-shadow-lg); background: var(--wi-ink); color: #fff; min-width: 260px; }
.toast .toast-body { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; font-size: .88rem; }
.toast .toast-icon { margin-top: 2px; }
.toast.is-success .toast-icon { color: #4fd6ae; }
.toast.is-error .toast-icon { color: #ff8f86; }
.toast strong { display: block; font-size: .85rem; }
.toast .btn-close { filter: invert(1); opacity: .6; margin-left: auto; }
.confirm-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--wi-danger-soft); color: var(--wi-danger); display: grid; place-items: center; font-size: 1.15rem; margin-bottom: 14px; }
.nav-tabs { border-bottom: 1px solid var(--wi-line); gap: 4px; }
.nav-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--wi-muted); font-weight: 600; font-size: .88rem; padding: 10px 12px; border-radius: 0; margin-bottom: -1px; }
.nav-tabs .nav-link:hover { color: var(--wi-ink); text-decoration: none; }
.nav-tabs .nav-link.active { color: var(--wi-primary); border-bottom-color: var(--wi-primary); background: transparent; }

/* ---------- Loader ---------- */
.wi-loader { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 3000; pointer-events: none; opacity: 0; transition: opacity .2s; overflow: hidden; }
.wi-loader.active { opacity: 1; }
.wi-loader::before { content: ''; position: absolute; inset: 0; width: 40%; background: var(--wi-gradient); border-radius: 3px; animation: wi-load 1.1s ease-in-out infinite; }
@keyframes wi-load { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.skeleton { background: linear-gradient(90deg, #efeef6 25%, #f8f7fc 37%, #efeef6 63%); background-size: 400% 100%; animation: wi-skel 1.3s ease infinite; border-radius: 8px; min-height: 14px; }
@keyframes wi-skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.btn.is-busy { pointer-events: none; opacity: .75; }
.btn.is-busy::before { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: wi-spin .7s linear infinite; }
@keyframes wi-spin { to { transform: rotate(360deg); } }

/* ---------- Misc ---------- */
.perm-group { border: 1px solid var(--wi-line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.perm-checks { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; padding-left: 26px; }
.copy-field { display: flex; align-items: center; gap: 8px; background: var(--wi-surface-2); border: 1px solid var(--wi-line); border-radius: 12px; padding: 6px 6px 6px 14px; font-size: .85rem; min-width: 0; }
.copy-field span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.activity-feed { list-style: none; padding: 0; margin: 0; }
.activity-feed li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--wi-line); font-size: .87rem; }
.activity-feed li:last-child { border-bottom: 0; }
.dt-container .dt-search input, .dt-container .dt-length select { border: 1px solid var(--wi-line-strong); border-radius: 10px; padding: .42rem .9rem; font-size: .86rem; }
.dt-container .dt-search input:focus { outline: none; border-color: var(--wi-primary); box-shadow: 0 0 0 4px rgba(var(--wi-primary-rgb), .14); }
.dt-container .dt-layout-row { padding: 12px 16px; margin: 0 !important; }
.dt-container .dt-layout-row.dt-layout-table { padding: 0; }
.dt-container .dt-info { color: var(--wi-muted); font-size: .8rem; }
.page-link { color: var(--wi-ink-2); border-color: var(--wi-line); }
.active > .page-link, .page-link.active { background: var(--wi-primary); border-color: var(--wi-primary); }
.error-page { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); width: 280px; box-shadow: var(--wi-shadow-lg); }
    .sidebar.active { transform: translateX(0); }
    .sidebar.collapsed { width: 280px; }
    .sidebar.active ~ .sidebar-backdrop { display: block; }
    .sidebar .toggle-btn { display: none; }
    .main, .main.collapsed { margin-left: 0; }
    .mobile-toggle { display: grid; place-items: center; }
    .topbar { padding: 0 14px; }
    .page { padding: 20px 16px 40px; }
    .impersonate-bar { padding: 8px 14px; }
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    .auth-main { align-items: flex-start; padding-top: 32px; min-height: 100vh; }
}
@media (max-width: 575.98px) {
    .content-header h1, .content-header h4 { font-size: 1.45rem; }
    .section { padding: 16px; border-radius: 14px; }
    .wedding-switch .ws-title, .wedding-switch .ws-sub { max-width: 130px; }
    .header-actions { width: 100%; }
    .header-actions .btn { flex: 1; }
    .table > thead th, .table > tbody td { padding: 11px 12px; }
    .hide-xs { display: none !important; }
    .choice-grid { grid-template-columns: 1fr; }
    .modal-dialog { margin: 10px; }
    .type-chip label { padding: 7px 12px; font-size: .8rem; }
}
@media print {
    .sidebar, .topbar, .no-print, .impersonate-bar { display: none !important; }
    .main { margin: 0 !important; }
    body { background: #fff; }
    .section { box-shadow: none; border-color: #ddd; }
}
