/* ============================================================
   CANTUS — Design System
   Palette: Navy #1B2B4B | Gold #C9A84C | Ivory #FAF7F2 | Cream #F2EDE4
   Typography: Inter (body, UI) | Playfair Display (display, headings)
   ============================================================ */

/* ── Tokens ──────────────────────────────────────────────── */
:root {
  --navy:      #1B2B4B;
  --navy-dark: #111d33;
  --navy-mid:  #243659;
  --gold:      #C9A84C;
  --gold-lt:   #dfc07a;
  --ivory:     #FAF7F2;
  --cream:     #F2EDE4;
  --cream-dk:  #e8e0d3;
  --sand:      #D9CFC2;
  --text:      #2c2c2c;
  --text-muted:#6b6b6b;
  --white:     #ffffff;

  /* Font families */
  --font-sans:  'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  /* Font size scale (standardized) */
  --text-xs:   0.75rem;   /* 12px — labels, badges, captions */
  --text-sm:   0.875rem;  /* 14px — nav, buttons, small body */
  --text-base: 1rem;      /* 16px — body default */
  --text-md:   0.9375rem; /* 15px — form inputs, secondary text */
  --text-lg:   1.125rem;  /* 18px — subtitles, card titles */
  --text-xl:   1.25rem;   /* 20px — section subtitles */
  --text-2xl:  1.5rem;    /* 24px — page titles */
  --text-3xl:  1.75rem;   /* 28px — large headings */
  --text-4xl:  2rem;      /* 32px — stats, hero elements */
  --text-display: clamp(2.25rem, 5vw, 3.5rem);  /* Hero title */
  --text-display-sm: clamp(1.75rem, 3vw, 2.5rem); /* Section title */

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 4px rgba(27,43,75,.08);
  --shadow:    0 4px 20px rgba(27,43,75,.12);
  --shadow-lg: 0 12px 48px rgba(27,43,75,.18);

  --transition: 200ms ease;
}

/* ── Reset / Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  line-height: 1.2;
  color: var(--navy);
}

/* ── Layout ──────────────────────────────────────────────── */
.layout-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.layout-main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding-block: 80px;
}

.section--sm {
  padding-block: 48px;
}

/* ── Navigation ──────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.nav-logo {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--white);
  letter-spacing: .02em;
  flex-shrink: 0;
}

.nav-logo span {
  color: var(--gold);
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
  flex: 1;
}

.nav-links a {
  display: block;
  padding: 6px 14px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255,255,255,.75);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,.1);
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Admin dropdown in nav — match outline-white style */
.nav-auth .admin-dropdown-wrapper .e-btn {
  background: transparent !important;
  color: var(--white) !important;
  border-color: rgba(255,255,255,.6) !important;
}
.nav-auth .admin-dropdown-wrapper .e-btn:hover {
  background: rgba(255,255,255,.12) !important;
  border-color: var(--white) !important;
  color: var(--white) !important;
}

/* Mobile menu toggle + drawer (desktop: drawer is inline flex row) */
.nav-menu-toggle {
  display: none;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  color: var(--white);
}

.nav-menu-toggle:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.nav-menu-toggle-bars {
  position: relative;
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
}

.nav-menu-toggle-bars::before,
.nav-menu-toggle-bars::after {
  content: '';
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
}

.nav-menu-toggle-bars::before { top: -7px; }
.nav-menu-toggle-bars::after { top: 7px; }

.nav-backdrop {
  display: none;
}

.nav-drawer {
  display: flex;
  flex-direction: row;
  flex: 1;
  align-items: center;
  min-width: 0;
  gap: 0;
}

html.nav-scroll-lock,
html.nav-scroll-lock body {
  overflow: hidden;
}

@media (max-width: 960px) {
  .nav-inner {
    gap: 12px;
    flex-wrap: nowrap;
  }

  .nav-menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 250;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
  }

  .nav-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-drawer {
    position: fixed;
    top: 64px;
    right: 0;
    bottom: 0;
    left: auto;
    flex: none;
    flex-direction: column;
    align-items: stretch;
    width: min(320px, calc(100vw - 48px));
    max-width: 100%;
    padding: 16px 20px 24px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    background: var(--navy-mid);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
    z-index: 260;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    gap: 20px;
  }

  .nav-drawer.is-open {
    transform: translateX(0);
  }

  .nav-links {
    flex-direction: column;
    flex: 0 0 auto;
    gap: 4px;
  }

  .nav-links a {
    min-height: 44px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
  }

  .nav-auth {
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .nav-auth-account {
    justify-content: flex-start !important;
    width: 100%;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-auth-logout-form {
    width: 100%;
  }

  .nav-auth-logout {
    width: 100%;
  }

  .nav-auth .admin-dropdown-wrapper {
    width: 100%;
  }

  .nav-auth .admin-dropdown-wrapper .e-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn-primary:hover:not(:disabled) {
  background: var(--gold-lt);
  border-color: var(--gold-lt);
  color: var(--navy);
  box-shadow: 0 4px 16px rgba(201,168,76,.35);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-navy:hover:not(:disabled) {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover:not(:disabled) {
  background: var(--navy);
  color: var(--white);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.6);
}
.btn-outline-white:hover:not(:disabled) {
  background: rgba(255,255,255,.12);
  border-color: var(--white);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  padding-inline: 12px;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--cream);
  color: var(--navy);
}

.btn-sm {
  padding: 6px 14px;
  font-size: var(--text-sm);
}

.btn-lg {
  padding: 14px 32px;
  font-size: var(--text-base);
}

/* ── Hero Section ────────────────────────────────────────── */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, #2a4270 100%);
  color: var(--white);
  padding-block: 100px 80px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M40 40 L80 0 L80 80 Z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: var(--text-display);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-title em {
  font-style: italic;
  color: var(--gold);
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,.75);
  margin-bottom: 36px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-ornament {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  border: 2px solid rgba(201,168,76,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8rem;
  position: relative;
}

.hero-ornament::before {
  content: '';
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,.15);
}

/* ── Section Headers ─────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 52px;
}

.section-eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: var(--text-display-sm);
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 12px;
}

.section-lead {
  font-size: var(--text-md);
  color: var(--text-muted);
  max-width: 560px;
  margin-inline: auto;
}

/* ── Concert / Event Cards ───────────────────────────────── */
.concert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 24px;
}

.concert-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--cream-dk);
  transition: transform var(--transition), box-shadow var(--transition);
}

.concert-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.concert-card-header {
  background: var(--navy);
  color: var(--white);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.concert-date {
  text-align: center;
  flex-shrink: 0;
  background: var(--gold);
  color: var(--navy);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  min-width: 56px;
}

.concert-date-day {
  display: block;
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: 700;
  line-height: 1;
}

.concert-date-month {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top: 2px;
}

.concert-info-title {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  color: var(--white);
  margin-bottom: 4px;
}

.concert-info-meta {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.65);
}

.concert-card-body {
  padding: 20px 24px;
}

.concert-card-desc {
  font-size: var(--text-md);
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

/* ── News Cards ──────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.news-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--cream-dk);
  transition: transform var(--transition), box-shadow var(--transition);
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.news-card-body {
  padding: 24px;
}

.news-card-date {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.news-card-title {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
  line-height: 1.35;
}

.news-card-excerpt {
  font-size: var(--text-md);
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── About Section ───────────────────────────────────────── */
.about-section {
  background: var(--cream);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 36px;
}

.stat-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 24px;
  border-left: 3px solid var(--gold);
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-family: var(--font-serif);
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Join Section ────────────────────────────────────────── */
.join-section {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--white);
  text-align: center;
  padding-block: 80px;
}

.join-section .section-title {
  color: var(--white);
}

.join-section .section-lead {
  color: rgba(255,255,255,.75);
}

.join-section .section-eyebrow {
  color: var(--gold);
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.65);
  padding-block: 48px calc(28px + env(safe-area-inset-bottom, 0px));
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 12px;
}

.footer-brand span { color: var(--gold); }

.footer-desc {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: rgba(255,255,255,.5);
}

.footer-heading {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.55);
  transition: color var(--transition);
}

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

.footer-bottom {
  font-size: var(--text-sm);
  text-align: center;
  color: rgba(255,255,255,.35);
  padding-block: 28px;
}

/* ── Auth Pages ──────────────────────────────────────────── */
.auth-page {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.auth-logo span { color: var(--gold); }

.auth-subtitle {
  text-align: center;
  font-size: var(--text-md);
  color: var(--text-muted);
  margin-bottom: 32px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block: 20px;
  color: var(--sand);
  font-size: var(--text-sm);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cream-dk);
}

.auth-footer-text {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: 20px;
}

.auth-footer-text a {
  color: var(--navy);
  font-weight: 600;
}

.auth-footer-text a:hover { color: var(--gold); }

/* ── Form Fields ─────────────────────────────────────────── */
.form-field {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-sans);
  font-size: var(--text-md);
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--cream-dk);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}

.form-input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(27,43,75,.1);
}

.form-input::placeholder { color: var(--sand); }

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6b6b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-input-error { border-color: #dc3545; }
.form-error-msg {
  font-size: var(--text-sm);
  color: #dc3545;
  margin-top: 4px;
}

/* ── Badges / Tags ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .02em;
}

.badge-gold { background: rgba(201,168,76,.15); color: #8a6a1c; }
.badge-navy { background: rgba(27,43,75,.1); color: var(--navy); }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-gray { background: var(--cream); color: var(--text-muted); }

/* Horizontal scroll for wide Syncfusion grids on small viewports */
.cantus-grid-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.cantus-admin-search-box {
  width: 100%;
  max-width: 280px;
}

@media (max-width: 640px) {
  .cantus-admin-search-box {
    max-width: none;
  }
}

.cantus-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

@media (max-width: 640px) {
  .cantus-toolbar-row {
    flex-direction: column;
    align-items: stretch;
  }

  .cantus-toolbar-row .e-btn,
  .cantus-toolbar-row .equal-width-btn {
    width: 100% !important;
    max-width: none;
  }
}

/* ── equal-width-btn (Syncfusion action buttons) ─────────── */
.equal-width-btn {
  width: 130px;
  justify-content: center;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  transition: background-color 200ms;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e5e7eb;
  color: #1f2937;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
}
.equal-width-btn:hover { background: #d1d5db; }

/* ── Page headers (member/manage areas) ──────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  color: var(--navy);
}

/* ── Cards (generic) ─────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--cream-dk);
  overflow: hidden;
}

.card-body { padding: 24px; }
.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--cream-dk);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Alerts / Messages ───────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--text-md);
  margin-bottom: 16px;
  border: 1px solid transparent;
}

.alert-success { background: #d1fae5; border-color: #6ee7b7; color: #065f46; }
.alert-error   { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.alert-info    { background: #dbeafe; border-color: #93c5fd; color: #1e40af; }
.alert-warning { background: #fef3c7; border-color: #fcd34d; color: #92400e; }

/* ── Ornamental divider ──────────────────────────────────── */
.ornament {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-block: 24px;
  color: var(--gold);
  font-size: var(--text-md);
}

.ornament::before,
.ornament::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }
  .about-inner { grid-template-columns: 1fr; gap: 36px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .section { padding-block: 56px; }
}

@media (max-width: 640px) {
  .section { padding-block: 52px; }
  .container { padding-inline: 16px; }
  .hero { padding-block: 64px 52px; }
  .auth-card { padding: 28px 20px; }
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .concert-grid {
    gap: 16px;
  }
}

/* ── Blazor-specific ─────────────────────────────────────── */
.blazor-error-boundary {
  background: #b32121;
  color: white;
  padding: 1rem 1rem 1rem 3.7rem;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjYyNTIgMjU5Ljk2MSA1Mi43OTg1IDI2MC40MDcgNTIuMjY1OEMyNjEuMiA1MS40ODM3IDI2Mi4yOTYgNTEgMjYzLjUwNiA1MVpNMjYzLjU4NiA2Ni4wMTgzQzI2MC43MzcgNjYuMDE4MyAyNTkuMzEzIDY3LjEyNDUgMjU5LjMxMyA2OS4zMzcgMjU5LjMxMyA2OS42MTAyIDI1OS4zMzIgNjkuODYwOCAyNTkuMzcxIDcwLjA4ODdMMjYxLjc5NSA4NC4wMTYxIDI2NS4zOCA4NC4wMTYxIDI2Ny44MjEgNjkuNzQ3NUMyNjcuODYgNjkuNzMwOSAyNjcuODc5IDY5LjU4NzcgMjY3Ljg3OSA2OS4zMTc5IDI2Ny44NzkgNjcuMTE4MiAyNjYuNDQ4IDY2LjAxODMgMjYzLjU4NiA2Ni4wMTgzWk0yNjMuNTc2IDg2LjA1NDdDMjYxLjA0OSA4Ni4wNTQ3IDI1OS43ODYgODcuMzAwNSAyNTkuNzg2IDg5Ljc5MjEgMjU5Ljc4NiA5Mi4yODM3IDI2MS4wNDkgOTMuNTI5NSAyNjMuNTc2IDkzLjUyOTUgMjY2LjExNiA5My41Mjk1IDI2Ny4zODcgOTIuMjgzNyAyNjcuMzg3IDg5Ljc5MjEgMjY3LjM4NyA4Ny4zMDA1IDI2Ni4xMTYgODYuMDU0NyAyNjMuNTc2IDg2LjA1NDdaIiBmaWxsPSIjRkZFNTAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L2c+PC9zdmc+");
  background-repeat: no-repeat;
  background-position: 1rem center;
  background-size: 1.8rem;
}

.blazor-error-boundary::after { content: "An error has occurred." }

/* Validation */
.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }
.validation-message { color: #e50000; font-size: var(--text-sm); margin-top: 4px; }

h1:focus { outline: none; }

/* ── Member concerts buttons — black text ─ */
.max-w-5xl .e-btn.btn-black-text,
.max-w-5xl .e-btn.btn-black-text * {
  color: #000 !important;
}

/* Syncfusion dialogs — fit narrow viewports (width is often inline from component) */
@media (max-width: 900px) {
  .e-dlg-container .e-dialog {
    max-width: calc(100vw - 24px) !important;
  }
}

@media (max-width: 640px) {
  .e-dlg-container .e-dialog {
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    margin: 10px !important;
  }

  .e-dialog .e-dlg-content {
    max-height: min(75dvh, calc(100dvh - 120px)) !important;
    overflow-y: auto !important;
  }
}

/* ── Upload dialog — override Syncfusion 500px max-height cap ─ */
.e-dialog.upload-dialog {
  max-height: 95vh !important;
  height: auto !important;
}
.e-dialog.upload-dialog .e-dlg-content {
  max-height: none !important;
  overflow: visible !important;
}

/* Manage calendar: allow horizontal scroll + shorter month cells on phones */
.cantus-schedule-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Calendar Event Schedule — show description in cells ─ */
/* 1. Larger cells so events have room for Subject + Description */
.calendar-event-schedule .e-schedule .e-month-view .e-work-cells {
  min-height: 130px !important;
  height: auto !important;
}
/* 1b. Highlight days that have events — stronger background for visibility */
.calendar-event-schedule .e-schedule .e-month-view .e-work-cells:has(.e-appointment) {
  background-color: #dbeafe !important; /* blue-100 — more noticeable than default */
}
/* 2. Appointment wrapper — allow content to expand (was rehearsal-schedule, never matched!) */
.calendar-event-schedule .e-schedule .e-month-view .e-appointment,
.calendar-event-schedule .e-schedule .e-month-view .e-appointment-wrap,
.calendar-event-schedule .e-schedule .e-vertical-view .e-day-wrapper .e-appointment,
.calendar-event-schedule .e-schedule .e-vertical-view .e-all-day-appointment-wrapper .e-appointment {
  overflow: visible !important;
  min-height: auto !important;
  height: auto !important;
  max-height: none !important;
}
/* 3. Inner content — no clipping */
.calendar-event-schedule .e-schedule .e-appointment .e-appointment-details,
.calendar-event-schedule .e-schedule .e-appointment-details,
.calendar-event-schedule .e-schedule .e-appointment .e-inner-wrap {
  overflow: visible !important;
  white-space: normal !important;
  display: block !important;
  height: auto !important;
}
/* 4. Subject/description text — allow wrapping */
.calendar-event-schedule .e-schedule .e-appointment .e-subject,
.calendar-event-schedule .e-schedule .e-appointment-details .e-subject {
  white-space: normal !important;
  overflow: visible !important;
}
/* 5. Month view content area — allow rows to grow */
.calendar-event-schedule .e-schedule .e-month-view .e-content-wrap,
.calendar-event-schedule .e-schedule .e-month-view .e-date-header-wrap table tbody td {
  height: auto !important;
}

@media (max-width: 640px) {
  .calendar-event-schedule .e-schedule .e-month-view .e-work-cells {
    min-height: 88px !important;
  }

  .calendar-event-schedule .e-schedule-toolbar-container .e-toolbar-items,
  .calendar-event-schedule .e-schedule-toolbar .e-toolbar-items {
    flex-wrap: wrap !important;
    height: auto !important;
    min-height: auto !important;
  }
}

/* ── Contact messages admin grid — unread rows ─ */
.e-grid .e-row.contact-msg-unread .e-rowcell {
  font-weight: 600;
}

/* ── Contact message view dialog — long body ─ */
.contact-message-dialog-body {
  max-height: 65vh;
  overflow-y: auto;
}

/* ── Admin log detail dialog ─ */
.admin-log-detail {
  max-height: 70vh;
  overflow-y: auto;
}
