﻿        /* Modern CSS Variables & Resets */
        :root {
            --primary: #1d1d1f;
            --primary-dark: #000000;
            --bg-main: #f9fafb;
            --sidebar-bg: #111827;
            --sidebar-text: #9ca3af;
            --text-dark: #111827;
            --border: #e5e7eb;
            
            /* Status Colors */
            --success-bg: #d1fae5;
            --success-text: #065f46;
            --warning-bg: #fef3c7;
            --warning-text: #92400e;
            --danger-bg: #fee2e2;
            --danger-text: #991b1b;
            --info-bg: #e0f2fe;
            --info-text: #0369a1;
            --offline-bg: #ffedd5;
            --offline-text: #c2410c;
        }

        body { 
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
            background-color: var(--bg-main); 
            color: var(--text-dark); 
            margin: 0; 
            padding: 0;
            display: flex;
            min-height: 100vh;
            height: 100vh;
            overflow: hidden;
        }

        /* ──── SIDEBAR STYLING ──── */
        /* Fixed width sized to the longest nav label ("Push"); the sidebar is
           always expanded on desktop (no collapse) and becomes a horizontal bar ≤820px. */
        aside {
            width: 230px;
            background-color: var(--sidebar-bg);
            color: white;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            padding: 24px 16px;
            box-sizing: border-box;
            flex-shrink: 0;
        }

        .brand {
            font-size: 18px;
            font-weight: 800;
            letter-spacing: -0.025em;
            margin-bottom: 32px;
            padding-left: 8px;
            color: white;
        }

        nav {
            display: flex;
            flex-direction: column;
            gap: 4px;
            flex-grow: 1;
        }

        .nav-item {
            display: flex;
            align-items: center;
            padding: 12px 12px;
            color: var(--sidebar-text);
            text-decoration: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }

        .nav-item:hover {
            background-color: #1f2937;
            color: white;
        }

        .nav-item.active {
            background-color: var(--primary);
            color: white;
        }

        /* ──── PORTAL PAGE ADDITIONAL STYLING ──── */
        .portal-hero {
            background: linear-gradient(135deg, #1d1d1f 0%, #000000 100%);
            color: white;
            padding: 40px;
            border-radius: 12px;
            margin-bottom: 24px;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        }
        .portal-grid {
            display: grid;
            grid-template-columns: 1.8fr 1.2fr;
            gap: 24px;
        }
        @media (max-width: 768px) {
            .portal-grid {
                grid-template-columns: 1fr;
            }
        }
        .map-wrapper {
            position: relative;
            overflow: hidden;
            border-radius: 12px;
            border: 1px solid var(--border);
            height: 300px;
            background-color: #e5e7eb;
            margin-top: 16px;
        }
        .map-wrapper iframe {
            width: 100%;
            height: 100%;
            border: 0;
        }
        .speaker-card {
            display: flex;
            gap: 16px;
            padding: 16px;
            border: 1px solid var(--border);
            border-radius: 8px;
            margin-bottom: 12px;
            background: #f9fafb;
        }
        .speaker-avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background-color: #e5e7eb;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: var(--primary);
            flex-shrink: 0;
        }

        /* ──── MAIN WORKSPACE ──── */
        main {
            flex-grow: 1;
            padding: 40px;
            box-sizing: border-box;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
        }

        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid var(--border);
            padding-bottom: 20px;
            margin-bottom: 32px;
        }

        /* ──── NOTIFICATION BELL + PANEL ──── */
        .notif-bell { position: fixed; top: 18px; right: 24px; z-index: 600; cursor: pointer; flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; background: #fff; border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0,0,0,.06); display: flex; align-items: center; justify-content: center; transition: background .15s, box-shadow .15s; user-select: none; }
        .notif-bell:hover { background: #f9fafb; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
        .notif-bell-icon { display: block; color: #4b5563; }
        .notif-badge { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--bg, #fff); }
        .notif-panel { position: absolute; top: 46px; right: 0; width: 360px; max-width: calc(100vw - 32px); max-height: 460px; overflow-y: auto; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.16); z-index: 500; cursor: default; }
        .notif-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: #fff; border-radius: 14px 14px 0 0; }
        .notif-item { display: flex; gap: 11px; padding: 12px 16px; border-bottom: 1px solid #f3f4f6; cursor: default; }
        .notif-item.unread { background: #eff6ff; }
        .notif-item:hover { background: #f9fafb; }
        .notif-item-ico { flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 15px; background: #f3f4f6; }
        .notif-item-body { min-width: 0; flex: 1; }
        .notif-item-title { font-size: 13px; font-weight: 600; color: #1f2937; margin: 0; }
        .notif-item-text { font-size: 12px; color: #6b7280; margin: 2px 0 0; line-height: 1.4; }
        .notif-item-time { font-size: 11px; color: #9ca3af; margin: 4px 0 0; }
        .notif-empty { padding: 40px 20px; text-align: center; color: #9ca3af; font-size: 13px; }

        /* ──── NAVIGATION PAGES (TABS) ──── */
        .page-view {
            display: none; /* Hidden by default */
            animation: fadeIn 0.2s ease-in-out;
        }

        .page-view.active-view {
            display: block; /* Shown when active */
        }

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

        /* ──── REUSABLE UI CARDS & GRID ──── */
        .card { 
            background: white; 
            padding: 24px; 
            border: 1px solid var(--border); 
            border-radius: 12px; 
            box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
            margin-bottom: 24px;
        }
        .grid-metrics { 
            display: grid; 
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
            gap: 24px; 
            margin-bottom: 32px; 
        }
        .metric-title { font-size: 12px; font-weight: 600; text-transform: uppercase; color: #9ca3af; margin: 0; }
        .metric-value { font-size: 28px; font-weight: 700; margin: 4px 0 0 0; }
        .search-bar { width: 100%; max-width: 300px; padding: 8px 14px; font-size: 14px; border: 1px solid #d1d5db; border-radius: 8px; outline: none; box-sizing: border-box; }
        .select-input { padding: 8px 14px; font-size: 14px; border: 1px solid #d1d5db; border-radius: 8px; background: white; outline: none; cursor: pointer; box-sizing: border-box; }
        
        table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
        th { padding-bottom: 12px; color: #9ca3af; text-transform: uppercase; font-size: 12px; font-weight: 600; border-bottom: 1px solid var(--border); }
        td { padding: 16px 0; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
        
        .badge { padding: 4px 10px; font-size: 11px; font-weight: 600; border-radius: 9999px; display: inline-block; text-transform: uppercase; letter-spacing: 0.05em; }
        .badge-success { background-color: var(--success-bg); color: var(--success-text); }
        .badge-warning { background-color: var(--warning-bg); color: var(--warning-text); }
        .badge-danger { background-color: var(--danger-bg); color: var(--danger-text); }
        .badge-info { background-color: var(--info-bg); color: var(--info-text); }
        .badge-offline { background-color: var(--offline-bg); color: var(--offline-text); }
        
        .btn { padding: 8px 16px; font-size: 13px; font-weight: 600; border-radius: 6px; cursor: pointer; border: none; display: inline-flex; align-items: center; gap: 6px; transition: all 0.2s; }
        .btn-primary { background-color: var(--primary); color: white; }
        .btn-primary:hover { background-color: var(--primary-dark); }
        .btn-secondary { background-color: white; color: #374151; border: 1px solid #d1d5db; }
        .btn-secondary:hover { background-color: #f9fafb; }
        .btn-danger { background-color: rgba(239, 68, 68, 0.8); color: white; }
        .btn-danger:hover { background-color: rgba(220, 38, 38, 0.9); }
        .btn:disabled { opacity: 0.5; cursor: not-allowed; }
        /* Icon-only row-action buttons: consistent square footprint regardless of glyph width.
           Height matches the compact (4px 8px / 11px) text row-buttons they sit beside. */
        .btn-icon { padding: 0; min-width: 28px; height: 28px; font-size: 13px; line-height: 1; justify-content: center; }
        /* Table row action cells: lay buttons out with a consistent gap regardless of how
           the action HTML strings are concatenated together. */
        td.row-actions { white-space: nowrap; }
        td.row-actions > .btn { margin-left: 6px; vertical-align: middle; }
        td.row-actions > .btn:first-child { margin-left: 0; }

        /* ──── DYNAMIC EVENT SELECTOR SEGMENT TABS ──── */
        .event-switch-bar {
            display: flex;
            gap: 8px;
            background: #e2e8f0;
            padding: 6px;
            border-radius: 10px;
            margin-bottom: 28px;
            overflow-x: auto;
        }
        .event-tab-btn {
            background: none;
            border: none;
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            color: #475569;
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.2s;
        }
        .event-tab-btn:hover {
            color: var(--text-dark);
            background: rgba(255, 255, 255, 0.4);
        }
        .event-tab-btn.active-tab {
            background: white;
            color: var(--primary);
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        /* ──── DASHBOARD SPLIT WORKSPACE ──── */
        .dashboard-layout {
            display: grid;
            grid-template-columns: 1.8fr 1.2fr;
            gap: 24px;
            align-items: start; /* each column hugs its own content (Event Tasks fold) */
        }
        @media (max-width: 1024px) {
            .dashboard-layout {
                grid-template-columns: 1fr;
            }
        }

        /* Collapse chevron on manager toggle buttons (matches Event Tasks panel) */
        .mgr-chevron {
            display: inline-block;
            font-size: 11px;
            line-height: 1;
            transition: transform .2s;
            transform: rotate(0deg);
        }
        .mgr-chevron.is-open { transform: rotate(90deg); }

        /* Shared responsive toolbar (search + filter dropdowns above a table).
           Grows to a full-width row once the header wraps, keeping the search bar
           flexible and giving every dropdown a uniform width so they line up. */
        .table-toolbar-controls {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: flex-end;
            align-items: center;
            flex: 1 1 380px;          /* claim the row when the header wraps */
        }
        .table-toolbar-controls .search-bar {
            flex: 1 1 200px;
            min-width: 160px;
        }
        .table-toolbar-controls .select-input {
            flex: 0 1 160px;          /* uniform dropdown width so they align */
            min-width: 140px;
        }
        .table-toolbar-controls .btn { flex: 0 0 auto; }
        @media (max-width: 600px) {
            /* Stack everything full-width and let dropdowns share the row evenly. */
            .table-toolbar-controls .search-bar { flex-basis: 100%; }
            .table-toolbar-controls .select-input { flex: 1 1 0; min-width: 0; }
        }

        /* ──── TIMELINE PATHWAY ──── */
        .timeline-container {
            position: relative;
            padding-left: 24px;
            border-left: 2px solid var(--border);
            margin-top: 16px;
        }
        .timeline-event {
            position: relative;
            margin-bottom: 28px;
            animation: rowFadeIn 0.2s ease-out;
        }
        .timeline-event:last-child {
            margin-bottom: 0;
        }
        .timeline-dot {
            position: absolute;
            left: -33px;
            top: 4px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            border: 4px solid white;
            box-shadow: 0 0 0 2px var(--border);
        }
        .dot-running { background-color: #10b981; box-shadow: 0 0 0 2px #10b981; }
        .dot-upcoming { background-color: #6b7280; }
        .dot-warning { background-color: #f59e0b; }
        
        .timeline-time {
            font-size: 11px;
            font-weight: 700;
            color: var(--primary);
            margin: 0 0 4px 0;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .timeline-title {
            font-size: 15px;
            font-weight: 700;
            margin: 0 0 4px 0;
        }
        .timeline-meta {
            font-size: 13px;
            color: #6b7280;
            margin: 0;
        }

        /* ──── NOTIFICATION STYLING ──── */
        .notif-item {
            display: flex;
            gap: 16px;
            padding: 16px;
            border-radius: 8px;
            margin-bottom: 12px;
            border: 1px solid var(--border);
            align-items: flex-start;
        }
        .notif-item.action-required {
            background-color: #fffbeb;
            border-color: #fde68a;
        }
        .notif-item.starting-soon {
            background-color: #f0fdf4;
            border-color: #bbf7d0;
        }
        .notif-item.approval { background-color: #eff6ff; border-color: #bfdbfe; }
        .notif-item.email-push { background-color: #f5f3ff; border-color: #ddd6fe; }
        .notif-item.publish { background-color: #fff7ed; border-color: #fed7aa; }
        .notif-item.info { background-color: #f8fafc; border-color: #e2e8f0; }
        .notif-item.locked { opacity: .72; }
        .notif-role-tag {
            display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px;
            font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
            background: #f3f4f6; color: #000000; border: 1px solid #e5e7eb;
        }
        .notif-role-tag.locked { background: #f3f4f6; color: #6b7280; border-color: #e5e7eb; }
        .notif-cat-tag {
            display:inline-block; margin-left:8px; padding:1px 7px; border-radius:6px;
            font-size:10px; font-weight:700; letter-spacing:.03em; vertical-align:middle;
        }
        .notif-cat-tag.approval  { background:#dbeafe; color:#1e40af; }
        .notif-cat-tag.email-push{ background:#ede9fe; color:#5b21b6; }
        .notif-cat-tag.publish   { background:#ffedd5; color:#9a3412; }
        .notif-cat-tag.action-required { background:#fef3c7; color:#92400e; }
        .notif-cat-tag.starting-soon   { background:#dcfce7; color:#166534; }

        /* ──── 📣 ANNOUNCEMENTS / BROADCAST ──── */
        .ann-channel-pill {
            display:inline-flex; align-items:center; gap:5px; padding:6px 11px; cursor:pointer;
            border:1px solid var(--border); border-radius:999px; font-size:12px; font-weight:600;
            color:#4b5563; background:#fff; user-select:none; transition:all .15s;
        }
        .ann-channel-pill input { accent-color: var(--primary); margin:0; }
        .ann-channel-pill.on { border-color: var(--primary); background: rgba(0,0,0,.06); color:#374151; }
        .ann-channel-pill.soon { opacity:.85; }
        .ann-channel-pill .soon-tag { font-size:9px; font-weight:700; color:#b45309; background:#fef3c7; border-radius:4px; padding:0 4px; }
        .ann-feed-item {
            border:1px solid var(--border); border-radius:10px; padding:12px 14px; margin-bottom:10px;
            background:#fff;
        }
        .ann-feed-item .ann-head { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; margin-bottom:5px; }
        .ann-feed-item h4 { margin:0; font-size:13.5px; font-weight:700; }
        .ann-feed-item p { margin:4px 0 0; font-size:13px; color:#4b5563; line-height:1.45; }
        .ann-feed-item .ann-meta { font-size:11px; color:#9ca3af; white-space:nowrap; }
        .ann-chip { display:inline-block; padding:1px 7px; border-radius:6px; font-size:10px; font-weight:700; margin-right:4px; }
        .ann-chip.draft { background:#fef3c7; color:#92400e; }
        .ann-chip.sent  { background:#dcfce7; color:#166534; }
        .ann-chip.ch    { background:#f3f4f6; color:#000000; }
        .ann-chip.auto  { background:#f3e8ff; color:#7e22ce; }
        .notif-icon {
            font-size: 20px;
            line-height: 1;
            padding-top: 2px;
        }
        .notif-content h4 {
            margin: 0 0 4px 0;
            font-size: 14px;
            font-weight: 700;
        }
        .notif-content p {
            margin: 0 0 8px 0;
            font-size: 13px;
            color: #4b5563;
            line-height: 1.4;
        }
        .empty-notifications {
            text-align: center;
            padding: 32px 16px;
            color: #9ca3af;
            font-size: 14px;
        }

        /* ──── DIALOG MODAL LAYERS ──── */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: rgba(17, 24, 39, 0.6);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            backdrop-filter: blur(4px);
        }
        .modal-card {
            background: white;
            border-radius: 12px;
            width: 100%;
            max-width: 480px;
            padding: 28px;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            animation: modalSlideUp 0.25s ease-out;
        }
        @keyframes modalSlideUp {
            from { transform: translateY(20px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }
        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        .modal-header h3 { margin: 0; font-size: 18px; font-weight: 700; }
        .modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: #9ca3af; }
        .modal-close:hover { color: #374151; }
        
        .form-group { margin-bottom: 16px; }
        .form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #374151; }
        .form-control { width: 100%; padding: 8px 14px; border: 1px solid #d1d5db; border-radius: 8px; outline: none; font-size: 14px; box-sizing: border-box; }
        .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,0,0,0.1); }
        /* Long <option> text (e.g. Registration Mode) must not force a select wider than its
           grid cell — clip it and keep selects full-width within their column. */
        select.form-control { max-width: 100%; text-overflow: ellipsis; }
        /* Grid cells holding a form-group must be allowed to shrink (min-width:0) so their
           inputs/selects don't overflow the modal's 2-column layout. */
        #event-form .form-group { min-width: 0; }
        #event-form > div[style*="grid"] > .form-group,
        #event-modal div[style*="grid"] > div { min-width: 0; }

        /* Custom layout for bulk utility actions in table */
        .bulk-actions-wrapper {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 14px 20px;
            background: #f8fafc;
            border: 1px solid var(--border);
            border-radius: 8px;
            margin-bottom: 16px;
        }
        .checked-row { background-color: #f1f5f9; }
        
        /* Checkbox styling */
        .chk-input {
            width: 18px;
            height: 18px;
            accent-color: var(--primary);
            cursor: pointer;
        }

        /* ──── Toast Notification Styling ──── */
        #custom-toast {
            position: fixed;
            bottom: 24px;
            right: 24px;
            color: white;
            padding: 14px 22px;
            border-radius: 10px;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            display: none;
            align-items: center;
            gap: 12px;
            z-index: 2000;
            font-size: 14px;
            font-weight: 600;
            animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            border: 1px solid rgba(255,255,255,0.1);
        }
        @keyframes toastSlideIn {
            from { transform: translateY(20px) scale(0.95); opacity: 0; }
            to { transform: translateY(0) scale(1); opacity: 1; }
        }

        /* Activity input row list transition */
        .activity-form-row {
            animation: rowFadeIn 0.2s ease-out;
        }
        @keyframes rowFadeIn {
            from { opacity: 0; transform: translateY(5px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* ──── PORTAL EDITOR ENGINE STYLING ──── */
        .portal-mode-tabs {
            display: flex;
            background: #e2e8f0;
            padding: 4px;
            border-radius: 10px;
            gap: 4px;
        }
        .portal-mode-tab {
            padding: 8px 18px;
            border: none;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            color: #475569;
            cursor: pointer;
            background: transparent;
            transition: all 0.2s;
            white-space: nowrap;
        }
        .portal-mode-tab.active-ptab {
            background: white;
            color: var(--primary);
            box-shadow: 0 1px 3px rgba(0,0,0,0.12);
        }
        .portal-editor-layout {
            display: grid;
            grid-template-columns: 440px minmax(0, 1fr);
            gap: 20px;
            align-items: start;
        }
        /* Editor panel is narrow — keep its grid cells from overflowing the margin. */
        .portal-editor-panel > div[style*="grid"] > div,
        .portal-editor-panel .form-control { min-width: 0; }
        @media (max-width: 960px) {
            .portal-editor-layout { grid-template-columns: 1fr; }
        }
        .portal-editor-panel {
            background: white;
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 18px 20px;
            /* Show all settings full-size — no inner scroll; the page scrolls instead. */
        }
        .portal-preview-frame {
            background: white;
            border: 1px solid var(--border);
            border-radius: 12px;
            overflow-y: auto;
            max-height: 64vh;
        }
        .portal-fullwidth-preview {
            background: white;
            border: 1px solid var(--border);
            border-radius: 12px;
            overflow-y: auto;
            max-height: 68vh;
        }
        .portal-section-heading {
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            color: #9ca3af;
            letter-spacing: 0.06em;
            margin: 18px 0 8px 0;
        }
        .color-picker-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 9px 0;
            border-bottom: 1px solid #f3f4f6;
        }
        .color-picker-row .clabel {
            font-size: 13px;
            font-weight: 500;
            color: #374151;
        }
        /* Unified color picker — matches the (native) certificate text-color picker
           everywhere in the project. Kept minimal so it renders as the native swatch. */
        input[type="color"].color-swatch {
            cursor: pointer;
            vertical-align: middle;
        }
        .section-toggle-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 9px 0;
            border-bottom: 1px solid #f3f4f6;
            font-size: 13px;
            font-weight: 500;
            color: #374151;
        }
        .toggle-switch {
            position: relative;
            width: 38px;
            height: 22px;
            flex-shrink: 0;
        }
        .toggle-switch input {
            opacity: 0;
            width: 0;
            height: 0;
            position: absolute;
        }
        .toggle-slider {
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: #d1d5db;
            border-radius: 22px;
            cursor: pointer;
            transition: 0.2s;
        }
        .toggle-slider:before {
            content: "";
            position: absolute;
            width: 16px; height: 16px;
            left: 3px; bottom: 3px;
            background: white;
            border-radius: 50%;
            transition: 0.2s;
            box-shadow: 0 1px 3px rgba(0,0,0,0.2);
        }
        .toggle-switch input:checked + .toggle-slider { background: var(--primary); }
        .toggle-switch input:checked + .toggle-slider:before { transform: translateX(16px); }

        /* ── Rich-text (description) editor ── */
        .rte-wrap { border: 1px solid #d1d5db; border-radius: 8px; overflow: hidden; background: #fff; }
        .rte-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 5px 6px; background: #f9fafb; border-bottom: 1px solid #e5e7eb; }
        .rte-btn {
            min-width: 28px; height: 26px; padding: 0 7px; border: 1px solid transparent;
            background: transparent; border-radius: 6px; cursor: pointer; font-size: 13px;
            color: #374151; display: inline-flex; align-items: center; justify-content: center;
            font-family: inherit; line-height: 1; transition: background .12s, border-color .12s;
        }
        .rte-btn:hover { background: #eef2f7; }
        .rte-btn:active, .rte-btn.is-active { background: #f3f4f6; border-color: #e5e7eb; color: #000000; }
        .rte-btn b, .rte-btn i { pointer-events: none; }
        .rte-sep { width: 1px; background: #e5e7eb; margin: 3px 3px; }
        .rte-area {
            min-height: 110px; max-height: 280px; overflow-y: auto; padding: 10px 12px;
            font-size: 13px; line-height: 1.6; color: #1f2937; outline: none;
        }
        .rte-area:empty:before { content: attr(data-placeholder); color: #9ca3af; }
        .rte-area p { margin: 0 0 10px; }
        .rte-area h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
        .rte-area ul, .rte-area ol { margin: 0 0 10px; padding-left: 22px; }
        .rte-area li { margin: 0 0 4px; }
        .rte-area a { color: var(--primary); }
        .rte-area:focus-within { outline: none; }
        .rte-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,0,0,.12); }

        /* ── Structured sponsor editor ── */
        .sponsor-editor { display: flex; flex-direction: column; gap: 8px; }
        .sponsor-row {
            display: grid; grid-template-columns: auto minmax(0, 1fr) 100px minmax(0, 1fr) auto;
            gap: 8px; align-items: center; padding: 8px; border: 1px solid #e5e7eb;
            border-radius: 9px; background: #fafafa;
        }
        .sponsor-row > * { min-width: 0; }
        .sponsor-logo-cell {
            width: 42px; height: 42px; border-radius: 8px; background: #eef2f7; flex-shrink: 0;
            display: flex; align-items: center; justify-content: center; overflow: hidden;
            cursor: pointer; border: 1px dashed #cbd5e1; font-size: 9px; color: #94a3b8; text-align: center;
        }
        .sponsor-logo-cell img { width: 100%; height: 100%; object-fit: contain; }
        .sponsor-row input, .sponsor-row select {
            width: 100%; padding: 7px 9px; border: 1px solid #d1d5db; border-radius: 7px;
            font-size: 13px; box-sizing: border-box; background: #fff; outline: none; font-family: inherit;
        }
        .sponsor-row input:focus, .sponsor-row select:focus { border-color: var(--primary); }
        .sponsor-del {
            width: 30px; height: 30px; border: none; background: transparent; cursor: pointer;
            color: #9ca3af; border-radius: 6px; font-size: 15px; flex-shrink: 0;
        }
        .sponsor-del:hover { background: #fef2f2; color: #ef4444; }
        @media (max-width: 560px) { .sponsor-row { grid-template-columns: auto 1fr auto; grid-auto-rows: auto; } }

        /* ── Budget line-item table ── */
        .budget-table-head, .budget-row {
            display: grid;
            grid-template-columns: 1.6fr 1.2fr 0.9fr 1fr 1fr 132px 36px;
            gap: 10px;
            align-items: center;
        }
        .budget-table-head {
            padding: 0 6px 8px;
            font-size: 10px;
            font-weight: 700;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            color: #9ca3af;
            border-bottom: 1px solid #f0f0f0;
        }
        .budget-table-head .num, .budget-row .num { text-align: right; }
        .budget-row {
            padding: 8px 6px;
            border-bottom: 1px solid #f6f7f9;
        }
        .budget-row input, .budget-row select {
            width: 100%;
            padding: 7px 9px;
            border: 1px solid #d1d5db;
            border-radius: 7px;
            font-size: 13px;
            box-sizing: border-box;
            background: #fff;
            outline: none;
            font-family: inherit;
        }
        .budget-row input.num { text-align: right; }
        .budget-row input:focus, .budget-row select:focus { border-color: var(--primary); }
        .budget-row input.type-income { color: #047857; font-weight: 600; }
        .budget-row .budget-del {
            width: 30px; height: 30px; border: none; background: rgba(239, 68, 68, 0.8); cursor: pointer;
            color: white; border-radius: 6px; font-size: 14px;
        }
        .budget-row .budget-del:hover { background: rgba(220, 38, 38, 0.9); color: white; }
        .budget-row .bl-approval { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
        .budget-row .bl-approval .btn { padding: 5px 12px; font-size: 12px; white-space: nowrap; }
        .budget-status-pill {
            display: inline-flex; align-items: center; gap: 3px;
            font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
            background: #dcfce7; color: #15803d; white-space: nowrap;
        }
        .budget-row input:disabled, .budget-row select:disabled {
            background: #f9fafb; color: #6b7280; cursor: default; border-color: #e5e7eb;
        }
        .budget-row.is-approved { background: rgba(4,120,87,0.035); }
        /* 📣 Media board */
        .media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
        .media-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
        .media-card-hero { height: 150px; background-size: cover; background-position: center; }
        .media-card-body { padding: 16px 18px; display: flex; flex-direction: column; flex: 1; }
        .media-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
        .media-chip { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
        .media-card-title { font-size: 16px; margin: 0 0 7px; color: #1d1d1f; line-height: 1.3; }
        .media-card-text { font-size: 13px; line-height: 1.55; color: #4b5563; flex: 1; }
        .media-card-text :is(h1,h2,h3) { font-size: 14px; margin: 6px 0 3px; }
        .media-card-text a { color: var(--primary); }
        .media-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
        .media-card-actions { display: flex; gap: 4px; flex-wrap: wrap; }
        .media-card-actions .btn { padding: 5px 11px; font-size: 12px; }
        .media-card-actions .btn.is-on { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
        .media-card { position: relative; }
        .media-drag {
            position: absolute; top: 8px; right: 8px; z-index: 3;
            width: 26px; height: 26px; border: none; border-radius: 6px;
            background: rgba(255,255,255,.85); color: #9ca3af; cursor: grab;
            font-size: 14px; line-height: 1; display: flex; align-items: center; justify-content: center;
        }
        .media-drag:hover { background: #fff; color: #4b5563; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
        .media-drag:active { cursor: grabbing; }
        .media-card.dragging { opacity: .5; outline: 2px dashed var(--primary); }
        .budget-cat-bar-track { height: 8px; background: #eef2f7; border-radius: 99px; overflow: hidden; }
        .budget-cat-bar-fill { height: 100%; border-radius: 99px; transition: width .3s; }
        @media (max-width: 720px) {
            .budget-table-head { display: none; }
            .budget-row { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; gap: 8px; padding: 12px 6px; border-bottom: 1px solid #e5e7eb; }
            .budget-row .budget-del { justify-self: end; }
            .budget-row .bl-approval { grid-column: 1 / -1; justify-content: flex-start; }
        }

        /* Ticket preview card */
        .ticket-card-preview {
            border-radius: 14px;
            overflow: visible;
            box-shadow: 0 16px 48px rgba(0,0,0,0.18);
            max-width: 500px;
            margin: 0 auto;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
        }

        /* ──── MINIMAL PRODUCT DESIGN SYSTEM ──── */
        :root {
            --primary: #1d1d1f;
            --primary-dark: #000000;
            --bg-main: #f5f5f7;
            --sidebar-bg: rgba(251, 251, 253, 0.82);
            --sidebar-text: #6e6e73;
            --text-dark: #1d1d1f;
            --border: rgba(0, 0, 0, 0.08);
            --success-bg: #e9f8ee;
            --success-text: #16753a;
            --warning-bg: #fff7e6;
            --warning-text: #8a5700;
            --danger-bg: #fff0f0;
            --danger-text: #b42318;
            --info-bg: #eaf4ff;
            --info-text: #0066cc;
            --offline-bg: #f2f2f7;
            --offline-text: #515154;
        }

        * { scrollbar-width: thin; scrollbar-color: #c7c7cc transparent; }
        *::selection { background: rgba(0, 113, 227, 0.18); }

        body {
            background:
                radial-gradient(circle at 88% 5%, rgba(0, 113, 227, 0.08), transparent 27rem),
                var(--bg-main);
            color: var(--text-dark);
            letter-spacing: -0.008em;
        }

        aside {
            width: 248px;
            padding: 22px 16px;
            background: var(--sidebar-bg);
            color: var(--text-dark);
            border-right: 1px solid var(--border);
            box-shadow: none;
            backdrop-filter: saturate(180%) blur(24px);
            -webkit-backdrop-filter: saturate(180%) blur(24px);
        }

        .brand {
            display: flex;
            align-items: center;
            /* left padding matches the nav-item left padding so the logo's
               center lines up with the tab icons' centers below it */
            margin: 0 4px 30px;
            padding: 0 0 0 1px;
            color: #1d1d1f;
            font-size: 17px;
            font-weight: 650;
            letter-spacing: -0.03em;
        }

        .brand-mark {
            /* Holds the uploaded logo (assets/logo.png). The mark carries its own shape + shadow,
               so no chip background — just size it to sit with the wordmark. Slightly larger than
               the box to offset the logo's built-in transparent padding. */
            width: 34px;
            height: 34px;
            object-fit: contain;
            margin-left: -2px;
        }

        nav { gap: 5px; }

        .nav-item {
            padding: 10px 11px;
            border-radius: 10px;
            color: #6e6e73;
            font-size: 13px;
            font-weight: 520;
            letter-spacing: -0.01em;
        }

        .nav-item:hover {
            background: rgba(0, 0, 0, 0.035);
            color: #1d1d1f;
        }

        .nav-item.active {
            background: rgba(0, 113, 227, 0.1);
            color: #0066cc;
            box-shadow: none;
        }

        .nav-symbol {
            width: 20px;
            color: currentColor;
            font-size: 14px;
            text-align: center;
            opacity: 0.9;
        }

        .account-card {
            padding: 12px;
            border: 1px solid var(--border);
            border-radius: 14px;
            background: rgba(255,255,255,0.66);
            display: flex;
            align-items: center;
        }

        .account-avatar {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: grid;
            place-items: center;
            color: white;
            background: linear-gradient(145deg, #3a3a3c, #1d1d1f);
            font-size: 11px;
            font-weight: 700;
        }

        /* ──── SIDEBAR LABEL LAYOUT (always expanded — no collapse) ──── */
        aside { position: relative; }
        .brand { position: relative; align-items: center; }
        /* Logo mark stays pinned in place */
        .brand-mark { flex-shrink: 0; }
        .brand-text {
            display: inline-block;
            overflow: hidden;
            white-space: nowrap;
            max-width: 160px;
            margin-left: 7px;
        }
        .nav-label {
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            max-width: 200px;
            margin-left: 11px;
        }
        .account-info {
            overflow: hidden;
            white-space: nowrap;
            max-width: 160px;
            margin-left: 10px;
        }

        main {
            padding: 36px clamp(24px, 4vw, 64px) 56px;
            max-width: 1600px;
            margin: 0 auto;
        }

        header {
            padding: 0 0 24px;
            margin-bottom: 28px;
            border-bottom: 1px solid var(--border);
            display: flex;
            justify-content: flex-start;
            align-items: flex-start;
            gap: 14px;
            text-align: left;
        }

        /* Header back-navigation button */
        .nav-back-btn {
            flex-shrink: 0;
            width: 40px;
            height: 40px;
            margin-top: 4px;
            border: 1px solid var(--border);
            background: rgba(255,255,255,0.7);
            border-radius: 11px;
            color: #1d1d1f;
            font-size: 18px;
            line-height: 1;
            cursor: pointer;
            display: none;
            align-items: center;
            justify-content: center;
            transition: background .15s, border-color .15s, transform .1s;
        }
        .nav-back-btn:hover { background: rgba(0,0,0,0.04); border-color: #c7c7cc; }
        .nav-back-btn:active { transform: scale(0.94); }
        .nav-back-btn.is-visible { display: inline-flex; }

        .header-kicker {
            margin: 0 0 7px;
            color: #86868b;
            font-size: 11px;
            font-weight: 650;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }

        header h1 {
            margin: 0;
            font-size: clamp(28px, 3vw, 38px);
            line-height: 1.08;
            font-weight: 650;
            letter-spacing: -0.045em;
        }

        #page-desc {
            margin-top: 8px !important;
            color: #6e6e73 !important;
            font-size: 14px !important;
        }

        .workspace-status {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 7px 8px 7px 12px;
            border: 1px solid var(--border);
            border-radius: 999px;
            background: rgba(255,255,255,0.7);
            color: #515154;
            font-size: 12px;
            font-weight: 550;
        }

        .live-pill {
            padding: 5px 9px;
            border-radius: 999px;
            background: #e9f8ee;
            color: #16753a;
            font-size: 11px;
        }

        .card {
            padding: 22px;
            border: 1px solid var(--border);
            border-radius: 18px;
            background: rgba(255,255,255,0.84);
            box-shadow: 0 1px 2px rgba(0,0,0,0.025), 0 12px 32px rgba(0,0,0,0.035);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
        }

        .grid-metrics {
            grid-template-columns: repeat(4, minmax(150px, 1fr));
            gap: 14px;
            margin-bottom: 24px;
        }

        .grid-metrics .card {
            min-height: 92px;
            margin-bottom: 0;
            border-left: 1px solid var(--border) !important;
        }

        .metric-title {
            color: #86868b !important;
            font-size: 10px;
            letter-spacing: 0.075em;
        }

        .metric-value {
            margin-top: 10px;
            font-size: 30px;
            font-weight: 620;
            letter-spacing: -0.045em;
        }

        .dashboard-layout {
            grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
            gap: 18px;
        }

        .event-switch-bar,
        .portal-mode-tabs {
            gap: 3px;
            padding: 4px;
            background: rgba(118,118,128,0.12);
            border-radius: 11px;
        }

        .event-tab-btn,
        .portal-mode-tab {
            min-height: 34px;
            padding: 7px 14px;
            border-radius: 8px;
            color: #515154;
            font-size: 12px;
            font-weight: 550;
        }

        .event-tab-btn.active-tab,
        .portal-mode-tab.active-ptab {
            color: #1d1d1f;
            background: rgba(255,255,255,0.94);
            box-shadow: 0 1px 4px rgba(0,0,0,0.1);
        }

        .btn {
            min-height: 34px;
            padding: 8px 14px;
            border-radius: 9px;
            font-size: 12px;
            font-weight: 600;
            letter-spacing: -0.006em;
        }

        .btn-primary {
            background: #1d1d1f;
            color: white;
            box-shadow: 0 1px 2px rgba(0, 92, 184, 0.18);
        }

        .btn-primary:hover { background: #000000; transform: translateY(-1px); }
        .btn-secondary { background: rgba(255,255,255,0.76); border-color: var(--border); color: #1d1d1f; }
        .btn-secondary:hover { background: white; }
        .btn-danger { background: rgba(239, 68, 68, 0.8); }

        table { font-size: 13px; }
        th {
            padding: 0 12px 12px;
            color: #86868b;
            font-size: 10px;
            letter-spacing: 0.065em;
        }
        td { padding: 15px 12px; border-bottom-color: rgba(0,0,0,0.055); }
        tbody tr { transition: background .18s ease; }
        tbody tr:hover { background: rgba(0,113,227,0.025); }

        .badge {
            padding: 5px 9px;
            font-size: 9px;
            border-radius: 999px;
            letter-spacing: 0.055em;
        }

        .search-bar,
        .select-input,
        .form-control {
            min-height: 38px;
            border-color: rgba(0,0,0,0.1);
            border-radius: 10px;
            background: rgba(255,255,255,0.8);
            color: #1d1d1f;
        }

        .search-bar:focus,
        .select-input:focus,
        .form-control:focus {
            border-color: #1d1d1f;
            box-shadow: 0 0 0 3px rgba(0,113,227,0.13);
        }

        .timeline-container { border-left-color: rgba(0,0,0,0.09); }
        .timeline-dot { width: 12px; height: 12px; left: -31px; border-width: 3px; }
        .timeline-time { color: #1d1d1f; font-size: 10px; }
        .timeline-title { font-weight: 620; }

        .notif-item {
            padding: 15px;
            border-radius: 13px;
        }

        .notif-item.action-required { background: #fffaf0; border-color: rgba(230,160,0,0.22); }
        .notif-item.starting-soon { background: #f3fbf5; border-color: rgba(40,170,80,0.19); }

        .modal-overlay { background: rgba(0,0,0,0.26); backdrop-filter: blur(14px); }
        .modal-card {
            max-height: 88vh;
            overflow-y: auto;
            border: 1px solid rgba(255,255,255,0.5);
            border-radius: 22px;
            box-shadow: 0 28px 80px rgba(0,0,0,0.2);
        }

        .portal-editor-panel,
        .portal-preview-frame,
        .portal-fullwidth-preview {
            border-color: var(--border);
            border-radius: 18px;
            background: rgba(255,255,255,0.84);
            box-shadow: 0 10px 30px rgba(0,0,0,0.035);
        }

        .bulk-actions-wrapper {
            border-color: var(--border);
            border-radius: 12px;
            background: rgba(0,113,227,0.035);
        }

        #custom-toast {
            border-radius: 14px;
            box-shadow: 0 18px 50px rgba(0,0,0,0.2);
            backdrop-filter: blur(20px);
        }

        .wallet-readiness-card {
            margin-top: 18px;
            padding: 14px;
            border: 1px solid rgba(0, 113, 227, 0.12);
            border-radius: 14px;
            background: rgba(0, 113, 227, 0.045);
        }

        .wallet-status-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 7px;
        }

        .wallet-status-pill {
            padding: 4px 8px;
            border-radius: 999px;
            background: #fff7e6;
            color: #8a5700;
            font-size: 9px;
            font-weight: 700;
            letter-spacing: .055em;
            text-transform: uppercase;
        }

        .wallet-actions {
            width: min(100%, 500px);
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin-top: 18px;
        }

        .wallet-button {
            min-height: 48px;
            padding: 8px 14px;
            border-radius: 12px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            font-family: inherit;
            transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
        }

        .wallet-button:hover {
            transform: translateY(-1px);
            box-shadow: 0 8px 20px rgba(0,0,0,.1);
        }

        .wallet-button.apple {
            border: 1px solid #000;
            background: #000;
            color: white;
        }

        .wallet-button.google {
            border: 1px solid rgba(0,0,0,.13);
            background: white;
            color: #1d1d1f;
        }

        .wallet-brand-icon {
            width: 25px;
            height: 25px;
            display: grid;
            place-items: center;
            border-radius: 7px;
            font-size: 16px;
            font-weight: 750;
            flex-shrink: 0;
        }

        .wallet-button.apple .wallet-brand-icon {
            background: white;
            color: black;
        }

        .wallet-button.google .wallet-brand-icon {
            background: linear-gradient(145deg, #4285f4, #34a853);
            color: white;
        }

        .wallet-button-copy {
            text-align: left;
            line-height: 1.05;
        }

        .wallet-button-copy small {
            display: block;
            margin-bottom: 3px;
            font-size: 8px;
            opacity: .72;
            text-transform: uppercase;
            letter-spacing: .06em;
        }

        .wallet-button-copy strong {
            display: block;
            font-size: 13px;
            font-weight: 650;
        }

        .wallet-prototype-note {
            width: min(100%, 500px);
            margin: 10px 0 0;
            color: #86868b;
            font-size: 10px;
            line-height: 1.45;
            text-align: center;
        }

        .btn-wallet {
            color: #1d1d1f;
            background: #fff;
            border: 1px solid rgba(0,0,0,.12);
        }

        .btn-wallet:hover { background: #f5f5f7; }

        @media (max-width: 1100px) {
            .grid-metrics { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
            .dashboard-layout { grid-template-columns: 1fr; }
        }

        @media (max-width: 820px) {
            body {
                display: block;
                height: auto;
                min-height: 100vh;
                overflow: auto;
            }
            aside {
                position: sticky;
                top: 0;
                z-index: 900;
                width: 100%;
                height: auto;
                padding: 10px 14px;
                border-right: none;
                border-bottom: 1px solid var(--border);
                display: block;
            }
            aside > div:first-child { display: flex; align-items: center; gap: 14px; }
            .brand { flex-shrink: 0; margin: 0; }
            .brand span:last-child { display: none; }
            aside nav { flex-direction: row; overflow-x: auto; gap: 2px; }
            .nav-item { flex-shrink: 0; padding: 9px 10px; }
            .nav-item .nav-label { display: none; }
            .nav-symbol { width: 18px; }
            .account-card { display: none; }
            main { padding: 24px 16px 40px; overflow: visible; }
            header { align-items: flex-start; gap: 14px; }
            .workspace-status { padding-left: 9px; }
            .workspace-name { display: none; }
            .portal-editor-layout { grid-template-columns: 1fr; }
        }

        @media (max-width: 560px) {
            .grid-metrics { grid-template-columns: 1fr 1fr; gap: 10px; }
            .grid-metrics .card { min-height: 78px; padding: 16px; }
            .metric-value { font-size: 25px; }
            .card { padding: 17px; border-radius: 16px; }
            header h1 { font-size: 28px; }
            .event-switch-bar { margin-bottom: 18px; }
            .wallet-actions { grid-template-columns: 1fr; }
        }

        /* ──── ADMIN PROFILE BUTTON (sidebar bottom) ──── */
        .account-card {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 10px;
            border-radius: 10px;
            cursor: pointer;
            transition: background 0.2s;
            border: 1px solid transparent;
        }
        .account-card:hover {
            background: #1f2937;
            border-color: #374151;
        }
        .account-avatar {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            background: var(--primary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 13px;
            color: white;
            flex-shrink: 0;
            overflow: hidden;
        }
        .account-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 50%;
        }
        .account-info { flex: 1; min-width: 0; }
        .account-name {
            font-size: 13px;
            font-weight: 650;
            color: #1d1d1f;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            transition: color 0.2s;
        }
        .account-role {
            font-size: 10px;
            color: #86868b;
            margin-top: 1px;
            transition: color 0.2s;
        }
        .account-card:hover .account-name { color: white; }
        .account-card:hover .account-role { color: #9ca3af; }

        /* ──── PROFILE MODAL ──── */
        .profile-pic-wrap {
            position: relative;
            width: 88px;
            height: 88px;
            margin: 4px auto 14px;
        }
        .profile-pic-circle {
            width: 88px;
            height: 88px;
            border-radius: 50%;
            background: var(--primary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 32px;
            font-weight: 800;
            color: white;
            overflow: hidden;
            border: 3px solid rgba(0,0,0,0.28);
        }
        .profile-pic-circle img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .pic-edit-btn {
            position: absolute;
            bottom: 1px;
            right: 1px;
            width: 26px;
            height: 26px;
            border-radius: 50%;
            background: white;
            border: 2px solid var(--primary);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 12px;
            box-shadow: 0 2px 6px rgba(0,0,0,0.15);
            transition: transform 0.15s;
        }
        .pic-edit-btn:hover { transform: scale(1.12); }

        /* ──── VALIDATION PAGE ──── */
        .val-scanner-wrap {
            width: 100%;
            aspect-ratio: 1 / 1;
            max-height: 220px;
            background: #111827;
            border-radius: 10px;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }
        #qr-video { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
        @keyframes qr-scan-line {
            0%   { top: 8%; }
            50%  { top: 88%; }
            100% { top: 8%; }
        }
        .qr-scan-active::after {
            content: '';
            position: absolute;
            left: 8%; right: 8%;
            height: 2px;
            background: linear-gradient(90deg, transparent, #3b82f6, transparent);
            box-shadow: 0 0 6px #3b82f6;
            animation: qr-scan-line 2s linear infinite;
            pointer-events: none;
            z-index: 10;
        }
        #scan-placeholder {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 20px;
            width: 100%;
        }
        .val-result-card {
            border-radius: 10px;
            padding: 14px 16px;
            border: 2px solid;
        }
        .val-result-card.val-checked-in { background: #ecfdf5; border-color: #6ee7b7; }
        .val-result-card.val-pending    { background: #fffbeb; border-color: #fcd34d; }
        .val-result-card.val-not-found  { background: #fef2f2; border-color: #fca5a5; }
        .val-result-status {
            font-size: 10px; font-weight: 700; text-transform: uppercase;
            letter-spacing: .05em; margin-bottom: 6px;
        }
        .val-checked-in .val-result-status { color: #065f46; }
        .val-pending    .val-result-status { color: #92400e; }
        .val-not-found  .val-result-status { color: #991b1b; }
        .val-result-name { font-size: 20px; font-weight: 800; color: #111827; margin-bottom: 2px; }
        .val-result-meta { font-size: 12px; color: #6b7280; }

        /* ──── EMAIL SETTINGS ──── */
        .ejs-badge {
            display: inline-flex; align-items: center; gap: 5px;
            padding: 3px 8px; border-radius: 99px; font-size: 11px; font-weight: 700;
        }
        .ejs-badge.ok  { background: #d1fae5; color: #065f46; }
        .ejs-badge.off { background: #fef3c7; color: #92400e; }

        /* ──── TICKET CAPACITY BARS (Attendee View) ──── */
        .capacity-overview {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            padding: 14px 20px;
            background: #fff;
            border-radius: 12px;
            border: 1px solid var(--border);
            margin-bottom: 16px;
        }
        .capacity-tile {
            flex: 1;
            min-width: 140px;
            background: #f9fafb;
            border: 1px solid var(--border);
            border-radius: 10px;
            padding: 10px 14px;
        }
        .capacity-tile-label {
            font-size: 12px;
            font-weight: 700;
            color: #374151;
            margin-bottom: 4px;
            display: flex;
            justify-content: space-between;
        }
        .capacity-bar-track {
            height: 6px;
            background: #e5e7eb;
            border-radius: 99px;
            overflow: hidden;
        }
        .capacity-bar-fill {
            height: 100%;
            border-radius: 99px;
            transition: width 0.4s ease;
            background: var(--primary);
        }
        .capacity-bar-fill.full { background: #ef4444; }
        .capacity-bar-fill.near { background: #f59e0b; }
        .capacity-count {
            font-size: 11px;
            color: #6b7280;
            margin-top: 4px;
        }

        /* ──── TICKET TYPE FORM ROWS (Event Creator) ──── */
        .ticket-type-row {
            display: flex;
            gap: 8px;
            align-items: center;
            flex-wrap: wrap;
        }
        .ticket-type-row > * { min-width: 0; }
        .ticket-type-row .tt-capacity { flex: 1 1 90px; }
        .activity-form-row > * { min-width: 0; }

        .profile-section {
            border-top: 1px solid var(--border);
            padding-top: 16px;
            margin-top: 16px;
        }
        .profile-section-title {
            font-size: 11px;
            font-weight: 700;
            text-transform: uppercase;
            color: #9ca3af;
            letter-spacing: 0.06em;
            margin-bottom: 12px;
        }

        /* ──── EVENTS SECTION SUB-TABS (Events / Registrations / Portal) ──── */
        #events-subnav,
        #attendees-subnav {
            display: flex;
            gap: 4px;
            padding: 5px;
            background: rgba(118, 118, 128, 0.12);
            border-radius: 11px;
            margin-bottom: 24px;
            max-width: 560px;
            overflow-x: auto;
            flex-shrink: 0;
        }
        .esub-btn {
            flex: 0 0 auto;
            border: none;
            background: transparent;
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 13px;
            font-weight: 600;
            color: #515154;
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.2s;
        }
        .esub-btn:hover { color: #1d1d1f; }
        .esub-btn.active-tab {
            background: #fff;
            color: var(--primary);
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
        }
        .comms-tab-btn { background: none; border: none; padding: 9px 14px; font-size: 13px; font-weight: 600; color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
        .comms-tab-btn:hover { color: #1f2937; }
        .comms-tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Sponsor banner rotator — used on the in-app Billboard (public board ships the same rules inline).
   Each sponsor banner fills the same fixed 4:1 strip; activateSponsorRotators() cross-fades between
   them one at a time. */
.eq-sponsor-panel { margin: 0 0 12px; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.eq-sponsor-empty { text-align: center; color: #9ca3af; font-size: 12px; padding: 10px 0; }
.eq-sponsor-rotator { position: relative; width: 100%; aspect-ratio: 4 / 1; border-radius: 10px; overflow: hidden; background: #f3f4f6; }
/* All slides are stacked; only the visible one is on top and clickable, so a banner click always
   opens the sponsor currently shown (not whichever slide happens to be last in the DOM). */
.eq-sponsor-slide { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .6s ease; }
.eq-sponsor-slide.is-active { opacity: 1; pointer-events: auto; z-index: 2; }
.eq-sponsor-slide, .eq-sponsor-slide a { display: block; width: 100%; height: 100%; }
.eq-sponsor-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eq-sponsor-name { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; letter-spacing: .02em; font-size: clamp(16px, 3vw, 30px); text-align: center; padding: 0 20px; }
.eq-sponsor-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; border: none; cursor: pointer; width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,.4); color: #fff; font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; }
.eq-sponsor-nav:hover { background: rgba(0,0,0,.6); }
.eq-sponsor-rotator:hover .eq-sponsor-nav { opacity: 1; }
.eq-sponsor-prev { left: 8px; }
.eq-sponsor-next { right: 8px; }
.eq-sponsor-dots { display: flex; gap: 6px; justify-content: center; margin-top: 6px; }
.eq-sponsor-dot { width: 7px; height: 7px; border-radius: 50%; background: #d1d5db; cursor: pointer; }
.eq-sponsor-dot.is-active { background: var(--primary); }
