:root {
  --primary: #00677d;
  --primary-dark: #004a5a;
  --tertiary: #7d5300;
  --surface: #ffffff;
  --surface-tint: #f2f6f7;
  --text: #1a1c1d;
  --text-muted: #5b6367;
  --border: #dde3e4;
  --radius: 14px;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);

  /* Public-site-only additions — the accent is a warm counterpoint to the
     teal primary (kept out of --primary/--tertiary so the admin panel,
     which shares this file, is unaffected), and the two font stacks are
     only ever applied under .site-body (see below). */
  --accent: #f5a524;
  --accent-dark: #c9840f;
  --accent-soft: #fef3e0;
  --font-heading: 'Poppins', 'Segoe UI', Roboto, -apple-system, sans-serif;
  --font-body: 'Inter', 'Segoe UI', Roboto, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
  color: var(--text);
  background: var(--surface);
  line-height: 1.5;
}

/* Public marketing site only (admin panel keeps the system-font stack). */
.site-body { font-family: var(--font-body); }
.site-body h1,
.site-body h2,
.site-body h3,
.site-body .brand,
.site-body .hero-eyebrow,
.site-body .eyebrow {
  font-family: var(--font-heading);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}
.brand .badge {
  width: calc(36px * var(--logo-scale, 1.3));
  height: calc(36px * var(--logo-scale, 1.3));
  border-radius: 50%;
  background: #fff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  padding: 3px;
  box-sizing: border-box;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px var(--border), 0 4px 14px rgba(0, 0, 0, 0.12);
}
.badge img, .brand-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: var(--text); font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero {
  position: relative;
  color: #fff;
  text-align: center;
  overflow: hidden;
}
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); margin: 0 0 12px; font-weight: 800; letter-spacing: -0.02em; }
.hero p { font-size: 1.1rem; opacity: 0.94; max-width: 560px; margin: 0 auto; line-height: 1.6; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 165, 36, 0.22);
  border: 1px solid rgba(245, 165, 36, 0.5);
  color: #ffe6b8;
  border-radius: 999px;
  padding: 5px 14px 5px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.hero-eyebrow svg { width: 14px; height: 14px; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 8px 16px 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
}
.stat-pill svg { width: 15px; height: 15px; color: #ffcb70; }
.hero-cta {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.btn-hero-primary {
  display: inline-block;
  background: #fff;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 12px 26px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease;
}
.btn-hero-primary:hover { transform: translateY(-2px); text-decoration: none; }
.btn-hero-ghost {
  display: inline-block;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 12px 26px;
  border-radius: 10px;
  transition: background-color 0.15s ease;
}
.btn-hero-ghost:hover { background: rgba(255, 255, 255, 0.22); text-decoration: none; }

/* Hero: no banners uploaded yet — layered gradient with soft accent glows */
.hero-plain {
  background:
    radial-gradient(60% 90% at 88% 0%, rgba(245, 165, 36, 0.35) 0%, transparent 60%),
    radial-gradient(50% 70% at 8% 100%, rgba(255, 255, 255, 0.14) 0%, transparent 55%),
    linear-gradient(135deg, var(--primary), var(--primary-dark) 55%, var(--tertiary));
  padding: 80px 0 68px;
}

/* Hero: banner carousel — full-bleed image with text overlaid */
.hero-slider {
  height: clamp(360px, 50vw, 560px);
  display: flex;
  align-items: flex-end;
}
.hero-slides {
  position: absolute;
  inset: 0;
  display: flex;
  transition: transform 0.6s ease;
}
.hero-slide { position: relative; flex: 0 0 100%; min-width: 0; height: 100%; }
.hero-slide a, .hero-slide img { display: block; width: 100%; height: 100%; }
.hero-slide img { object-fit: cover; }
.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 28, 33, 0.15) 0%, rgba(8, 28, 33, 0.28) 45%, rgba(8, 28, 33, 0.75) 100%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: 60px;
}
.hero-slider h1, .hero-slider p { text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.hero-nav:hover { background: rgba(255, 255, 255, 0.34); }
.hero-nav svg { width: 22px; height: 22px; }
.hero-nav-prev { left: 16px; }
.hero-nav-next { right: 16px; }

.hero-dots {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 8px;
}
.hero-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  padding: 0;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.hero-dots button.active { background: #fff; transform: scale(1.15); }

@media (max-width: 640px) {
  .hero-nav { width: 34px; height: 34px; }
  .hero-nav svg { width: 18px; height: 18px; }
  .hero-nav-prev { left: 10px; }
  .hero-nav-next { right: 10px; }
}

/* Compact page header for /notices, /events, /gallery */
.page-hero {
  background: linear-gradient(135deg, var(--primary), var(--tertiary));
  color: #fff;
  padding: 44px 0;
  text-align: center;
}
.page-hero h1 { margin: 6px 0 0; font-size: clamp(1.6rem, 3.2vw, 2.1rem); font-weight: 800; }
.page-hero .hero-eyebrow { margin-bottom: 0; }

.notice-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.notice-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.notice-card-title { display: flex; align-items: center; gap: 12px; }
.notice-card-title .icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--surface-tint);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.notice-card-title .icon svg { width: 17px; height: 17px; }
.notice-card-title h2 { font-size: 1.05rem; margin: 0; }
.notice-card-date { color: var(--text-muted); font-size: 0.82rem; white-space: nowrap; }
.notice-card p { margin: 0; color: var(--text); line-height: 1.65; }

.event-detail-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.event-detail-image { border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-tint); }
.event-detail-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.event-detail-image-placeholder { display: flex; align-items: center; justify-content: center; color: var(--primary); }
.event-detail-image-placeholder svg { width: 30px; height: 30px; opacity: 0.5; }
button.event-detail-image {
  width: 100%;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  background: none;
  cursor: zoom-in;
  display: block;
}
button.event-detail-image:hover img { transform: scale(1.06); }
.event-detail-body h2 { font-size: 1.15rem; margin: 0 0 8px; }
.event-detail-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }
.event-detail-meta span { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 0.85rem; font-weight: 600; }
.event-detail-meta svg { width: 15px; height: 15px; }
.event-detail-body p { margin: 0; color: var(--text); line-height: 1.65; }

@media (max-width: 560px) {
  .event-detail-card { grid-template-columns: 1fr; }
}

/* Sections */
section.block { padding: 56px 0; }
section.block.tinted { background: var(--surface-tint); }
.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 26px;
  gap: 16px;
}
.section-title h2 { font-size: 1.7rem; margin: 6px 0 0; font-weight: 800; letter-spacing: -0.01em; }
.section-title.centered { flex-direction: column; align-items: center; text-align: center; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.section-title.centered .eyebrow { justify-content: center; }
.eyebrow::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
}
.section-title .view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  padding-bottom: 4px;
}
.section-title .view-all svg { width: 15px; height: 15px; transition: transform 0.15s ease; }
.section-title .view-all:hover svg { transform: translateX(3px); }

/* Cards / grid */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px;
  box-shadow: var(--shadow);
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.about-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--surface-tint);
  color: var(--primary);
  margin-bottom: 16px;
}
.about-badge svg { width: 26px; height: 26px; }
.about-card p { margin: 0; line-height: 1.7; color: var(--text); font-size: 1.02rem; }

/* Vision & Mission */
.mission-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.mission-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px 28px;
  box-shadow: var(--shadow);
}
.mission-card .about-badge { background: var(--accent-soft); color: var(--accent-dark); }
.mission-card h3 { margin: 2px 0 10px; font-size: 1.15rem; font-weight: 700; }
.mission-card p { margin: 0; line-height: 1.7; color: var(--text); }
@media (max-width: 640px) {
  .mission-grid { grid-template-columns: 1fr; }
}

/* Principal's Message */
.principal-card {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 44px;
  box-shadow: var(--shadow);
}
.principal-quote-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--surface-tint);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.principal-quote-mark svg { width: 22px; height: 22px; }
.principal-card blockquote {
  margin: 0 0 22px;
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text);
}
.principal-attribution { display: flex; align-items: center; gap: 12px; }
.principal-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--tertiary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.principal-attribution strong { display: block; font-size: 0.98rem; }
.principal-attribution span { color: var(--text-muted); font-size: 0.84rem; }
@media (max-width: 640px) {
  .principal-card { padding: 30px 24px; }
}

.tile-list { display: flex; flex-direction: column; gap: 10px; }
.list-tile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.list-tile:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.list-tile .icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-tint);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.list-tile .icon svg { width: 18px; height: 18px; }
.list-tile .title { font-weight: 600; flex: 1; }
.list-tile .meta { color: var(--text-muted); font-size: 0.85rem; white-space: nowrap; }

/* Events */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.event-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.event-card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12); }
.event-card-image { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-tint); position: relative; }
.event-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.event-card-image-placeholder { display: flex; align-items: center; justify-content: center; color: var(--primary); }
.event-card-image-placeholder svg { width: 34px; height: 34px; opacity: 0.5; }
button.event-card-image {
  width: 100%;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  background: none;
  cursor: zoom-in;
  display: block;
}
button.event-card-image:hover img { transform: scale(1.06); }
.event-card-body { padding: 18px 20px; }
.event-card-date {
  display: inline-block;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.event-card-body h3 { margin: 0 0 8px; font-size: 1.05rem; }
.event-card-location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.event-card-location svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}
.gallery-tile {
  position: relative;
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  background: none;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 1;
  cursor: pointer;
}
.gallery-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.gallery-tile:hover img { transform: scale(1.06); }
.gallery-tile-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px 12px 10px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), transparent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.gallery-tile:hover .gallery-tile-caption { opacity: 1; transform: translateY(0); }
.gallery-tile-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.15);
  transition: background-color 0.2s ease;
}
.gallery-tile-play svg { width: 44px; height: 44px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4)); }
.gallery-tile:hover .gallery-tile-play { background: rgba(0, 0, 0, 0.28); }

/* Gallery albums — first-level "pick an album" view (admin + public site). */
.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
}
.album-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}
.album-card:hover .album-cover img { transform: scale(1.06); }
.album-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: var(--admin-bg, #f1f5f6);
  box-shadow: var(--shadow, 0 2px 10px rgba(0, 0, 0, 0.08));
}
.album-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.album-cover-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.2);
}
.album-cover-play svg { width: 32px; height: 32px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4)); }
.album-name { font-weight: 700; font-size: 0.95rem; }
.album-count { font-size: 0.8rem; color: var(--text-muted); }

/* Lightbox (gallery photo zoom) */
body.lightbox-locked { overflow: hidden; }
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6, 14, 17, 0.92);
  padding: 60px 20px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-figure {
  margin: 0;
  max-width: min(90vw, 1000px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-image {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-caption {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 16px;
  text-align: center;
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease;
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-close {
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.1rem;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

@media (max-width: 640px) {
  .lightbox-overlay { padding: 20px 12px; }
  .lightbox-nav { width: 38px; height: 38px; }
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
  .lightbox-close { top: 10px; right: 10px; width: 36px; height: 36px; }
}

.empty-message { color: var(--text-muted); padding: 8px 0; }

/* Module teasers */
.module-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.module-chip {
  flex: 0 0 auto;
  width: 96px;
  text-align: center;
  padding: 16px 8px;
  border-radius: 16px;
  background: var(--surface-tint);
  font-size: 0.8rem;
  font-weight: 600;
}
.module-chip .glyph { font-size: 1.4rem; display: block; margin-bottom: 6px; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}
.contact-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
a.contact-item:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.contact-item .icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--surface-tint);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-item .icon svg { width: 19px; height: 19px; }
.contact-item strong { display: block; font-size: 0.82rem; margin-bottom: 2px; }
.contact-item > span:last-child { display: flex; flex-direction: column; gap: 2px; word-break: break-word; }

/* Footer */
.site-footer { background: var(--sidebar-bg, #0c2b33); color: rgba(255, 255, 255, 0.75); padding-top: 48px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-col h3 { color: #fff; font-size: 0.9rem; margin: 0 0 14px; text-transform: uppercase; letter-spacing: 0.04em; }
.footer-brand .brand { color: #fff; margin-bottom: 12px; }
.footer-brand .brand .badge { background: #fff; }
.footer-about { font-size: 0.88rem; line-height: 1.6; margin: 0; max-width: 340px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: rgba(255, 255, 255, 0.78); font-size: 0.9rem; font-weight: 500; }
.footer-links a:hover { color: #fff; }
.footer-contact { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.88rem; }
.footer-contact svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; opacity: 0.8; }
.footer-bottom { padding: 18px 0; }
.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}
.footer-legal-link { color: rgba(255, 255, 255, 0.6); text-decoration: none; }
.footer-legal-link:hover { color: #fff; text-decoration: underline; }
.footer-bottom-inner .footer-legal-link::before { content: '·'; margin-right: 10px; }

@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 20px 16px;
    gap: 4px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; border-bottom: 1px solid var(--surface-tint); }
  .hero h1 { font-size: 1.7rem; }
}

/* ------------------------------------------------------------------ */
/* Admin area                                                          */
/* ------------------------------------------------------------------ */

:root {
  --sidebar-bg: #0c2b33;
  --sidebar-bg-soft: #123842;
  --sidebar-hover: rgba(255, 255, 255, 0.08);
  --sidebar-active: rgba(255, 255, 255, 0.14);
  --sidebar-text: rgba(255, 255, 255, 0.68);
  --sidebar-text-strong: #ffffff;
  --admin-bg: #f4f7f8;
  --admin-border: #e4e9ea;
  --admin-shadow: 0 1px 2px rgba(16, 24, 27, 0.04), 0 8px 24px rgba(16, 24, 27, 0.06);
  --success: #1e7a3d;
  --success-bg: #e6f4ea;
  --danger: #b3261e;
  --danger-bg: #fdecea;
}

.admin-body { background: var(--admin-bg); }

.admin-shell { display: flex; min-height: 100vh; align-items: stretch; }

/* Sidebar */
.admin-sidebar {
  width: 248px;
  flex: 0 0 248px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px;
  color: var(--sidebar-text-strong);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.admin-brand:hover { text-decoration: none; }
.admin-brand .brand-badge {
  width: calc(36px * var(--logo-scale, 1.3));
  height: calc(36px * var(--logo-scale, 1.3));
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  padding: 3px;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.admin-brand .brand-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}

.admin-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
.admin-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--sidebar-text);
  font-weight: 600;
  font-size: 0.88rem;
}
.admin-nav .nav-item:hover { background: var(--sidebar-hover); color: var(--sidebar-text-strong); text-decoration: none; }
.admin-nav .nav-item.active { background: var(--sidebar-active); color: var(--sidebar-text-strong); }
.admin-nav .nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-section-label {
  display: block;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 12px 4px;
}
.nav-section-label:first-child { padding-top: 4px; }

.admin-sidebar-footer {
  padding: 14px 20px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-footer-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--sidebar-text);
  font-size: 0.82rem;
  font-weight: 600;
}
.sidebar-footer-link:hover { color: var(--sidebar-text-strong); text-decoration: none; }
.sidebar-footer-link svg { width: 15px; height: 15px; }

/* Content column */
.admin-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.admin-topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  height: 66px;
  background: var(--surface);
  border-bottom: 1px solid var(--admin-border);
  position: sticky;
  top: 0;
  z-index: 5;
}
.admin-page-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-menu-toggle {
  display: none;
  border: none;
  background: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text);
}
.admin-menu-toggle svg { width: 22px; height: 22px; }

.admin-user-chip { display: flex; align-items: center; gap: 10px; }
.admin-user-link { display: flex; align-items: center; gap: 10px; color: inherit; }
.admin-user-link:hover { text-decoration: none; opacity: 0.85; }
.admin-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.admin-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-logout-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--text-muted);
}
.admin-logout-link:hover { background: var(--admin-bg); color: var(--danger); text-decoration: none; }
.admin-logout-link svg { width: 17px; height: 17px; }

.admin-main { padding: 28px 28px 60px; flex: 1; }
.admin-main-inner { max-width: 1100px; }

.admin-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.admin-title-row h1 { margin: 0; font-size: 1.3rem; font-weight: 700; }
.admin-subtitle { color: var(--text-muted); font-size: 0.88rem; margin: 4px 0 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.87rem;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(0, 103, 125, 0.25); }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-danger { background: #fff; color: var(--danger); border-color: #f0c3bd; }
.btn-danger:hover { background: var(--danger-bg); text-decoration: none; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--admin-border); }
.btn-ghost:hover { background: var(--admin-bg); text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; border-radius: 7px; }

/* Alerts */
.alert {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 0.88rem;
  font-weight: 500;
  border: 1px solid transparent;
}
.alert-error { background: var(--danger-bg); color: #7a231c; border-color: #f3b4ac; }
.alert-success { background: var(--success-bg); color: #1e4620; border-color: #a8dab5; }

/* Cards */
.admin-card {
  background: var(--surface);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 26px;
  box-shadow: var(--admin-shadow);
  margin-bottom: 20px;
}
.admin-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.admin-card-header h2 { margin: 0; font-size: 1rem; font-weight: 700; }

/* Forms */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 0.83rem; margin-bottom: 7px; color: var(--text); }
.form-group .hint { color: var(--text-muted); font-size: 0.78rem; margin-top: 5px; }
.form-control {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--admin-border);
  border-radius: 9px;
  font-size: 0.92rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 103, 125, 0.12);
}
textarea.form-control { resize: vertical; min-height: 90px; }

.logo-size-picker { display: flex; gap: 16px; flex-wrap: wrap; }
.logo-size-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 16px;
  border: 2px solid var(--admin-border);
  border-radius: 12px;
  transition: border-color .15s ease, background .15s ease;
}
.logo-size-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.logo-size-option.selected { border-color: var(--primary); background: var(--admin-bg); }
.logo-size-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px var(--admin-border);
  overflow: hidden;
  flex-shrink: 0;
}
.logo-size-preview img { width: 100%; height: 100%; object-fit: contain; padding: 4px; box-sizing: border-box; }
.logo-size-label { font-weight: 600; font-size: 0.85rem; }

.password-field { position: relative; }
.password-field .form-control { padding-right: 42px; }
.password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
}
.password-toggle:hover { background: var(--admin-bg); color: var(--text); }
.password-toggle svg { width: 18px; height: 18px; }
.password-toggle span { display: flex; align-items: center; }
.password-toggle .icon-eye-off { display: none; }
.password-toggle.showing .icon-eye { display: none; }
.password-toggle.showing .icon-eye-off { display: flex; }
.search-field { position: relative; max-width: 340px; margin-bottom: 18px; }
.search-field svg { position: absolute; top: 50%; left: 13px; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-muted); pointer-events: none; }
.search-field .form-control { padding-left: 40px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.checkbox-row { display: flex; align-items: center; gap: 9px; }
.checkbox-row input[type="checkbox"],
.checkbox-row input[type="radio"] { width: 16px; height: 16px; accent-color: var(--primary); }
.checkbox-row label { font-weight: 600; font-size: 0.85rem; }
.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px 16px;
  padding: 14px;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  background: var(--admin-bg);
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--admin-border);
}

/* Tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table { width: 100%; min-width: 480px; border-collapse: collapse; }
.admin-table th, .admin-table td {
  text-align: left;
  padding: 13px 14px;
  font-size: 0.87rem;
  vertical-align: middle;
}
.admin-table thead th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--admin-border);
}
.admin-table tbody tr { border-bottom: 1px solid var(--admin-border); transition: background-color .1s ease; }
.admin-table tbody tr:last-child { border-bottom: none; }
.admin-table tbody tr:hover { background: var(--admin-bg); }
.admin-table td.title-cell { font-weight: 600; }
.admin-table img.thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  background: var(--admin-bg);
  border: 1px solid var(--admin-border);
}
.admin-table .actions { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.whatsapp-share-btn { color: #25D366; border-color: #25D366; }
.whatsapp-share-btn:hover { background: #25D366; color: #fff; }
.whatsapp-share-btn svg { width: 16px; height: 16px; }
.whatsapp-sent-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.78rem; color: var(--success); white-space: nowrap;
}
.whatsapp-sent-badge svg { width: 14px; height: 14px; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-neutral { background: var(--admin-bg); color: var(--text-muted); }
.badge-info { background: #e6f0f2; color: var(--primary-dark); }
.badge-warning { background: var(--danger-bg); color: var(--danger); }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-muted);
}
.empty-state svg { width: 40px; height: 40px; margin-bottom: 14px; color: var(--admin-border); }
.empty-state p { margin: 0 0 16px; font-size: 0.92rem; }
.empty-message { color: var(--text-muted); padding: 8px 0; }

/* Dashboard */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: var(--admin-shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--surface-tint);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-card .stat-icon svg { width: 21px; height: 21px; }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.stat-card .stat-label { color: var(--text-muted); font-size: 0.8rem; font-weight: 600; margin-top: 2px; }

.dashboard-section-title { font-size: 0.95rem; font-weight: 700; margin: 0 0 14px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.dashboard-tile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--admin-shadow);
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.dashboard-tile:hover {
  border-color: var(--primary);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(16, 24, 27, 0.1);
}
.dashboard-tile .tile-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--surface-tint);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.dashboard-tile .tile-icon svg { width: 20px; height: 20px; }

/* Login page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--sidebar-bg) 0%, var(--sidebar-bg-soft) 45%, #1a4a56 100%);
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border-radius: 18px;
  padding: 36px 32px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  margin-bottom: 26px;
}
.login-brand .brand-badge {
  width: calc(52px * var(--logo-scale, 1.3));
  height: calc(52px * var(--logo-scale, 1.3));
  border-radius: 14px;
  background: #fff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  padding: 4px;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--admin-border), 0 6px 18px rgba(0, 0, 0, 0.1);
}
.login-brand h1 { margin: 0; font-size: 1.15rem; font-weight: 700; }
.login-brand p { margin: 0; color: var(--text-muted); font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.login-back {
  display: block;
  text-align: center;
  margin-top: 22px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}
.login-back:hover { color: #fff; }

@media (max-width: 900px) {
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 30;
    transform: translateX(-100%);
    transition: transform .18s ease;
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0);
  }
  .admin-shell.sidebar-open .admin-sidebar { transform: translateX(0); box-shadow: 20px 0 60px rgba(0, 0, 0, 0.25); }
  .admin-menu-toggle { display: inline-flex; }
  .admin-main { padding: 22px 16px 48px; }
  .admin-topbar { padding: 0 16px; }
  .admin-user-name { display: none; }
  .admin-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8, 20, 24, 0.45);
    z-index: 25;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }
  .admin-shell.sidebar-open .admin-sidebar-backdrop { opacity: 1; pointer-events: auto; }
  body.admin-body:has(.admin-shell.sidebar-open) { overflow: hidden; }
}
