:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --surface-strong: #eef2ff;
    --text: #162033;
    --muted: #64748b;
    --border: #dbe2ea;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    --radius: 20px;
    --radius-sm: 12px;
    --container: min(1180px, calc(100vw - 32px));
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(96, 165, 250, 0.18), transparent 24%),
        radial-gradient(circle at 85% 10%, rgba(14, 165, 233, 0.12), transparent 18%),
        linear-gradient(180deg, #f8fbff 0%, #eef4fb 45%, #f7fafc 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

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

button {
    cursor: pointer;
}

.container {
    width: var(--container);
    margin: 0 auto;
}

.page-stack {
    display: grid;
    gap: 24px;
    padding: 28px 0 48px;
}

.surface-page .page-stack,
.surface-page .narrow-page,
.dashboard-page .dashboard-layout {
    padding-top: 28px;
    padding-bottom: 48px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    border-bottom: 1px solid rgba(219, 226, 234, 0.9);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
}

.nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 78px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
    font-weight: 700;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #60a5fa);
}

.site-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.site-nav a,
.button-link,
.primary-button,
.secondary-button,
.success-button,
.warning-button,
.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.site-nav a:hover,
.button-link:hover,
.primary-button:hover,
.secondary-button:hover,
.success-button:hover,
.warning-button:hover,
.danger-button:hover {
    transform: translateY(-1px);
}

.site-nav a.is-active {
    color: var(--primary);
}

.button-link,
.secondary-button {
    border-color: var(--border);
    background: var(--surface);
}

.button-link.ghost {
    background: transparent;
}

.primary-button,
.success-button,
.warning-button,
.danger-button {
    color: #fff;
}

.primary-button {
    background: var(--primary);
}

.primary-button:hover {
    background: var(--primary-dark);
}

.success-button {
    background: var(--success);
}

.warning-button {
    background: var(--warning);
}

.danger-button {
    background: var(--danger);
}

.small {
    min-height: 34px;
    padding: 8px 12px;
    font-size: 0.92rem;
}

.full-width {
    width: 100%;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
}

.hero-card,
.section-card,
.panel-card,
.table-card,
.form-card,
.chart-card,
.auth-card,
.invoice-card {
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.hero-card {
    display: grid;
    gap: 24px;
    align-items: start;
    grid-template-columns: 1.3fr 0.9fr;
}

.hero-showcase {
    overflow: hidden;
    position: relative;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(240, 247, 255, 0.94)),
        var(--surface);
}

.hero-showcase::after {
    content: "";
    position: absolute;
    inset: auto -120px -120px auto;
    width: 280px;
    height: 280px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.12), transparent 70%);
    pointer-events: none;
}

.hero-card.center-card,
.auth-card {
    max-width: 720px;
    margin: 0 auto;
    grid-template-columns: 1fr;
}

.hero-copy h1,
.auth-card h1,
.dashboard-content h1,
.section-heading h2,
.detail-main h1 {
    margin: 0;
    line-height: 1.05;
}

.hero-copy h1,
.detail-main h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
}

.hero-text,
.auth-copy,
.panel-card p,
.event-card p,
.empty-card p,
.metric-card span,
.table-card p,
.form-footnote,
.sidebar-status {
    color: var(--muted);
    line-height: 1.7;
}

.eyebrow,
.sidebar-label {
    margin: 0 0 10px;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero-actions,
.card-actions,
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stats-grid,
.role-grid,
.summary-grid,
.event-card-grid,
.chart-grid {
    display: grid;
    gap: 18px;
}

.stats-grid,
.summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.role-grid,
.event-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hero-visuals,
.hero-photo-grid,
.feature-band-grid,
.timeline-grid,
.event-directory-strip,
.admin-media-grid,
.admin-step-grid {
    display: grid;
    gap: 16px;
}

.hero-visuals {
    align-self: stretch;
}

.hero-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 150px;
}

.photo-tile {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.photo-tile img,
.moment-card img,
.event-directory-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-tile::after,
.moment-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.72));
}

.photo-tile-1 {
    grid-row: span 2;
}

.photo-tile-4 {
    grid-column: span 2;
}

.photo-overlay,
.moment-copy {
    position: absolute;
    left: 16px;
    right: 16px;
    z-index: 1;
}

.photo-overlay {
    bottom: 16px;
    display: grid;
    gap: 8px;
    color: #fff;
}

.photo-tag {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
}

.hero-mini-stats {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card-dark {
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.18);
    background: linear-gradient(145deg, #0f172a, #1e293b);
}

.stat-card-dark span {
    color: rgba(226, 232, 240, 0.74);
}

.hero-note {
    max-width: 520px;
}

.feature-band,
.timeline-panel {
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(243, 248, 255, 0.95));
    box-shadow: var(--shadow);
}

.feature-band {
    display: grid;
    gap: 22px;
}

.feature-band-copy h2,
.timeline-panel h2,
.event-directory-copy h1 {
    margin: 0;
}

.feature-band-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.moment-card {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    border-radius: 18px;
}

.moment-copy {
    bottom: 18px;
    display: grid;
    gap: 8px;
    color: #fff;
}

.moment-copy h3 {
    margin: 0;
}

.moment-copy p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.timeline-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.timeline-card {
    position: relative;
    padding: 22px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: #fff;
}

.website-section {
    display: grid;
    gap: 18px;
    padding-top: 6px;
    border-top: 1px solid var(--border);
}

.website-section:first-of-type {
    padding-top: 0;
    border-top: 0;
}

.admin-media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-media-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-media-card {
    display: grid;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: #fff;
}

.admin-media-preview {
    display: grid;
    place-items: center;
    min-height: 220px;
    overflow: hidden;
    border-radius: 16px;
    background: var(--surface-muted);
}

.admin-media-preview.landscape {
    min-height: 170px;
}

.admin-media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.admin-media-empty {
    padding: 18px;
    color: var(--muted);
    text-align: center;
}

.admin-step-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.timeline-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
    border-radius: 14px;
    font-weight: 800;
    color: var(--primary);
    background: #e8f0ff;
}

.timeline-card h3 {
    margin: 0 0 10px;
}

.timeline-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.event-directory-hero {
    display: grid;
    gap: 22px;
    overflow: hidden;
}

.event-directory-copy {
    display: grid;
    gap: 12px;
    max-width: 760px;
}

.event-directory-strip {
    grid-template-columns: 1.1fr 0.9fr 0.9fr;
}

.event-directory-strip img {
    min-height: 230px;
    border-radius: 18px;
    box-shadow: var(--shadow);
}

[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-card,
.metric-card,
.mini-card {
    padding: 18px;
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    border: 1px solid var(--border);
}

.stat-card strong,
.metric-card strong,
.mini-card strong {
    display: block;
    margin-top: 6px;
    font-size: 1.8rem;
}

.section-heading,
.content-header,
.stack-on-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.text-link {
    color: var(--primary);
    font-weight: 600;
}

.filter-bar,
.form-grid,
.content-grid,
.detail-grid,
.invoice-grid {
    display: grid;
    gap: 16px;
}

.filter-bar {
    grid-template-columns: 1.6fr 1fr 1fr;
}

.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-column {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-layout {
    display: grid;
    gap: 24px;
    grid-template-columns: 280px 1fr;
}

.dashboard-sidebar {
    position: sticky;
    top: 96px;
    align-self: start;
    display: grid;
    gap: 22px;
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.sidebar-nav {
    display: grid;
    gap: 10px;
}

.sidebar-nav a {
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--muted);
}

.sidebar-nav a.is-active,
.sidebar-nav a:hover {
    color: var(--primary);
    background: var(--surface-strong);
}

.dashboard-content {
    display: grid;
    gap: 22px;
}

.event-card,
.empty-card {
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
}

.event-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 0.95rem;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: capitalize;
    color: var(--primary);
    background: #e8f0ff;
}

.tag-success {
    color: var(--success);
    background: #eaf7ee;
}

.tag-warning {
    color: var(--warning);
    background: #fff4e5;
}

.tag-danger {
    color: var(--danger);
    background: #fdecec;
}

.compact-list {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.compact-list div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--muted);
}

.compact-list dt {
    font-weight: 600;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

.detail-main,
.detail-side,
.subsection {
    display: grid;
    gap: 16px;
}

.sticky-panel {
    position: sticky;
    top: 100px;
}

.stack-form {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 8px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}

textarea {
    resize: vertical;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.checkbox-row input {
    width: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stack-actions {
    display: grid;
    gap: 10px;
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chart-card canvas {
    width: 100%;
    min-height: 260px;
    max-height: 320px;
}

.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid var(--border);
}

.flash-success {
    color: #0f5132;
    background: #e8f8ef;
}

.flash-error {
    color: #7f1d1d;
    background: #feecec;
}

.flash-close {
    border: 0;
    background: transparent;
    font-size: 1.25rem;
}

.auth-shell,
.narrow-page {
    padding: 28px 0 48px;
}

.demo-box,
.error-box {
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--surface-muted);
    border: 1px solid var(--border);
}

.invoice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-footer {
    border-top: 1px solid var(--border);
    background: #fff;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0 28px;
    color: var(--muted);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

@media (max-width: 1100px) {
    .hero-card,
    .detail-layout,
    .dashboard-layout,
    .two-column,
    .chart-grid,
    .feature-band-grid,
    .timeline-grid,
    .event-directory-strip,
    .admin-media-grid,
    .admin-media-grid.compact,
    .admin-step-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar,
    .sticky-panel {
        position: static;
    }

    .hero-photo-grid {
        grid-auto-rows: 180px;
    }

    .photo-tile-1,
    .photo-tile-4 {
        grid-column: auto;
        grid-row: auto;
    }
}

@media (max-width: 840px) {
    .nav-toggle {
        display: inline-block;
    }

    .site-nav {
        position: absolute;
        top: 78px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border: 1px solid var(--border);
        border-radius: 18px;
        background: #fff;
        box-shadow: var(--shadow);
    }

    .site-nav.is-open {
        display: flex;
    }

    .role-grid,
    .event-card-grid,
    .stats-grid,
    .summary-grid,
    .filter-bar,
    .three-column,
    .invoice-grid,
    .hero-mini-stats {
        grid-template-columns: 1fr;
    }

    .section-heading,
    .content-header,
    .stack-on-mobile,
    .footer-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100vw - 20px, 100%);
    }

    .hero-card,
    .section-card,
    .panel-card,
    .table-card,
    .form-card,
    .chart-card,
    .auth-card,
    .invoice-card,
    .dashboard-sidebar {
        padding: 20px;
    }

    th,
    td {
        padding: 12px 8px;
    }

    table,
    thead,
    tbody,
    th,
    td,
    tr {
        display: block;
    }

    thead {
        display: none;
    }

    tr {
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
    }

    td {
        border: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .feature-band,
    .timeline-panel {
        padding: 22px;
    }
}
