/* ─── VARIABLES & RESET ─────────────────────────────────── */
:root {
  --navy:       #0c1e3c;
  --navy-mid:   #162d52;
  --navy-light: #1e3d6e;
  --gold:       #c9922a;
  --gold-light: #e8b050;
  --gold-pale:  #fdf3e3;
  --cream:      #fafaf8;
  --white:      #ffffff;
  --gray-50:    #f8f7f5;
  --gray-100:   #eeece8;
  --gray-200:   #dbd9d3;
  --gray-400:   #9e9b94;
  --gray-600:   #5a5750;
  --gray-800:   #2e2c28;
  --red:        #c0392b;
  --green:      #1a7a4a;
  --blue:       #1e5fa8;
  --amber:      #b5780a;

  --bg:         var(--cream);
  --surface:    var(--white);
  --surface2:   var(--gray-50);
  --border:     var(--gray-100);
  --text:       var(--gray-800);
  --text-muted: var(--gray-600);
  --text-faint: var(--gray-400);

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --radius-xl:  24px;
  --shadow-sm:  0 1px 3px rgba(12,30,60,.06), 0 1px 2px rgba(12,30,60,.04);
  --shadow-md:  0 4px 16px rgba(12,30,60,.08), 0 2px 6px rgba(12,30,60,.06);
  --shadow-lg:  0 12px 40px rgba(12,30,60,.12), 0 4px 12px rgba(12,30,60,.08);
  --transition: .2s cubic-bezier(.4,0,.2,1);
}
[data-theme="dark"] {
  --bg:         #0a1628;
  --surface:    #0f2040;
  --surface2:   #162952;
  --border:     #1e3560;
  --text:       #e8e5de;
  --text-muted: #9fa8b8;
  --text-faint: #5c6880;
  --gold:       #e8b050;
  --gold-pale:  #1a2e4a;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex; flex-direction: column;
  transition: background var(--transition), color var(--transition);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select {
  font-family: inherit;
  font-size: .9rem;
  width: 100%;
  padding: .65rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,146,42,.15);
}
.ff { font-family: 'Fraunces', Georgia, serif; }
.hidden { display: none !important; }
.page { display: none; animation: fadeUp .4s ease both; }
.page.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ─── AGENDA / GRUPOS PANELS ───────────────────────────────── */
.agenda-tab {
  padding: .55rem 1.1rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.agenda-tab:hover { color: var(--text); }
.agenda-tab-active { color: var(--navy); border-bottom-color: var(--gold); font-weight: 600; }
[data-theme="dark"] .agenda-tab-active { color: var(--gold-light); }

.grupo-card {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .85rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  margin-bottom: .5rem;
  background: var(--surface);
  transition: border-color var(--transition);
}
.grupo-card:hover { border-color: var(--gold); }
.grupo-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.contacto-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.import-preview-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .85rem;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
}
.import-preview-item:last-child { border-bottom: none; }
.import-check { width: auto; }

/* ─── SCROLLBAR ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--border); }
::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 4px; }

/* ─── NOTIFICATION TICKER ───────────────────────────────── */
#notifTicker {
  position: fixed;
  top: var(--navbar-h, 64px);
  left: 0; right: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 36px;
  transition: background var(--transition), border-color var(--transition);
  z-index: 140;
}
#notifTicker.ticker-hidden { display: none !important; }
@media(max-width:480px) {
  #notifTicker { top: var(--navbar-h, 56px); }
}
.ticker-label {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: 0 .9rem;
  height: 100%;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-right: 1px solid rgba(255,255,255,.12);
  white-space: nowrap;
  z-index: 2;
}
.ticker-label i { font-size: .8rem; }
.ticker-track-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}
.ticker-track {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  will-change: transform;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: 0 2.5rem;
  font-size: .8rem;
  cursor: pointer;
  transition: opacity .2s;
}
.ticker-item:hover { opacity: .8; }
.ticker-item .ticker-cat {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .1rem .5rem;
  border-radius: 10px;
  flex-shrink: 0;
}
.ticker-sep {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .35;
  margin: 0 1rem;
  flex-shrink: 0;
}
.ticker-controls {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  border-left: 1px solid rgba(255,255,255,.12);
  z-index: 2;
}
.ticker-btn {
  width: 32px;
  height: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  opacity: .6;
  cursor: pointer;
  transition: opacity .15s, background .15s;
  background: transparent;
  border: none;
  color: inherit;
}
.ticker-btn:hover { opacity: 1; background: rgba(255,255,255,.08); }
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-anim { animation: tickerScroll linear infinite; }
.ticker-paused { animation-play-state: paused; }
@keyframes tickerFadeSlide {
  0%   { opacity: 0; transform: translateY(8px); }
  12%  { opacity: 1; transform: translateY(0); }
  88%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-8px); }
}
.ticker-slide-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: .6rem;
  font-size: .8rem;
  opacity: 0;
  pointer-events: none;
}
.ticker-slide-item.active {
  opacity: 1;
  pointer-events: auto;
  animation: tickerFadeSlide linear;
}
/* Admin ticker panel */
#tkMsg-list { display: flex; flex-direction: column; gap: .5rem; }
.tk-msg-row {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .7rem .9rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.tk-msg-row.disabled { opacity: .5; }
.tk-msg-body { flex: 1; min-width: 0; }
.tk-msg-text { font-size: .85rem; font-weight: 500; color: var(--text); }
.tk-msg-meta { font-size: .72rem; color: var(--text-faint); margin-top: .15rem; }
.tk-msg-actions { display: flex; gap: .3rem; flex-shrink: 0; }

/* ─── NAVBAR ────────────────────────────────────────────── */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 150;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition);
}
[data-theme="dark"] #navbar { background: rgba(10,22,40,.92); }
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 1.5rem;
  height: 64px;
  display: flex; align-items: center; gap: 1rem;
}
.nav-logo {
  display: flex; align-items: center; gap: .75rem;
  flex-shrink: 0;
}
.nav-logo-icon {
  width: 40px; height: 40px;
  background: var(--navy);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--transition);
}
.nav-logo:hover .nav-logo-icon { transform: scale(1.06); }
.nav-logo-icon i { color: var(--gold-light); font-size: 1rem; }
.nav-logo-text { line-height: 1.2; }
.nav-logo-title { font-family: 'Fraunces', serif; font-size: 1.05rem; font-weight: 700; color: var(--navy); }
[data-theme="dark"] .nav-logo-title { color: var(--text); }
.nav-logo-sub { font-size: .7rem; color: var(--text-muted); }
.nav-links { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.nav-link {
  padding: .4rem .85rem; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500; color: var(--text-muted);
  transition: all var(--transition);
  position: relative;
}
.nav-link:hover { color: var(--navy); background: var(--surface2); }
[data-theme="dark"] .nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--navy); font-weight: 600; }
[data-theme="dark"] .nav-link.active { color: var(--gold-light); }
.nav-link.active::after {
  content: ''; position: absolute; bottom: -1px; left: .85rem; right: .85rem;
  height: 2px; background: var(--gold); border-radius: 2px;
}
.nav-item-wrap { position: relative; display: inline-block; }
.nav-item-wrap > .nav-link { display: flex; align-items: center; gap: .3rem; }
.nav-dropdown-arrow { font-size: .58rem; opacity: .55; transition: transform .2s; }
.nav-item-wrap:hover .nav-dropdown-arrow { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: .4rem 0;
  opacity: 0; pointer-events: none;
  transition: opacity .18s, transform .18s;
  transform: translateX(-50%) translateY(-6px);
  z-index: 200;
}
.nav-item-wrap:hover .nav-dropdown,
.nav-item-wrap.open .nav-dropdown {
  opacity: 1; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-item-wrap.open .nav-dropdown-arrow { transform: rotate(180deg); }
.nav-dropdown-item {
  display: flex; align-items: center; gap: .55rem;
  padding: .52rem 1rem; font-size: .84rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
  text-decoration: none;
}
.nav-dropdown-item:hover { background: var(--surface2); color: var(--navy); }
[data-theme="dark"] .nav-dropdown-item:hover { color: var(--gold-light); }
.nav-dropdown-item i { width: 14px; text-align: center; color: var(--gold); font-size: .78rem; }
.nav-actions { display: flex; align-items: center; gap: .5rem; margin-left: .5rem; }
.nav-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--surface2); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: .875rem; transition: all var(--transition);
  border: 1px solid var(--border);
}
.nav-btn:hover { background: var(--border); color: var(--text); }
.btn-admin {
  padding: .4rem 1rem; border-radius: var(--radius-sm);
  background: var(--navy); color: var(--gold-light);
  font-size: .8rem; font-weight: 600; letter-spacing: .02em;
  transition: all var(--transition); border: 1px solid var(--navy-light);
}
.btn-admin:hover { background: var(--navy-light); }
/* Search */
.nav-search { position: relative; }
.nav-search input {
  width: 0; padding: .4rem 0; border-color: transparent;
  border-radius: 20px; background: transparent;
  transition: width .3s ease, padding .3s ease, border-color .3s ease, background .3s ease;
}
.nav-search.open input {
  width: 220px; padding: .4rem 2.2rem .4rem .85rem;
  border-color: var(--border); background: var(--surface);
}
.nav-search-icon {
  position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: .8rem; cursor: pointer;
  transition: color var(--transition);
}
.nav-search:hover .nav-search-icon { color: var(--text); }
.search-results {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 320px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); overflow: hidden; z-index: 200;
}
.search-result-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background var(--transition);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--surface2); }
/* Hamburger */
.hamburger { display: none; }

/* ─── HERO SLIDER ───────────────────────────────────────── */
#hero {
  position: relative; overflow: hidden;
  height: min(90vh, 680px);
  background: var(--navy);
}
.slide {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  opacity: 0; transition: opacity .8s ease;
}
.slide.active { opacity: 1; z-index: 1; }
.slide-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(12,30,60,.88) 0%, rgba(12,30,60,.55) 55%, rgba(12,30,60,.15) 100%);
}
.slide-content {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto; padding: 0 2rem;
  width: 100%;
}
.slide-tag {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .85rem; border-radius: 20px;
  background: rgba(201,146,42,.2); border: 1px solid rgba(201,146,42,.4);
  color: var(--gold-light); font-size: .75rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 1.25rem;
  animation: slideInLeft .6s .2s both;
}
.slide-tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-light); animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1}50%{opacity:.4} }
@keyframes slideInLeft { from{opacity:0;transform:translateX(-20px)} to{opacity:1;transform:none} }
.slide-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 700; color: #fff;
  line-height: 1.15; max-width: 700px;
  margin-bottom: 1rem;
  animation: slideInLeft .6s .35s both;
}
.slide-sub {
  font-size: 1.05rem; color: rgba(255,255,255,.75);
  max-width: 520px; margin-bottom: 2rem;
  animation: slideInLeft .6s .5s both;
}
.slide-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.8rem; border-radius: var(--radius-md);
  background: var(--gold); color: var(--navy);
  font-weight: 700; font-size: .9rem; letter-spacing: .02em;
  transition: all var(--transition);
  animation: slideInLeft .6s .65s both;
}
.slide-btn:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,146,42,.4); }
/* Slider controls */
.slider-nav {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  z-index: 10; display: flex; align-items: center; gap: 1rem;
}
.slider-dot {
  width: 8px; height: 8px; border-radius: 4px;
  background: rgba(255,255,255,.4);
  transition: all .3s ease; cursor: pointer;
}
.slider-dot.active { background: var(--gold-light); width: 24px; }
.slider-arrow {
  position: absolute; top: 50%; z-index: 10;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.15); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.25); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition);
  transform: translateY(-50%);
}
.slider-arrow:hover { background: rgba(255,255,255,.25); }
#prevSlide { left: 1.5rem; }
#nextSlide { right: 1.5rem; }

/* ─── SECTIONS ──────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }
.section-header { margin-bottom: 2.5rem; }
.section-tag {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold); margin-bottom: .6rem;
}
.section-tag::before {
  content: ''; display: block; width: 18px; height: 2px;
  background: var(--gold); border-radius: 2px;
}
.section-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700; color: var(--text); line-height: 1.2;
}
.section-sub { color: var(--text-muted); margin-top: .5rem; font-size: .95rem; }
.view-all {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .85rem; font-weight: 600; color: var(--gold);
  transition: gap var(--transition);
}
.view-all:hover { gap: .7rem; }

/* ─── NEWS CARDS ────────────────────────────────────────── */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.news-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--gold); }
.card-img {
  position: relative; height: 200px; overflow: hidden; background: var(--surface2);
}
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.news-card:hover .card-img img { transform: scale(1.04); }
.card-img-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
}
.card-img-placeholder i { color: rgba(255,255,255,.2); font-size: 3rem; }
.card-cat {
  position: absolute; top: .75rem; left: .75rem;
  padding: .25rem .7rem; border-radius: 4px;
  font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: #fff; background: var(--navy);
}
.card-body { padding: 1.25rem; }
.card-meta {
  display: flex; align-items: center; gap: 1rem;
  font-size: .75rem; color: var(--text-faint); margin-bottom: .6rem;
}
.card-meta span { display: flex; align-items: center; gap: .3rem; }
.card-title {
  font-family: 'Fraunces', serif; font-size: 1.05rem; font-weight: 700;
  line-height: 1.35; margin-bottom: .6rem; color: var(--text);
  transition: color var(--transition); cursor: pointer;
}
.news-card:hover .card-title { color: var(--gold); }
.card-excerpt { font-size: .875rem; color: var(--text-muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-link {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .8rem; font-weight: 600; color: var(--gold);
  margin-top: .85rem; transition: gap var(--transition);
}
.card-link:hover { gap: .6rem; }
/* Featured card (large) */
.news-card-featured {
  grid-column: span 2;
  display: grid; grid-template-columns: 1.4fr 1fr;
}
.news-card-featured .card-img { height: auto; }
.news-card-featured .card-title { font-size: 1.35rem; }
@media(max-width:700px) {
  .news-card-featured { grid-column: span 1; grid-template-columns: 1fr; }
  .news-card-featured .card-img { height: 220px; }
}

/* ─── NOTICES SIDEBAR ───────────────────────────────────── */
.home-layout { display: grid; grid-template-columns: 1fr 340px; gap: 2.5rem; }
@media(max-width:1000px) { .home-layout { grid-template-columns: 1fr; } }
.notices-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); position: sticky; top: 80px;
  max-height: calc(100vh - 100px); overflow-y: auto;
}
.notices-header {
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: .6rem;
  background: var(--navy);
}
.notices-header-icon { color: var(--gold-light); font-size: .85rem; }
.notices-header-title { font-family: 'Fraunces', serif; font-weight: 700; font-size: .95rem; color: #fff; }
.notice-item { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); transition: background var(--transition); }
.notice-item:last-child { border-bottom: none; }
.notice-item:hover { background: var(--surface2); }
.notice-type {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .67rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: .2rem .55rem; border-radius: 4px;
  margin-bottom: .4rem;
}
.notice-type.info    { background: #e3f0ff; color: #1a5fa8; }
.notice-type.alerta  { background: #fff3cd; color: #856404; }
.notice-type.urgente { background: #fde8e8; color: #b91c1c; }
.notice-type.evento  { background: #ede9fe; color: #6d28d9; }
[data-theme="dark"] .notice-type.info    { background: #0f2d54; color: #60a5fa; }
[data-theme="dark"] .notice-type.alerta  { background: #3d2a00; color: #fbbf24; }
[data-theme="dark"] .notice-type.urgente { background: #3d0f0f; color: #f87171; }
[data-theme="dark"] .notice-type.evento  { background: #2e1f5e; color: #a78bfa; }
.notice-title { font-size: .875rem; font-weight: 600; margin-bottom: .25rem; }
.notice-content { font-size: .8rem; color: var(--text-muted); line-height: 1.5; }
.notice-pin { font-size: .7rem; color: var(--red); font-weight: 700; display: flex; align-items: center; gap: .25rem; margin-bottom: .3rem; }

/* ─── GALLERY ───────────────────────────────────────────── */
.gallery-grid {
  columns: 4; gap: 1rem;
}
@media(max-width:900px) { .gallery-grid { columns: 3; } }
@media(max-width:600px) { .gallery-grid { columns: 2; } }
.gallery-item {
  break-inside: avoid; margin-bottom: 1rem;
  border-radius: var(--radius-md); overflow: hidden;
  cursor: pointer; position: relative;
  box-shadow: var(--shadow-sm);
}
.gallery-item img { width: 100%; display: block; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item-overlay {
  position: absolute; inset: 0;
  background: rgba(12,30,60,0); display: flex;
  align-items: center; justify-content: center;
  transition: background .3s ease;
}
.gallery-item:hover .gallery-item-overlay { background: rgba(12,30,60,.45); }
.gallery-item-overlay i {
  color: #fff; font-size: 1.5rem;
  opacity: 0; transform: scale(.7);
  transition: all .3s ease;
}
.gallery-item:hover .gallery-item-overlay i { opacity: 1; transform: scale(1); }
/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.92); display: flex;
  align-items: center; justify-content: center; padding: 1rem;
}
.lightbox img { max-height: 90vh; max-width: 90vw; border-radius: var(--radius-md); object-fit: contain; }
.lightbox-close {
  position: absolute; top: 1.25rem; right: 1.25rem;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.15); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.1rem;
  transition: background var(--transition);
}
.lightbox-close:hover { background: rgba(255,255,255,.25); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.15); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background var(--transition);
}
.lightbox-nav:hover { background: rgba(255,255,255,.25); }
#lbPrev { left: 1.25rem; }
#lbNext { right: 1.25rem; }

/* ─── CONTACT ───────────────────────────────────────────── */
.contact-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; }
@media(max-width:800px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}
.contact-info-item { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.contact-info-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--gold-pale); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-info-icon i { color: var(--gold); font-size: .9rem; }
.contact-info-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--text-faint); margin-bottom: .2rem; }
.contact-info-value { font-size: .9rem; color: var(--text); }
.hours-card {
  background: var(--navy); border-radius: var(--radius-lg); padding: 1.75rem; margin-top: 1.5rem;
}
.hours-title { font-family: 'Fraunces', serif; font-weight: 700; color: #fff; margin-bottom: 1rem; }
.hours-row { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: .875rem; color: rgba(255,255,255,.7); }
.hours-row:last-child { border-bottom: none; }
.hours-row span:last-child { color: var(--gold-light); font-weight: 600; }
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-muted); margin-bottom: .4rem; letter-spacing: .02em; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media(max-width:560px) { .form-grid-2 { grid-template-columns: 1fr; } }

/* ─── BUTTONS ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.6rem; border-radius: var(--radius-md);
  font-size: .875rem; font-weight: 600; letter-spacing: .02em;
  transition: all var(--transition); cursor: pointer;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-light); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(12,30,60,.25); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(201,146,42,.3); }
.btn-outline {
  background: transparent; color: var(--navy); border: 2px solid var(--navy);
}
.btn-outline:hover { background: var(--navy); color: #fff; }
[data-theme="dark"] .btn-outline { color: var(--text); border-color: var(--border); }
[data-theme="dark"] .btn-outline:hover { background: var(--surface2); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #a93226; }
.btn-sm { padding: .4rem .85rem; font-size: .8rem; border-radius: var(--radius-sm); }
.btn-full { width: 100%; }

/* ─── ALERTS / FLASH ────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .9rem 1.1rem; border-radius: var(--radius-md);
  font-size: .875rem; margin-bottom: 1.25rem;
}
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
[data-theme="dark"] .alert-success { background: #052e16; border-color: #166534; color: #4ade80; }
[data-theme="dark"] .alert-error   { background: #2d0505; border-color: #991b1b; color: #f87171; }
[data-theme="dark"] .alert-info    { background: #0f1f3e; border-color: #1e40af; color: #60a5fa; }

/* ─── FOOTER ────────────────────────────────────────────── */
footer {
  background: var(--navy); color: rgba(255,255,255,.75);
  margin-top: auto; padding: 3.5rem 0 1.5rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2.5rem; }
@media(max-width:800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width:500px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-title { font-family: 'Fraunces', serif; font-weight: 700; color: #fff; font-size: 1rem; margin-bottom: .75rem; }
.footer-text { font-size: .85rem; line-height: 1.6; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { font-size: .85rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--gold-light); }
.footer-socials { display: flex; gap: .6rem; margin-top: .75rem; }
.social-btn {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; transition: all var(--transition);
}
.social-btn:hover { background: var(--gold); color: var(--navy); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.25rem; font-size: .8rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: gap;
}

/* ─── BREADCRUMB ────────────────────────────────────────── */
.breadcrumb {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
  font-size: .8rem; color: var(--text-faint); margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--text-muted); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb i { font-size: .6rem; }

/* ─── NEWS DETAIL ───────────────────────────────────────── */
.article-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; }
@media(max-width:1000px) { .article-layout { grid-template-columns: 1fr; } }
.article-hero {
  border-radius: var(--radius-xl); overflow: hidden;
  height: 420px; background: var(--surface2); margin-bottom: 2rem;
}
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.article-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; padding: 1.25rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.article-meta-item { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--text-muted); }
.article-body {
  font-size: 1.02rem; line-height: 1.85; color: var(--text);
}
.article-body h2 { font-family: 'Fraunces', serif; font-size: 1.5rem; font-weight: 700; margin: 2rem 0 .75rem; }
.article-body h3 { font-family: 'Fraunces', serif; font-size: 1.2rem; font-weight: 700; margin: 1.5rem 0 .5rem; }
.article-body p { margin-bottom: 1.25rem; }
.article-body ul, .article-body ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.article-body li { margin-bottom: .4rem; }
.article-body strong { font-weight: 600; color: var(--navy); }
[data-theme="dark"] .article-body strong { color: var(--text); }
.article-body blockquote {
  border-left: 4px solid var(--gold); padding: .75rem 1.25rem;
  background: var(--gold-pale); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0; color: var(--navy); font-style: italic;
}
[data-theme="dark"] .article-body blockquote { background: var(--surface2); color: var(--text); }
.share-bar { display: flex; align-items: center; gap: .6rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.share-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); margin-right: .25rem; }
.share-btn {
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; transition: all var(--transition);
  border: 1px solid var(--border); color: var(--text-muted);
}
.share-btn:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-pale); }
.related-title { font-family: 'Fraunces', serif; font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.related-item { display: flex; gap: .75rem; padding: .75rem 0; border-bottom: 1px solid var(--border); cursor: pointer; transition: background var(--transition); }
.related-item:last-child { border-bottom: none; }
.related-item:hover .related-item-title { color: var(--gold); }
.related-img { width: 64px; height: 64px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; background: var(--surface2); }
.related-item-title { font-size: .85rem; font-weight: 600; line-height: 1.35; transition: color var(--transition); }
.related-item-date { font-size: .73rem; color: var(--text-faint); margin-top: .25rem; }

/* ─── PAGE HEADERS ──────────────────────────────────────── */
.page-hero {
  background: var(--navy); padding: 3.5rem 0;
  position: relative; overflow: hidden;
}
.page-hero::after {
  content: ''; position: absolute; top: -40%; right: -5%;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,146,42,.12) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-title {
  font-family: 'Fraunces', serif; font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700; color: #fff; margin-bottom: .5rem;
}
.page-hero-sub { color: rgba(255,255,255,.6); font-size: 1rem; }

/* ─── CATEGORY PILLS ────────────────────────────────────── */
.cat-pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; }
.cat-pill {
  padding: .4rem .95rem; border-radius: 20px;
  font-size: .8rem; font-weight: 600; cursor: pointer;
  border: 1.5px solid var(--border); color: var(--text-muted);
  transition: all var(--transition); background: var(--surface);
}
.cat-pill:hover { border-color: var(--gold); color: var(--gold); }
.cat-pill.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ─── PAGINATION ────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; gap: .4rem; margin-top: 3rem; }
.pag-btn {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: .875rem; font-weight: 600; cursor: pointer;
  border: 1.5px solid var(--border); color: var(--text-muted);
  background: var(--surface); transition: all var(--transition);
}
.pag-btn:hover { border-color: var(--gold); color: var(--gold); }
.pag-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ─── EMPTY STATE ───────────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-state-icon { font-size: 3rem; color: var(--text-faint); margin-bottom: 1rem; }
.empty-state-title { font-family: 'Fraunces', serif; font-size: 1.25rem; font-weight: 700; margin-bottom: .5rem; }
.empty-state-text { color: var(--text-muted); font-size: .9rem; }

/* ─── STATS STRIP ───────────────────────────────────────── */
.stats-strip { background: var(--navy); padding: 2.5rem 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media(max-width:700px) { .stats-grid { grid-template-columns: repeat(2,1fr); } }
.stat-item { text-align: center; padding: 1.25rem; }
.stat-num { font-family: 'Fraunces', serif; font-size: 2.5rem; font-weight: 700; color: var(--gold-light); line-height: 1; }
.stat-label { font-size: .8rem; color: rgba(255,255,255,.55); margin-top: .3rem; text-transform: uppercase; letter-spacing: .06em; }

/* ─── ADMIN TURNO SWITCHER ─────────────────────────────── */
#admin-sidebar[data-turno="diurno"] .admin-logo-icon { background: rgba(251,191,36,.25); }
#admin-sidebar[data-turno="nocturno"] .admin-logo-icon { background: rgba(124,58,237,.25); }
#admin-sidebar[data-turno="nocturno"] .admin-logo-icon i { color: #c4b5fd; }
#admin-sidebar[data-turno="diurno"] .admin-logo-icon i { color: #fbbf24; }
.admin-turno-btn-active-d { background: rgba(251,191,36,.2) !important; color: #fbbf24 !important; }
.admin-turno-btn-active-n { background: rgba(196,181,253,.2) !important; color: #c4b5fd !important; }

/* ─── ADMIN ─────────────────────────────────────────────── */
/* ══════════════════════════════════════════════════════════════
   ADMIN — modo página completa separada del sitio público
══════════════════════════════════════════════════════════════ */

/* Cuando el admin está activo, el body se comporta como contenedor fijo */
body.admin-mode {
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

/* Ocultar todo el sitio público cuando admin está activo */
body.admin-mode > #navbar,
body.admin-mode > main#mainContent,
body.admin-mode > footer,
body.admin-mode > #turnoBanner,
body.admin-mode > #turnoSelectorOverlay,
body.admin-mode > .lightbox,
body.admin-mode > #adminLogin {
  display: none !important;
}

/* El wrapper ahora usa CSS GRID — sin flexbox ni position:absolute */
#admin-wrapper {
  display: none;
}
#admin-wrapper.show {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: auto 1fr;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
}

/* ── Barra de acciones superior (ocupa toda la fila 1) ── */
#admin-action-bar {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1rem;
  background: var(--navy);
  border-bottom: 2px solid rgba(201,146,42,.4);
  flex-wrap: wrap;
}
.aab-brand {
  display: flex; align-items: center; gap: .5rem;
  font-family: 'Fraunces', serif; font-size: .88rem;
  font-weight: 700; color: var(--gold-light);
  margin-right: .5rem; white-space: nowrap;
}
.aab-brand i { font-size: .85rem; }
.aab-divider { width: 1px; height: 22px; background: rgba(255,255,255,.15); margin: 0 .25rem; flex-shrink: 0; }
.aab-btn {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .75rem; border-radius: var(--radius-sm);
  font-size: .75rem; font-weight: 600; cursor: pointer;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.07); color: rgba(255,255,255,.8);
  transition: all .15s; white-space: nowrap; font-family: inherit;
}
.aab-btn:hover { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.3); }
.aab-btn.aab-primary { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.aab-btn.aab-primary:hover { background: var(--gold-light); }
.aab-btn.aab-danger  { background: rgba(220,38,38,.18); border-color: rgba(220,38,38,.4); color: #f87171; }
.aab-btn.aab-danger:hover  { background: rgba(220,38,38,.3); }
.aab-spacer { flex: 1; }
.aab-status {
  font-size: .68rem; color: rgba(255,255,255,.45);
  white-space: nowrap; display: flex; align-items: center; gap: .3rem;
}
.aab-status.ok   { color: #4ade80; }
.aab-status.warn { color: #fbbf24; }
@media(max-width:768px) {
  #admin-action-bar { gap: .35rem; padding: .4rem .75rem; }
  .aab-brand span { display: none; }
  .aab-btn span { display: none; }
  .aab-btn { padding: .3rem .5rem; }
  .aab-status { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   ADMIN LAYOUT — solución definitiva
   #admin-wrapper = único position:fixed (pantalla completa)
   Todos los hijos = position:absolute dentro del wrapper
══════════════════════════════════════════════════════════════ */
:root {
  --aab-h:  44px;
  --atb-h:  59px;   /* 3px accent + 56px topbar */
  --asb-w: 240px;
}

#admin-wrapper { display: none; }
#admin-wrapper.show {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
}

/* ── Action bar ── */
#admin-action-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: var(--aab-h);
  z-index: 20;
  display: flex; align-items: center; gap: .5rem;
  padding: 0 1rem;
  background: var(--navy);
  border-bottom: 2px solid rgba(201,146,42,.4);
  overflow: hidden;
  box-sizing: border-box;
}

/* ── Sidebar ── */
#admin-sidebar {
  position: absolute;
  top: var(--aab-h); left: 0; bottom: 0;
  width: var(--asb-w);
  z-index: 15;
  background: var(--navy);
  display: flex; flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: left .25s ease;
}

/* ── Área principal ── */
#admin-main {
  position: absolute;
  top: var(--aab-h);
  left: var(--asb-w);
  right: 0; bottom: 0;
  z-index: 10;
}

/* ── Accent bar ── */
#adminTurnoAccentBar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #fbbf24 0%, transparent 60%);
  transition: background .3s;
}

/* ── Topbar ── */
.admin-topbar {
  position: absolute;
  top: 3px; left: 0; right: 0;
  height: 56px;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center; gap: 1rem;
  box-sizing: border-box;
}
.admin-topbar-title { font-size: 1rem; font-weight: 600; color: var(--text); }
.admin-topbar-spacer { flex: 1; }

/* ── Área de scroll ── */
/* Dentro de #admin-main: empieza a 59px, llega hasta el fondo */
.admin-content {
  position: absolute;
  top: var(--atb-h);
  left: 0; right: 0; bottom: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  padding: 1.75rem;
  scroll-behavior: smooth;
}
.admin-content::-webkit-scrollbar { width: 8px; }
.admin-content::-webkit-scrollbar-track { background: var(--surface2); }
.admin-content::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 4px; }
.admin-content::-webkit-scrollbar-thumb:hover { background: var(--gray-600); }
.admin-content { scrollbar-width: auto; scrollbar-color: var(--gray-400) var(--surface2); }
/* Scrollbar más visible en sub-windows tipo modal/editor */
.admin-card { overflow: visible; }

/* ── Mobile ── */
@media(max-width:768px) {
  #admin-sidebar { left: calc(-1 * var(--asb-w)); }
  #admin-sidebar.open { left: 0; box-shadow: 4px 0 24px rgba(0,0,0,.5); z-index: 25; }
  #admin-main { left: 0; }
  .admin-content { padding: 1rem .85rem; }
  .admin-topbar { padding: 0 .85rem; }
  .aab-brand span, .aab-btn span { display: none; }
  .aab-btn { padding: .3rem .5rem; }
  #cacheStatusBadge { display: none !important; }
}
/* ── Admin panels ── */
.admin-panel { display: none; }
.admin-panel.active { display: block; }

/* ── Sidebar internals ── */
.admin-logo { padding: 1.25rem 1rem; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: .75rem; }
.admin-logo-icon { width: 36px; height: 36px; background: rgba(201,146,42,.2); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; }
.admin-logo-icon i { color: var(--gold-light); font-size: .9rem; }
.admin-logo-text { font-family: 'Fraunces', serif; color: #fff; font-weight: 700; font-size: .95rem; }
.admin-logo-sub { color: rgba(255,255,255,.4); font-size: .7rem; }
.admin-nav { flex: 1; padding: .75rem 0; overflow-y: auto; }
.admin-nav-section { padding: .4rem 1rem .2rem; font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.3); margin-top: .5rem; }
.admin-nav-link { display: flex; align-items: center; gap: .7rem; padding: .6rem 1rem; font-size: .85rem; font-weight: 500; color: rgba(255,255,255,.6); cursor: pointer; transition: all var(--transition); margin: .1rem .5rem; border-radius: var(--radius-sm); }
.admin-nav-link:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.9); }
.admin-nav-link.active { background: rgba(201,146,42,.15); color: var(--gold-light); }
.admin-nav-link i { width: 16px; text-align: center; font-size: .85rem; }
.admin-user { padding: .85rem 1rem; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: .65rem; flex-shrink: 0; }
.admin-user-av { width: 34px; height: 34px; border-radius: 50%; background: rgba(201,146,42,.2); display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; color: var(--gold-light); flex-shrink: 0; }
.admin-user-name { font-size: .82rem; font-weight: 600; color: #fff; }
.admin-user-role { font-size: .7rem; color: rgba(255,255,255,.4); }
.admin-logout { margin-left: auto; width: 28px; height: 28px; border-radius: 6px; background: rgba(255,255,255,.06); display: flex; align-items: center; justify-content: center; cursor: pointer; color: rgba(255,255,255,.4); font-size: .75rem; transition: all var(--transition); }
.admin-logout:hover { background: rgba(220,38,38,.2); color: #f87171; }
.stats-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.75rem; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.stat-card-icon { width: 38px; height: 38px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; margin-bottom: .85rem; font-size: .9rem; }
.stat-card-icon.blue   { background: #eff6ff; color: #2563eb; }
.stat-card-icon.green  { background: #f0fdf4; color: #16a34a; }
.stat-card-icon.amber  { background: #fffbeb; color: #d97706; }
.stat-card-icon.purple { background: #faf5ff; color: #7c3aed; }
[data-theme="dark"] .stat-card-icon.blue   { background: #0f2040; color: #60a5fa; }
[data-theme="dark"] .stat-card-icon.green  { background: #052e16; color: #4ade80; }
[data-theme="dark"] .stat-card-icon.amber  { background: #2d1500; color: #fbbf24; }
[data-theme="dark"] .stat-card-icon.purple { background: #1e0a3c; color: #c084fc; }
.stat-card-value { font-family: 'Fraunces', serif; font-size: 1.85rem; font-weight: 700; line-height: 1; margin-bottom: .2rem; }
.stat-card-label { font-size: .78rem; color: var(--text-muted); }
/* Admin tables */
.admin-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); margin-bottom: 1.5rem;
}
.admin-card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem; }
.admin-card-title { font-weight: 600; font-size: .95rem; }
/* Tables always scroll horizontally */
.admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.admin-table th { padding: .7rem 1rem; text-align: left; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-faint); border-bottom: 1px solid var(--border); background: var(--surface2); white-space: nowrap; }
.admin-table td { padding: .8rem 1rem; font-size: .875rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--surface2); }
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .2rem .6rem; border-radius: 20px;
  font-size: .7rem; font-weight: 700;
}
.badge-green  { background: #f0fdf4; color: #166534; }
.badge-gray   { background: var(--gray-100); color: var(--gray-600); }
.badge-yellow { background: #fffbeb; color: #92400e; }
.badge-red    { background: #fef2f2; color: #991b1b; }
.badge-blue   { background: #eff6ff; color: #1e40af; }
[data-theme="dark"] .badge-green  { background: #052e16; color: #4ade80; }
[data-theme="dark"] .badge-gray   { background: var(--surface2); color: var(--text-muted); }
.action-btns { display: flex; gap: .35rem; }
.action-btn {
  width: 30px; height: 30px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; cursor: pointer; transition: all var(--transition);
  border: 1px solid var(--border); color: var(--text-muted); background: var(--surface);
}
.action-btn:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-pale); }
.action-btn.danger:hover { border-color: var(--red); color: var(--red); background: #fef2f2; }
/* Admin form */
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media(max-width:600px) { .admin-form-grid { grid-template-columns: 1fr; } }
.admin-form-full { grid-column: 1 / -1; }
.admin-form-group { margin-bottom: 0; }
.admin-form-label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-muted); margin-bottom: .35rem; letter-spacing: .02em; }
/* Toolbar */
.admin-toolbar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.admin-search { position: relative; }
.admin-search input { padding-left: 2.2rem; width: 220px; }
.admin-search i { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: .8rem; pointer-events: none; }
@media(max-width:600px) {
  .admin-search input { width: 140px; }
}

/* ─── ADMIN PANEL MOBILE ─────────────────────────────────── */
@media(max-width:768px) {
  /* Todos los grids de 2+ columnas dentro del admin colapsan a 1 */
  #admin-main .admin-form-grid,
  #admin-main [style*="grid-template-columns:1fr 1fr"],
  #admin-main [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  #admin-main [style*="grid-template-columns:1fr 1fr 1fr"],
  #admin-main [style*="grid-template-columns: 1fr 1fr 1fr"],
  #admin-main [style*="grid-template-columns:1fr 1fr auto"],
  #admin-main [style*="grid-template-columns: 1fr 1fr auto"] {
    grid-template-columns: 1fr !important;
  }
  #admin-main [style*="grid-template-columns:auto 1fr 1fr"],
  #admin-main [style*="grid-template-columns:auto 1fr auto"] {
    grid-template-columns: 1fr auto !important;
  }
  /* Teléfonos y correos extra: mantener layout de 2 cols compacto */
  #telefonosExtraList [style*="grid-template-columns"],
  #correosExtraList   [style*="grid-template-columns"] {
    grid-template-columns: 1fr auto !important;
    row-gap: .4rem;
  }
  #telefonosExtraList [style*="grid-template-columns"] > div:first-child,
  #correosExtraList   [style*="grid-template-columns"] > div:first-child,
  #telefonosExtraList [style*="grid-template-columns"] > div:nth-child(2),
  #correosExtraList   [style*="grid-template-columns"] > div:nth-child(2) {
    grid-column: 1;
  }
  /* Stats cards: 2 columnas en mobile */
  .stats-cards { grid-template-columns: repeat(2, 1fr) !important; }
  /* Admin cal container: una columna */
  .admin-cal-container { grid-template-columns: 1fr !important; }
  /* Banner editor: una columna */
  #panel-bannereditor > div[style*="grid"],
  #panel-bannereditor .admin-card div[style*="grid-template-columns:1fr 1fr 1fr 1fr"] {
    grid-template-columns: 1fr 1fr !important;
  }
  /* Topbar acciones: ocultar las menos importantes si overflow */
  .admin-topbar .deploy-btn span { display: none; }
  /* Chatbot panel: una columna */
  #panel-chatbot > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}
/* Deploy btn */
.deploy-btn {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem 1.1rem; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #fff; font-size: .82rem; font-weight: 700; cursor: pointer;
  transition: all var(--transition); border: none;
}
.deploy-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(5,150,105,.35); }
/* Notif badge */
.notif-wrap { position: relative; }
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--red); color: #fff;
  font-size: .6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
/* Login overlay */
.admin-login {
  position: fixed; inset: 0; z-index: 600;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.login-card {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 2.5rem; width: 100%; max-width: 400px;
  box-shadow: 0 32px 80px rgba(0,0,0,.35);
}
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo-icon {
  width: 60px; height: 60px; border-radius: var(--radius-md);
  background: var(--navy); display: flex; align-items: center; justify-content: center;
  margin: 0 auto .85rem;
}
.login-logo-icon i { color: var(--gold-light); font-size: 1.5rem; }
.login-title { font-family: 'Fraunces', serif; font-size: 1.4rem; font-weight: 700; color: var(--text); }
.login-sub { font-size: .85rem; color: var(--text-muted); margin-top: .25rem; }
.password-toggle {
  position: absolute; right: .75rem; top: 50%;
  transform: translateY(-50%); cursor: pointer;
  color: var(--text-faint); font-size: .85rem;
}
.input-wrap { position: relative; }
/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 700;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 0; width: 100%; max-width: 560px;
  max-height: 92vh;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  overflow: hidden; /* clip rounded corners */
  animation: fadeUp .3s ease;
}
.modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.modal-title { font-weight: 700; font-size: 1rem; }
.modal-close { width: 30px; height: 30px; border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text-faint); font-size: .8rem; transition: all var(--transition); }
.modal-close:hover { background: var(--surface2); color: var(--text); }
/* El body tiene scroll propio cuando excede el alto */
.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-400) var(--surface2);
}
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-track { background: var(--surface2); }
.modal-body::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 4px; }
.modal-body::-webkit-scrollbar-thumb:hover { background: var(--gray-600); }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .75rem; flex-shrink: 0; }
/* Modales más anchos para forms con muchos campos (auto via clase) */
.modal.modal-lg  { max-width: 720px; }
.modal.modal-xl  { max-width: 920px; }
.modal.modal-full { max-width: 1200px; }
/* Deploy modal steps */
.deploy-step { display: flex; align-items: center; gap: .7rem; padding: .5rem 0; font-size: .875rem; }
.deploy-step i.ok    { color: var(--green); }
.deploy-step i.err   { color: var(--red); }
.deploy-step i.spin  { color: var(--gold); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── RESPONSIVE ────────────────────────────────────────── */
@media(max-width:768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-menu {
    position: fixed; top: 64px; left: 0; right: 0; bottom: 0; z-index: 99;
    background: var(--surface); padding: 1rem;
    transform: translateX(-100%); transition: transform .3s ease;
    border-top: 1px solid var(--border);
  }
  .mobile-menu.open { transform: translateX(0); }
  .mobile-nav-link {
    display: block; padding: .85rem 1rem;
    font-size: 1rem; font-weight: 500; color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: color var(--transition);
  }
  .mobile-nav-link:hover { color: var(--gold); }
  #admin-sidebar { position: fixed; bottom: 0; top: 0; left: 0; z-index: 50; transform: translateX(-100%); }
  #admin-sidebar.open { transform: translateX(0); }
  .admin-topbar-menu { display: flex; }
}
@media(min-width:769px) {
  .admin-topbar-menu { display: none; }
  .mobile-menu { display: none; } /* Esta línea oculta el menú móvil en PC */
}

/* ─── MOBILE GLOBAL FIXES ────────────────────────────────── */
@media(max-width:768px) {
  /* Page heroes */
  .page-hero { padding: 2rem 0 1.5rem !important; }
  .page-hero-title { font-size: clamp(1.3rem, 6vw, 2rem) !important; }
  .page-hero-sub  { font-size: .82rem !important; }

  /* Turno hero (page-turnos / asistencia) */
  .turno-hero { padding: 1.5rem 0 1rem !important; }

  /* Turno tabs — full-width scrollable row */
  .turno-tabs {
    gap: .5rem !important;
    margin-bottom: 1.25rem !important;
    overflow-x: auto;
    flex-wrap: nowrap !important;
    padding-bottom: .25rem;
    -webkit-overflow-scrolling: touch;
  }
  .turno-tab {
    padding: .55rem 1.1rem !important;
    font-size: .8rem !important;
    flex-shrink: 0;
  }

  /* Plan tabs */
  .plan-tabs { gap: .3rem !important; overflow-x: auto; flex-wrap: nowrap !important; padding-bottom: .2rem; }
  .plan-tab  { flex-shrink: 0; font-size: .75rem !important; padding: .3rem .7rem !important; }

  /* Section general padding */
  .section    { padding: 2.5rem 0 !important; }
  .section-sm { padding: 1.5rem 0 !important; }

  /* Container safe padding */
  .container  { padding: 0 .85rem !important; }

  /* News grid: single column */
  .news-grid  { grid-template-columns: 1fr !important; gap: 1rem !important; }
  .news-card-featured { grid-template-columns: 1fr !important; grid-column: span 1 !important; }
  .news-card-featured .card-img { height: 200px; }

  /* Home layout: single column */
  .home-layout { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
  .notices-panel { position: static !important; }

  /* Stats grid */
  .stats-grid { grid-template-columns: repeat(2,1fr) !important; gap: .75rem !important; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr !important; gap: 1.25rem !important; }
  footer { padding: 2rem 0 1rem !important; }

  /* Asist card: stack on mobile */
  .asist-card { grid-template-columns: 36px 1fr !important; }

  /* Calendar: shrink day cells */
  .cal-day { min-height: 48px !important; padding: .2rem !important; }
  .cal-day-num { font-size: .7rem !important; width: 20px !important; height: 20px !important; }
  .cal-event-dot { font-size: .55rem !important; }
}

/* ─── TURNOS / PLAN TABS ─────────────────────────────────── */
.turno-tabs { display:flex; gap:.75rem; margin-bottom:2rem; flex-wrap:wrap; }

/* ── Base tab ── */
.turno-tab {
  position: relative; overflow: hidden;
  padding: .7rem 1.6rem;
  border-radius: var(--radius-lg);
  font-size: .9rem; font-weight: 700; cursor: pointer;
  border: 2px solid var(--border); color: var(--text-muted);
  transition: all .3s cubic-bezier(.4,0,.2,1);
  background: var(--surface);
  display: flex; align-items: center; gap: .5rem;
  letter-spacing: .01em;
  box-shadow: var(--shadow-sm);
  user-select: none;
}
.turno-tab i { font-size: 1rem; transition: transform .4s ease; }
.turno-tab:hover i { transform: scale(1.2) rotate(-5deg); }

/* ──────────────────────────────────────────
   DIURNO — gradiente solar cálido + rayos
────────────────────────────────────────── */
.turno-tab.diurno {
  border-color: rgba(217,119,6,.25);
  color: #92400e;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}
.turno-tab.diurno:hover {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  box-shadow: 0 4px 20px rgba(245,158,11,.25);
  color: #78350f;
}
.turno-tab.active.diurno {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 60%, #b45309 100%);
  border-color: #d97706;
  color: #fff;
  box-shadow: 0 6px 24px rgba(217,119,6,.45), 0 2px 8px rgba(217,119,6,.3);
}
/* Halo solar giratorio en tab activo diurno */
.turno-tab.active.diurno::before {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.35) 0%, transparent 70%);
  animation: solar-pulse 2.5s ease-in-out infinite;
}
/* Destellos de rayos de sol */
.turno-tab.active.diurno::after {
  content: '';
  position: absolute; inset: 0;
  background: repeating-conic-gradient(
    rgba(255,255,255,.08) 0deg 10deg,
    transparent 10deg 30deg
  );
  border-radius: inherit;
  animation: sun-rays 12s linear infinite;
}
@keyframes solar-pulse {
  0%,100% { transform: scale(1); opacity: .6; }
  50%      { transform: scale(1.35); opacity: 1; }
}
@keyframes sun-rays { to { transform: rotate(360deg); } }

/* ──────────────────────────────────────────
   NOCTURNO — gradiente noche + estrellas
────────────────────────────────────────── */
.turno-tab.nocturno {
  border-color: rgba(109,40,217,.2);
  color: #4c1d95;
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
}
.turno-tab.nocturno:hover {
  border-color: #7c3aed;
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  box-shadow: 0 4px 20px rgba(124,58,237,.2);
  color: #3b0764;
}
.turno-tab.active.nocturno {
  background: linear-gradient(135deg, #1e1040 0%, #2d1b69 55%, #1a0a2e 100%);
  border-color: #7c3aed;
  color: #e9d5ff;
  box-shadow: 0 6px 24px rgba(109,40,217,.5), 0 2px 8px rgba(109,40,217,.35);
}
/* Luna brillante */
.turno-tab.active.nocturno::before {
  content: '';
  position: absolute; top: -20px; right: -10px;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(196,181,253,.5) 0%, transparent 65%);
  animation: moon-glow 3s ease-in-out infinite;
}
/* Estrellas titilantes */
.turno-tab.active.nocturno::after {
  content: '✦ ✧ ✦ ✧ ✦';
  position: absolute; top: 3px; right: 6px;
  font-size: .45rem; color: rgba(233,213,255,.7);
  letter-spacing: 2px;
  animation: twinkle 2s ease-in-out infinite alternate;
}
@keyframes moon-glow {
  0%,100% { transform: scale(1) translate(0,0); opacity:.6; }
  50%      { transform: scale(1.2) translate(-4px,4px); opacity:1; }
}
@keyframes twinkle {
  from { opacity:.3; letter-spacing:2px; }
  to   { opacity:1;  letter-spacing:4px; }
}

/* Dark mode adjustments */
[data-theme="dark"] .turno-tab.diurno {
  background: linear-gradient(135deg, #2d1a00 0%, #3d2400 100%);
  border-color: rgba(245,158,11,.3);
  color: #fcd34d;
}
[data-theme="dark"] .turno-tab.diurno:hover {
  background: linear-gradient(135deg, #3d2400 0%, #4d2e00 100%);
  color: #fde68a;
}
[data-theme="dark"] .turno-tab.nocturno {
  background: linear-gradient(135deg, #1a0a2e 0%, #2d1b69 100%);
  border-color: rgba(124,58,237,.3);
  color: #c4b5fd;
}
[data-theme="dark"] .turno-tab.nocturno:hover {
  background: linear-gradient(135deg, #2d1b69 0%, #3b2080 100%);
  color: #e9d5ff;
}

.plan-tabs { display:flex; gap:.4rem; margin-bottom:1.5rem; flex-wrap:wrap; }
.plan-tab {
  padding:.4rem 1rem; border-radius:20px;
  font-size:.8rem; font-weight:600; cursor:pointer;
  border:1.5px solid var(--border); color:var(--text-muted);
  transition:all var(--transition); background:var(--surface);
}
.plan-tab.active { background:var(--gold); color:var(--navy); border-color:var(--gold); }

.plan-badge {
  display:inline-flex; align-items:center; gap:.3rem;
  padding:.2rem .7rem; border-radius:20px; font-size:.72rem; font-weight:700;
}
.plan-badge.p2026 { background:#eff6ff; color:#1d4ed8; }
.plan-badge.p2012 { background:#f0fdf4; color:#166534; }
.plan-badge.p94   { background:#fef9c3; color:#854d0e; }
.plan-badge.pla   { background:#fdf4ff; color:#7e22ce; }
[data-theme="dark"] .plan-badge.p2026 { background:#1e3a5f; color:#93c5fd; }
[data-theme="dark"] .plan-badge.p2012 { background:#052e16; color:#86efac; }
[data-theme="dark"] .plan-badge.p94   { background:#2d2000; color:#fde047; }
[data-theme="dark"] .plan-badge.pla   { background:#2e1065; color:#d8b4fe; }

.turno-section { display:none; animation:fadeUp .3s ease; }
.turno-section.active { display:block; }

.plan-section { display:none; animation:fadeUp .3s ease; }
.plan-section.active { display:block; }

.horario-table { width:100%; border-collapse:collapse; margin-top:1rem; }
/* ── Horarios públicos: timetable cards ── */
.hg-pub-card { background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);overflow:hidden;margin-bottom:1.5rem;box-shadow:var(--shadow-sm); }
.hg-pub-header { display:flex;align-items:center;justify-content:space-between;padding:.85rem 1.25rem;border-bottom:2px solid var(--border);background:var(--surface2); }
.hg-pub-table { width:100%;border-collapse:collapse;font-size:.82rem; }
.hg-pub-table th { padding:.5rem .65rem;text-align:center;background:var(--navy);color:var(--gold-light);font-size:.72rem;font-weight:700;border:1px solid rgba(255,255,255,.08); }
.hg-pub-table th:first-child,.hg-pub-table th:nth-child(2) { text-align:left; }
.hg-pub-table td { padding:.4rem .6rem;border:1px solid var(--border);vertical-align:middle;text-align:center; }
.hg-pub-table td:first-child,.hg-pub-table td:nth-child(2) { text-align:left;white-space:nowrap; }
.hg-pub-table tr:hover td { background:var(--surface2); }
.hg-mat-pill { display:inline-block;padding:.2rem .55rem;border-radius:20px;font-size:.75rem;font-weight:600;white-space:nowrap; }
.horario-table th {
  padding:.65rem 1rem; text-align:left; font-size:.75rem; font-weight:700;
  text-transform:uppercase; letter-spacing:.06em; color:var(--text-faint);
  background:var(--surface2); border-bottom:2px solid var(--border);
}
.horario-table td {
  padding:.75rem 1rem; font-size:.875rem; border-bottom:1px solid var(--border); vertical-align:middle;
}
.horario-table tr:last-child td { border-bottom:none; }
.horario-table tr:hover td { background:var(--surface2); }

.turno-hero {
  padding:2.5rem 0 1.5rem;
  background:linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
}
.turno-hero.nocturno { background:linear-gradient(135deg, #1a0a2e 0%, #2d1b69 100%); }

/* ─── CALENDARIO / ASISTENCIA ────────────────────────────── */
.cal-wrapper {
  background:var(--surface);
  border-radius:var(--radius-xl);
  overflow:hidden;
  box-shadow:0 2px 24px rgba(12,30,60,.08), 0 1px 4px rgba(12,30,60,.04);
  border:1px solid var(--border);
}
.cal-header {
  background:linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color:#fff; padding:1.1rem 1.5rem;
  display:flex; align-items:center; justify-content:space-between;
}
.cal-nav-btn {
  width:32px; height:32px; border-radius:50%;
  background:rgba(255,255,255,.12); border:none;
  color:#fff; cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:background .15s; font-size:.8rem;
}
.cal-nav-btn:hover { background:rgba(255,255,255,.25); }
.cal-month-title {
  font-family:'Fraunces',serif; font-size:1.05rem; font-weight:700;
  letter-spacing:.01em;
}
.cal-grid {
  display:grid; grid-template-columns:repeat(7,1fr);
  background:var(--border);
  gap:1px;
}
.cal-day-name {
  padding:.55rem .25rem; text-align:center; font-size:.68rem; font-weight:700;
  text-transform:uppercase; letter-spacing:.08em; color:var(--text-faint);
  background:var(--surface2);
}
.cal-day-name:first-child,
.cal-day-name:last-child { color:rgba(201,146,42,.8); }
.cal-day {
  min-height:88px; padding:.45rem .4rem;
  background:var(--surface);
  cursor:pointer;
  transition:background .12s;
  position:relative; overflow:visible;
}
.cal-day:hover { background:var(--surface2); }
.cal-day.other-month { background:var(--gray-50); opacity:.5; pointer-events:none; }
[data-theme="dark"] .cal-day.other-month { background:var(--surface2); opacity:.4; }
.cal-day.weekend .cal-day-num { color:var(--gold); }
.cal-day.today { background:#fffbf0; }
[data-theme="dark"] .cal-day.today { background:rgba(201,146,42,.08); }
.cal-day.today .cal-day-num {
  background:var(--gold); color:var(--navy);
  border-radius:50%; width:24px; height:24px;
  display:flex; align-items:center; justify-content:center;
  font-weight:800; box-shadow:0 2px 8px rgba(201,146,42,.4);
}
.cal-day.has-events { }
.cal-day-num {
  font-size:.8rem; font-weight:600; color:var(--text-muted);
  width:24px; height:24px;
  display:flex; align-items:center; justify-content:center;
  border-radius:50%;
}
.cal-event-dot {
  font-size:.62rem; padding:.06rem .3rem; border-radius:3px; margin-top:.2rem;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:600;
}

.asist-detail {
  background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg);
  margin-top:1.5rem; overflow:hidden;
}
.asist-detail-header { padding:1rem 1.5rem; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; }
.asist-detail-title { font-weight:700; font-size:.95rem; }
.asist-card {
  padding:1rem 1.5rem; border-bottom:1px solid var(--border); display:grid;
  grid-template-columns:auto 1fr auto; gap:1rem; align-items:center;
}
.asist-card:last-child { border-bottom:none; }
.asist-turno-icon {
  width:36px; height:36px; border-radius:var(--radius-sm); display:flex; align-items:center; justify-content:center; font-size:.85rem;
}
.asist-turno-icon.diurno { background:#dbeafe; color:#1d4ed8; }
.asist-turno-icon.nocturno { background:#ede9fe; color:#5b21b6; }
.asist-materia { font-weight:600; font-size:.9rem; }
.asist-meta { font-size:.78rem; color:var(--text-muted); margin-top:.15rem; }
.asist-motivo { font-size:.78rem; color:var(--text-faint); font-style:italic; }

/* ─── PAGE HERO ──────────────────────────────────────────── */
.page-hero { background:var(--navy); padding:3rem 0 2rem; }
.page-hero-title { font-family:'Fraunces',serif; font-size:clamp(1.8rem,4vw,2.8rem); font-weight:700; color:#fff; }
.page-hero-sub { color:rgba(255,255,255,.65); margin-top:.5rem; font-size:.95rem; }

/* ─── ADMIN CALENDAR ─────────────────────────────────────── */
.admin-cal-container { display:grid; grid-template-columns:1fr 340px; gap:1.5rem; }
@media(max-width:900px) { .admin-cal-container { grid-template-columns:1fr; } }
.admin-cal-sidebar {
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius-xl); overflow:hidden;
  box-shadow:0 2px 12px rgba(12,30,60,.05);
}
.admin-cal-sidebar-header { padding:1rem 1.25rem; border-bottom:1px solid var(--border); font-weight:700; }
.asist-list-item {
  padding:.75rem 1.25rem; border-bottom:1px solid var(--border); cursor:pointer;
  transition:background var(--transition);
}
.asist-list-item:hover { background:var(--surface2); }
.asist-list-item:last-child { border-bottom:none; }

/* ─── CAL BARS — vivid solid colors (20 palette) ─────────── */
.cal-bar {
  position: absolute;
  height: 18px;
  line-height: 18px;
  font-size: .6rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 1;
  cursor: pointer;
  letter-spacing: .01em;
  text-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: filter .12s, opacity .12s;
}
.cal-bar:hover { filter: brightness(1.12); opacity:.95; }
.cal-bar.bar-single { left:3px; right:3px; border-radius:5px; padding:0 6px; }
.cal-bar.bar-start  { left:3px; right:-1px; border-radius:5px 0 0 5px; padding-left:6px; }
.cal-bar.bar-mid    { left:-1px; right:-1px; border-radius:0; }
.cal-bar.bar-end    { left:-1px; right:3px; border-radius:0 5px 5px 0; }

/* 20 vivid colors — solid, white text */
.cal-bar.mc-0  { background:#1a73e8; color:#fff; } /* Google Blue      */
.cal-bar.mc-1  { background:#e53935; color:#fff; } /* Tomato           */
.cal-bar.mc-2  { background:#2e7d32; color:#fff; } /* Forest Green     */
.cal-bar.mc-3  { background:#e65100; color:#fff; } /* Deep Orange      */
.cal-bar.mc-4  { background:#6a1b9a; color:#fff; } /* Purple Grape     */
.cal-bar.mc-5  { background:#c2185b; color:#fff; } /* Pink Raspberry   */
.cal-bar.mc-6  { background:#00796b; color:#fff; } /* Teal             */
.cal-bar.mc-7  { background:#1565c0; color:#fff; } /* Royal Blue       */
.cal-bar.mc-8  { background:#558b2f; color:#fff; } /* Olive Green      */
.cal-bar.mc-9  { background:#f57f17; color:#fff; } /* Amber            */
.cal-bar.mc-10 { background:#0277bd; color:#fff; } /* Light Blue       */
.cal-bar.mc-11 { background:#ad1457; color:#fff; } /* Dark Pink        */
.cal-bar.mc-12 { background:#00695c; color:#fff; } /* Dark Teal        */
.cal-bar.mc-13 { background:#283593; color:#fff; } /* Dark Indigo      */
.cal-bar.mc-14 { background:#bf360c; color:#fff; } /* Burnt Sienna     */
.cal-bar.mc-15 { background:#4527a0; color:#fff; } /* Deep Purple      */
.cal-bar.mc-16 { background:#0d47a1; color:#fff; } /* Dark Blue        */
.cal-bar.mc-17 { background:#1b5e20; color:#fff; } /* Dark Green       */
.cal-bar.mc-18 { background:#880e4f; color:#fff; } /* Dark Magenta     */
.cal-bar.mc-19 { background:#e91e63; color:#fff; } /* Flamingo         */
/* Dark mode — same vivid colors look great on dark bg */
[data-theme="dark"] .cal-bar { text-shadow:none; opacity:.92; }
[data-theme="dark"] .cal-bar:hover { opacity:1; }

/* ─── MAP (Leaflet) ──────────────────────────────────────── */
#mapContainer { transition: box-shadow var(--transition); }
#mapContainer:hover { box-shadow: var(--shadow-lg); }
.leaflet-container { font-family: 'DM Sans', system-ui, sans-serif; }
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
}
.map-marker-label {
  background: var(--navy); color: #fff;
  padding: .35rem .75rem; border-radius: var(--radius-sm);
  font-size: .78rem; font-weight: 600;
}

/* ─── CACHE STATUS ──────────────────────────────────────────── */
[data-theme="dark"] #cacheStatusBadge { filter: brightness(.85); }
#cacheStatusBadge { transition: background .3s, color .3s; max-width:220px; overflow:hidden; text-overflow:ellipsis; }

/* ─── TURNO PAGE INDEPENDENCE ────────────────────────────── */
/* Hero nocturno variant */
.page-hero.nocturno {
  background: linear-gradient(135deg, #1a0a3c 0%, #2d1065 50%, #0f2040 100%);
}
/* Tabs hidden when turno is globally locked */
.turno-tabs.locked { display: none !important; }

/* Turno-section transitions */
.turno-section {
  display: none;
  animation: fadeUp .35s ease both;
}
.turno-section.active { display: block; }

/* Info hero cards */
[data-theme="dark"] .turno-info-hero.diurno {
  background: linear-gradient(135deg, #2d1500 0%, #1a0e00 100%) !important;
  border-color: rgba(217,119,6,.3) !important;
}
[data-theme="dark"] .turno-info-hero.diurno * { color: #fcd34d !important; }
[data-theme="dark"] .turno-info-hero.diurno p { color: #fde68a !important; }
[data-theme="dark"] .turno-info-hero.nocturno {
  background: linear-gradient(135deg, #1e0a3c 0%, #0f0530 100%) !important;
  border-color: rgba(109,40,217,.3) !important;
}
[data-theme="dark"] .turno-info-hero.nocturno * { color: #c4b5fd !important; }

/* Admin sidebar improvements */
#admin-sidebar {
  background: linear-gradient(180deg, #0c1e3c 0%, #0a1628 100%);
}
.admin-nav-section {
  font-size: .62rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,.25);
  padding: .9rem 1.25rem .35rem;
}
.admin-nav-link {
  display: flex; align-items: center; gap: .65rem;
  padding: .58rem 1.25rem;
  font-size: .84rem; font-weight: 500;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  transition: all .18s ease;
  border-left: 2px solid transparent;
  margin: .08rem 0;
  border-radius: 0;
}
.admin-nav-link i {
  width: 16px; text-align: center;
  font-size: .82rem; flex-shrink: 0;
  opacity: .7; transition: opacity .18s;
}
.admin-nav-link:hover {
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.06);
  border-left-color: rgba(201,146,42,.4);
}
.admin-nav-link:hover i { opacity: 1; }
.admin-nav-link.active {
  color: #fff;
  background: rgba(201,146,42,.12);
  border-left-color: var(--gold);
  font-weight: 600;
}
.admin-nav-link.active i { opacity: 1; color: var(--gold-light); }
/* Nocturno active accent */
#admin-sidebar[data-turno="nocturno"] .admin-nav-link.active {
  background: rgba(124,58,237,.15);
  border-left-color: #c4b5fd;
}
#admin-sidebar[data-turno="nocturno"] .admin-nav-link.active i { color: #c4b5fd; }

/* Admin topbar improvements */
.admin-topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(12,30,60,.04);
}


/* ─── TURNO SELECTOR HOME ───────────────────────────────── */
.turno-selector-overlay {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(10,22,40,.92); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; animation: fadeIn .3s ease;
  overflow-y: auto;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

/* Cuando el overlay real recibe la clase ts-styled, usa las mismas variables que el preview */
#turnoSelectorOverlay.ts-styled {
  background:
    radial-gradient(ellipse at 20% 0%,   color-mix(in srgb, var(--ts-acc-1,#e8b050) 25%, transparent) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 100%, color-mix(in srgb, var(--ts-acc-2,#7c3aed) 30%, transparent) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 120%, color-mix(in srgb, var(--ts-acc-3,#06b6d4) 20%, transparent) 0%, transparent 45%),
    linear-gradient(135deg, var(--ts-bg-a,#050a18) 0%, var(--ts-bg-b,#0c1e3c) 100%) !important;
  backdrop-filter: blur(0px);
}
#turnoSelectorOverlay.ts-styled .turno-selector-card {
  background: rgba(255,255,255,.04) !important;
  border: 1px solid rgba(255,255,255,.09);
  max-width: var(--ts-max-w,720px);
  border-radius: var(--ts-radius,28px);
  box-shadow: 0 40px 80px rgba(0,0,0,.5);
}
#turnoSelectorOverlay.ts-styled .turno-selector-title { color: #fff !important; }
#turnoSelectorOverlay.ts-styled .turno-selector-sub   { color: rgba(255,255,255,.65) !important; }
#turnoSelectorOverlay.ts-styled .turno-option-card {
  border-color: rgba(255,255,255,.12);
  color: #fff;
}
#turnoSelectorOverlay.ts-styled .turno-option-card.diurno {
  background:
    radial-gradient(ellipse at top, color-mix(in srgb, var(--ts-acc-1,#e8b050) 30%, transparent) 0%, transparent 60%),
    linear-gradient(160deg, var(--ts-card-d-a,#1a3567) 0%, var(--ts-card-d-b,#06122a) 100%);
}
#turnoSelectorOverlay.ts-styled .turno-option-card.nocturno {
  background:
    radial-gradient(ellipse at top, color-mix(in srgb, var(--ts-acc-2,#7c3aed) 30%, transparent) 0%, transparent 60%),
    linear-gradient(160deg, var(--ts-card-n-a,#2e1065) 0%, var(--ts-card-n-b,#0a0a2e) 100%);
}
#turnoSelectorOverlay.ts-styled .turno-option-card.diurno .turno-option-icon   { background: linear-gradient(135deg,#fbbf24 0%,#d97706 100%); color:#fff; }
#turnoSelectorOverlay.ts-styled .turno-option-card.nocturno .turno-option-icon { background: linear-gradient(135deg,#a78bfa 0%,#6d28d9 100%); color:#fff; }
#turnoSelectorOverlay.ts-styled .turno-option-name { color: #fff !important; }
#turnoSelectorOverlay.ts-styled .turno-option-desc { color: rgba(255,255,255,.7) !important; }
#turnoSelectorOverlay.ts-styled p[style*="text-faint"] { color: rgba(255,255,255,.4) !important; }
#turnoSelectorOverlay.ts-styled .turno-option-plan-badge {
  border-color: rgba(255,255,255,.2);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.85) !important;
}
.turno-selector-card {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 2rem 2rem 1.5rem; width: 100%; max-width: 640px;
  box-shadow: 0 40px 80px rgba(0,0,0,.4);
  text-align: center;
}
.turno-selector-title {
  font-family: 'Fraunces', serif; font-size: clamp(1.3rem,5vw,2.2rem);
  font-weight: 700; color: var(--text); margin-bottom: .4rem;
}
.turno-selector-sub { color: var(--text-muted); font-size: .88rem; margin-bottom: 1.5rem; line-height: 1.5; }
.turno-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.turno-option-card {
  border: 2px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.5rem 1rem; cursor: pointer; transition: all .25s ease;
  text-decoration: none; display: block;
}
.turno-option-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.turno-option-card.diurno:hover { border-color: var(--gold); }
.turno-option-card.nocturno:hover { border-color: #7c3aed; }
.turno-option-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .85rem; font-size: 1.5rem;
}
.turno-option-card.diurno .turno-option-icon { background: #fffbeb; color: #d97706; }
.turno-option-card.nocturno .turno-option-icon { background: #ede9fe; color: #6d28d9; }
.turno-option-name { font-family:'Fraunces',serif; font-size:1.1rem; font-weight:700; margin-bottom:.3rem; }
.turno-option-desc { font-size:.78rem; color:var(--text-muted); line-height:1.5; }
.turno-option-plans { display:flex; gap:.3rem; flex-wrap:wrap; justify-content:center; margin-top:.6rem; }
.turno-option-plan-badge { font-size:.6rem; font-weight:700; padding:.15rem .45rem; border-radius:20px; }

/* Móvil: cards apiladas en fila horizontal */
@media(max-width:520px) {
  .turno-selector-card { padding: 1.25rem .9rem 1rem; border-radius: var(--radius-lg); }
  .turno-selector-sub  { font-size: .8rem; margin-bottom: 1rem; }
  .turno-cards { grid-template-columns: 1fr; gap: .65rem; }
  .turno-option-card {
    padding: .85rem 1rem;
    display: grid;
    grid-template-columns: 44px 1fr;
    grid-template-rows: auto auto auto;
    column-gap: .85rem;
    text-align: left;
    align-items: start;
  }
  .turno-option-icon {
    width: 44px; height: 44px; font-size: 1.15rem;
    margin: 0; grid-row: 1 / span 3;
  }
  .turno-option-name  { font-size: .95rem; margin-bottom: .1rem; }
  .turno-option-desc  { font-size: .72rem; }
  .turno-option-plans { justify-content: flex-start; margin-top: .3rem; }
  .turno-option-plan-badge { font-size: .58rem; }
}

/* ─── TURNO BANNER (once selected) ──────────────────────── */
.turno-banner {
  background: var(--navy); padding: .45rem 0;
  position: fixed; top: var(--sticky-offset, 64px); left: 0; right: 0; z-index: 130;
  border-bottom: 2px solid var(--gold);
}
/* Compensar el espacio que ocupa la barra fija en el contenido */
body.turno-activo #mainContent { margin-top: 40px; }

.turno-banner-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
}
.turno-banner-left  { display: flex; align-items: center; gap: .5rem; min-width: 0; flex: 1; overflow: hidden; }
.turno-banner-label { color: rgba(255,255,255,.6); font-size: .75rem; white-space: nowrap; flex-shrink: 0; }
.turno-banner-name  { color: #fff; font-weight: 700; font-size: .85rem; white-space: nowrap; }
.turno-banner-change {
  font-size: .72rem; color: var(--gold-light); cursor: pointer;
  background: rgba(201,146,42,.15); border: 1px solid rgba(201,146,42,.3);
  padding: .2rem .6rem; border-radius: 20px; transition: all .2s;
  white-space: nowrap; flex-shrink: 0;
}
.turno-banner-change:hover { background: rgba(201,146,42,.3); }
@media(max-width:480px) {
  .turno-banner { top: 56px; }
  body.turno-activo #mainContent { margin-top: 38px; }
  .turno-banner-inner { padding: 0 .75rem; }
  .turno-banner-label { display: none; }
  .turno-banner-name  { font-size: .8rem; }
  .turno-banner-change { font-size: .66rem; padding: .16rem .45rem; }
}

/* ─── ADMIN TURNO CONTEXT BAR ────────────────────────────── */
.admin-turno-context {
  display: flex; align-items: center; gap: .6rem;
  padding: .55rem 1rem;
  font-size: .75rem; font-weight: 600;
  border-radius: var(--radius-sm);
  margin-bottom: 1.1rem;
  border: 1px solid transparent;
  line-height: 1.3;
}
.admin-turno-context.diurno  { background:#fffbeb; color:#92400e; border-color:rgba(217,119,6,.2); }
.admin-turno-context.nocturno{ background:#f5f3ff; color:#4c1d95; border-color:rgba(109,40,217,.2); }
[data-theme="dark"] .admin-turno-context.diurno   { background:#2d1500; color:#fbbf24; border-color:rgba(251,191,36,.25); }
[data-theme="dark"] .admin-turno-context.nocturno { background:#1e0a3c; color:#c4b5fd; border-color:rgba(196,181,253,.25); }
.admin-turno-context i { font-size:.85rem; flex-shrink:0; }
.admin-turno-context .ctx-text { flex:1; }
.admin-turno-context strong { font-weight:800; }

/* ─── QUICK ACTION BUTTONS ───────────────────────────────── */
.qbtn {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .22rem .6rem; border-radius: 20px; font-size: .68rem;
  font-weight: 700; cursor: pointer; border: 1.5px solid transparent;
  transition: all .15s ease; white-space: nowrap; line-height: 1.4;
}
.qbtn:hover { transform: scale(1.05); }
.qbtn-pub  { background:#f0fdf4; color:#166534; border-color:#bbf7d0; }
.qbtn-draft{ background:#f8f7f5; color:#5a5750; border-color:#dbd9d3; }
.qbtn-on   { background:#f0fdf4; color:#166534; border-color:#bbf7d0; }
.qbtn-off  { background:#fef2f2; color:#991b1b; border-color:#fecaca; }
.qbtn-pin  { background:#fef2f2; color:#991b1b; border-color:#fecaca; }
.qbtn-unpin{ background:#f8f7f5; color:#5a5750; border-color:#dbd9d3; }
.qbtn-dest { background:#fffbeb; color:#92400e; border-color:#fde68a; }
.qbtn-nodest{ background:#f8f7f5; color:#5a5750; border-color:#dbd9d3; }
[data-theme="dark"] .qbtn-pub  { background:#052e16; color:#4ade80; border-color:#16a34a; }
[data-theme="dark"] .qbtn-draft{ background:#1e2030; color:#9fa8b8; border-color:#374151; }
[data-theme="dark"] .qbtn-on   { background:#052e16; color:#4ade80; border-color:#16a34a; }
[data-theme="dark"] .qbtn-off  { background:#2d0a0a; color:#f87171; border-color:#dc2626; }

/* ─── BANNER EDITOR ─────────────────────────────────────── */
input[type="color"] {
  -webkit-appearance: none;
  border: 1.5px solid var(--border);
  background: var(--surface);
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
input[type="color"]::-webkit-color-swatch { border-radius: 3px; border: none; }
input[type="range"] {
  -webkit-appearance: none;
  width: 100%; height: 4px; border-radius: 2px;
  background: var(--border); outline: none; border: none;
  padding: 0; box-shadow: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--gold); cursor: pointer;
  border: 2px solid var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.bnr-preview-wrap {
  padding: .5rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
@media(max-width:700px) {
  #panel-bannereditor .admin-card > div[style*="grid-template-columns:1fr 1fr"],
  #panel-bannereditor > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  #panel-bannereditor div[style*="grid-template-columns:1fr 1fr 1fr 1fr"] {
    grid-template-columns: 1fr 1fr !important;
  }
}

.slide-preview-strip { display:flex; gap:.75rem; overflow-x:auto; padding:.5rem 0; }
.slide-preview-card {
  flex-shrink:0; width:180px; background:var(--surface2);
  border:2px solid var(--border); border-radius:var(--radius-md);
  overflow:hidden; cursor:grab; transition:border-color var(--transition);
  position:relative;
}
.slide-preview-card:hover { border-color:var(--gold); }
.slide-preview-card.drag-over { border-color:var(--gold); box-shadow:0 0 0 3px rgba(201,146,42,.2); }
.slide-preview-img { height:90px; background:var(--navy); background-size:cover; background-position:center; }
.slide-preview-body { padding:.5rem .6rem; }
.slide-preview-title { font-size:.72rem; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.slide-preview-order { position:absolute; top:.4rem; left:.4rem; background:var(--gold); color:var(--navy); font-size:.65rem; font-weight:700; padding:.15rem .4rem; border-radius:4px; }

/* ═══════════════════════════════════════════════════════════════
   CHATBOT IA — Liceo Libertad
═══════════════════════════════════════════════════════════════ */
#chatBtn {
  position:fixed; bottom:1.75rem; right:1.75rem; z-index:500;
  width:60px; height:60px; border-radius:50%;
  background:linear-gradient(135deg,var(--navy) 0%,var(--navy-light) 100%);
  color:var(--gold-light);
  display:flex; align-items:center; justify-content:center; font-size:1.4rem;
  box-shadow:0 8px 28px rgba(12,30,60,.4),0 0 0 0 rgba(201,146,42,.4);
  cursor:pointer; border:none;
  transition:transform .25s ease,box-shadow .25s ease;
  animation:chatPop .5s .8s both;
}
@keyframes chatPop{from{opacity:0;transform:scale(.5) rotate(-15deg)}to{opacity:1;transform:scale(1) rotate(0)}}
@keyframes chatPulse{0%{box-shadow:0 8px 28px rgba(12,30,60,.4),0 0 0 0 rgba(201,146,42,.4)}70%{box-shadow:0 8px 28px rgba(12,30,60,.4),0 0 0 12px rgba(201,146,42,0)}100%{box-shadow:0 8px 28px rgba(12,30,60,.4),0 0 0 0 rgba(201,146,42,0)}}
#chatBtn:hover{transform:scale(1.1);box-shadow:0 12px 36px rgba(12,30,60,.5);}
#chatBtn .chat-notif{
  position:absolute;top:-4px;right:-4px;
  width:20px;height:20px;border-radius:50%;
  background:linear-gradient(135deg,var(--gold) 0%,var(--gold-light) 100%);
  color:var(--navy);
  font-size:.6rem;font-weight:900;
  display:none;align-items:center;justify-content:center;
  border:2.5px solid var(--bg);
  animation:chatPulse 2s infinite;
}
#chatBtn .chat-notif.show{display:flex;}

#chatWindow{
  position:fixed;bottom:calc(1.75rem + 76px);right:1.75rem;z-index:500;
  width:min(420px,calc(100vw - 2rem));
  background:var(--surface);
  border-radius:20px;
  box-shadow:0 24px 80px rgba(12,30,60,.28),0 4px 20px rgba(12,30,60,.14);
  border:1px solid var(--border);
  display:flex;flex-direction:column;overflow:hidden;
  transform:translateY(24px) scale(.94);opacity:0;pointer-events:none;
  transition:transform .3s cubic-bezier(.34,1.56,.64,1),opacity .25s ease;
  max-height:min(600px,calc(100vh - 180px));
}
#chatWindow.open{transform:translateY(0) scale(1);opacity:1;pointer-events:all;}

/* Header */
.chat-header{
  background:linear-gradient(135deg,var(--navy) 0%,#1a3460 60%,var(--navy-light) 100%);
  padding:.85rem 1rem;display:flex;align-items:center;gap:.7rem;flex-shrink:0;
  position:relative;overflow:hidden;
}
.chat-header::before{
  content:'';position:absolute;inset:0;
  background:url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.chat-header-av{
  width:38px;height:38px;border-radius:12px;
  background:linear-gradient(135deg,var(--gold) 0%,var(--gold-light) 100%);
  display:flex;align-items:center;justify-content:center;
  font-size:1.05rem;flex-shrink:0;
  box-shadow:0 2px 8px rgba(201,146,42,.35);
  position:relative;z-index:1;
}
.chat-header-info{flex:1;min-width:0;position:relative;z-index:1;}
.chat-header-name{font-weight:700;font-size:.9rem;color:#fff;letter-spacing:.01em;}
.chat-header-status{font-size:.67rem;color:rgba(255,255,255,.65);display:flex;align-items:center;gap:.35rem;margin-top:.1rem;}
.chat-header-status .dot{
  width:7px;height:7px;border-radius:50%;background:#4ade80;flex-shrink:0;
  box-shadow:0 0 6px #4ade80;
  animation:blink 2.5s infinite;
}
@keyframes blink{0%,100%{opacity:1;box-shadow:0 0 6px #4ade80}50%{opacity:.5;box-shadow:none}}
.chat-header-actions{display:flex;gap:.25rem;position:relative;z-index:1;}
.chat-hbtn{
  width:28px;height:28px;border-radius:8px;
  background:rgba(255,255,255,.1);color:rgba(255,255,255,.75);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;font-size:.72rem;border:none;
  transition:background .2s,color .2s;
}
.chat-hbtn:hover{background:rgba(255,255,255,.22);color:#fff;}

/* Messages area */
.chat-messages{
  flex:1;overflow-y:auto;
  padding:1rem .9rem .5rem;
  display:flex;flex-direction:column;gap:.5rem;
  scroll-behavior:smooth;
  background:var(--surface);
}
.chat-messages::-webkit-scrollbar{width:3px;}
.chat-messages::-webkit-scrollbar-thumb{background:var(--gray-200);border-radius:4px;}

/* Date divider */
.chat-date-divider{
  text-align:center;margin:.5rem 0;
  font-size:.65rem;color:var(--text-faint);letter-spacing:.04em;text-transform:uppercase;
  display:flex;align-items:center;gap:.5rem;
}
.chat-date-divider::before,.chat-date-divider::after{
  content:'';flex:1;height:1px;background:var(--border);
}

/* Message row */
.chat-msg{
  display:flex;align-items:flex-end;gap:.4rem;
  animation:msgIn .2s ease both;
  max-width:88%;
}
@keyframes msgIn{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}
.chat-msg.bot{align-self:flex-start;}
.chat-msg.user{align-self:flex-end;flex-direction:row-reverse;}

/* Avatar */
.chat-av{
  width:28px;height:28px;border-radius:9px;
  background:linear-gradient(135deg,var(--navy) 0%,var(--navy-light) 100%);
  color:var(--gold-light);
  display:flex;align-items:center;justify-content:center;
  font-size:.65rem;flex-shrink:0;
  box-shadow:0 2px 6px rgba(12,30,60,.2);
}
.chat-msg.user .chat-av{
  background:linear-gradient(135deg,var(--gold) 0%,var(--gold-light) 100%);
  color:var(--navy);
}

/* Bubble wrapper (holds bubble + actions) */
.chat-msg-body{display:flex;flex-direction:column;gap:.25rem;min-width:0;}
.chat-bubble{
  padding:.6rem .9rem;border-radius:16px;
  font-size:.84rem;line-height:1.55;
  max-width:100%;word-break:break-word;
  position:relative;
}
.chat-msg.bot .chat-bubble{
  background:var(--surface2);color:var(--text);
  border-bottom-left-radius:4px;
  border:1px solid var(--border);
}
.chat-msg.user .chat-bubble{
  background:linear-gradient(135deg,var(--navy) 0%,var(--navy-light) 100%);
  color:#fff;
  border-bottom-right-radius:4px;
  box-shadow:0 2px 8px rgba(12,30,60,.2);
}

/* Timestamp + actions row */
.chat-msg-meta{
  display:flex;align-items:center;gap:.4rem;
  padding:0 .2rem;
}
.chat-msg.user .chat-msg-meta{justify-content:flex-end;}
.chat-ts{font-size:.62rem;color:var(--text-faint);}

/* Reaction & copy buttons */
.chat-actions{display:flex;gap:.15rem;opacity:0;transition:opacity .15s;}
.chat-msg:hover .chat-actions{opacity:1;}
.chat-action-btn{
  width:22px;height:22px;border-radius:6px;border:none;
  background:var(--surface);color:var(--text-faint);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;font-size:.62rem;
  border:1px solid var(--border);
  transition:all .15s;
}
.chat-action-btn:hover{background:var(--surface2);color:var(--text);}
.chat-action-btn.active-up{background:#d1fae5;color:#065f46;border-color:#6ee7b7;}
.chat-action-btn.active-down{background:#fee2e2;color:#991b1b;border-color:#fca5a5;}
.chat-action-btn.copied{background:#eff6ff;color:#1d4ed8;border-color:#93c5fd;}

/* Bubble content formatting */
.chat-bubble ul{margin:.3rem 0 .3rem .8rem;padding:0;}
.chat-bubble li{margin:.15rem 0;}
.chat-bubble strong{font-weight:700;}
.chat-bubble em{font-style:italic;opacity:.85;}
.chat-bubble code{background:rgba(0,0,0,.06);border-radius:4px;padding:.05rem .3rem;font-size:.8em;font-family:monospace;}
.chat-msg.user .chat-bubble code{background:rgba(255,255,255,.15);}
.chat-bubble .chat-table{width:100%;border-collapse:collapse;margin:.4rem 0;font-size:.78rem;}
.chat-bubble .chat-table th{background:rgba(12,30,60,.08);padding:.25rem .45rem;text-align:left;border:1px solid var(--border);font-weight:600;}
.chat-bubble .chat-table td{padding:.22rem .45rem;border:1px solid var(--border);}
.chat-msg.user .chat-bubble .chat-table th{background:rgba(255,255,255,.15);border-color:rgba(255,255,255,.2);}
.chat-msg.user .chat-bubble .chat-table td{border-color:rgba(255,255,255,.15);}
.chat-bubble hr{border:none;border-top:1px solid var(--border);margin:.5rem 0;}
.chat-msg.user .chat-bubble hr{border-color:rgba(255,255,255,.2);}

/* Typing indicator */
.typing-dots{display:inline-flex;align-items:center;gap:4px;padding:.25rem 0;}
.typing-dots span{
  width:7px;height:7px;border-radius:50%;
  background:var(--text-faint);
  animation:dotB 1.3s ease infinite;
}
.typing-dots span:nth-child(2){animation-delay:.18s;}
.typing-dots span:nth-child(3){animation-delay:.36s;}
@keyframes dotB{0%,80%,100%{transform:translateY(0);opacity:.5}40%{transform:translateY(-7px);opacity:1}}

/* Suggestions */
.chat-suggestions{
  padding:.5rem .9rem .3rem;
  display:flex;gap:.3rem;flex-wrap:wrap;flex-shrink:0;
  border-top:1px solid var(--border);
  background:var(--surface);
}
.chat-sugg{
  font-size:.71rem;padding:.25rem .65rem;
  border-radius:20px;border:1.5px solid var(--border);
  background:var(--surface2);color:var(--text-muted);
  cursor:pointer;transition:all .15s;white-space:nowrap;
  font-weight:500;
}
.chat-sugg:hover{border-color:var(--gold);color:var(--gold);background:var(--gold-pale);transform:translateY(-1px);}

/* Input area */
.chat-input-area{
  padding:.6rem .75rem;border-top:1px solid var(--border);
  display:flex;flex-direction:column;gap:.4rem;flex-shrink:0;
  background:var(--surface);
}
.chat-input-row{
  display:flex;gap:.45rem;align-items:flex-end;
}
.chat-input-row textarea{
  flex:1;min-height:38px;max-height:96px;
  padding:.5rem .85rem;font-size:.84rem;
  border-radius:20px;resize:none;line-height:1.45;
  border:1.5px solid var(--border);background:var(--surface2);color:var(--text);
  transition:border-color .2s,box-shadow .2s;overflow-y:auto;
}
.chat-input-row textarea:focus{
  border-color:var(--gold);
  box-shadow:0 0 0 3px rgba(201,146,42,.12);outline:none;
}
.chat-send{
  width:40px;height:40px;border-radius:50%;
  background:linear-gradient(135deg,var(--navy) 0%,var(--navy-light) 100%);
  color:var(--gold-light);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;flex-shrink:0;border:none;font-size:.85rem;
  transition:transform .15s,box-shadow .15s;
  box-shadow:0 2px 8px rgba(12,30,60,.25);
}
.chat-send:hover{transform:scale(1.08);box-shadow:0 4px 14px rgba(12,30,60,.35);}
.chat-send:disabled{opacity:.35;cursor:not-allowed;transform:none;box-shadow:none;}

/* Footer powered by */
.chat-footer{
  display:flex;align-items:center;justify-content:center;gap:.3rem;
  padding:.25rem .75rem .4rem;
  font-size:.6rem;color:var(--text-faint);letter-spacing:.02em;
  flex-shrink:0;
}
.chat-footer a{color:var(--text-faint);text-decoration:none;}
.chat-footer a:hover{color:var(--gold);}

/* Toast de copiado */
#chatCopyToast{
  position:fixed;bottom:calc(1.75rem + 76px + 450px);right:1.75rem;
  background:var(--navy);color:#fff;
  font-size:.75rem;font-weight:600;padding:.4rem .9rem;
  border-radius:20px;box-shadow:var(--shadow-md);
  opacity:0;pointer-events:none;transition:opacity .2s;z-index:600;
}
#chatCopyToast.show{opacity:1;}

/* Dark mode tweaks */
[data-theme="dark"] .chat-msg.bot .chat-bubble{background:var(--surface2);border-color:var(--border);}
[data-theme="dark"] .chat-action-btn{background:var(--surface2);border-color:var(--border);}
/* Admin chatbot panel */
.chatbot-ctx-box{
  width:100%;min-height:110px;font-size:.82rem;line-height:1.6;
  font-family:'DM Sans',sans-serif;
  border:1.5px solid var(--border);border-radius:var(--radius-sm);
  padding:.7rem .9rem;background:var(--surface);color:var(--text);
  resize:vertical;
}
.chatbot-ctx-box:focus{border-color:var(--gold);box-shadow:0 0 0 3px rgba(201,146,42,.12);outline:none;}
.ctx-tag{
  display:inline-flex;align-items:center;gap:.3rem;
  padding:.2rem .6rem;border-radius:20px;font-size:.68rem;font-weight:700;
  background:var(--gold-pale);color:var(--gold);
  border:1px solid rgba(201,146,42,.25);
  cursor:pointer;transition:all .15s;white-space:nowrap;
}
.ctx-tag:hover{background:var(--gold);color:var(--navy);}


/* ─── EDITOR DE NOTICIAS AVANZADO ──────────────────────────── */
.rte-toolbar {
  display: flex; flex-wrap: wrap; gap: .25rem;
  padding: .4rem .5rem; background: var(--surface2);
  border: 1.5px solid var(--border); border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.rte-btn {
  width: 30px; height: 28px; border-radius: 4px; border: none;
  background: var(--surface); color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; cursor: pointer; transition: all .12s;
  font-family: inherit;
}
.rte-btn:hover { background: var(--border); color: var(--text); }
.rte-btn.active { background: var(--navy); color: var(--gold-light); }
.rte-sep { width: 1px; background: var(--border); margin: 2px 2px; }
.rte-area {
  width: 100%;
  min-height: 320px;
  max-height: 65vh;
  padding: .75rem 1rem;
  border: 1.5px solid var(--border); border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--surface); color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: .9rem;
  line-height: 1.7; outline: none;
  overflow-y: auto; /* scroll propio cuando el contenido es muy largo */
  resize: vertical;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-400) var(--surface2);
}
.rte-area::-webkit-scrollbar { width: 8px; }
.rte-area::-webkit-scrollbar-track { background: var(--surface2); }
.rte-area::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 4px; }
.rte-area::-webkit-scrollbar-thumb:hover { background: var(--gray-600); }
.rte-area:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,146,42,.12); }
.rte-area h2 { font-family: 'Fraunces', serif; font-size: 1.3rem; font-weight: 700; margin: .75rem 0 .4rem; }
.rte-area h3 { font-family: 'Fraunces', serif; font-size: 1.1rem; font-weight: 600; margin: .65rem 0 .35rem; }
.rte-area blockquote { border-left: 4px solid var(--gold); padding: .5rem 1rem; margin: .75rem 0; color: var(--text-muted); font-style: italic; }
.rte-area ul, .rte-area ol { padding-left: 1.5rem; margin: .5rem 0; }
/* Imagen preview en modal noticia */
.img-preview-wrap { position: relative; margin-top: .5rem; }
.img-preview { width: 100%; height: 160px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border); display: none; }
/* Filtros avanzados en panel noticias */
.adv-filter-bar {
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
  padding: .75rem 1.25rem; background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.adv-filter-bar select, .adv-filter-bar input[type=date] {
  font-size: .8rem; padding: .3rem .65rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text); width: auto;
}
.adv-filter-bar select:focus, .adv-filter-bar input[type=date]:focus {
  border-color: var(--gold); box-shadow: 0 0 0 2px rgba(201,146,42,.12);
}
/* Bulk actions bar */
.bulk-bar {
  display: none; align-items: center; gap: .75rem; flex-wrap: wrap;
  padding: .6rem 1.25rem; background: rgba(201,146,42,.08);
  border-bottom: 1px solid rgba(201,146,42,.2);
}
.bulk-bar.visible { display: flex; }
.bulk-count { font-size: .82rem; font-weight: 600; color: var(--gold); }
/* Stats mini row in noticias panel */
.news-stats-row {
  display: flex; gap: 1rem; flex-wrap: wrap;
  padding: .75rem 1.25rem; border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.news-stat-chip {
  font-size: .78rem; padding: .25rem .7rem; border-radius: 20px;
  background: var(--surface2); color: var(--text-muted);
  border: 1px solid var(--border); display: flex; align-items: center; gap: .35rem;
}
.news-stat-chip i { color: var(--gold); font-size: .75rem; }
/* Checkbox column */
.admin-table .cb-col { width: 36px; text-align: center; }
.row-check { width: 15px; height: 15px; cursor: pointer; accent-color: var(--gold); }
/* Quick preview popover */
.news-preview-popover {
  position: fixed; z-index: 9999; width: 340px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 1.25rem; display: none;
  max-height: 420px; overflow-y: auto;
}
.news-preview-popover.show { display: block; }
.news-preview-popover img { width: 100%; height: 140px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: .75rem; }
.news-preview-title { font-family: 'Fraunces', serif; font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.news-preview-body { font-size: .82rem; color: var(--text-muted); line-height: 1.6; max-height: 160px; overflow: hidden; position: relative; }
.news-preview-body::after { content:''; position:absolute; bottom:0; left:0; right:0; height:40px; background: linear-gradient(transparent, var(--surface)); }
/* Noticia modal wide */
.modal-noticia { max-width: 820px !important; }


/* ─── PLANES ────────────────────────────────────────────────── */
.plan-card {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1rem 1.25rem; border-radius: var(--radius-md);
  border: 1.5px solid var(--border); background: var(--surface);
  margin-bottom: .75rem; transition: border-color var(--transition);
}
.plan-card:hover { border-color: var(--gold); }
.plan-card-dot {
  width: 14px; height: 14px; border-radius: 50%;
  flex-shrink: 0; margin-top: .2rem;
}
.plan-drag-handle { cursor: grab; color: var(--text-faint); font-size: .85rem; padding: .1rem .3rem; }
/* turno chip for pages */
.pg-turno-chip {
  font-size: .6rem; font-weight: 700; padding: .1rem .4rem;
  border-radius: 10px; white-space: nowrap;
}
.pg-turno-chip.ambos   { background: #eff6ff; color: #1d4ed8; }
.pg-turno-chip.diurno  { background: #fffbeb; color: #92400e; }
.pg-turno-chip.nocturno{ background: #f5f3ff; color: #4c1d95; }

/* ── Sub-menu editor (panel-paginas) ─────────────────── */
.sme-wrap { display:grid; grid-template-columns:220px 1fr; gap:1.25rem; }
@media(max-width:800px){ .sme-wrap { grid-template-columns:1fr; } }
.sme-section-title {
  font-size:.72rem; font-weight:700; text-transform:uppercase;
  letter-spacing:.07em; color:var(--text-faint); margin-bottom:.65rem;
  display:flex; align-items:center; gap:.4rem;
}
/* ── Lista páginas ── */
.sme-page-list { display:flex; flex-direction:column; gap:.3rem; }
.sme-page-row {
  display:flex; align-items:center; gap:.55rem;
  padding:.52rem .75rem; border-radius:var(--radius-sm);
  border:1.5px solid var(--border); background:var(--surface);
  cursor:pointer; transition:all .15s;
  font-size:.84rem; font-weight:500; font-family:var(--font-body);
}
.sme-page-row:hover { border-color:var(--gold); background:var(--surface2); }
.sme-page-row.active {
  border-color:var(--navy); background:var(--navy); color:#fff;
  box-shadow: 0 2px 12px rgba(15,30,60,.2);
}
[data-theme="dark"] .sme-page-row.active { border-color:var(--gold); background:var(--navy-light); color:var(--gold-light); }
.sme-page-row .sme-badge {
  font-size:.6rem; padding:.08rem .35rem; border-radius:9px;
  background:rgba(201,146,42,.15); color:var(--gold); font-weight:700; margin-left:auto; flex-shrink:0;
}
.sme-page-row.active .sme-badge { background:rgba(255,255,255,.18); color:rgba(255,255,255,.85); }

/* ── Columna sub-ítems ── */
.sme-sub-col { display:flex; flex-direction:column; gap:.55rem; }
.sme-sub-list { display:flex; flex-direction:column; gap:.3rem; }
.sme-sub-row {
  display:flex; align-items:center; gap:.45rem;
  padding:.5rem .7rem; border-radius:var(--radius-sm);
  border:1.5px solid var(--border); background:var(--surface);
  font-size:.83rem; font-family:var(--font-body);
  transition:all .15s; position:relative;
}
.sme-sub-row:hover { border-color:var(--gold); background:rgba(201,146,42,.05); }
.sme-sub-drag { color:var(--text-faint); cursor:grab; font-size:.7rem; flex-shrink:0; }
.sme-sub-name-wrap { flex:1; display:flex; align-items:center; gap:.4rem; min-width:0; }
.sme-sub-name { font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sme-sub-slug { font-size:.68rem; color:var(--text-faint); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:90px; }
.sme-sub-actions { display:flex; gap:.2rem; flex-shrink:0; }
.sme-sub-actions .action-btn { padding:.22rem .38rem; font-size:.72rem; }

/* ── Inline edición ── */
.sme-inline-edit {
  display:grid; grid-template-columns:1fr auto auto auto; gap:.4rem;
  align-items:center; padding:.4rem .6rem;
  border-radius:var(--radius-sm);
  background:rgba(201,146,42,.07);
  border:1.5px solid var(--gold);
}
.sme-inline-edit input { font-size:.82rem; font-family:var(--font-body); padding:.28rem .5rem; }

/* ── Formulario agregar ── */
.sme-add-box {
  background:var(--surface2); border:1.5px dashed var(--border);
  border-radius:var(--radius-sm); padding:.85rem;
  display:flex; flex-direction:column; gap:.55rem;
}
.sme-add-box-title { font-size:.72rem; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.05em; display:flex; align-items:center; gap:.35rem; }
.sme-add-row { display:grid; grid-template-columns:1fr 1fr; gap:.45rem; }
.sme-add-row.three { grid-template-columns:1fr 1fr 1fr; }
@media(max-width:600px){ .sme-add-row, .sme-add-row.three { grid-template-columns:1fr; } }
.sme-field label { font-size:.7rem; font-weight:600; color:var(--text-muted); display:block; margin-bottom:.2rem; }
.sme-field input { font-size:.82rem; font-family:var(--font-body); width:100%; box-sizing:border-box; }
.sme-icon-btn {
  display:flex; align-items:center; gap:.35rem;
  border:1.5px solid var(--border); border-radius:var(--radius-sm);
  padding:.32rem .6rem; font-size:.78rem; background:var(--surface);
  color:var(--text); cursor:pointer; transition:border-color .15s;
  font-family:var(--font-body); white-space:nowrap;
}
.sme-icon-btn:hover { border-color:var(--gold); }
.sme-icon-btn i { color:var(--gold); font-size:.85rem; }

/* ── Mover entre niveles ── */
.sme-move-section {
  margin-top:1rem; padding:.85rem 1rem; border-radius:var(--radius-sm);
  border:1.5px dashed var(--border); background:var(--surface2);
}
.sme-move-title { font-size:.72rem; font-weight:700; color:var(--text-muted); margin-bottom:.6rem; display:flex; align-items:center; gap:.4rem; text-transform:uppercase; letter-spacing:.05em; }
.sme-move-row { display:flex; align-items:flex-end; gap:.5rem; flex-wrap:wrap; }
.sme-empty { text-align:center; padding:1.5rem; color:var(--text-faint); font-size:.83rem; }

/* ══ ICON PICKER MODAL ══════════════════════════════════════ */
#iconPickerModal {
  position:fixed; inset:0; z-index:2000; display:none;
  align-items:center; justify-content:center;
  background:rgba(0,0,0,.55); backdrop-filter:blur(4px); padding:1rem;
}
#iconPickerModal.open { display:flex; }
.ipm-card {
  background:var(--surface); border-radius:var(--radius-lg);
  border:1.5px solid var(--border);
  box-shadow:0 24px 64px rgba(0,0,0,.35);
  width:100%; max-width:560px; max-height:80vh;
  display:flex; flex-direction:column; overflow:hidden;
}
.ipm-header {
  padding:.85rem 1rem; border-bottom:1px solid var(--border);
  display:flex; align-items:center; gap:.65rem;
}
.ipm-header h3 { font-size:.95rem; font-weight:700; flex:1; margin:0; }
.ipm-search { flex:1; font-size:.85rem; font-family:var(--font-body); padding:.38rem .65rem; border:1.5px solid var(--border); border-radius:var(--radius-sm); }
.ipm-search:focus { border-color:var(--gold); outline:none; }
.ipm-cats { display:flex; gap:.3rem; flex-wrap:wrap; padding:.6rem 1rem; border-bottom:1px solid var(--border); }
.ipm-cat {
  font-size:.7rem; font-weight:600; padding:.22rem .6rem; border-radius:20px;
  border:1.5px solid var(--border); background:var(--surface2);
  color:var(--text-muted); cursor:pointer; transition:all .13s;
  font-family:var(--font-body);
}
.ipm-cat.active, .ipm-cat:hover { border-color:var(--gold); background:rgba(201,146,42,.1); color:var(--navy); }
[data-theme="dark"] .ipm-cat.active, [data-theme="dark"] .ipm-cat:hover { color:var(--gold-light); }
.ipm-grid {
  flex:1; overflow-y:auto; display:grid;
  grid-template-columns:repeat(auto-fill,minmax(56px,1fr));
  gap:.3rem; padding:.85rem;
}
.ipm-icon {
  display:flex; flex-direction:column; align-items:center; gap:.3rem;
  padding:.55rem .3rem; border-radius:var(--radius-sm);
  border:1.5px solid transparent; cursor:pointer; transition:all .13s;
  font-size:.58rem; color:var(--text-muted); text-align:center;
  line-height:1.2; font-family:var(--font-body);
}
.ipm-icon i { font-size:1.15rem; color:var(--text); transition:color .13s; }
.ipm-icon:hover { border-color:var(--gold); background:rgba(201,146,42,.08); }
.ipm-icon:hover i { color:var(--gold); }
.ipm-icon.selected { border-color:var(--navy); background:var(--navy); color:#fff; }
.ipm-icon.selected i { color:#fff; }
[data-theme="dark"] .ipm-icon.selected { border-color:var(--gold); background:rgba(201,146,42,.18); }
[data-theme="dark"] .ipm-icon.selected i { color:var(--gold-light); }
.ipm-footer { padding:.7rem 1rem; border-top:1px solid var(--border); display:flex; align-items:center; gap:.5rem; justify-content:flex-end; }
.ipm-footer .ipm-selected-preview { flex:1; font-size:.8rem; color:var(--text-muted); display:flex; align-items:center; gap:.4rem; }
.ipm-no-icon-btn {
  font-size:.75rem; padding:.3rem .7rem; border:1.5px solid var(--border);
  border-radius:var(--radius-sm); background:var(--surface2); cursor:pointer;
  color:var(--text-muted); font-family:var(--font-body); transition:border-color .13s;
}
.ipm-no-icon-btn:hover { border-color:var(--text-faint); }

/* ─── SECCIONES PERSONALIZADAS ──────────────────────────── */
.sec-block { padding: 3.5rem 0; }
.sec-block + .sec-block { border-top: 1px solid var(--border); }
.sec-block.bg-navy { background: var(--navy); color: #fff; }
.sec-block.bg-gold  { background: var(--gold-pale); }
.sec-block.bg-gray  { background: var(--gray-50); }
.sec-block.bg-dark  { background: var(--surface2); }
.sec-layout-center  { text-align: center; max-width: 760px; margin: 0 auto; }
.sec-layout-cols    { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.sec-layout-cols-3  { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.sec-layout-cols-img{ display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
@media(max-width:768px){
  .sec-layout-cols, .sec-layout-cols-img { grid-template-columns: 1fr; }
  .sec-layout-cols-3 { grid-template-columns: 1fr 1fr; }
}
@media(max-width:500px){ .sec-layout-cols-3 { grid-template-columns: 1fr; } }
.sec-img { width: 100%; border-radius: var(--radius-lg); object-fit: cover; max-height: 360px; box-shadow: var(--shadow-md); }
.sec-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700; line-height: 1.2; margin-bottom: .75rem;
}
.sec-block.bg-navy .sec-title { color: #fff; }
.sec-subtitle { font-size: 1rem; color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.6; }
.sec-block.bg-navy .sec-subtitle { color: rgba(255,255,255,.65); }
.sec-cta-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.75rem; border-radius: var(--radius-md);
  background: var(--gold); color: var(--navy);
  font-weight: 700; font-size: .9rem;
  transition: all var(--transition);
}
.sec-cta-btn:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(201,146,42,.35); }
.sec-block.bg-navy .sec-cta-btn { background: #fff; color: var(--navy); }
.sec-block.bg-navy .sec-cta-btn:hover { background: var(--gold-light); }
.sec-col-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 1.5rem;
  box-shadow: var(--shadow-sm); text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.sec-col-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.sec-col-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--gold-pale); color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin: 0 auto 1rem;
}
.sec-col-title { font-family: 'Fraunces', serif; font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.sec-col-text { font-size: .875rem; color: var(--text-muted); line-height: 1.6; }
/* Admin seccion preview strip */
.sec-preview { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.sec-preview-chip {
  font-size: .7rem; padding: .2rem .6rem; border-radius: 20px;
  background: var(--surface2); color: var(--text-muted); border: 1px solid var(--border);
}
