/* ============================================================
   Plantilla Web para Colegios — style.css
   Cambia los colores principales aquí abajo para personalizar
   toda la plantilla de una vez.
   ============================================================ */

:root {
  --navy: #10306b;
  --navy-soft: #1d4f9e;
  --sky: #3fa9dc;
  --sky-soft: #eaf6fd;
  --gold: #f0a93a;
  --gold-soft: #f6c977;
  --paper: #f5f8fc;
  --paper-card: #ffffff;
  --ink: #1f2937;
  --ink-muted: #5b6472;
  --line: rgba(16, 48, 107, 0.12);
  --font-heading: "Poppins", sans-serif;
  --font-body: "Inter", sans-serif;
}

* { box-sizing: border-box; }

/* The `hidden` attribute must always win, even over classes that set their own `display`
   (e.g. .btn, .card-cta, .grid-3) — without this, toggling `el.hidden` in JS silently fails
   on any element whose class declares a display value. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin: 0;
  color: var(--navy);
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14.5px;
  padding: 13px 26px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(240, 169, 58, 0.35);
}

.btn-outline {
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-outline-navy {
  border: 1.5px solid var(--navy);
  color: var(--navy);
}

.btn-outline-navy:hover {
  background: rgba(16, 48, 107, 0.06);
}

/* ---------- HEADER / NAV ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 248, 252, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--sky) 55%, var(--gold) 100%);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  color: var(--navy);
}

.brand .logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo { height: 52px; width: auto; display: block; }

.footer-logo-card {
  display: inline-flex;
  background: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 16px;
}
.footer-logo-card img { height: 30px; width: auto; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14.5px;
  font-weight: 500;
}

.nav-links a {
  opacity: 0.8;
  transition: opacity 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
  color: var(--gold);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 18px;
}

.donate-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--navy);
  opacity: 0.8;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.donate-link:hover { opacity: 1; color: var(--gold); }

.lang-switch {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--ink-muted);
  background: none;
  border: none;
  border-radius: 16px;
  padding: 5px 11px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-btn.active {
  background: var(--navy);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
  transition: 0.2s ease;
}

@media (max-width: 860px) {
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); flex-direction: column; align-items: flex-start; gap: 0; border-bottom: 1px solid var(--line); max-height: 0; overflow: hidden; transition: max-height 0.25s ease; }
  .nav-links.open { max-height: 400px; }
  .nav-links a { padding: 14px 24px; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .nav-cta .btn-primary { display: none; }
  .nav-cta .donate-link { display: none; }
}

/* ---------- HERO ---------- */

.hero {
  background: linear-gradient(155deg, var(--navy) 0%, var(--navy-soft) 65%, #2f6fb8 100%);
  color: #fff;
  padding: 88px 0 96px;
  position: relative;
  overflow: hidden;
}

.hero-watermark {
  position: absolute;
  top: -14%;
  right: -6%;
  width: 460px;
  height: 460px;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}

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

.hero h1 {
  color: #fff;
  font-size: clamp(32px, 4.4vw, 50px);
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero h1 span {
  color: var(--gold-soft);
  background-image: linear-gradient(rgba(63, 169, 220, 0.4), rgba(63, 169, 220, 0.4));
  background-repeat: no-repeat;
  background-size: 100% 0.32em;
  background-position: 0 90%;
}

.hero-wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 54px;
  z-index: 1;
}
.hero-wave path { fill: var(--sky-soft); }

.hero p.lead {
  font-size: 17px;
  max-width: 50ch;
  opacity: 0.85;
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-stats {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  font-size: 13px;
  opacity: 0.75;
}

.hero-stats strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--gold-soft);
}
.hero-stats > div:nth-child(2) strong,
.hero-stats > div:nth-child(4) strong {
  color: var(--sky);
}

.hero-visual {
  aspect-ratio: 4/3.4;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-visual .placeholder-label {
  font-family: var(--font-heading);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  border: 1px dashed rgba(255,255,255,0.3);
  padding: 10px 18px;
  border-radius: 6px;
}

/* Crops a 16:9 embed to fill the 4/3.4 .hero-visual box, like object-fit: cover. */
.hero-visual.hero-video {
  aspect-ratio: 16/9;
}
.yt-bg-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.yt-bg-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.yt-mute-toggle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(16,48,107,0.6);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}
.yt-mute-toggle:hover { background: rgba(16,48,107,0.85); }
.yt-mute-toggle .icon-unmuted { display: none; }
.yt-mute-toggle:not(.is-muted) .icon-muted { display: none; }
.yt-mute-toggle:not(.is-muted) .icon-unmuted { display: block; }

/* ---------- SECTIONS ---------- */

section { padding: 88px 0; }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head p.eyebrow { margin-bottom: 12px; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 36px); margin-bottom: 12px; }
.section-head p.sub { color: var(--ink-muted); font-size: 15.5px; }

.bg-alt { background: var(--paper-card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.bg-sky {
  background-color: var(--sky-soft);
  background-image: radial-gradient(rgba(16, 48, 107, 0.09) 1px, transparent 1px);
  background-size: 20px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.bg-navy { background: var(--navy); color: #fff; }
.bg-navy .section-head h2 { color: #fff; }
.bg-navy .section-head p.sub { color: rgba(255,255,255,0.7); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 30px 26px;
}

.card .icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(240, 169, 58, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--gold);
}
.grid-3 .card:nth-child(2) .icon {
  background: rgba(63, 169, 220, 0.16);
  color: var(--sky);
}

.card h3 { font-size: 18px; margin-bottom: 10px; }
.card p { font-size: 14px; color: var(--ink-muted); margin: 0; }

a.card {
  display: block;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
a.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(16, 48, 107, 0.12);
  border-color: var(--gold);
}
.card-cta {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gold);
}

.stat-card {
  text-align: center;
  padding: 30px 16px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
}
.stat-card strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 32px;
  color: var(--gold-soft);
  margin-bottom: 6px;
}
.stat-card span { font-size: 13px; opacity: 0.75; }

.quote-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 30px 28px;
}
.quote-card p.quote-text {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 16px;
  color: var(--navy);
  margin-bottom: 18px;
}
.quote-card .attribution {
  font-size: 13px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.quote-card .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold-soft);
}

.team-photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--sky-soft);
}

.lang-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--navy);
  background: var(--sky-soft);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.cta-banner {
  background: var(--gold);
  border-radius: 16px;
  padding: 56px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-banner h2 { font-size: clamp(22px, 2.6vw, 30px); max-width: 20ch; }
.cta-banner.cta-sky { background: var(--sky); }

.timeline { border-top: 1px solid var(--line); }
.timeline-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-item .step-num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 28px;
  color: var(--gold);
  opacity: 0.7;
}
.timeline-item h3 { font-size: 17px; margin-bottom: 6px; }
.timeline-item p { color: var(--ink-muted); font-size: 14.5px; margin: 0; max-width: 60ch; }

.list-check { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.list-check li { padding-left: 26px; position: relative; font-size: 14.5px; }
.list-check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}

table.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
table.pricing-table th, table.pricing-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
table.pricing-table th {
  font-family: var(--font-heading);
  background: rgba(16,48,107,0.04);
  color: var(--navy);
}

/* ---------- FORM (contacto.html) ---------- */

.form-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 36px;
}
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.form-row label { font-size: 13.5px; font-weight: 600; color: var(--navy); }
.form-row input,
.form-row select,
.form-row textarea {
  font-family: var(--font-body);
  font-size: 14.5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
}
.form-row textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 12.5px; color: var(--ink-muted); margin-top: 10px; }

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row-2 { grid-template-columns: 1fr; } }

.form-section {
  border: none;
  padding: 0;
  margin: 0 0 40px;
}
.form-section:last-of-type { margin-bottom: 0; }
.form-section legend {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 17px;
  color: var(--navy);
  margin-bottom: 20px;
  padding: 0;
  width: 100%;
}
.form-section legend .step-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--sky-soft);
  color: var(--navy);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.choice-group { display: flex; flex-wrap: wrap; gap: 10px; }
.choice-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 9px 16px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.choice-group label:has(input:checked) {
  border-color: var(--sky);
  background: var(--sky-soft);
  color: var(--navy);
}
.choice-group input { accent-color: var(--sky); }

.info-callout {
  background: var(--sky-soft);
  border-radius: 10px;
  padding: 24px 26px;
  margin-bottom: 40px;
}
.info-callout h3 { font-size: 16px; margin-bottom: 10px; }
.info-callout ul.list-check { margin-top: 12px; }

.form-success {
  text-align: center;
  padding: 60px 20px;
}
.form-success .icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--sky-soft);
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.contact-info-list { display: flex; flex-direction: column; gap: 22px; }
.contact-info-list .item { display: flex; gap: 14px; align-items: flex-start; }
.contact-info-list .item .icon {
  width: 38px; height: 38px; border-radius: 9px;
  background: rgba(16,48,107,0.06); display: flex; align-items: center; justify-content: center;
  color: var(--navy); flex-shrink: 0;
}
.contact-info-list .item h4 { font-size: 14.5px; margin-bottom: 3px; }
.contact-info-list .item p { font-size: 13.5px; color: var(--ink-muted); margin: 0; }

.map-placeholder {
  aspect-ratio: 16/9;
  border-radius: 10px;
  border: 1px dashed var(--line);
  background: rgba(16,48,107,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- FOOTER ---------- */

.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  padding: 64px 0 28px;
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--sky) 55%, var(--navy) 100%);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-grid h5 {
  font-family: var(--font-heading);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}
.footer-grid .brand { color: #fff; margin-bottom: 14px; }
.footer-grid p.desc { font-size: 13.5px; opacity: 0.7; max-width: 32ch; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 13.5px; opacity: 0.8; }
.footer-links a:hover { opacity: 1; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  padding-bottom: 56px;
  font-size: 12.5px;
  opacity: 0.6;
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .cta-banner { flex-direction: column; align-items: flex-start; }
}

/* ---------- PAGE HEADER (inner pages) ---------- */
.page-header {
  background: var(--navy);
  color: #fff;
  padding: 64px 0 56px;
  text-align: center;
}
.page-header h1 { color: #fff; font-size: clamp(28px, 3.6vw, 42px); }
.page-header p { max-width: 56ch; margin: 14px auto 0; opacity: 0.8; font-size: 15px; }
.breadcrumb { font-size: 12.5px; opacity: 0.6; margin-bottom: 14px; }
.breadcrumb a { opacity: 0.85; }
.breadcrumb a:hover { opacity: 1; text-decoration: underline; }

/* ---------- BLOG ---------- */
.blog-card { display: flex; flex-direction: column; }
.blog-card-cover {
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--sky-soft);
}
.blog-card-cover img { width: 100%; height: 100%; object-fit: cover; }

.card-image {
  aspect-ratio: 16/10;
  margin: -30px -26px 20px;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  background: var(--sky-soft);
}
.card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blog-card h3 { font-size: 17px; margin-bottom: 8px; }
.blog-card p { font-size: 14px; color: var(--ink-muted); margin-bottom: 0; }
.blog-empty { text-align: center; padding: 60px 20px; color: var(--ink-muted); }

/* ---------- LOADER (self-drawing graduation cap) ---------- */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 60px 20px;
  color: var(--ink-muted);
}
.loader-cap { width: 56px; height: 56px; color: var(--navy); }
.loader-cap path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: loader-draw 2.2s ease-in-out infinite;
}
.loader-cap path:nth-child(2) { animation-delay: 0.25s; }
.loader-text { font-family: var(--font-heading); font-size: 13px; letter-spacing: 0.02em; }

@keyframes loader-draw {
  0% { stroke-dashoffset: 1; }
  40% { stroke-dashoffset: 0; }
  60% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1; }
}

.post-body { margin-top: 8px; max-width: 68ch; }
.post-body p { font-size: 16.5px; line-height: 1.75; color: var(--ink); margin: 0 0 20px; }

/* ---------- ADMIN ---------- */
.admin-post-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.admin-post-meta { display: block; font-size: 12.5px; color: var(--ink-muted); margin-top: 3px; }
.admin-post-actions { display: flex; gap: 10px; flex-shrink: 0; }
.admin-post-actions .btn { padding: 8px 16px; font-size: 13px; }

.admin-lang-tabs {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
  margin-bottom: 24px;
}
.admin-lang-tabs button {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  background: none;
  border: none;
  border-radius: 16px;
  padding: 7px 18px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.admin-lang-tabs button.active { background: var(--navy); color: #fff; }
.admin-lang-panel[hidden] { display: none; }

.ql-editor { min-height: 220px; font-family: var(--font-body); font-size: 14.5px; }
.ql-toolbar.ql-snow { border-radius: 6px 6px 0 0; border-color: var(--line); }
.ql-container.ql-snow { border-radius: 0 0 6px 6px; border-color: var(--line); font-family: var(--font-body); }

.promo-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 40, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.promo-popup-overlay.is-open { opacity: 1; }
.promo-popup {
  position: relative;
  background: #fff;
  border-radius: 16px;
  max-width: 380px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(12px) scale(0.97);
  transition: transform 0.2s ease;
}
.promo-popup-overlay.is-open .promo-popup { transform: translateY(0) scale(1); }
.promo-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  color: var(--navy);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.promo-popup-image { display: block; width: 100%; height: auto; border-radius: 16px 16px 0 0; }
.promo-popup-actions {
  display: flex;
  gap: 10px;
  padding: 18px;
}
.promo-popup-actions .btn { flex: 1; text-align: center; justify-content: center; }
@media (max-width: 480px) {
  .promo-popup-actions { flex-direction: column; }
}

.password-field { position: relative; display: flex; }
.password-field input { flex: 1; padding-right: 42px; }
.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  color: var(--ink-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.password-toggle:hover { background: var(--paper-card); color: var(--navy); }
.password-toggle .icon-eye-off { display: none; }
.password-toggle.is-visible .icon-eye-open { display: none; }
.password-toggle.is-visible .icon-eye-off { display: block; }

/* ---------- ADMIN SHELL (sidebar layout) ---------- */

.admin-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--paper);
}
.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px 16px;
  background: #fff;
  border-right: 1px solid var(--line);
}
.admin-sidebar-brand { display: block; padding: 4px 8px 18px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.admin-sidebar-brand img { height: 52px; width: auto; display: block; }
.admin-menu { display: flex; flex-direction: column; gap: 4px; }
.admin-sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.admin-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  background: none;
  border: none;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.admin-menu-item:hover { background: var(--sky-soft); color: var(--navy); }
.admin-menu-item.active { background: var(--navy); color: #fff; }
.admin-menu-item svg { flex-shrink: 0; }

.admin-main { padding: 36px clamp(20px, 4vw, 48px) 60px; min-width: 0; }
.admin-view { max-width: 980px; }
.admin-view-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.admin-view-head h2 { font-size: 24px; }
.admin-view-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-view-head select {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.stat-label { font-size: 12.5px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card strong { font-family: var(--font-heading); font-size: 28px; color: var(--navy); line-height: 1.1; }

.analytics-chart { width: 100%; }
.analytics-chart svg { display: block; width: 100%; height: auto; }
.analytics-legend { display: flex; gap: 18px; margin-top: 10px; font-size: 12.5px; color: var(--ink-muted); }
.analytics-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
.analytics-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 24px; }
.analytics-cols .form-card { padding: 24px; }

.rank-list { display: flex; flex-direction: column; gap: 4px; }
.rank-row { position: relative; display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 6px; font-size: 13.5px; overflow: hidden; }
.rank-row::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--pct, 0%); background: var(--sky-soft); }
.rank-row > * { position: relative; }
.rank-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row strong { color: var(--navy); flex-shrink: 0; }
.rank-empty { color: var(--ink-muted); font-size: 13.5px; }

.profile-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.profile-row:last-child { border-bottom: none; }
.profile-row span { color: var(--ink-muted); }

@media (max-width: 860px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; gap: 10px; }
  .admin-sidebar-brand { padding: 0; margin: 0; border: none; flex-basis: 100%; }
  .admin-sidebar-brand img { height: 40px; }
  .admin-menu { flex-direction: row; flex-basis: 100%; gap: 6px; }
  .admin-menu-item { width: auto; flex: 1; justify-content: center; padding: 9px 8px; font-size: 13px; gap: 8px; }
  .admin-sidebar-foot { margin-top: 0; flex-direction: row; flex-basis: 100%; gap: 6px; padding-top: 10px; }
}
