        body {
            background: linear-gradient(145deg, var(--color-charcoal) 0%, var(--color-night) 100%);
            padding: 20px;
            min-height: 100vh;
        }

        .container {
            max-width: 1100px;
            margin: 0 auto;
        }

        /* Header */
        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 40px;
            padding-bottom: 20px;
            border-bottom: 1px solid rgba(212, 168, 83, 0.15);
        }

        .logo {
            font-size: 24px;
            font-weight: 600;
            font-family: var(--font-display);
            color: var(--color-amber);
            text-decoration: none;
        }

        .logo:hover {
            color: var(--color-amber-light);
        }

        .user-info-link {
            text-decoration: none;
            color: inherit;
            cursor: pointer;
            transition: opacity 0.2s;
        }

        .user-info-link:hover {
            opacity: 0.8;
        }

        .user-menu {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .user-info {
            text-align: right;
        }

        .user-name {
            font-weight: 500;
            color: var(--color-cream);
        }

        .user-role {
            font-size: 12px;
            color: #a39e96;
        }

        /* Buttons */
        .btn {
            padding: 12px 24px;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-family: var(--font-body);
        }

        .btn-primary {
            background: var(--color-amber);
            color: var(--color-charcoal);
        }

        .btn-primary:hover {
            background: var(--color-amber-light);
            transform: translateY(-2px);
            box-shadow: 0 8px 16px rgba(212, 168, 83, 0.3);
        }

        .btn-secondary {
            background: rgba(45, 42, 38, 0.8);
            color: var(--color-cream);
            border: 1px solid rgba(212, 168, 83, 0.2);
        }

        .btn-secondary:hover {
            background: rgba(212, 168, 83, 0.1);
            border-color: rgba(212, 168, 83, 0.4);
        }

        .btn-outline {
            background: transparent;
            color: var(--color-cream);
            border: 1px solid rgba(212, 168, 83, 0.3);
        }

        .btn-outline:hover {
            background: rgba(212, 168, 83, 0.1);
            border-color: var(--color-amber);
        }

        .btn-sm {
            padding: 8px 16px;
            font-size: 13px;
        }

        /* Welcome */
        .welcome-section {
            margin-bottom: 32px;
        }

        .welcome-title {
            font-size: 32px;
            font-weight: 600;
            font-family: var(--font-display);
            margin-bottom: 4px;
        }

        /* ============================================
           Main Content Grid
           ============================================ */
        .main-grid {
            display: grid;
            grid-template-columns: 1fr 340px;
            gap: 32px;
            margin-bottom: 40px;
        }

        @media (max-width: 900px) {
            .main-grid {
                grid-template-columns: 1fr;
            }
        }

        /* ============================================
           GO LIVE Section - The Hero
           ============================================ */
        .go-live-section {
            min-height: 280px;
        }

        .go-live-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .go-live-title {
            font-size: 15px;
            font-weight: 600;
            color: var(--color-amber);
            text-transform: uppercase;
            letter-spacing: 1px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .go-live-title::before {
            content: '';
            width: 8px;
            height: 8px;
            background: var(--color-amber);
            border-radius: 50%;
            animation: pulse-glow 2s ease-in-out infinite;
        }

        @keyframes pulse-glow {
            0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(212, 168, 83, 0.4); }
            50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(212, 168, 83, 0); }
        }

        .events-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 16px;
        }

        .event-card {
            background: linear-gradient(145deg, rgba(45, 42, 38, 0.8), rgba(35, 32, 28, 0.95));
            border: 1px solid rgba(212, 168, 83, 0.15);
            border-radius: 16px;
            padding: 20px;
            position: relative;
            overflow: hidden;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
        }

        .event-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--color-amber) 0%, rgba(212, 168, 83, 0.2) 100%);
            opacity: 0;
            transition: opacity 0.25s ease;
        }

        .event-card:hover {
            border-color: rgba(212, 168, 83, 0.4);
            transform: translateY(-4px);
            box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.5);
        }

        .event-card:hover::before {
            opacity: 1;
        }

        .event-name {
            font-family: var(--font-display);
            font-size: 18px;
            font-weight: 600;
            color: var(--color-cream);
            margin: 0 0 4px 0;
            line-height: 1.3;
        }

        .event-meta {
            font-size: 13px;
            color: #a39e96;
            line-height: 1.5;
        }

        .event-meta .live-badge {
            vertical-align: middle;
            position: relative;
            top: -1px;
        }

        .event-status-detail {
            color: #6a655e;
        }

        .event-actions {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: auto;
            padding-top: 12px;
        }

        .btn-go-live {
            background: linear-gradient(135deg, var(--color-amber) 0%, #c9963d 100%);
            color: var(--color-charcoal);
            font-weight: 600;
            padding: 8px 16px;
            border-radius: 8px;
            border: none;
            cursor: pointer;
            transition: all 0.2s ease;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
            white-space: nowrap;
        }

        .btn-go-live:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px -2px rgba(212, 168, 83, 0.4);
        }

        .btn-go-live .live-dot {
            width: 6px;
            height: 6px;
            background: currentColor;
            border-radius: 50%;
        }

        .event-actions-secondary {
            display: flex;
            align-items: center;
            gap: 2px;
            margin-left: auto;
        }

        .action-icon {
            background: none;
            border: none;
            cursor: pointer;
            padding: 6px;
            border-radius: 6px;
            line-height: 1;
            transition: all 0.15s ease;
            text-decoration: none;
            color: #6a655e;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .action-icon svg {
            width: 15px;
            height: 15px;
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .action-icon:hover {
            background: rgba(212, 168, 83, 0.1);
            color: var(--color-amber);
        }

        /* Empty state for events */
        .events-empty {
            background: linear-gradient(145deg, rgba(45, 42, 38, 0.5), rgba(35, 32, 28, 0.7));
            border: 1px solid rgba(212, 168, 83, 0.15);
            border-radius: 16px;
            padding: 40px 24px;
            text-align: center;
        }

        .events-empty-icon {
            width: 64px;
            height: 64px;
            margin: 0 auto 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--color-amber);
            background: radial-gradient(circle, rgba(212, 168, 83, 0.16) 0%, transparent 70%);
            border-radius: 50%;
        }

        .events-empty-icon svg {
            width: 34px;
            height: 34px;
            stroke: currentColor;
            fill: none;
            stroke-width: 1.5;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .events-empty h3 {
            font-family: var(--font-display);
            font-size: 22px;
            color: var(--color-cream);
            margin: 0 0 8px 0;
        }

        .events-empty p {
            color: #a39e96;
            margin: 0 0 24px 0;
            font-size: 14px;
            line-height: 1.6;
            max-width: 320px;
            margin-left: auto;
            margin-right: auto;
        }

        /* ============================================
           Sidebar - Quick Start Guide
           ============================================ */
        .sidebar {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .onboarding-card {
            background: linear-gradient(145deg, rgba(45, 42, 38, 0.6), rgba(35, 32, 28, 0.8));
            border: 1px solid rgba(212, 168, 83, 0.12);
            border-radius: 16px;
            padding: 24px;
        }

        .onboarding-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 16px;
        }

        .onboarding-card-title {
            font-family: var(--font-display);
            font-size: 18px;
            color: var(--color-cream);
            margin: 0;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .onboarding-dismiss {
            background: none;
            border: none;
            color: #a39e96;
            font-size: 18px;
            line-height: 1;
            cursor: pointer;
            padding: 4px;
        }

        .onboarding-dismiss:hover {
            color: var(--color-cream);
        }

        .onboarding-success {
            font-size: 13px;
            color: var(--color-success, #4a9d6e);
            margin: 0 0 12px 0;
        }

        .onboarding-steps {
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .onboarding-step {
            display: flex;
            gap: 12px;
            padding: 12px 0;
            border-bottom: 1px solid rgba(212, 168, 83, 0.08);
        }

        .onboarding-step:last-child {
            border-bottom: none;
            padding-bottom: 0;
        }

        .onboarding-step-icon {
            width: 24px;
            height: 24px;
            background: rgba(212, 168, 83, 0.15);
            color: var(--color-amber);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 600;
            flex-shrink: 0;
        }

        .onboarding-step.done .onboarding-step-icon {
            background: rgba(74, 157, 110, 0.2);
            color: var(--color-success, #4a9d6e);
        }

        .onboarding-step-content {
            flex: 1;
        }

        .onboarding-step-title {
            font-weight: 500;
            color: var(--color-cream);
            font-size: 14px;
            margin-bottom: 2px;
        }

        .onboarding-step.done .onboarding-step-title {
            color: #a39e96;
            text-decoration: line-through;
        }

        .onboarding-step-desc {
            font-size: 12px;
            color: #a39e96;
            line-height: 1.4;
        }

        .onboarding-step-link {
            margin-top: 8px;
            padding: 8px 10px;
            border: 1px solid rgba(212, 168, 83, 0.25);
            border-radius: 6px;
            background: rgba(212, 168, 83, 0.06);
            font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
            font-size: 12px;
            color: #d4a853;
            overflow-wrap: anywhere;
        }

        .onboarding-step-action {
            margin-top: 6px;
            font-size: 12px;
        }

        .onboarding-step-status {
            margin-top: 6px;
            font-size: 12px;
        }

        .onboarding-step-status.success {
            color: var(--color-success, #4a9d6e);
        }

        .onboarding-step-status.error {
            color: #c45d3e;
        }

        .onboarding-guide-link {
            display: inline-block;
            margin-top: 16px;
            font-size: 13px;
        }

        /* Church Quick Links */
        .churches-card {
            background: linear-gradient(145deg, rgba(45, 42, 38, 0.6), rgba(35, 32, 28, 0.8));
            border: 1px solid rgba(212, 168, 83, 0.12);
            border-radius: 16px;
            padding: 20px;
        }

        .churches-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
        }

        .churches-card-title {
            font-size: 13px;
            font-weight: 600;
            color: #a39e96;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin: 0;
        }

        .churches-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .churches-tools {
            display: flex;
            flex-direction: column;
            gap: 10px;
            margin-bottom: 12px;
        }

        .churches-count {
            font-size: 11px;
            color: #7b746b;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .churches-search {
            width: 100%;
            padding: 9px 12px;
            border-radius: 8px;
            border: 1px solid rgba(212, 168, 83, 0.2);
            background: rgba(255, 255, 255, 0.04);
            color: var(--color-cream);
            font-size: 13px;
            font-family: var(--font-body);
            outline: none;
        }

        .churches-search::placeholder {
            color: #736d66;
        }

        .churches-search:focus {
            border-color: rgba(212, 168, 83, 0.5);
            background: rgba(255, 255, 255, 0.08);
        }

        .churches-scroll {
            max-height: min(58vh, 540px);
            overflow-y: auto;
            padding-right: 4px;
        }

        .churches-scroll::-webkit-scrollbar {
            width: 6px;
        }

        .churches-scroll::-webkit-scrollbar-track {
            background: transparent;
        }

        .churches-scroll::-webkit-scrollbar-thumb {
            background: rgba(212, 168, 83, 0.25);
            border-radius: 999px;
        }

        .church-chip {
            background: rgba(45, 42, 38, 0.5);
            border: 1px solid rgba(212, 168, 83, 0.1);
            border-radius: 8px;
            padding: 12px 14px;
            display: flex;
            align-items: center;
            gap: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            text-decoration: none;
            color: inherit;
        }

        .church-chip:hover {
            background: rgba(212, 168, 83, 0.08);
            border-color: rgba(212, 168, 83, 0.25);
        }

        .church-chip-name {
            font-weight: 500;
            color: var(--color-cream);
            font-size: 14px;
        }

        .church-chip-meta {
            font-size: 11px;
            color: #6a655e;
            text-transform: uppercase;
        }

        .church-chip-arrow {
            color: #6a655e;
            font-size: 12px;
            margin-left: auto;
        }

        .church-status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            flex-shrink: 0;
        }

        .church-status-dot-live {
            background: var(--color-success);
            animation: pulse-glow 2s ease-in-out infinite;
        }

        .church-status-dot-standby {
            background: #f59e0b;
            box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
        }

        .church-status-dot-offline {
            background: #fb923c;
            box-shadow: 0 0 12px rgba(251, 146, 60, 0.3);
        }

        .churches-empty-inline {
            color: #6a655e;
            font-size: 13px;
            text-align: center;
            padding: 12px;
        }

        .churches-empty-inline a {
            color: var(--color-amber);
            text-decoration: none;
        }

        .churches-empty-inline a:hover {
            text-decoration: underline;
        }

        /* Invitations Banner */
        .invitations-banner {
            background: rgba(212, 168, 83, 0.08);
            border: 1px solid rgba(212, 168, 83, 0.2);
            border-radius: 12px;
            padding: 16px 20px;
            margin-bottom: 24px;
        }

        .invitations-banner.hidden {
            display: none;
        }

        .invitations-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 12px;
        }

        .invitations-title {
            color: var(--color-amber);
            font-size: 15px;
            font-weight: 600;
            margin: 0;
        }

        .invitation-item {
            background: rgba(45, 42, 38, 0.5);
            border: 1px solid rgba(212, 168, 83, 0.15);
            border-radius: 8px;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            margin-bottom: 8px;
        }

        .invitation-item:last-child {
            margin-bottom: 0;
        }

        .invitation-info {
            flex: 1;
        }

        .invitation-church {
            font-weight: 600;
            color: var(--color-cream);
            margin-bottom: 2px;
        }

        .invitation-details {
            font-size: 13px;
            color: #a39e96;
        }

        .invitation-actions {
            display: flex;
            gap: 8px;
        }

        /* Admin Section */
        .admin-section {
            background: rgba(45, 42, 38, 0.3);
            border: 1px solid rgba(212, 168, 83, 0.1);
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 40px;
        }

        .admin-section.hidden {
            display: none;
        }

        .admin-section .section-title {
            font-size: 13px;
            font-weight: 600;
            color: #a39e96;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin: 0 0 12px 0;
        }

        .admin-actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        /* Loading & Empty States */
        .loading {
            text-align: center;
            padding: 40px;
            color: #a39e96;
        }

        .spinner {
            border: 3px solid rgba(255, 255, 255, 0.1);
            border-top-color: var(--color-amber);
            border-radius: 50%;
            width: 32px;
            height: 32px;
            animation: spin 1s linear infinite;
            margin: 0 auto 12px;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* Footer */
        .footer {
            text-align: center;
            padding: 32px 0;
            border-top: 1px solid rgba(212, 168, 83, 0.08);
            color: #5a554e;
            font-size: 13px;
        }

        .footer a {
            color: #a39e96;
            text-decoration: none;
        }

        .footer a:hover {
            color: var(--color-amber);
        }

        .footer-links {
            display: flex;
            justify-content: center;
            gap: 24px;
            margin-bottom: 12px;
        }

        /* Hide elements */
        .hidden {
            display: none !important;
        }

        /* Live badge on event cards */
        .live-badge {
            display: inline-flex;
            align-items: center;
            border: none;
            font-size: 10px;
            font-weight: 600;
            padding: 2px 6px;
            border-radius: 3px;
            flex-shrink: 0;
            text-transform: uppercase;
            letter-spacing: 0.3px;
            line-height: 1.4;
        }

        .live-badge.state-live {
            background: rgba(74, 157, 110, 0.22);
            color: #8fd3ab;
            animation: pulse-live 2s ease-in-out infinite;
        }

        .live-badge.state-standby {
            background: rgba(245, 158, 11, 0.2);
            color: #fcd34d;
        }

        .live-badge.state-offline {
            background: rgba(251, 146, 60, 0.2);
            color: #fdba74;
        }

        @keyframes pulse-live {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.7; }
        }

        .btn-go-live.live-active {
            background: linear-gradient(135deg, #4a9d6e 0%, #3d8159 100%);
            color: #f7fbf8;
        }

        .btn-go-live.standby-active {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            color: #1f1506;
        }

        .btn-go-live.offline-active {
            background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
            color: #fff8f0;
        }

        /* Responsive */
        @media (max-width: 768px) {
            .header {
                flex-direction: column;
                gap: 16px;
                text-align: center;
            }

            .user-menu {
                flex-direction: column;
            }

            .user-info {
                text-align: center;
            }

            .events-grid {
                grid-template-columns: 1fr;
            }
        }

        @media (max-width: 900px) {
            .churches-scroll {
                max-height: none;
                overflow: visible;
                padding-right: 0;
            }
        }

/* The church is the working context; account management lives in the profile. */
.workspace-description { margin: 10px 0 0; max-width: 65ch; color: #c4bdb3; font-size: 15px; line-height: 1.6; }
.welcome-title { overflow-wrap: anywhere; }
.church-switcher { display: flex; align-items: center; gap: 12px; margin-top: 22px; }
.church-switcher label { color: #c4bdb3; font-size: 14px; flex-shrink: 0; }
.church-switcher select { min-height: 44px; max-width: min(100%, 420px); min-width: 0; padding: 10px 36px 10px 12px; font: inherit; color: #faf8f5; background: #1a1714; border: 1px solid #71675b; border-radius: 8px; }
.workspace-nav { display: flex; gap: 28px; margin-top: 24px; border-bottom: 1px solid #4a4543; }
.workspace-nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 2px 12px; color: #c4bdb3; text-decoration: none; border-bottom: 2px solid transparent; font-size: 15px; }
.workspace-nav a[aria-current="page"] { color: #e8c078; border-bottom-color: #d4a853; }
.workspace-nav a:hover { color: #faf8f5; }
.workspace-help { padding: 8px 4px; }
.workspace-help h3 { margin: 0 0 10px; font-size: 16px; line-height: 1.5; color: #f0ebe3; }
.workspace-help p { margin: 0 0 16px; color: #c4bdb3; font-size: 14px; line-height: 1.7; }
.workspace-help a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: #e8c078; text-underline-offset: 4px; }
.workspace-help .workspace-help-note { margin-top: 16px; font-size: 13px; }
.workspace-error { padding: 24px 0; color: #f0ebe3; }
.workspace-error p { margin-bottom: 16px; }
.dashboard-page :is(a, button, select):focus-visible { outline: 2px solid #e8c078; outline-offset: 4px; }
.dashboard-page .event-meta { overflow-wrap: anywhere; }
.dashboard-page .go-live-title { margin: 0; }
@media (max-width: 600px) {
  .church-switcher { align-items: stretch; flex-direction: column; gap: 8px; }
  .church-switcher select { width: 100%; max-width: 100%; }
  .workspace-nav { gap: 24px; }
  .workspace-help { padding-top: 16px; }
}

.dashboard-page .events-empty { background: none; border: 0; border-radius: 0; padding: 32px 12px; }
.dashboard-page .events-empty-icon { box-shadow: none; background: none; }
.dashboard-page .action-icon { min-width: 44px; min-height: 44px; color: #c4bdb3; }
.dashboard-page .event-actions { flex-wrap: wrap; }
.dashboard-page .onboarding-guide-link { color: #e8c078; text-underline-offset: 4px; }
.dashboard-page .onboarding-card:not(.hidden) + .workspace-help { display: none; }
@media (max-width: 768px) {
  .app-page.dashboard-page .user-info { display: block; text-align: left; }
  .app-page.dashboard-page .user-menu { width: 100%; flex-direction: row; justify-content: space-between; }
  .app-page.dashboard-page .user-info-link { min-width: 0; min-height: 44px; }
  .app-page.dashboard-page .user-name { overflow-wrap: anywhere; }
  .app-page.dashboard-page .go-live-header { flex-direction: row; align-items: center; flex-wrap: wrap; }
}

/* Optional commitment after a positively rated service. */
.trial-commitment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--color-stone);
    border-radius: 12px;
    background: var(--color-charcoal);
}
.trial-commitment[hidden] { display: none; }
.trial-commitment-copy { flex: 1 1 420px; min-width: 0; }
.trial-commitment h2 { margin: 0 0 8px; font-size: 20px; }
.trial-commitment p { margin: 0; max-width: 70ch; line-height: 1.6; }
.trial-commitment .trial-commitment-terms { margin-top: 8px; color: var(--color-pearl); font-size: 14px; }
.trial-commitment-actions { display: flex; flex-wrap: wrap; gap: 10px; }
