/* MMSMUN XV - Design Tokens */
:root {
  --cream: #F9F6F1;
  --maroon: #530D1A;
  --maroon-hover: #6B1122;
  --gold: #C59B37;
  --gold-light: #D4AD4A;
  --text-muted: #6B5B5B;
  --white: #FFFFFF;
  --font-serif: 'Cinzel', 'Playfair Display', Georgia, serif;
  --font-sans: 'Montserrat', 'Open Sans', Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--cream);
  color: var(--maroon);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========== HEADER ========== */
.site-header {
  position: relative;
  z-index: 100;
  background: var(--cream);
  padding: 14px 48px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.header-brand img {
  width: 64px;
  height: 64px;
}

.brand-text h1 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.brand-text h1 .maroon { color: var(--maroon); }
.brand-text h1 .gold { color: var(--gold); }

.brand-text p {
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  line-height: 1.3;
  max-width: 220px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  justify-content: center;
}

.main-nav a {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--maroon);
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--gold);
}

.main-nav a.active {
  border-bottom-color: var(--gold);
}

.btn-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--maroon);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 12px 28px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-register:hover {
  background: var(--maroon-hover);
}

/* ========== HERO ========== */
.hero {
  position: relative;
  flex: 1;
  min-height: calc(100vh - 90px - 120px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../assets/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.12;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 40px 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
}

.hero-content {
  max-width: 560px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.hero-title .maroon { color: var(--maroon); }
.hero-title .gold { color: var(--gold); }

.hero-subtitle {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--maroon);
  margin-bottom: 20px;
}

.hero-divider {
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin-bottom: 24px;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-style: italic;
  line-height: 1.35;
  margin-bottom: 28px;
}

.hero-tagline .line1 { color: var(--maroon); display: block; }
.hero-tagline .line2 { color: var(--gold); display: block; }

.hero-dates {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--maroon);
  margin-bottom: 8px;
}

.hero-address {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--maroon);
  margin-bottom: 28px;
}

/* Countdown */
.countdown {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.countdown-item {
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(83, 13, 26, 0.12);
  padding: 20px 18px 16px;
  min-width: 88px;
  text-align: center;
}

.countdown-value {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--maroon);
  line-height: 1;
  display: block;
}

.countdown-label {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--maroon);
  margin-top: 8px;
  display: block;
}

.btn-register-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--maroon);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 16px 32px;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-register-hero:hover {
  background: var(--maroon-hover);
}

.btn-register-hero svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.hero-logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-logo img {
  width: min(420px, 90%);
  filter: drop-shadow(0 8px 24px rgba(83, 13, 26, 0.15));
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--maroon);
  padding: 28px 40px 32px;
  text-align: center;
}

.footer-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 22px;
}

.footer-heading::before,
.footer-heading::after {
  content: '';
  flex: 1;
  max-width: 200px;
  height: 1px;
  background: var(--gold);
}

.footer-heading span {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--gold);
  white-space: nowrap;
}

.footer-social {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 8px 20px;
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--gold-light);
}

.footer-social .divider {
  width: 1px;
  height: 20px;
  background: var(--gold);
  opacity: 0.5;
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.footer-credit {
  margin: 22px 0 0;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.72);
}

/* ========== PLACEHOLDER PAGES ========== */
.placeholder-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
}

.placeholder-page h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--maroon);
  margin-bottom: 12px;
}

.placeholder-page p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.placeholder-page a.back-link {
  margin-top: 24px;
  color: var(--gold);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.placeholder-page a.back-link:hover {
  text-decoration: underline;
}

/* ========== PAGE CONTENT ========== */
.page-content {
  flex: 1;
  padding: 48px 48px 64px;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.page-header {
  text-align: center;
  margin-bottom: 48px;
}

.page-header h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--maroon);
  margin-bottom: 16px;
}

.page-header-divider {
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 0 auto;
}

/* ========== CHARITY ========== */
.charity-page {
  max-width: 820px;
}

.charity-intro {
  text-align: center;
  margin-bottom: 40px;
}

.charity-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 10px;
}

.charity-partner-name {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  color: var(--maroon);
  margin: 0 0 16px;
  font-weight: 600;
}

.charity-lead {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #3d2a2e;
  margin: 0;
}

.charity-block {
  margin-bottom: 28px;
  padding-top: 8px;
}

.charity-block h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--maroon);
  margin: 0 0 10px;
}

.charity-block p {
  margin: 0;
  line-height: 1.65;
  color: #3d2a2e;
}

.charity-block-muted {
  background: rgba(83, 13, 26, 0.04);
  border-radius: 8px;
  padding: 20px 22px;
}

/* ========== REGISTRATION ========== */
.register-page {
  max-width: 760px;
}

.register-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 12px;
}

.register-lead {
  max-width: 560px;
  margin: 16px auto 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.register-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin: 40px 0 28px;
}

.register-type-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 28px 26px;
  background: var(--white);
  border: 2px solid rgba(83, 13, 26, 0.12);
  border-radius: 12px;
  box-shadow: 0 10px 32px rgba(83, 13, 26, 0.06);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.register-type-card:hover {
  border-color: rgba(197, 155, 55, 0.55);
  box-shadow: 0 14px 36px rgba(83, 13, 26, 0.1);
  transform: translateY(-2px);
}

.register-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: rgba(83, 13, 26, 0.08);
  color: var(--maroon);
  font-size: 1.1rem;
}

.register-type-card h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--maroon);
  margin: 0 0 10px;
}

.register-type-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
  flex: 1;
}

.register-type-cta {
  margin-top: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

.register-help {
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
}

.register-back-link {
  display: inline-block;
  margin-top: 32px;
  color: var(--gold);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.register-back-link:hover {
  text-decoration: underline;
}

.register-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.register-breadcrumb a {
  color: var(--gold);
}

.register-breadcrumb a:hover {
  text-decoration: underline;
}

.register-breadcrumb [aria-current="page"] {
  color: var(--maroon);
}

.register-form-header {
  margin-bottom: 36px;
}

.register-form-shell {
  background: var(--white);
  border: 1px solid rgba(83, 13, 26, 0.1);
  border-radius: 14px;
  padding: 36px 40px;
  box-shadow: 0 10px 32px rgba(83, 13, 26, 0.06);
}

.register-form-fields {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.register-form-placeholder {
  margin: 0;
  padding: 24px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.register-form-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}

.register-form-field label,
.register-form-field .register-field-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--maroon);
  margin: 0;
  line-height: 1.35;
}

.register-form-field input,
.register-form-field select,
.register-form-field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(83, 13, 26, 0.18);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  color: var(--maroon);
  background: var(--white);
  line-height: 1.4;
}

.register-form-field input:focus,
.register-form-field select:focus,
.register-form-field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(197, 155, 55, 0.18);
}

.register-form-field textarea {
  min-height: 110px;
  resize: vertical;
}

.register-form-actions {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(83, 13, 26, 0.1);
}

.btn-register-form {
  display: inline-block;
  padding: 14px 28px;
  background: var(--maroon);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-register-form:hover {
  background: var(--maroon-hover);
}

.btn-register-form:disabled {
  opacity: 0.7;
  cursor: wait;
}

.register-section {
  margin: 0;
  padding: 0;
  border: none;
}

.register-section + .register-section {
  padding-top: 36px;
  border-top: 1px solid rgba(83, 13, 26, 0.12);
}

.register-section-title {
  font-family: var(--font-serif);
  font-size: 1.28rem;
  color: var(--maroon);
  margin: 0 0 22px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(197, 155, 55, 0.35);
}

.register-section-fields {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.register-field-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--maroon);
  margin: 0;
  line-height: 1.35;
}

.register-field-desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.register-required {
  color: #b3261e;
  font-weight: 700;
}

.register-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2px;
}

.register-radio-option,
.register-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid rgba(83, 13, 26, 0.18);
  border-radius: 8px;
  background: rgba(249, 246, 241, 0.7);
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--maroon);
  transition: border-color 0.15s, background 0.15s;
}

.register-radio-option:hover,
.register-checkbox-label:hover {
  border-color: rgba(197, 155, 55, 0.55);
  background: rgba(197, 155, 55, 0.08);
}

.register-radio-option input,
.register-checkbox-label input {
  width: auto;
  margin: 0;
  accent-color: var(--maroon);
}

.register-legal-field {
  gap: 16px;
}

.register-legal-text {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #3d2a2e;
  margin: 0;
  padding: 20px 22px;
  background: rgba(83, 13, 26, 0.04);
  border: 1px solid rgba(83, 13, 26, 0.08);
  border-radius: 10px;
  max-height: 280px;
  overflow-y: auto;
}

.register-legal-text p {
  margin: 0 0 14px;
}

.register-legal-text p:last-child {
  margin-bottom: 0;
}

.register-form-field.has-error input,
.register-form-field.has-error select,
.register-form-field.has-error textarea,
.register-form-field.has-error .register-radio-group {
  border-color: #b3261e;
}

.register-form-field.has-error .register-radio-group {
  border: 1px solid #b3261e;
  border-radius: 8px;
  padding: 10px;
}

.register-field-error {
  margin: 0;
  font-size: 0.85rem;
  color: #b3261e;
  line-height: 1.4;
}

.register-form-banner {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(179, 38, 30, 0.08);
  color: #8a1c2e;
  font-size: 0.92rem;
  line-height: 1.45;
}

.register-thanks-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
}

.register-thanks-card {
  text-align: center;
  background: var(--white);
  border: 1px solid rgba(83, 13, 26, 0.1);
  border-radius: 12px;
  padding: 40px 36px;
  box-shadow: 0 10px 32px rgba(83, 13, 26, 0.06);
  max-width: 640px;
}

.register-thanks-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(83, 13, 26, 0.1);
  color: var(--maroon);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.register-thanks-card h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--maroon);
  margin: 0 0 12px;
}

.register-thanks-text {
  margin: 20px 0 28px;
  line-height: 1.65;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.register-committee-list {
  display: grid;
  gap: 12px;
  margin-top: 2px;
}

.register-committee-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(83, 13, 26, 0.12);
  border-radius: 8px;
  background: rgba(249, 246, 241, 0.55);
}

.register-committee-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--maroon);
  cursor: pointer;
}

.register-committee-check input {
  width: auto;
  margin: 0;
  accent-color: var(--maroon);
}

.register-committee-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.register-committee-count input {
  width: 88px;
  padding: 8px 10px;
}

.register-committee-count input:disabled {
  opacity: 0.45;
  background: rgba(83, 13, 26, 0.04);
}

@media (max-width: 720px) {
  .register-type-grid {
    grid-template-columns: 1fr;
  }

  .register-form-shell {
    padding: 24px 18px;
  }

  .register-form-fields {
    gap: 32px;
  }

  .register-section + .register-section {
    padding-top: 28px;
  }

  .register-section-fields {
    gap: 24px;
  }

  .register-committee-row {
    grid-template-columns: 1fr;
  }
}

/* ========== SECRETARIAT ========== */
.secretariat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}

.member-card {
  text-align: center;
}

.member-photo {
  aspect-ratio: 3 / 4;
  width: 100%;
  max-width: 280px;
  margin: 0 auto 20px;
  background: rgba(83, 13, 26, 0.06);
  border: 2px solid rgba(197, 155, 55, 0.35);
  overflow: hidden;
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-photo img.is-hidden {
  display: none;
}

.member-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--maroon);
  margin-bottom: 6px;
}

.member-role {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
  line-height: 1.4;
}

.member-description {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
  min-height: 4.5rem;
  text-align: left;
  max-width: 280px;
  margin: 0 auto;
}

/* ========== CURRICULUM COUNCIL ========== */
.curriculum-council-section {
  margin-top: 72px;
  padding-top: 16px;
}

.curriculum-council-header {
  margin-bottom: 36px;
}

.council-group-frame {
  margin: 0 auto 36px;
  max-width: 1000px;
}

.council-group-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 320px;
  background: rgba(83, 13, 26, 0.06);
  border: 3px solid rgba(197, 155, 55, 0.45);
  box-shadow: 0 12px 40px rgba(83, 13, 26, 0.1);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.council-group-photo::before {
  content: 'Curriculum Council photo';
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: rgba(83, 13, 26, 0.35);
  letter-spacing: 0.04em;
}

.council-group-photo:has(img:not(.is-hidden))::before {
  display: none;
}

.council-group-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.council-group-photo img.is-hidden {
  display: none;
}

.council-group-caption {
  margin-top: 12px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.council-names-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.council-name-slot {
  text-align: center;
}

.council-name-slot .member-description {
  max-width: none;
  min-height: 3rem;
}

/* ========== SPONSOR ========== */
.sponsor-section {
  margin-top: 72px;
  padding-top: 16px;
}

.sponsor-header {
  margin-bottom: 36px;
}

.sponsor-card {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 36px 48px;
  align-items: start;
  max-width: 900px;
  margin: 0 auto;
}

.sponsor-photo {
  aspect-ratio: 3 / 4;
  width: 100%;
  background: rgba(83, 13, 26, 0.06);
  border: 2px solid rgba(197, 155, 55, 0.35);
  overflow: hidden;
}

.sponsor-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sponsor-photo img.is-hidden {
  display: none;
}

.sponsor-info {
  text-align: left;
  padding-top: 8px;
}

.sponsor-info .member-name {
  text-align: left;
}

.sponsor-info .member-role {
  text-align: left;
}

.sponsor-description {
  max-width: none;
  min-height: 6rem;
  text-align: left;
  margin: 0;
}

/* ========== STAFF LOGIN ========== */
.staff-login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.staff-login-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border: 1px solid rgba(83, 13, 26, 0.1);
  box-shadow: 0 8px 32px rgba(83, 13, 26, 0.08);
  padding: 36px 32px 40px;
}

.role-selector {
  border: none;
  margin: 0 0 28px;
  padding: 0;
}

.role-selector legend {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--maroon);
  margin-bottom: 14px;
}

.role-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.role-option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
  border: 2px solid rgba(83, 13, 26, 0.15);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--maroon);
}

.role-option:has(input:checked) {
  border-color: var(--gold);
  background: rgba(197, 155, 55, 0.1);
}

.role-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.login-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--maroon);
  margin-top: 8px;
}

.login-input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--maroon);
  border: 2px solid rgba(83, 13, 26, 0.15);
  background: var(--cream);
  outline: none;
  transition: border-color 0.2s;
}

.login-input:focus {
  border-color: var(--gold);
}

.login-error {
  color: #9B1C1C;
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 4px;
}

.login-coming-soon {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 24px 0;
}

.btn-login {
  margin-top: 16px;
  width: 100%;
  padding: 14px 24px;
  background: var(--maroon);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-login:hover {
  background: var(--maroon-hover);
}

/* ========== STAFF DASHBOARD ========== */
.staff-dashboard {
  max-width: 900px;
}

.staff-dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.staff-dashboard-header h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--maroon);
  margin-bottom: 8px;
}

.staff-welcome {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.staff-welcome span {
  color: var(--maroon);
  font-weight: 600;
}

.btn-logout {
  flex-shrink: 0;
  padding: 10px 20px;
  background: transparent;
  color: var(--maroon);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 2px solid var(--maroon);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn-logout:hover {
  background: var(--maroon);
  color: var(--white);
}

.staff-placeholder {
  margin-top: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ========== STAFF PORTAL (Secretariat Dashboard) ========== */
body[data-portal="secretariat"],
body[data-portal="admin"] {
  min-height: 100vh;
}

.staff-portal {
  display: flex;
  min-height: 100vh;
  height: 100vh;
}

.portal-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--maroon);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
}

.portal-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 16px;
}

.portal-sidebar-brand img {
  width: 44px;
  height: 44px;
}

.portal-sidebar-brand span {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.portal-sidebar-brand em {
  color: var(--gold);
  font-style: normal;
}

.portal-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
  padding: 0 12px;
}

.portal-tab {
  background: none;
  border: none;
  text-align: left;
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.portal-tab:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.portal-tab.active {
  color: var(--gold);
  border-left-color: var(--gold);
  background: rgba(197, 155, 55, 0.12);
}

.portal-logout {
  margin: 16px 12px 0;
  padding: 12px 16px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.portal-logout:hover {
  background: rgba(255, 255, 255, 0.1);
}

.portal-main {
  flex: 1;
  overflow-y: auto;
  background: var(--cream);
  padding: 32px 40px 48px;
}

.portal-topbar h1 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--maroon);
  margin-bottom: 4px;
}

.portal-topbar .staff-welcome {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.firebase-warning {
  background: #FFF3CD;
  border: 1px solid #FFC107;
  color: #664D03;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 0.85rem;
  border-radius: 4px;
}

.firebase-warning code {
  font-size: 0.8rem;
}

.portal-panel {
  display: none;
  margin-top: 28px;
}

.portal-panel.active {
  display: block;
}

.panel-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--maroon);
  margin-bottom: 8px;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 24px;
}

/* Widgets (Home) */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.widget-card {
  background: var(--white);
  border: 1px solid rgba(83, 13, 26, 0.08);
  box-shadow: 0 4px 20px rgba(83, 13, 26, 0.06);
  padding: 24px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}

.widget-card:hover {
  box-shadow: 0 8px 28px rgba(83, 13, 26, 0.1);
  transform: translateY(-2px);
}

.widget-card h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--maroon);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
}

.widget-list {
  list-style: none;
  min-height: 80px;
}

.widget-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(83, 13, 26, 0.06);
  font-size: 0.85rem;
}

.widget-item strong {
  color: var(--maroon);
}

.widget-item span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.widget-item-clickable {
  cursor: pointer;
}

.widget-item-clickable:hover strong {
  color: var(--gold);
}

.widget-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 12px 0;
}

.widget-link {
  display: block;
  margin-top: 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold);
}

/* Announcements */
.announcements-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 720px;
}

.announcement-card {
  background: var(--white);
  border: 1px solid rgba(83, 13, 26, 0.08);
  padding: 24px;
  box-shadow: 0 2px 12px rgba(83, 13, 26, 0.05);
}

.announcement-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.role-badge {
  background: var(--maroon);
  color: var(--white);
  padding: 4px 10px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  border-radius: 999px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.announcement-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--maroon);
  margin-bottom: 10px;
}

.announcement-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Tasks */
.tasks-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.tasks-section h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--maroon);
  margin-bottom: 8px;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.task-card {
  background: var(--white);
  border: 1px solid rgba(83, 13, 26, 0.08);
  padding: 20px;
  box-shadow: 0 2px 12px rgba(83, 13, 26, 0.05);
}

.task-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.task-card h3 {
  font-size: 1rem;
  color: var(--maroon);
  font-weight: 700;
}

.task-slots {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
}

.task-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 6px;
}

.task-location {
  color: var(--maroon) !important;
}

.task-meta {
  font-size: 0.75rem !important;
  margin-top: 8px !important;
}

.btn-claim {
  margin-top: 12px;
  padding: 10px 18px;
  background: var(--maroon);
  color: var(--white);
  border: none;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-claim:hover {
  background: var(--maroon-hover);
}

.task-full {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Messages */
.messages-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  height: calc(100vh - 160px);
  min-height: 480px;
  background: var(--white);
  border: 1px solid rgba(83, 13, 26, 0.08);
  box-shadow: 0 4px 24px rgba(83, 13, 26, 0.06);
  overflow: hidden;
}

.messages-sidebar {
  border-right: 1px solid rgba(83, 13, 26, 0.08);
  display: flex;
  flex-direction: column;
}

.messages-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(83, 13, 26, 0.08);
}

.messages-sidebar-header h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--maroon);
}

.btn-new-message {
  padding: 6px 12px;
  background: var(--maroon);
  color: var(--white);
  border: none;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
}

.btn-new-message:hover {
  background: var(--maroon-hover);
}

.conversation-list {
  flex: 1;
  overflow-y: auto;
}

.conversation-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(83, 13, 26, 0.06);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}

.conversation-item:hover,
.conversation-item.active {
  background: rgba(197, 155, 55, 0.1);
}

.convo-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--maroon);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.convo-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.convo-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--maroon);
}

.convo-preview {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.convo-time {
  font-size: 0.68rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.convo-empty {
  padding: 24px 16px;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chat-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(83, 13, 26, 0.08);
}

.chat-header h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--maroon);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(249, 246, 241, 0.5);
}

.chat-placeholder {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: auto;
}

.chat-bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.chat-bubble.sent {
  align-self: flex-end;
  background: var(--maroon);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.chat-bubble.received {
  align-self: flex-start;
  background: var(--white);
  color: var(--maroon);
  border: 1px solid rgba(83, 13, 26, 0.1);
  border-bottom-left-radius: 4px;
}

.bubble-time {
  display: block;
  font-size: 0.65rem;
  opacity: 0.7;
  margin-top: 4px;
}

.chat-compose {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid rgba(83, 13, 26, 0.08);
  background: var(--white);
}

.chat-compose input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid rgba(83, 13, 26, 0.12);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  outline: none;
  border-radius: 24px;
}

.chat-compose input:focus {
  border-color: var(--gold);
}

.btn-send {
  padding: 12px 22px;
  background: var(--maroon);
  color: var(--white);
  border: none;
  font-weight: 600;
  font-size: 0.8rem;
  border-radius: 24px;
  cursor: pointer;
}

.btn-send:hover {
  background: var(--maroon-hover);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-card {
  background: var(--white);
  padding: 28px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.modal-card h3 {
  font-family: var(--font-serif);
  color: var(--maroon);
  margin-bottom: 20px;
}

.modal-card label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--maroon);
  margin-bottom: 8px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: flex-end;
}

.btn-modal-cancel {
  padding: 10px 18px;
  background: transparent;
  border: 2px solid var(--maroon);
  color: var(--maroon);
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
}

.btn-modal-confirm {
  padding: 10px 18px;
  background: var(--maroon);
  color: var(--white);
  border: none;
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
}

.empty-state {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 16px 0;
}

@media (max-width: 1024px) {
  .widget-grid {
    grid-template-columns: 1fr;
  }

  .tasks-layout {
    grid-template-columns: 1fr;
  }

  .messages-layout {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 520px;
  }

  .messages-sidebar {
    max-height: 220px;
    border-right: none;
    border-bottom: 1px solid rgba(83, 13, 26, 0.08);
  }

  .chat-panel {
    min-height: 360px;
  }
}

@media (max-width: 768px) {
  .staff-portal {
    flex-direction: column;
  }

  .portal-sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 12px;
    align-items: center;
  }

  .portal-sidebar-brand {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .portal-nav {
    flex-direction: row;
    flex-wrap: wrap;
    flex: 1;
    justify-content: center;
  }

  .portal-tab {
    border-left: none;
    border-bottom: 3px solid transparent;
    padding: 10px 12px;
    font-size: 0.68rem;
  }

  .portal-tab.active {
    border-left: none;
    border-bottom-color: var(--gold);
  }

  .portal-logout {
    margin: 0;
    width: 100%;
  }

  .portal-main {
    padding: 20px 16px 32px;
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .site-header {
    grid-template-columns: 1fr auto;
    padding: 16px 24px;
  }

  .main-nav {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 16px 20px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 32px 24px 48px;
  }

  .hero-content {
    max-width: 100%;
    margin: 0 auto;
  }

  .hero-divider {
    margin-left: auto;
    margin-right: auto;
  }

  .countdown {
    justify-content: center;
  }

  .hero-logo {
    order: -1;
  }

  .hero-logo img {
    width: min(280px, 70%);
  }

  .secretariat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 24px;
  }

  .council-names-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .council-group-photo {
    min-height: 240px;
  }

  .page-content {
    padding: 40px 24px 56px;
  }
}

@media (max-width: 640px) {
  .header-brand .brand-text p {
    display: none;
  }

  .site-header .btn-register {
    padding: 10px 18px;
    font-size: 0.65rem;
  }

  .countdown-item {
    min-width: 72px;
    padding: 14px 16px;
  }

  .countdown-value {
    font-size: 1.8rem;
  }

  .footer-social {
    flex-direction: column;
    gap: 8px;
  }

  .footer-social .divider {
    display: none;
  }

  .secretariat-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .council-names-row {
    grid-template-columns: 1fr;
  }

  .sponsor-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .sponsor-photo {
    max-width: 260px;
  }

  .sponsor-info,
  .sponsor-info .member-name,
  .sponsor-info .member-role,
  .sponsor-description {
    text-align: center;
  }

  .role-options {
    grid-template-columns: 1fr;
  }

  .staff-dashboard-header {
    flex-direction: column;
    align-items: stretch;
  }
}
