:root {
  --ink: #303040;
  --muted: #686878;
  --paper: #f8f7f3;
  --panel: #ffffff;
  --red: #d04030;
  --red-dark: #a92f25;
  --blush: #f5d9d5;
  --warm: #f2ede6;
  --graphite: #303040;
  --line: rgba(48, 48, 64, 0.14);
  --shadow: 0 22px 60px rgba(48, 48, 64, 0.16);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #ffffff 0, var(--paper) 520px),
    var(--paper);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.6;
}

body.modal-open {
  overflow: hidden;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 12px clamp(18px, 5vw, 64px);
  background: rgba(248, 247, 243, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  width: auto;
  max-width: min(42vw, 178px);
  height: 58px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  object-fit: contain;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 700;
}

.main-nav a {
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--red);
}

.nav-cta {
  padding: 10px 16px;
  background: var(--red);
  border-radius: 8px;
  color: #fff;
}

.student-web-access {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border: 1px solid #20263a;
  border-radius: 8px;
  background: #20263a;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(32, 38, 58, .22);
}

.student-web-access:hover {
  border-color: #080b14;
  background: #080b14;
  color: #fff !important;
}

.app-download-access {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 12px;
  border: 1px solid var(--red);
  border-radius: 8px;
  background: var(--red);
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(208, 64, 48, .24);
}

.app-download-access:hover {
  border-color: #a92e23;
  background: #a92e23;
  color: #fff !important;
}

.nav-button-icon {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.student-hero-access {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0d66f2;
  border-color: #0d66f2;
  color: #fff;
  box-shadow: 0 12px 28px rgba(13, 102, 242, .28);
}

.student-hero-access:hover {
  background: #084fae;
  border-color: #084fae;
  color: #fff;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100svh - 76px);
  padding: clamp(46px, 8vw, 96px) clamp(18px, 5vw, 64px);
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 18%, rgba(208, 64, 48, 0.5), transparent 24rem),
    linear-gradient(90deg, rgba(48, 48, 64, 0.98) 0%, rgba(48, 48, 64, 0.82) 48%, rgba(48, 48, 64, 0.24) 100%),
    url("https://loremflickr.com/1800/1000/taekwondo,martialarts?lock=111") center / cover;
  color: #fff;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 10px;
  background: linear-gradient(90deg, var(--red), var(--blush), var(--graphite));
}

.hero-content {
  position: relative;
  z-index: 2;
  align-self: center;
  width: min(680px, 100%);
}

.hero-media {
  position: absolute;
  right: clamp(18px, 6vw, 88px);
  bottom: 36px;
  z-index: 1;
  width: min(34vw, 360px);
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  opacity: 0.92;
  filter: drop-shadow(0 28px 34px rgba(0, 0, 0, 0.35));
}

.hero-media img {
  width: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

.hero-badge {
  position: absolute;
  right: clamp(18px, 6vw, 92px);
  top: clamp(92px, 13vw, 148px);
  z-index: 2;
  display: grid;
  gap: 4px;
  width: min(260px, 26vw);
  padding: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #fff;
  backdrop-filter: blur(16px);
}

.hero-badge strong {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 52px;
  line-height: 0.9;
}

.hero-badge span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 800;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blush);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--red);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0;
  line-height: 0.95;
}

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: clamp(58px, 11vw, 128px);
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(40px, 6vw, 74px);
}

h3 {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.1;
}

.hero-copy {
  max-width: 610px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 21px);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 16px 28px rgba(215, 25, 32, 0.24);
}

.button.primary:hover {
  background: var(--red-dark);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  outline: 1px solid rgba(255, 255, 255, 0.34);
}

.button.apk-download {
  background: #111827;
  color: #fff;
  outline: 1px solid rgba(255, 255, 255, 0.28);
}

.button.apk-download::before {
  content: "↓";
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 900;
}

.button.full {
  width: 100%;
}

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

.hero-stats span {
  min-width: 124px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.76);
}

.hero-stats strong {
  display: block;
  color: #fff;
  font-size: 26px;
  line-height: 1;
}

.band {
  background: var(--warm);
  border-bottom: 1px solid var(--line);
}

.section,
.section-inner,
.split-section,
.contact {
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.news-card {
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(48, 48, 64, 0.08);
}

.news-card time {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.news-card p {
  color: var(--muted);
}

.intro {
  width: 100%;
  margin: 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 32px;
  padding: clamp(42px, 7vw, 76px) 0;
}

.intro-grid p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.section {
  padding: clamp(54px, 8vw, 96px) 0;
}

.programs-section,
.gallery-section {
  position: relative;
}

.programs-section::before,
.gallery-section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(208, 64, 48, 0.32), transparent);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 32px;
}

.section-heading p:last-child {
  color: var(--muted);
  font-size: 18px;
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.program-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.program-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 46px rgba(48, 48, 64, 0.14);
}

.program-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e6e6e1;
}

.program-card div {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
}

.program-card span {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.program-card p {
  flex: 1;
  margin-bottom: 0;
  color: var(--muted);
}

.split-section {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 28px;
  align-items: center;
  padding: clamp(48px, 7vw, 76px);
  background: var(--graphite);
  border-radius: 8px;
  color: #fff;
  box-shadow: var(--shadow);
}

.schedule-section {
  width: min(1160px, calc(100% - 36px));
  margin: clamp(54px, 8vw, 96px) auto;
  padding: clamp(42px, 7vw, 68px);
  background:
    linear-gradient(135deg, rgba(208, 64, 48, 0.18), transparent 38%),
    var(--graphite);
  border-radius: 8px;
  color: #fff;
  box-shadow: var(--shadow);
}

.schedule-section .section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  max-width: none;
}

.schedule-section .section-heading p:not(.eyebrow) {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.74);
}

.agenda-wrap {
  display: grid;
  gap: 22px;
}

.agenda-branch {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.branch-head {
  padding: 22px;
  background: rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.branch-head h3 {
  margin-bottom: 6px;
  color: #fff;
}

.branch-head p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.72);
}

.agenda-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  padding: 16px;
}

.agenda-day {
  min-height: 190px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  color: var(--graphite);
}

.agenda-day header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px;
  background: var(--warm);
  border-bottom: 1px solid rgba(48, 48, 64, 0.12);
}

.agenda-day header span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--red);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.agenda-day header strong {
  font-size: 18px;
}

.agenda-classes {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.agenda-class {
  display: grid;
  gap: 4px;
  padding: 12px;
  background: #fff;
  border-left: 5px solid var(--red);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(48, 48, 64, 0.08);
}

.agenda-class time {
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}

.agenda-class strong {
  color: var(--graphite);
  font-size: 17px;
}

.split-copy p:not(.eyebrow) {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.74);
}

.schedule-panel {
  display: grid;
  gap: 12px;
}

.schedule-panel div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.schedule-panel strong {
  font-size: 20px;
}

.schedule-panel span {
  color: rgba(255, 255, 255, 0.76);
  text-align: right;
}

.gallery {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
}

.gallery img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  border-radius: 8px;
}

.gallery img:first-child {
  grid-row: span 2;
}

.album-stack {
  display: grid;
  gap: 34px;
}

.album-section {
  display: grid;
  gap: 16px;
}

.album-section > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.album-section h3 {
  margin-bottom: 4px;
}

.album-section p {
  margin-bottom: 0;
  color: var(--muted);
}

.album-section > header > span {
  flex: 0 0 auto;
  padding: 7px 10px;
  background: var(--warm);
  border-radius: 8px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.album-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.album-image {
  position: relative;
  min-height: 190px;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--graphite);
}

.thumb-button {
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  text-align: left;
}

.album-image img {
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.album-image:hover img {
  transform: scale(1.04);
}

.thumb-caption {
  position: absolute;
  inset: auto 0 0;
  padding: 48px 16px 16px;
  background: linear-gradient(180deg, transparent, rgba(31, 31, 43, 0.9));
  color: #fff;
}

.thumb-caption strong,
.thumb-caption span {
  display: block;
}

.thumb-caption span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.zoom-mark {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.album-image:hover .zoom-mark,
.album-image:focus-visible .zoom-mark {
  opacity: 1;
  transform: translateY(0);
}

.contact {
  display: grid;
  grid-template-columns: 1fr 0.86fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 72px;
  padding: clamp(42px, 7vw, 68px);
  background: linear-gradient(135deg, var(--graphite), #1f1f2b);
  border-radius: 8px;
  color: #fff;
}

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(18, 18, 26, 0.86);
}

.lightbox-backdrop[hidden] {
  display: none;
}

.lightbox-dialog {
  position: relative;
  width: min(1040px, 100%);
  max-height: calc(100svh - 44px);
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.lightbox-dialog img {
  width: 100%;
  max-height: calc(100svh - 180px);
  object-fit: contain;
  background: #111;
}

.lightbox-dialog > div {
  padding: 18px 22px 22px;
}

.lightbox-dialog h2 {
  margin-bottom: 6px;
  color: var(--graphite);
  font-size: 38px;
}

.lightbox-dialog p {
  margin-bottom: 0;
  color: var(--muted);
}

.contact-info p {
  color: rgba(255, 255, 255, 0.78);
}

.location-list {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.location-list p {
  margin: 0;
  padding: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 22px;
  background: #fff;
  border-radius: 8px;
  color: var(--ink);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
  color: var(--ink);
  font: inherit;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--red);
  outline: 3px solid rgba(208, 64, 48, 0.16);
}

.floating-whatsapp {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  background: #20b55a;
  border-radius: 8px;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 18px 36px rgba(17, 24, 39, 0.24);
}

.floating-menu {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: grid;
  gap: 8px;
}

.floating-menu a {
  display: flex;
  justify-content: center;
  min-width: 126px;
  padding: 10px 12px;
  background: var(--red);
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(48, 48, 64, 0.2);
}

.floating-menu a:first-child {
  background: #20b55a;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(18px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.site-footer > div { display: flex; flex-wrap: wrap; gap: 18px; }
.privacy-consent { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 10px !important; font-size: 13px; line-height: 1.5; }
.privacy-consent input { width: 19px !important; min-width: 19px; height: 19px; margin-top: 2px; accent-color: var(--primary); }
.privacy-consent a { color: inherit; font-weight: 800; text-decoration: underline; }
.cookie-notice { position: fixed; right: 18px; bottom: 18px; left: 18px; z-index: 80; display: flex; align-items: center; justify-content: space-between; gap: 20px; width: min(920px, calc(100% - 36px)); margin: auto; padding: 18px 20px; border: 1px solid rgba(255,255,255,.18); border-radius: 18px; background: #101a2d; color: #fff; box-shadow: 0 24px 70px rgba(7,22,47,.34); }
.cookie-notice[hidden] { display: none; }
.cookie-notice strong { display: block; margin-bottom: 4px; font-size: 17px; }
.cookie-notice p { margin: 0; color: rgba(255,255,255,.78); font-size: 13px; line-height: 1.5; }
.cookie-notice a { color: #fff; font-weight: 800; text-decoration: underline; }
.cookie-notice button { flex: 0 0 auto; min-height: 44px; border: 0; border-radius: 999px; padding: 10px 18px; background: var(--primary); color: #fff; font: inherit; font-weight: 900; cursor: pointer; }
@media (max-width: 640px) { .cookie-notice { align-items: stretch; flex-direction: column; gap: 12px; } .cookie-notice button { width: 100%; } }

/* Controles de tamano para los tres bloques principales del kiosko */
.kiosk-grid-marking [data-kiosk-block] {
  position: relative;
  min-width: 0;
  transition: opacity .2s ease;
}

.kiosk-block-expand {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(48,48,64,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: var(--graphite);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 5px 14px rgba(20,30,55,.08);
}

.kiosk-body .kiosk-grid-marking[data-expanded-block="qr"] {
  grid-template-columns: minmax(440px, 2.5fr) minmax(170px, .5fr) minmax(150px, .45fr);
}

.kiosk-body .kiosk-grid-marking[data-expanded-block="rut"] {
  grid-template-columns: minmax(170px, .5fr) minmax(440px, 2.5fr) minmax(150px, .45fr);
}

.kiosk-body .kiosk-grid-marking[data-expanded-block="marked"] {
  grid-template-columns: minmax(150px, .45fr) minmax(170px, .5fr) minmax(440px, 2.5fr);
}

.kiosk-grid-marking[data-expanded-block] [data-kiosk-block] {
  opacity: .76;
}

.kiosk-grid-marking[data-expanded-block="qr"] [data-kiosk-block="qr"],
.kiosk-grid-marking[data-expanded-block="rut"] [data-kiosk-block="rut"],
.kiosk-grid-marking[data-expanded-block="marked"] [data-kiosk-block="marked"] {
  opacity: 1;
}

@media (max-width: 860px) {
  .kiosk-body .kiosk-grid-marking[data-expanded-block] {
    grid-template-columns: 1fr;
  }
}

.prereg-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20,24,38,.72);
  backdrop-filter: blur(5px);
}
.prereg-detail-modal[hidden] { display: none; }
.prereg-detail-modal > section { width: min(1080px,100%); max-height: calc(100vh - 48px); overflow: auto; border-radius: 20px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.prereg-detail-modal header,.prereg-detail-modal footer { position: sticky; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; background: #fff; }
.prereg-detail-modal header { top: 0; border-bottom: 1px solid var(--line); }
.prereg-detail-modal footer { bottom: 0; justify-content: flex-end; border-top: 1px solid var(--line); }
.prereg-detail-modal footer form { margin: 0; }
.prereg-detail-modal header span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.prereg-detail-modal header h2 { margin: 3px 0 0; }
.prereg-detail-modal header > button { border: 0; background: transparent; font-size: 34px; cursor: pointer; }
.prereg-detail-modal [data-prereg-content] { display: grid; gap: 20px; padding: 22px; }
.prereg-comparison h3 { margin: 0 0 10px; }
.prereg-comparison table { width: 100%; border-collapse: collapse; font-size: 13px; }
.prereg-comparison th,.prereg-comparison td { padding: 9px 11px; border: 1px solid var(--line); text-align: left; vertical-align: top; white-space: pre-wrap; }
.prereg-comparison thead th { background: var(--warm); }
.prereg-comparison tr.is-changed td:last-child { background: #fff4d7; }
.prereg-comparison td strong { display: inline-block; margin-left: 8px; padding: 2px 6px; border-radius: 999px; background: #b35c00; color: #fff; font-size: 10px; text-transform: uppercase; }
.datatable-export { align-self: end; min-height: 42px; padding: 9px 15px; border: 0; border-radius: 10px; background: #19723b; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.admin-form-toggle { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; margin: 8px 0 14px; padding: 10px 15px; border: 1px solid rgba(208,64,48,.24); border-radius: 10px; background: #fff5f1; color: var(--red-dark); font: inherit; font-size: 14px; font-weight: 850; cursor: pointer; box-shadow: 0 5px 14px rgba(48,48,64,.07); }
.admin-form-toggle span { display: inline-grid; place-items: center; width: 25px; height: 25px; border-radius: 7px; background: var(--red); color: #fff; font-size: 18px; line-height: 1; }
.admin-form-toggle:hover { border-color: var(--red); background: var(--red); color: #fff; }
.admin-form-toggle:hover span { background: #fff; color: var(--red); }
.admin-form[hidden] { display: none !important; }
.prereg-status-filter { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin: 10px 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.prereg-status-filter label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.prereg-status-filter select { min-width: 190px; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-weight: 750; }
@media (max-width: 640px) { .prereg-detail-modal { padding: 8px; } .prereg-detail-modal > section { max-height: calc(100vh - 16px); } }
.privacy-page { min-height: 100vh; padding: 44px 20px; background: var(--paper); }
.privacy-card { max-width: 900px; margin: 0 auto; padding: clamp(24px, 5vw, 54px); border: 1px solid var(--line); border-radius: 24px; background: var(--panel); box-shadow: var(--shadow); }
.privacy-card > img { display: block; max-width: 190px; max-height: 90px; margin-bottom: 28px; object-fit: contain; }
.privacy-card h1 { margin: 8px 0 10px; }
.privacy-card .privacy-content { margin-top: 30px; line-height: 1.75; white-space: pre-line; }
.privacy-card .privacy-contact { margin-top: 28px; padding: 18px; border-radius: 14px; background: var(--warm); }

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 800;
  color: var(--ink);
}

.admin-body,
.login-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(208, 64, 48, 0.12), transparent 32rem),
    var(--paper);
}

.login-body {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(430px, 100%);
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-card img {
  width: 230px;
  margin-bottom: 22px;
}

.login-card h1,
.admin-title h1 {
  color: var(--graphite);
  font-size: clamp(44px, 6vw, 72px);
}

.login-help {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.soft-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}

.admin-layout {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  box-sizing: border-box;
  padding: 18px 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(247,249,253,.98));
  border-right: 1px solid var(--line);
  box-shadow: 18px 0 44px rgba(48, 48, 64, 0.06);
  overflow: hidden;
  backdrop-filter: blur(16px);
}

.admin-brand {
  display: grid;
  gap: 6px;
  padding: 2px 8px 10px;
  color: var(--graphite);
  font-weight: 900;
}

.admin-brand img {
  width: min(178px, 100%);
  max-height: 70px;
  object-fit: contain;
}

.admin-brand span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.admin-nav {
  display: grid;
  gap: 20px;
  flex: 1 1 auto;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  scrollbar-gutter: auto;
}

.admin-nav:not(:hover) {
  scrollbar-width: thin;
}

.admin-nav::-webkit-scrollbar {
  width: 8px;
}

.admin-nav::-webkit-scrollbar-track {
  background: transparent;
}

.admin-nav::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
}

.admin-nav:hover::-webkit-scrollbar-thumb {
  background: rgba(101, 113, 137, .28);
}

.admin-nav-group {
  display: grid;
  gap: 6px;
}

.admin-nav-group h2 {
  margin: 0 8px 4px;
  color: var(--muted);
  font-family: Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: normal;
}

.admin-nav a,
.admin-sidebar-actions a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--graphite);
  font-size: 14px;
  font-weight: 850;
}

.admin-nav a:hover,
.admin-sidebar-actions a:hover {
  background: var(--warm);
  border-color: var(--line);
}

.admin-nav a.is-active {
  background: #0d66f2;
  border-color: #0d66f2;
  color: #fff;
  box-shadow: 0 12px 28px rgba(13, 102, 242, 0.22);
}

.admin-nav-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-nav-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #edf2fa;
  color: #52637e;
  font-size: 14px;
  font-weight: 900;
}

.admin-nav a:hover .admin-nav-icon {
  background: #fff;
  color: #0d66f2;
}

.admin-nav a.is-active .admin-nav-icon {
  background: rgba(255,255,255,.2);
  color: #fff;
}

.admin-pending-summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid #ffd3cd;
  border-radius: 13px;
  background: #fff4f1;
  color: #8f2f24;
}

.admin-pending-summary:hover { border-color: #f2a79d; transform: translateY(-1px); }
.admin-pending-summary-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #d04030; color: #fff; font-weight: 900; }
.admin-pending-summary strong,
.admin-pending-summary small { display: block; }
.admin-pending-summary strong { font-size: 13px; }
.admin-pending-summary small { margin-top: 2px; color: #9c625b; font-size: 11px; }

.admin-nav a:has(.admin-nav-notification) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.admin-nav-notification {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: 0 0 auto;
  color: #d04030;
  font-size: 15px;
}

.admin-nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: #d04030;
  color: #fff;
  font-size: 12px;
  line-height: 1;
  box-shadow: 0 5px 12px rgba(208, 64, 48, .28);
}

.admin-notice-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(22, 25, 42, .68);
  backdrop-filter: blur(8px);
}

.admin-notice-modal {
  position: relative;
  width: min(680px, 100%);
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(20, 24, 44, .35);
}

.admin-notice-modal > header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 24px;
  background: linear-gradient(135deg, #303040, #d04030);
  color: #fff;
}

.admin-notice-modal > header > span { font-size: 34px; }
.admin-notice-modal h2,
.admin-notice-modal small { margin: 0; color: #fff; }
.admin-notice-modal small { font-weight: 900; text-transform: uppercase; opacity: .72; }
.admin-notice-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; background: rgba(255,255,255,.16); color: #fff; font-size: 25px; cursor: pointer; }
.admin-notice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; padding: 22px; }
.admin-notice-grid article { display: grid; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--warm); }
.admin-notice-grid article > span { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.admin-notice-grid article > strong { color: #d04030; font-size: 44px; line-height: 1; }
.admin-notice-grid article p { margin: 0 0 6px; color: var(--muted); }
.birthday-alert-card { background: linear-gradient(145deg, #fff8ed, #fff) !important; border-color: #f1c487 !important; }
.birthday-alert-title { display: flex; gap: 12px; align-items: center; }
.birthday-alert-title > b { font-size: 38px; }
.birthday-alert-title h3 { margin: 0; font-size: 19px; }
.birthday-alert-title small { color: var(--muted); }
.birthday-message-editor summary { list-style: none; cursor: pointer; text-align: center; }
.birthday-message-editor summary::-webkit-details-marker { display: none; }
.birthday-message-editor form { display: grid; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.birthday-message-editor label { display: grid; gap: 5px; color: var(--ink); font-size: 13px; font-weight: 800; }
.birthday-message-editor input, .birthday-message-editor textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 9px; padding: 10px; background: #fff; color: var(--ink); font: inherit; }

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  align-items: end;
}

.filter-grid label,
.kiosk-branch-launcher label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-head h2,
.section-head p {
  margin: 0;
}

.kiosk-branch-launcher {
  align-items: end;
  flex-wrap: wrap;
}

.kiosk-branch-launcher select {
  min-width: min(320px, 80vw);
}

.admin-sidebar-actions {
  display: grid;
  gap: 6px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 58px;
  margin: 0 -28px 24px;
  padding: 10px 28px;
  background: rgba(255, 255, 255, 0.84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.admin-topbar > span {
  padding: 8px 12px;
  background: var(--warm);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
}

.admin-menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--graphite);
  padding: 9px 12px;
  font: inherit;
  font-weight: 900;
}

.admin-manual-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--graphite);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(48, 48, 64, .14);
}

.admin-manual-button:hover {
  transform: translateY(-1px);
  background: var(--red);
}

.admin-shell {
  width: min(1280px, calc(100% - 56px));
  margin: 0 auto;
  padding: 0 0 68px;
}

.admin-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.admin-title h1 {
  margin-bottom: 0;
}


.admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.admin-grid.compact-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 0 18px;
}

.admin-stat,
.admin-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(48, 48, 64, 0.08);
}

.admin-stat {
  padding: 22px;
}

.admin-stat span {
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-stat strong {
  display: block;
  margin: 4px 0;
  color: var(--graphite);
  font-size: 42px;
  line-height: 1;
}

.admin-stat p {
  margin: 0;
  color: var(--muted);
}

.admin-panel {
  margin-bottom: 18px;
  padding: 22px;
}

.admin-panel h2 {
  font-family: Inter, Arial, sans-serif;
  font-size: 36px;
  font-weight: 850;
  letter-spacing: -.025em;
  line-height: 1.12;
}

.admin-actions,
.form-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.button.ghost {
  background: var(--warm);
  color: var(--graphite);
}

.admin-form {
  display: grid;
  gap: 16px;
}

.grid-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-form .form-actions,
.grid-form .check-row,
.grid-form .day-picker,
.grid-form .full-field {
  grid-column: 1 / -1;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: 18px;
  height: 18px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px 14px;
  margin-top: 8px;
}

.day-picker {
  margin: 0;
  padding: 0;
  border: 0;
}

.day-picker legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.day-picker > div {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.check-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 10px;
  background: var(--warm);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--graphite);
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  text-transform: none;
}

.check-pill input {
  width: 16px;
  height: 16px;
  margin-right: 7px;
}

.alert {
  margin-bottom: 16px;
  padding: 13px 14px;
  border-radius: 8px;
  font-weight: 800;
}

.alert.success {
  background: #e6f7ec;
  color: #126532;
}

.alert.danger {
  background: #fde8e5;
  color: #9c2c22;
}

.table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.admin-table th.is-sortable {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.admin-table th.is-sortable::after {
  content: "↕";
  display: inline-block;
  margin-left: 6px;
  color: rgba(104, 104, 120, .52);
  font-size: 11px;
}

.admin-table th[data-sort="asc"]::after {
  content: "↑";
  color: var(--red);
}

.admin-table th[data-sort="desc"]::after {
  content: "↓";
  color: var(--red);
}

.admin-table small {
  display: block;
  color: var(--muted);
}

.datatable-controls,
.datatable-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
}

.datatable-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.datatable-controls input,
.datatable-controls select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--graphite);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.datatable-controls input {
  width: min(380px, 62vw);
  padding: 8px 12px;
}

.datatable-controls select {
  padding: 8px 10px;
}

.datatable-footer {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.datatable-pages {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.datatable-pages button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--warm);
  color: var(--graphite);
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.datatable-pages button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.row-actions a,
.row-actions button {
  border: 0;
  background: transparent;
  color: var(--red);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.row-actions [data-action-direct] { margin: 0; }
.row-actions .exam-approve-button {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid #2b8a4b;
  border-radius: 9px;
  background: #e4f6e9;
  color: #176839;
}
.row-actions .exam-approve-button:hover { background: #176839; color: #fff; }

.status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.status.on {
  background: #e6f7ec;
  color: #126532;
}

.status.off {
  background: #ececf1;
  color: #686878;
}

.status.warn {
  background: #fff1d6;
  color: #9a5a00;
}

.medical-fields {
  margin: 4px 0 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.medical-fields legend {
  padding: 0 8px;
  color: var(--graphite);
  font-weight: 900;
}

.medical-fields .grid-form {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.muted-copy {
  color: var(--muted);
  margin-top: -8px;
}

.small-button {
  min-height: 0;
  padding: 9px 12px;
  font-size: 12px;
}

.inline-window-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.inline-window-form label {
  display: inline-flex;
  flex-direction: row;
  gap: 5px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.inline-window-form input {
  width: 64px;
  padding: 7px;
}

.inline-window-form button {
  border: 0;
  background: var(--graphite);
  color: #fff;
  border-radius: 8px;
  padding: 9px 10px;
  font-weight: 900;
  cursor: pointer;
}

.class-code {
  display: inline-flex;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef5ff;
  color: #0f63d6;
  font-weight: 900;
  letter-spacing: 0;
}

.student-checklist {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

.student-checklist legend {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.guardian-student-grid label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--warm);
}

.guardian-student-grid input {
  grid-row: 1 / span 2;
  width: 18px;
  height: 18px;
}

.guardian-student-grid small {
  color: var(--muted);
}

.guardian-student-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto auto;
  gap: 8px;
  margin-bottom: 10px;
}

.guardian-student-tools input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px 12px;
  font: inherit;
}

.guardian-student-tools button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--warm);
  color: var(--graphite);
  padding: 9px 11px;
  font-weight: 900;
  cursor: pointer;
}

.guardian-selected-summary {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px dashed #b9c9de;
  border-radius: 8px;
  background: #f7fbff;
  color: var(--muted);
  font-weight: 850;
}

.guardian-selected-summary strong { color: #0d66f2; }

.guardian-student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  max-height: 390px;
  overflow: auto;
  padding: 2px;
}

.guardian-student-grid label { cursor: pointer; }
.guardian-student-grid label:has(input:checked) { border-color: #8ab9f5; background: #eef6ff; }
.guardian-student-empty { grid-column: 1 / -1; color: var(--muted); font-weight: 800; }

@media (max-width: 720px) {
  .guardian-student-tools { grid-template-columns: 1fr 1fr; }
  .guardian-student-tools input { grid-column: 1 / -1; }
  .guardian-student-grid { grid-template-columns: 1fr; max-height: 440px; }
}

.student-category-chips,
.category-student-picker {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--warm);
}

.student-category-chips {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.student-category-chips legend,
.category-student-picker legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.student-category-chips label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--graphite);
  font-weight: 850;
}

.category-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 6px;
  border-radius: 999px;
  vertical-align: middle;
  box-shadow: 0 0 0 3px rgba(0,0,0,.04);
}

.message-student-picker {
  margin: 0;
  padding: 0;
  border: 0;
}

.message-student-picker legend {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.message-picker-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 8px;
  margin-bottom: 10px;
}

.message-picker-tools button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--warm);
  color: var(--graphite);
  padding: 9px 11px;
  font-weight: 900;
  cursor: pointer;
}

.message-selected-summary {
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px dashed #b9c9de;
  border-radius: 8px;
  background: #f7fbff;
  color: var(--muted);
  font-weight: 850;
}

.message-selected-summary strong {
  color: #0d66f2;
}

.message-student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding: 2px;
}

.message-student-grid label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  align-items: center;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: grab;
}

.message-student-grid label:active {
  cursor: grabbing;
}

.message-student-grid label.is-selected {
  border-color: #0d66f2;
  background: #eef5ff;
  box-shadow: 0 10px 22px rgba(13, 102, 242, 0.12);
}

.message-student-grid input {
  grid-row: 1 / span 2;
  width: 18px;
  height: 18px;
}

.message-student-grid span {
  color: var(--graphite);
  font-weight: 900;
}

.message-student-grid small {
  color: var(--muted);
}

.message-email-preview {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.message-email-preview[hidden] {
  display: none;
}

.message-email-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.message-email-preview-toolbar strong {
  color: var(--graphite);
  font-size: 15px;
}

.message-email-preview-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.message-email-preview iframe {
  width: 100%;
  min-height: 360px;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: #f4f6f8;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.lead-convert-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
  min-width: 360px;
}

.lead-convert-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.lead-convert-form input,
.lead-convert-form select {
  min-height: 36px;
  padding: 7px 9px;
}

.lead-convert-form button {
  grid-column: 1 / -1;
  border: 0;
  border-radius: 8px;
  background: #0d66f2;
  color: #fff;
  padding: 10px 12px;
  font-weight: 900;
  cursor: pointer;
}

.contact-filter-form .form-actions {
  align-self: end;
}

.contact-list {
  display: grid;
  gap: 14px;
}

.contact-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(48, 48, 64, 0.06);
}

.contact-card.is-new {
  border-left: 5px solid #d04030;
  box-shadow: 0 16px 36px rgba(208, 64, 48, .11);
}

.contact-person { display: grid; gap: 6px; }
.contact-channels { display: flex; flex-wrap: wrap; gap: 7px; }
.contact-channels a { padding: 6px 9px; border-radius: 999px; background: #eef4ff; color: #0d66f2; font-size: 12px; font-weight: 900; text-decoration: none; }

.contact-card > header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.contact-card > header strong,
.contact-card > header span,
.contact-card > header small {
  display: block;
}

.contact-card > header strong {
  color: var(--graphite);
  font-size: 18px;
}

.contact-card > header span,
.contact-card > header small,
.contact-meta {
  color: var(--muted);
}

.contact-meta {
  display: grid;
  grid-template-columns: minmax(150px,.65fr) minmax(180px,.8fr) minmax(260px,1.55fr);
  gap: 10px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
}

.contact-meta > div { display: grid; align-content: start; gap: 5px; padding: 12px; border-radius: 10px; background: var(--warm); }
.contact-meta span { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.contact-meta strong { color: var(--graphite); }
.contact-meta p { margin: 0; color: var(--graphite); line-height: 1.5; white-space: pre-wrap; }
.contact-message { border: 1px solid rgba(208,64,48,.13); background: #fff9f7 !important; }

.contact-actions-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 14px;
  align-items: start;
}

.contact-action-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #fbfcff; }
.contact-action-panel > summary { padding: 12px 14px; color: var(--graphite); font-weight: 900; cursor: pointer; }
.contact-action-panel[open] > summary { border-bottom: 1px solid var(--line); background: #f2f6fc; }
.contact-action-panel .contact-reply-form,
.contact-action-panel .lead-convert-form { border: 0; border-radius: 0; }

@media (max-width: 760px) {
  .admin-notice-grid,
  .contact-meta { grid-template-columns: 1fr; }
  .admin-notice-modal > header { padding-right: 58px; }
}

.contact-reply-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.contact-reply-form label,
.contact-reply-form .full-field {
  grid-column: span 1;
}

.contact-reply-form .full-field,
.contact-reply-form button {
  grid-column: 1 / -1;
}

.contact-reply-form button {
  border: 0;
  border-radius: 8px;
  background: #0d66f2;
  color: #fff;
  padding: 11px 12px;
  font-weight: 900;
  cursor: pointer;
}

.contact-converted {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.contact-replies {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f7f9fd;
}

.contact-replies summary {
  color: var(--graphite);
  font-weight: 900;
  cursor: pointer;
}

.contact-replies div {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.contact-replies strong,
.contact-replies span {
  display: block;
}

.contact-replies span,
.contact-replies p {
  color: var(--muted);
}

.contact-replies p {
  margin: 6px 0 0;
}

.smtp-test-result {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--warm);
}

.smtp-test-result.is-ok {
  border-color: rgba(32, 181, 90, .35);
  background: #e6f7ec;
}

.smtp-test-result.is-error {
  border-color: rgba(208, 64, 48, .35);
  background: #fde8e5;
}

.smtp-test-result strong,
.smtp-test-result small {
  display: block;
}

.smtp-test-result p {
  margin: 8px 0;
  color: var(--graphite);
  font-weight: 800;
}

.smtp-test-result small {
  color: var(--muted);
  font-weight: 800;
}

.smtp-test-result pre {
  max-height: 280px;
  margin: 12px 0 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 12px;
  border-radius: 8px;
  background: rgba(255,255,255,.68);
  color: var(--graphite);
  font-size: 13px;
  line-height: 1.45;
}

.student-link-picker {
  position: relative;
  min-width: 0;
}

.student-link-results {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% - 34px);
  max-height: 310px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(20, 30, 55, .16);
}

.student-link-results button,
.student-link-empty {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--graphite);
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.student-link-results button {
  cursor: pointer;
}

.student-link-results button:hover,
.student-link-results button:focus-visible {
  background: var(--warm);
  outline: 2px solid rgba(208, 64, 48, .16);
}

.student-link-empty {
  color: var(--muted);
}

.student-link-actions {
  margin-top: 8px;
}

.student-link-actions .button {
  width: auto;
  padding: 9px 12px;
}

.certificate-template-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--warm);
}

.certificate-template-tools strong {
  margin-right: 4px;
  color: var(--graphite);
}

.certificate-template-tools .button {
  width: auto;
  padding: 9px 12px;
}

.certificate-signature-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.certificate-signature-picker legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.certificate-signature-picker label {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 8px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--warm);
}

.certificate-signature-picker input {
  grid-row: 1 / span 2;
  width: 18px;
  height: 18px;
}

.certificate-signature-picker span {
  color: var(--graphite);
  font-weight: 900;
}

.certificate-signature-picker small {
  color: var(--muted);
}

.certificate-live-preview {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f7;
}

.certificate-preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.certificate-preview-toolbar strong {
  color: var(--graphite);
  font-size: 18px;
}

.certificate-preview-toolbar span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.certificate-preview-sheet {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 38px);
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(208,64,48,.08), transparent 32%),
    linear-gradient(315deg, rgba(7,22,47,.08), transparent 34%),
    #fff;
  box-shadow: 0 16px 34px rgba(20, 30, 55, .10);
}

.certificate-preview-sheet header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 2px solid #172033;
}

.certificate-preview-sheet header span {
  color: #172033;
  font-size: 26px;
  font-weight: 900;
}

.certificate-preview-sheet header strong {
  color: #d04030;
  font-size: 13px;
}

.certificate-preview-title {
  margin: 28px 0 20px;
  text-align: center;
}

.certificate-preview-title p {
  margin: 0 0 6px;
  color: #d04030;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.certificate-preview-title h3 {
  margin: 0;
  color: #172033;
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1;
}

.certificate-preview-sheet article {
  width: min(620px, 100%);
  min-height: 110px;
  margin: 0 auto 24px;
  color: #283345;
  font-size: 17px;
  line-height: 1.65;
  text-align: center;
}

.certificate-preview-sheet article p {
  margin: 0 0 12px;
}

.certificate-preview-sheet dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.certificate-preview-sheet dl div {
  padding: 10px;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: rgba(255,255,255,.72);
}

.certificate-preview-sheet dt {
  color: #657189;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.certificate-preview-sheet dd {
  margin: 4px 0 0;
  color: #172033;
  font-size: 13px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.certificate-signatures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 18px;
  width: min(720px, 100%);
  margin: 34px auto 0;
  align-items: end;
}

.certificate-signature {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 122px;
  padding-top: 8px;
  border-top: 1px solid #172033;
  text-align: center;
}

.certificate-signature img {
  width: min(170px, 100%);
  height: 62px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.certificate-signature strong {
  color: #172033;
  font-size: 14px;
}

.certificate-signature span {
  color: #657189;
  font-size: 12px;
  font-weight: 800;
}

.certificate-body {
  min-height: 100vh;
  margin: 0;
  background: #eef2f7;
  color: #172033;
  font-family: Inter, Arial, sans-serif;
}

.certificate-page {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.certificate-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}

.certificate-card {
  position: relative;
  min-height: 980px;
  padding: clamp(34px, 5vw, 62px);
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(208,64,48,.08), transparent 32%),
    linear-gradient(315deg, rgba(7,22,47,.08), transparent 34%),
    #fff;
  box-shadow: 0 24px 60px rgba(20, 30, 55, .16);
}

.certificate-error {
  min-height: auto;
}

.certificate-invalid {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(208,64,48,.35);
  border-radius: 8px;
  background: #fde8e5;
  color: #9c2c22;
  font-weight: 900;
}

.certificate-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 2px solid #172033;
}

.certificate-header div {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.certificate-header img {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.certificate-header span {
  color: #172033;
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 900;
}

.certificate-header strong {
  color: #d04030;
  font-size: 15px;
  white-space: nowrap;
}

.certificate-title {
  margin: clamp(44px, 7vw, 74px) 0 34px;
  text-align: center;
}

.certificate-title p {
  margin: 0 0 8px;
  color: #d04030;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.certificate-title h1 {
  margin: 0;
  color: #172033;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1;
}

.certificate-content {
  width: min(760px, 100%);
  margin: 0 auto 38px;
  color: #283345;
  font-size: clamp(18px, 2.2vw, 23px);
  line-height: 1.75;
  text-align: center;
}

.certificate-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.certificate-meta div {
  padding: 14px;
  border: 1px solid #dfe7f1;
  border-radius: 8px;
  background: rgba(255,255,255,.72);
}

.certificate-meta dt {
  color: #657189;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.certificate-meta dd {
  margin: 5px 0 0;
  color: #172033;
  font-weight: 900;
}

.signature-admin-preview {
  display: grid;
  gap: 8px;
  width: min(360px, 100%);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--warm);
}

.signature-admin-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.signature-admin-preview img,
.signature-admin-card img {
  object-fit: contain;
  background: #fff;
}

.signature-admin-preview img {
  width: 100%;
  max-height: 130px;
}

.certificate-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 18px;
  align-items: end;
  margin-top: 42px;
  padding-top: 22px;
  border-top: 1px solid #dfe7f1;
}

.certificate-footer strong,
.certificate-footer span {
  display: block;
}

.certificate-footer strong {
  color: #172033;
  font-size: 18px;
}

.certificate-footer span {
  margin-top: 6px;
  color: #657189;
  font-size: 12px;
  word-break: break-all;
}

.certificate-footer img {
  width: 150px;
  height: 150px;
  border: 8px solid #fff;
  box-shadow: 0 10px 22px rgba(20, 30, 55, .12);
}

.kiosk-shell {
  display: grid;
  gap: 18px;
}

.kiosk-body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(208,64,48,.12), transparent 34%),
    linear-gradient(135deg, #f8f4ef, #eef2f7 54%, #fdfaf7);
}

.kiosk-body .kiosk-shell {
  width: 100vw;
  height: 100vh;
  padding: clamp(10px, 1.5vw, 18px);
  box-sizing: border-box;
  overflow: hidden;
}

.kiosk-body .kiosk-shell.is-open {
  grid-template-rows: minmax(132px, 18vh) auto minmax(0, 1fr);
  gap: 12px;
}

.kiosk-body .kiosk-shell.is-waiting {
  grid-template-rows: minmax(128px, 17vh) minmax(0, 1fr);
  gap: 12px;
}

.kiosk-fullscreen-button {
  position: fixed;
  z-index: 90;
  right: 14px;
  top: 14px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.44);
  border-radius: 999px;
  background: rgba(23,32,51,.78);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.kiosk-fullscreen-button.is-subtle {
  opacity: .28;
}

.kiosk-fullscreen-button:hover,
.kiosk-fullscreen-button:focus-visible {
  opacity: 1;
}

.kiosk-alert {
  position: fixed;
  z-index: 95;
  left: 50%;
  top: 14px;
  width: min(620px, calc(100vw - 130px));
  transform: translateX(-50%);
  padding: 12px 16px;
  border-radius: 999px;
  background: #172033;
  color: #fff;
  text-align: center;
  font-weight: 900;
  box-shadow: 0 18px 42px rgba(20, 30, 55, .2);
  animation: kiosk-alert-hide .5s ease 5s forwards;
}

.kiosk-alert.success {
  background: #126532;
}

.kiosk-alert.danger {
  background: #9c2c22;
}

.kiosk-alert.warning {
  background: #9a5a00;
}

.kiosk-mark-modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 16, 32, .58);
  backdrop-filter: blur(10px);
  animation: kiosk-modal-in .18s ease-out;
}

.kiosk-mark-modal.is-hiding {
  animation: kiosk-modal-out .45s ease forwards;
}

.kiosk-mark-modal section {
  width: min(620px, 92vw);
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 34px 90px rgba(10, 16, 32, .34);
  text-align: center;
}

.kiosk-mark-modal.warning section {
  border-color: rgba(154, 90, 0, .34);
  background: linear-gradient(135deg, #fffaf1, #fff4df);
}

.kiosk-mark-modal.warning section::before {
  content: "!";
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: #9a5a00;
  color: #fff;
  font-size: 46px;
  font-weight: 900;
  line-height: 1;
}

.kiosk-mark-modal img {
  width: min(180px, 46vw);
  max-height: 110px;
  object-fit: contain;
  margin-bottom: 18px;
}

.kiosk-mark-modal span {
  display: block;
  color: #126532;
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.kiosk-mark-modal.warning span {
  color: #9a5a00;
}

.kiosk-mark-modal h2 {
  margin: 8px 0;
  color: var(--graphite);
  font-size: clamp(44px, 7vw, 76px);
  line-height: .95;
}

.kiosk-mark-modal p {
  margin: 0;
  color: var(--muted);
  font-size: 20px;
  font-weight: 900;
}

.kiosk-mark-modal div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.kiosk-mark-modal strong {
  padding: 8px 12px;
  border-radius: 999px;
  background: #9a5a00;
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
}

@keyframes kiosk-modal-in {
  from { opacity: 0; transform: scale(.98); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes kiosk-modal-out {
  to { opacity: 0; transform: scale(.98); }
}

@keyframes kiosk-alert-hide {
  to {
    opacity: 0;
    transform: translate(-50%, -12px);
    pointer-events: none;
  }
}

.kiosk-hero,
.kiosk-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(20, 30, 55, 0.10);
}

.kiosk-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: stretch;
  padding: clamp(18px, 3vw, 30px);
}

.kiosk-body .kiosk-hero {
  min-height: 0;
  padding: clamp(12px, 1.6vw, 18px);
}

.kiosk-body .kiosk-shell.is-waiting .kiosk-hero {
  position: relative;
  z-index: 3;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  margin: 0;
  border: 0;
  background: rgba(255,255,255,.94);
  box-shadow: 0 14px 36px rgba(20, 30, 55, .12);
}

.kiosk-hero h2 {
  margin: 4px 0 8px;
  color: var(--graphite);
  font-size: clamp(42px, 6vw, 72px);
  line-height: .95;
}

.kiosk-body .kiosk-hero h2 {
  font-size: clamp(28px, 4.4vw, 54px);
}

.kiosk-body .kiosk-shell.is-waiting .kiosk-hero h2 {
  max-width: 100%;
  margin-bottom: 4px;
  font-size: clamp(28px, 3.8vw, 48px);
  line-height: .92;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kiosk-hero p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.kiosk-code-card {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 180px;
  padding: 20px;
  border-radius: 8px;
  background: linear-gradient(135deg, #07162f, #0d66f2);
  color: #fff;
  text-align: center;
}

.kiosk-body .kiosk-code-card {
  min-height: 0;
  padding: 10px 14px;
  align-content: center;
}

.kiosk-body .kiosk-shell.is-waiting .kiosk-code-card {
  min-height: 0;
  border-radius: 8px;
}

.kiosk-code-card span,
.kiosk-code-card small {
  font-weight: 900;
  text-transform: uppercase;
  opacity: .8;
  line-height: 1.1;
}

.kiosk-code-card strong {
  font-size: clamp(46px, 7vw, 82px);
  line-height: .95;
  letter-spacing: 0;
}

.kiosk-body .kiosk-code-card strong {
  font-size: clamp(34px, 5.2vw, 58px);
}

.kiosk-body .kiosk-shell.is-waiting .kiosk-code-card strong {
  font-size: clamp(32px, 4.8vw, 54px);
}

.kiosk-auto-label {
  margin-top: 10px !important;
  color: var(--red) !important;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0;
}

.kiosk-current-time {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 6px !important;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(208, 64, 48, .09);
  color: var(--graphite) !important;
  font-size: clamp(13px, 1.35vw, 16px);
  line-height: 1.15;
}

.kiosk-current-time strong {
  color: var(--red);
  font-size: 1.15em;
}

.kiosk-waiting {
  display: grid;
  grid-template-columns: minmax(280px, .85fr) minmax(420px, 1.4fr);
  gap: 18px;
  align-items: stretch;
}

.kiosk-body .kiosk-waiting {
  position: relative;
  min-height: 0;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: #172033;
}

.kiosk-next-card,
.kiosk-gallery-showcase {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(20, 30, 55, 0.10);
}

.kiosk-next-card {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: clamp(20px, 3vw, 34px);
}

.kiosk-body .kiosk-next-card {
  position: absolute;
  z-index: 2;
  left: clamp(18px, 3vw, 44px);
  bottom: clamp(18px, 3vw, 44px);
  width: min(560px, calc(100% - 88px));
  min-height: 0;
  padding: clamp(20px, 3vw, 36px);
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.92);
  box-shadow: 0 24px 70px rgba(10, 15, 30, .30);
  backdrop-filter: blur(10px);
}

.kiosk-next-card h3 {
  margin: 0;
  color: var(--graphite);
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1;
}

.kiosk-body .kiosk-next-card h3 {
  max-width: 100%;
  font-size: clamp(34px, 4.6vw, 62px);
  line-height: .96;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.kiosk-next-card p,
.kiosk-next-card span {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.kiosk-next-card strong {
  color: var(--red);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.05;
}

.kiosk-gallery-showcase {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.kiosk-body .kiosk-gallery-slider {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: #172033;
}

.kiosk-body .kiosk-gallery-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(10,16,32,.62), rgba(10,16,32,.20) 42%, rgba(10,16,32,.34)),
    linear-gradient(0deg, rgba(10,16,32,.52), transparent 46%);
  pointer-events: none;
}

.kiosk-gallery-showcase figure {
  position: relative;
  min-height: 150px;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--warm);
}

.kiosk-body .kiosk-gallery-slider figure {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  min-height: 0;
  opacity: 0;
  transform: scale(1.025);
  transition: opacity .8s ease, transform 5.5s ease;
}

.kiosk-body .kiosk-gallery-slider figure.is-active {
  opacity: 1;
  transform: scale(1);
}

.kiosk-gallery-showcase img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  display: block;
}

.kiosk-body .kiosk-gallery-slider img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center;
}

.kiosk-gallery-showcase figcaption {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(31, 31, 43, .72);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.kiosk-body .kiosk-gallery-slider figcaption {
  z-index: 2;
  left: 18px;
  right: auto;
  top: 18px;
  bottom: auto;
  max-width: min(520px, calc(100% - 36px));
  padding: 10px 14px;
  font-size: clamp(16px, 1.5vw, 22px);
  background: rgba(23,32,51,.68);
}

.kiosk-gallery-empty {
  grid-column: 1 / -1;
  display: grid;
  min-height: 180px;
  place-items: center;
  color: var(--muted);
  font-weight: 900;
}

.kiosk-body .kiosk-gallery-empty {
  height: 100%;
}

.kiosk-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(300px, .8fr) minmax(280px, .7fr);
  gap: 18px;
  align-items: start;
}

.kiosk-body .kiosk-grid {
  min-height: 0;
  grid-template-columns: minmax(320px, .95fr) minmax(300px, .9fr) minmax(260px, .7fr);
  overflow: hidden;
}

.kiosk-body .kiosk-grid-marking {
  grid-template-columns: minmax(280px, .85fr) minmax(330px, 1fr) minmax(280px, .8fr);
}

.kiosk-entry-form {
  display: contents;
}

.kiosk-entry-form.is-disabled {
  opacity: .78;
}

.kiosk-entry-form.is-disabled input,
.kiosk-entry-form.is-disabled button {
  cursor: not-allowed;
}

.kiosk-column-title {
  color: var(--graphite);
  font-size: 18px;
}

.kiosk-rut-column {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.kiosk-qr-column {
  align-content: start;
}

.kiosk-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  min-height: 0;
}

.kiosk-summary-strip article {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 10px 28px rgba(20, 30, 55, .08);
}

.kiosk-summary-strip span,
.kiosk-summary-strip strong {
  display: block;
}

.kiosk-summary-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.kiosk-summary-strip strong {
  margin-top: 3px;
  color: var(--graphite);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1;
}

.kiosk-panel {
  padding: clamp(18px, 3vw, 26px);
}

.kiosk-body .kiosk-panel {
  min-height: 0;
  padding: clamp(14px, 1.8vw, 22px);
  overflow: hidden;
}

.kiosk-form {
  display: grid;
  gap: 16px;
}

.kiosk-body .kiosk-form {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 12px;
}

.kiosk-form.is-disabled {
  opacity: .78;
}

.kiosk-form.is-disabled input,
.kiosk-form.is-disabled button {
  cursor: not-allowed;
}

.kiosk-window {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 8px;
  font-weight: 900;
}

.kiosk-window.open {
  background: #e6f7ec;
  color: #126532;
}

.kiosk-window.closed {
  background: #fde8e5;
  color: #9c2c22;
}

.kiosk-form input[name="rut"] {
  min-height: 64px;
  font-size: 30px;
  font-weight: 900;
}

.kiosk-body .kiosk-form input[name="rut"] {
  min-height: clamp(48px, 7vh, 64px);
  font-size: clamp(22px, 3vw, 32px);
}

.touch-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.kiosk-body .touch-keypad {
  min-height: 0;
  align-content: stretch;
}

.touch-keypad button {
  min-height: 62px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--warm);
  color: var(--graphite);
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}

.kiosk-body .touch-keypad button {
  min-height: 0;
  font-size: clamp(17px, 2.2vw, 24px);
}

.touch-keypad .primary-key {
  background: #0d66f2;
  color: #fff;
  border-color: #0d66f2;
}

.kiosk-override {
  margin-top: 2px;
  color: var(--muted);
  font-weight: 900;
}

.kiosk-panel h3 {
  margin: 0;
  color: var(--graphite);
  font-size: 26px;
}

.kiosk-count {
  display: block;
  margin: 8px 0 16px;
  color: #0d66f2;
  font-size: 64px;
  line-height: .9;
}

.kiosk-body .kiosk-count {
  margin: 4px 0 10px;
  font-size: clamp(42px, 5vw, 64px);
}

.attendance-list {
  display: grid;
  gap: 10px;
  max-height: 62vh;
  overflow: auto;
  padding-right: 2px;
}

.kiosk-body .attendance-list,
.kiosk-body .kiosk-student-list {
  max-height: none;
  height: calc(100vh - clamp(112px, 16vh, 160px) - 178px);
  overflow: hidden;
}

.attendance-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--warm);
}

.attendance-list div.branch-mismatch {
  border-color: rgba(13, 102, 242, .32);
  background: #eaf2ff;
}

.kiosk-body .attendance-list div,
.kiosk-body .kiosk-student-list div {
  padding: 9px 10px;
}

.attendance-list span,
.attendance-list small {
  display: block;
}

.attendance-main {
  min-width: 0;
}

.attendance-list span {
  color: var(--graphite);
  font-weight: 900;
}

.attendance-list small {
  color: var(--muted);
}

.attendance-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.attendance-list strong {
  display: inline-flex;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: #0d66f2;
  color: #fff;
  font-size: 11px;
  text-transform: uppercase;
}

.attendance-list strong.debt-badge {
  background: #9a5a00;
}

.kiosk-students-panel {
  align-self: stretch;
}

.kiosk-student-list {
  display: grid;
  gap: 10px;
  max-height: 62vh;
  overflow: auto;
  padding-right: 2px;
}

.kiosk-body .kiosk-student-list {
  gap: 7px;
}

.kiosk-student-list div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.kiosk-student-list div.is-marked {
  border-color: rgba(32, 181, 90, .32);
  background: #e6f7ec;
}

.kiosk-student-list div.has-debt {
  border-color: rgba(154, 90, 0, .36);
  background: #fff4df;
}

.kiosk-student-list div.has-debt.is-marked {
  background: linear-gradient(90deg, #e6f7ec 0 58%, #fff4df 58% 100%);
}

.kiosk-student-list span,
.kiosk-student-list small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kiosk-student-list span {
  color: var(--graphite);
  font-weight: 900;
}

.kiosk-student-list small {
  color: var(--muted);
}

.kiosk-student-list strong {
  grid-row: 1 / span 2;
  border-radius: 999px;
  padding: 6px 9px;
  background: var(--warm);
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.kiosk-student-list .is-marked strong {
  background: #20b55a;
  color: #fff;
}

.kiosk-student-list .has-debt strong {
  background: #9a5a00;
  color: #fff;
}

.popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(31, 31, 43, 0.68);
}

.popup-backdrop.is-visible {
  display: flex;
}

.info-popup {
  position: relative;
  width: min(480px, 100%);
  padding: 28px;
  background: #fff;
  border-radius: 8px;
  color: var(--graphite);
  box-shadow: var(--shadow);
}

.info-popup > span,
.popup-preview-card > span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  background: var(--blush);
  border-radius: 8px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.info-popup h2,
.popup-preview-card h3 {
  margin-bottom: 12px;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 44px;
  line-height: 0.95;
}

.info-popup p,
.popup-preview-card p,
.popup-message {
  color: var(--muted);
}

.popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--warm);
  color: var(--graphite);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.popup-preview-card {
  max-width: 520px;
  padding: 24px;
  background: var(--warm);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.app-modal-config {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--warm);
}

.app-modal-config h3 {
  margin: 0;
  color: var(--graphite);
}

.app-info-preview {
  display: grid;
  gap: 10px;
}

.app-info-preview.is-disabled {
  opacity: .55;
}

.app-info-preview-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.app-info-preview-toolbar strong {
  color: var(--graphite);
}

.app-info-preview-phone {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f6f1ee, #ffffff);
}

.app-info-modal-card {
  position: relative;
  width: min(420px, 100%);
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 22px 50px rgba(7, 22, 47, .18);
}

.app-info-modal-card > button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.app-info-modal-card > span {
  display: block;
  padding: 20px 22px 4px;
  background: linear-gradient(135deg, #07162f, #d04030);
  color: rgba(255,255,255,.72);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.app-info-modal-card h2 {
  margin: 0;
  padding: 0 22px 20px;
  background: linear-gradient(135deg, #07162f, #d04030);
  color: #fff;
  font-size: 28px;
}

.app-info-modal-card article {
  padding: 20px 22px;
  color: var(--muted);
  line-height: 1.6;
}

.app-info-modal-card article img {
  max-width: 100%;
  border-radius: 12px;
}

.form-hint {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.gallery-admin-card {
  overflow: hidden;
  background: var(--warm);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.gallery-admin-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.gallery-admin-card > div {
  padding: 14px;
}

.gallery-admin-card span {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.gallery-admin-card h3 {
  margin: 6px 0;
}

.gallery-admin-card p {
  color: var(--muted);
}

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    inset: 76px 12px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 14px;
    border-radius: 8px;
  }

  .nav-cta {
    text-align: center;
  }

  .hero {
    min-height: auto;
    padding-top: 66px;
    padding-bottom: 78px;
    background:
      linear-gradient(180deg, rgba(48, 48, 64, 0.96) 0%, rgba(48, 48, 64, 0.76) 58%, rgba(48, 48, 64, 0.42) 100%),
      url("https://loremflickr.com/1800/1000/taekwondo,martialarts?lock=111") center / cover;
  }

  .hero-badge {
    position: relative;
    right: auto;
    top: auto;
    width: min(100%, 340px);
    margin-top: 26px;
  }

  .hero-media {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(78vw, 100%, 280px);
    max-width: 100%;
    margin: 34px auto 0;
  }

  .intro-grid,
  .split-section,
  .contact,
  .schedule-section .section-heading {
    grid-template-columns: 1fr;
  }

  .program-grid {
    grid-template-columns: 1fr;
  }

  .split-section,
  .schedule-section,
  .contact {
    width: min(100% - 24px, 680px);
    padding: 28px;
  }

  .agenda-days,
  .admin-grid,
  .grid-form {
    grid-template-columns: 1fr;
  }

  .day-picker > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-layout {
    display: block;
  }

  .admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(310px, calc(100vw - 34px));
    transform: translateX(-105%);
    transition: transform .22s ease;
  }

  .admin-sidebar.is-open {
    transform: translateX(0);
  }

  .admin-shell {
    width: min(100% - 24px, 760px);
    padding-top: 0;
  }

  .admin-topbar {
    justify-content: space-between;
    margin: 0 -12px 18px;
    padding: 10px 12px;
  }

  .admin-menu-toggle {
    display: inline-flex;
  }

  .admin-manual-button {
    min-height: 36px;
    padding: 7px 11px;
    font-size: 12px;
  }

  .admin-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .manual-hero,
  .manual-cta,
  .manual-grid,
  .manual-grid.two,
  .manual-screens-grid {
    grid-template-columns: 1fr;
  }

  .manual-hero,
  .manual-cta,
  .manual-section {
    padding: 18px;
  }

  .manual-index {
    top: 62px;
  }

  .manual-screen-body {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .manual-screen-body aside,
  .manual-screen-body main {
    padding: 10px;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .album-grid,
  .gallery-admin-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .lightbox-dialog img {
    max-height: calc(100svh - 220px);
  }

  .album-section > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .gallery img:first-child {
    grid-row: auto;
  }
}

@media (max-width: 520px) {
  .site-header {
    min-height: 68px;
    padding-inline: 14px;
  }

  .brand strong {
    max-width: 170px;
  }

  .main-nav {
    top: 68px;
  }

  .hero-actions,
  .hero-stats {
    flex-direction: column;
  }

  .button,
  .hero-stats span {
    width: 100%;
  }

  .schedule-panel div {
    align-items: flex-start;
    flex-direction: column;
  }

  .schedule-panel span {
    text-align: left;
  }

  .site-footer {
    flex-direction: column;
    padding-bottom: 178px;
  }

  .floating-menu {
    left: 12px;
    right: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Carrusel y plantillas seleccionables desde Administracion > Apariencia */
.hero-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-carousel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(28, 28, 38, 0.92), rgba(28, 28, 38, 0.62), rgba(28, 28, 38, 0.18));
}

.hero-carousel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.8s ease, transform 4.5s ease;
}

.hero-carousel img.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero > *:not(.hero-carousel) {
  position: relative;
  z-index: 2;
}

.template-deportiva .hero {
  border-bottom: 10px solid var(--red);
}

.template-institucional {
  background: #f4f7fb;
}
.template-institucional .site-header {
  background: rgba(255, 255, 255, 0.98);
}
.template-institucional .hero {
  min-height: calc(88svh - 76px);
  color: #172033;
  background: linear-gradient(135deg, #eef3f8, #ffffff) !important;
}
.template-institucional .hero-carousel,
.template-institucional .hero-badge,
.template-institucional .hero-media {
  display: none;
}
.template-institucional .hero-content {
  width: min(860px, 100%);
}
.template-institucional .hero-copy {
  color: #4f5b6d;
}
.template-institucional h1,
.template-institucional h2 {
  font-family: Inter, Arial, sans-serif;
  font-weight: 900;
  line-height: 1.04;
}
.template-institucional h1 {
  font-size: clamp(44px, 7vw, 94px);
}
.template-institucional .button.secondary {
  background: #fff;
  color: #172033;
  outline-color: rgba(23, 32, 51, 0.18);
}
.template-institucional .program-card,
.template-institucional .news-card,
.template-institucional .admin-panel {
  box-shadow: none;
}

.template-energia .hero {
  min-height: calc(100svh - 76px);
}
.template-energia .hero-carousel::after {
  background: linear-gradient(120deg, rgba(20, 20, 28, 0.92), rgba(208, 64, 48, 0.64), rgba(255, 255, 255, 0.08));
}
.template-energia .hero-content {
  width: min(760px, 100%);
}
.template-energia .hero-badge {
  transform: rotate(-3deg);
  background: var(--red);
}
.template-energia .button.primary,
.template-energia .nav-cta,
.template-energia .floating-menu a {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}
.template-energia .program-card,
.template-energia .news-card,
.template-energia .agenda-class {
  border-width: 2px;
}
.template-energia .hero-stats span {
  transform: skew(-2deg);
}

.template-oscura {
  background: #11131b;
  color: #f6f7fb;
}
.template-oscura .site-header {
  background: rgba(17, 19, 27, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}
.template-oscura .admin-nav a,
.template-oscura .main-nav a,
.template-oscura .admin-brand {
  color: #f6f7fb;
}
.template-oscura .hero-carousel::after {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.9), rgba(20, 20, 24, 0.72), rgba(0, 0, 0, 0.3));
}
.template-oscura .band,
.template-oscura .section,
.template-oscura body {
  background: #11131b;
}
.template-oscura .intro,
.template-oscura .program-card,
.template-oscura .news-card,
.template-oscura .contact-form,
.template-oscura .album-section > header {
  background: #1b1f2b;
  border-color: rgba(255,255,255,.12);
  color: #f6f7fb;
}
.template-oscura .section-heading p,
.template-oscura .program-card p,
.template-oscura .news-card p,
.template-oscura label {
  color: rgba(246,247,251,.72);
}
.template-oscura input,
.template-oscura textarea,
.template-oscura select {
  background: #10131d;
  color: #fff;
  border-color: rgba(255,255,255,.18);
}

.template-minimal {
  background: #ffffff;
}
.template-minimal .site-header {
  position: relative;
  background: #fff;
}
.template-minimal .hero {
  min-height: auto;
  padding-top: clamp(52px, 8vw, 92px);
  padding-bottom: clamp(46px, 7vw, 82px);
  background: #fff !important;
  color: #202434;
}
.template-minimal .hero-carousel,
.template-minimal .hero-media,
.template-minimal .hero-badge,
.template-minimal .hero-stats {
  display: none;
}
.template-minimal .hero-content {
  width: min(980px, 100%);
}
.template-minimal h1 {
  max-width: 980px;
  font-size: clamp(48px, 9vw, 112px);
}
.template-minimal .hero-copy {
  color: #596070;
}
.template-minimal .button.secondary {
  background: #f4f5f7;
  color: #202434;
  outline: 0;
}
.template-minimal .program-grid,
.template-minimal .news-grid,
.template-minimal .album-grid {
  gap: 22px;
}
.template-minimal .program-card,
.template-minimal .news-card,
.template-minimal .agenda-branch,
.template-minimal .contact,
.template-minimal .contact-form {
  box-shadow: none;
  border-radius: 4px;
}
.admin-card {
  margin-bottom: 18px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid rgba(48, 48, 64, .10);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.admin-card h2 {
  margin-top: 0;
  color: var(--graphite);
  font-family: Inter, Arial, sans-serif;
  font-size: 28px;
  font-weight: 850;
  line-height: 1.15;
}

.admin-help {
  color: var(--muted);
  line-height: 1.65;
}

.notice-box {
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid rgba(48, 48, 64, .10);
  border-radius: 8px;
  color: var(--graphite);
  overflow-wrap: anywhere;
}

.notice-box code,
.manual-list code {
  color: var(--red-dark);
  font-weight: 800;
}

.manual-list {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.8;
}

.manual-hero,
.manual-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,255,255,.76)),
    linear-gradient(135deg, rgba(210, 48, 39, .16), rgba(48, 48, 64, .12));
  box-shadow: 0 18px 44px rgba(48, 48, 64, .10);
}

.manual-hero h2,
.manual-cta h2 {
  margin: 0 0 10px;
  color: var(--graphite);
  font-size: clamp(32px, 4vw, 54px);
  line-height: .98;
}

.manual-hero p,
.manual-cta p,
.manual-section p {
  color: var(--muted);
  line-height: 1.7;
}

.manual-hero-card {
  display: grid;
  gap: 12px;
  align-content: center;
  padding: 22px;
  border: 1px solid rgba(48, 48, 64, .10);
  border-radius: 8px;
  background: #fff;
}

.manual-hero-card strong {
  color: var(--graphite);
  font-size: 22px;
}

.manual-hero-card span {
  color: var(--muted);
  line-height: 1.5;
}

.manual-index {
  position: sticky;
  top: 72px;
  z-index: 20;
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
}

.manual-index a {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--warm);
  color: var(--graphite);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.manual-index a:hover {
  background: var(--red);
  color: #fff;
}

.manual-section {
  margin-bottom: 18px;
  padding: 24px;
}

.manual-section h2 {
  margin: 0 0 12px;
  color: var(--graphite);
  font-family: Inter, Arial, sans-serif;
  font-weight: 850;
  line-height: 1.15;
}

.kiosk-mark-modal h2,
.app-info-modal-card h2,
.download-steps h2 {
  font-family: Inter, Arial, sans-serif;
  font-weight: 850;
  letter-spacing: -.02em;
  line-height: 1.15;
}

.manual-section h3 {
  margin: 0 0 8px;
  color: var(--graphite);
  font-size: 18px;
}

.manual-video-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 280px);
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--warm);
}

.manual-video-card video {
  grid-row: span 2;
  width: 100%;
  max-height: 460px;
  border-radius: 14px;
  background: #07162f;
}

.manual-video-card .button { justify-self: start; }

@media (max-width: 760px) {
  .manual-video-card { grid-template-columns: 1fr; }
  .manual-video-card video { grid-row: auto; max-height: 560px; }
}

.manual-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.manual-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.manual-grid article {
  padding: 18px;
  border: 1px solid rgba(48, 48, 64, .10);
  border-radius: 8px;
  background: var(--paper);
}

.manual-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 24px;
  color: var(--muted);
  line-height: 1.75;
}

.manual-steps strong,
.manual-list strong {
  color: var(--graphite);
}

.manual-screens-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.manual-screen {
  margin: 16px 0 18px;
  overflow: hidden;
  border: 1px solid rgba(48, 48, 64, .12);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(48, 48, 64, .10);
}

.manual-screens-grid .manual-screen {
  margin: 0;
}

.manual-screen-top {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #f8f7f4, #ebe6df);
  border-bottom: 1px solid rgba(48, 48, 64, .10);
}

.manual-screen-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
}

.manual-screen-top span:nth-child(2) {
  background: #d8a941;
}

.manual-screen-top span:nth-child(3) {
  background: #4d8f65;
}

.manual-screen-top strong {
  margin-left: 8px;
  color: var(--graphite);
  font-size: 13px;
}

.manual-screen-body {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  min-height: 178px;
  background: var(--paper);
}

.manual-screen-body aside {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  background: var(--graphite);
}

.manual-screen-body aside span {
  display: block;
  padding: 7px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .78);
  font-size: 11px;
  font-weight: 800;
}

.manual-screen-body aside span:first-child {
  background: var(--red);
  color: #fff;
}

.manual-screen-body main {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 16px;
}

.manual-screen .title {
  width: min(100%, 320px);
  min-height: 30px;
  padding: 6px 0;
  color: var(--graphite);
  font-size: 20px;
  font-weight: 900;
}

.manual-screen .line,
.manual-screen .cards,
.manual-screen .button,
.manual-screen .code {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.manual-screen .line {
  background: #fff;
  color: var(--muted);
  border: 1px solid rgba(48, 48, 64, .08);
}

.manual-screen .cards {
  background: #fff7ed;
  color: var(--graphite);
  border: 1px solid rgba(205, 95, 45, .18);
}

.manual-screen .button {
  width: fit-content;
  background: var(--red);
  color: #fff;
}

.manual-screen .code {
  width: fit-content;
  background: #13213c;
  color: #fff;
  font-size: 18px;
  letter-spacing: 1px;
}

/* Ajustes responsive, menu dinamico y secciones personalizadas */
main {
  overflow: hidden;
}

section[id] {
  scroll-margin-top: 92px;
}

h1,
h2,
h3,
.brand strong,
.section-heading,
.custom-copy {
  overflow-wrap: anywhere;
}

.section,
.section-inner,
.schedule-section,
.contact {
  max-width: min(1160px, calc(100vw - 36px));
}

.nav-group {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-submenu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 40;
  display: grid;
  min-width: 210px;
  padding: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease;
}

.nav-group:hover .nav-submenu,
.nav-group:focus-within .nav-submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-submenu a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink);
}

.nav-submenu a:hover {
  background: var(--warm);
}

.custom-section {
  border-top: 1px solid var(--line);
}

.custom-section-child {
  padding-top: clamp(32px, 5vw, 56px);
}

.custom-section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .82fr);
  gap: clamp(20px, 4vw, 44px);
  align-items: center;
}

.custom-section-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 18px 38px rgba(17,24,39,.14);
}

.custom-copy {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
}

.custom-copy + .button {
  margin-top: 18px;
}

.floating-menu {
  display: none !important;
}

.floating-whatsapp {
  right: 20px;
  bottom: 20px;
  width: 62px;
  height: 62px;
  min-height: 0;
  padding: 0;
  background: #25d366;
  border: 3px solid #fff;
  border-radius: 999px;
  color: #fff;
  box-shadow: 0 18px 38px rgba(17, 24, 39, .28);
}

.floating-whatsapp svg {
  width: 34px;
  height: 34px;
  fill: currentColor;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

/* Plantillas mas diferenciadas */
.template-deportiva .section-heading,
.template-deportiva .intro-grid {
  border-left: 6px solid var(--red);
  padding-left: clamp(16px, 3vw, 28px);
}

.template-institucional .hero {
  min-height: calc(78svh - 76px);
  place-items: center;
  text-align: center;
  color: #172033;
  background: linear-gradient(180deg, #ffffff, #eef4fb) !important;
}

.template-institucional .hero-carousel {
  display: block;
  inset: auto 0 0;
  height: 44%;
  opacity: .18;
}

.template-institucional .hero-carousel::after {
  background: linear-gradient(180deg, transparent, #eef4fb);
}

.template-institucional .hero-badge,
.template-institucional .hero-media {
  display: none;
}

.template-institucional .hero-content,
.template-institucional .hero-copy,
.template-institucional h1 {
  margin-inline: auto;
}

.template-institucional .hero-stats {
  justify-content: center;
}

.template-institucional .hero-stats span {
  background: #fff;
  color: #4f5b6d;
  border-color: rgba(23,32,51,.14);
}

.template-institucional .hero-stats strong {
  color: var(--red);
}

.template-energia .site-header {
  background: var(--red);
  color: #fff;
}

.template-energia .brand small,
.template-energia .main-nav a {
  color: rgba(255,255,255,.88);
}

.template-energia .nav-cta {
  background: #111827;
}

.template-energia .hero::after {
  height: 18px;
  background: repeating-linear-gradient(135deg, #111827 0 18px, var(--red) 18px 36px, #fff 36px 54px);
}

.template-energia .program-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.template-oscura .custom-copy,
.template-oscura .album-section p,
.template-oscura .contact-info p,
.template-oscura .location-list p {
  color: rgba(246,247,251,.74);
}

.template-oscura .custom-section,
.template-oscura .gallery-section,
.template-oscura .programs-section,
.template-oscura .news-section {
  background: #11131b;
}

.template-oscura .album-section > header,
.template-oscura .agenda-branch,
.template-oscura .location-list p {
  border-color: rgba(255,255,255,.12);
}

.template-minimal .section,
.template-minimal .schedule-section,
.template-minimal .contact {
  width: min(980px, calc(100% - 36px));
}

.template-minimal .section-heading {
  max-width: 980px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.template-minimal .program-card img,
.template-minimal .album-image,
.template-minimal .custom-section-grid img {
  display: none;
}

.template-minimal .program-grid,
.template-minimal .news-grid {
  grid-template-columns: 1fr;
}

@media (max-width: 980px) {
  .main-nav {
    gap: 16px;
  }

  .custom-section-grid,
  .template-energia .program-grid {
    grid-template-columns: 1fr;
  }

}

/* Mantiene el logo decorativo completo dentro del hero en escritorio/notebook. */
@media (min-width: 861px) {
  .hero-media {
    position: absolute;
    right: clamp(18px, 6vw, 88px);
    left: auto;
    bottom: 36px;
    width: min(27vw, 280px);
    max-width: calc(100% - 48px);
    margin: 0;
  }
}

@media (max-width: 860px) {
  .main-nav {
    max-height: calc(100svh - 94px);
    overflow-y: auto;
  }

  .nav-group {
    display: block;
  }

  .nav-submenu {
    position: static;
    display: grid;
    min-width: 0;
    margin: 0 8px 8px;
    padding: 4px;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .nav-submenu a {
    padding-left: 24px;
  }

  .hero-content {
    width: 100%;
  }

  .schedule-section,
  .contact,
  .section {
    max-width: calc(100vw - 24px);
  }

  .custom-section-grid img {
    max-height: 420px;
  }
}

@media (max-width: 520px) {
  body {
    min-width: 0;
  }

  h1 {
    font-size: clamp(44px, 17vw, 74px);
  }

  h2 {
    font-size: clamp(34px, 13vw, 54px);
  }

  .brand-logo {
    width: auto;
    max-width: min(42vw, 150px);
    height: 52px;
  }

  .section,
  .section-inner,
  .schedule-section,
  .contact {
    width: calc(100% - 24px);
  }

  .section,
  .schedule-section,
  .contact,
  .split-section {
    padding-left: 18px;
    padding-right: 18px;
  }

  .section-inner {
    padding-left: 0;
    padding-right: 0;
  }

  .album-image,
  .album-image img {
    min-height: 220px;
  }

  .floating-whatsapp {
    right: 14px;
    bottom: 14px;
    width: 58px;
    height: 58px;
  }

  .site-footer {
    padding-bottom: 96px;
  }
}

.location-title {
  margin: 26px 0 10px;
  color: #fff;
  font-family: Inter, Arial, sans-serif;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
}

/* Biblioteca de medios reutilizable en administracion */
.media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.media-actions label {
  flex: 1 1 220px;
  margin: 0;
}

.media-url {
  overflow-wrap: anywhere;
}

.media-url code {
  color: var(--red-dark);
  font-size: 12px;
  font-weight: 800;
}

.media-picker {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(18, 18, 26, .78);
}

.media-picker[hidden] {
  display: none;
}

.media-picker-dialog {
  width: min(980px, 100%);
  max-height: calc(100svh - 44px);
  overflow: hidden;
  background: var(--panel);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.media-picker-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.media-picker-dialog h2 {
  margin: 0;
  color: var(--graphite);
  font-size: 30px;
}

.media-picker-close {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--warm);
  color: var(--graphite);
  font-size: 26px;
  cursor: pointer;
}

.media-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  max-height: calc(100svh - 150px);
  overflow: auto;
  padding: 18px;
}

.media-picker-item {
  display: grid;
  gap: 8px;
  padding: 0 0 10px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.media-picker-item:hover,
.media-picker-item:focus-visible {
  border-color: var(--red);
  outline: 3px solid rgba(208, 64, 48, .14);
}

.media-picker-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.media-picker-item span,
.media-picker-item small {
  padding: 0 10px;
}

.media-picker-item span {
  font-weight: 900;
}

.media-picker-item small,
.media-picker-empty {
  color: var(--muted);
}

/* Todas las plantillas deben mostrar el carrusel superior */
.template-institucional .hero-carousel,
.template-minimal .hero-carousel {
  display: block !important;
  inset: 0 !important;
  height: auto !important;
  opacity: 1 !important;
}

.template-institucional .hero-carousel::after {
  background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(238,244,251,.48));
}

.template-minimal .hero-carousel::after {
  background: linear-gradient(90deg, rgba(255,255,255,.86), rgba(255,255,255,.58), rgba(255,255,255,.18));
}

.template-minimal .hero {
  min-height: calc(76svh - 76px);
  background: #fff !important;
}

/* Layout full-width para todas las plantillas */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  --content-max: 1240px;
  --page-pad: clamp(16px, 4vw, 64px);
}

.hero,
.band,
.intro,
.section,
.custom-section,
.programs-section,
.news-section,
.gallery-section,
.schedule-section,
.contact,
.site-footer {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.section,
.custom-section,
.programs-section,
.news-section,
.gallery-section {
  padding-left: var(--page-pad) !important;
  padding-right: var(--page-pad) !important;
}

.section > .section-heading,
.section > .program-grid,
.section > .news-grid,
.section > .album-stack,
.section > .custom-section-grid,
.custom-section > .custom-section-grid {
  width: min(var(--content-max), 100%) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.intro-grid,
.section-inner {
  width: min(var(--content-max), calc(100% - (var(--page-pad) * 2))) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.schedule-section,
.contact {
  border-radius: 0 !important;
  padding-left: max(var(--page-pad), calc((100vw - var(--content-max)) / 2)) !important;
  padding-right: max(var(--page-pad), calc((100vw - var(--content-max)) / 2)) !important;
}

.schedule-section {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.contact {
  margin-bottom: 0 !important;
}

.template-minimal .section,
.template-minimal .schedule-section,
.template-minimal .contact {
  width: 100% !important;
  max-width: none !important;
}

.template-minimal .section-heading {
  max-width: var(--content-max) !important;
}

.template-institucional .hero-content,
.template-energia .hero-content,
.template-minimal .hero-content,
.hero-content {
  width: min(var(--content-max), 100%) !important;
}

.site-footer {
  padding-left: max(var(--page-pad), calc((100vw - var(--content-max)) / 2)) !important;
  padding-right: max(var(--page-pad), calc((100vw - var(--content-max)) / 2)) !important;
}

@media (max-width: 860px) {
  body {
    --page-pad: 18px;
  }

  .section,
  .custom-section,
  .programs-section,
  .news-section,
  .gallery-section,
  .schedule-section,
  .contact,
  .split-section {
    width: 100% !important;
    max-width: none !important;
    padding-left: var(--page-pad) !important;
    padding-right: var(--page-pad) !important;
  }

  .intro-grid,
  .section-inner {
    width: calc(100% - (var(--page-pad) * 2)) !important;
  }

  .kiosk-hero,
  .kiosk-grid,
  .kiosk-waiting {
    grid-template-columns: 1fr;
  }

  .kiosk-body .kiosk-shell.is-waiting {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .kiosk-body .kiosk-shell.is-waiting .kiosk-hero {
    grid-template-columns: 1fr;
  }

  .kiosk-body .kiosk-shell.is-waiting .kiosk-hero h2 {
    white-space: normal;
    font-size: 34px;
  }

  .kiosk-body .kiosk-next-card {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
  }

  .kiosk-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kiosk-gallery-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .message-picker-tools {
    grid-template-columns: 1fr;
  }

  .certificate-card {
    min-height: auto;
    padding: 26px;
  }

  .certificate-header,
  .certificate-footer {
    grid-template-columns: 1fr;
  }

  .certificate-header {
    display: grid;
  }

  .certificate-meta {
    grid-template-columns: 1fr;
  }

  .certificate-preview-sheet dl {
    grid-template-columns: 1fr 1fr;
  }

  .contact-actions-grid,
  .contact-reply-form,
  .lead-convert-form {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .touch-keypad button {
    min-height: 56px;
  }
}

@page {
  size: A4;
  margin: 12mm;
}

@media print {
  body.certificate-body {
    background: #fff;
  }

  .no-print,
  .certificate-actions {
    display: none !important;
  }

  .certificate-page {
    width: auto;
    margin: 0;
    padding: 0;
  }

  .certificate-card {
    min-height: calc(297mm - 24mm);
    padding: 12mm;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .certificate-title h1 {
    font-size: 42px;
  }

  .certificate-content {
    font-size: 18px;
  }
}

@media (min-width: 861px) and (max-width: 1180px) {
  .kiosk-waiting {
    grid-template-columns: minmax(260px, .8fr) minmax(360px, 1.2fr);
  }

  .kiosk-gallery-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kiosk-grid {
    grid-template-columns: minmax(320px, 1fr) minmax(300px, 1fr);
  }

  .kiosk-grid-marking {
    grid-template-columns: minmax(320px, .9fr) minmax(360px, 1.1fr);
  }

  .kiosk-grid > .kiosk-panel:last-child {
    grid-column: 1 / -1;
  }

  .kiosk-grid-marking > .kiosk-panel:last-child {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  body {
    --page-pad: 14px;
  }

  .hero {
    padding-left: var(--page-pad) !important;
    padding-right: var(--page-pad) !important;
  }

  .kiosk-gallery-showcase {
    grid-template-columns: 1fr;
  }

  .kiosk-hero h2,
  .kiosk-next-card h3 {
    font-size: 34px;
  }

  .kiosk-body .kiosk-next-card h3 {
    font-size: 32px;
  }

  .section,
  .custom-section,
  .programs-section,
  .news-section,
  .gallery-section,
  .schedule-section,
  .contact {
    padding-left: var(--page-pad) !important;
    padding-right: var(--page-pad) !important;
  }
}

/* Ajuste hero badge para notebooks */
.hero-badge {
  right: max(var(--page-pad, 24px), calc((100vw - var(--content-max, 1240px)) / 2 + 18px));
  top: clamp(104px, 10vw, 136px);
  width: clamp(190px, 18vw, 250px);
  max-width: calc(100vw - 48px);
}

.hero-badge strong {
  font-size: clamp(40px, 4vw, 52px);
}

.hero-badge span {
  font-size: clamp(12px, 1.1vw, 13px);
}

@media (min-width: 861px) and (max-width: 1280px) {
  .hero-badge {
    top: auto;
    right: clamp(22px, 4vw, 48px);
    bottom: clamp(92px, 10vw, 136px);
    width: clamp(174px, 20vw, 220px);
    padding: 14px;
  }

  .hero-media {
    width: min(27vw, 280px);
  }
}

@media (min-width: 861px) and (max-width: 1080px) {
  .hero-badge {
    display: none;
  }
}

.public-form-page,
.download-page {
  min-height: 100vh;
  background: linear-gradient(180deg, var(--paper), #fff);
  padding: clamp(18px, 4vw, 44px);
}

.public-form-card {
  width: min(920px, 100%);
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid rgba(208, 64, 48, .18);
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(48, 48, 64, .12);
  padding: clamp(22px, 4vw, 40px);
}

.public-form-card > img {
  max-width: 180px;
  max-height: 82px;
  object-fit: contain;
  margin-bottom: 16px;
}

.public-form-card h1 {
  margin: 0 0 8px;
  font-size: clamp(42px, 8vw, 76px);
}

.download-hero {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, .7fr);
  gap: clamp(22px, 5vw, 58px);
  align-items: center;
}

.download-brand {
  width: fit-content;
  margin-bottom: 28px;
}

.download-hero h1 {
  font-size: clamp(48px, 9vw, 92px);
  line-height: .9;
  margin: 0 0 16px;
}

.download-hero p {
  max-width: 680px;
  font-size: 18px;
  color: var(--muted);
}

.phone-preview {
  min-height: 500px;
  border-radius: 36px;
  background: linear-gradient(160deg, #fff, var(--warm));
  border: 12px solid var(--ink);
  box-shadow: 0 32px 70px rgba(48, 48, 64, .26);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
}

.phone-preview img {
  max-width: 190px;
  max-height: 120px;
  object-fit: contain;
}

.phone-preview strong {
  font-size: 42px;
}

.phone-preview span {
  color: var(--muted);
  font-weight: 800;
}

.download-steps {
  width: min(1180px, 100%);
  margin: 38px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.download-steps article {
  background: #fff;
  border: 1px solid rgba(208, 64, 48, .16);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 16px 38px rgba(48, 48, 64, .08);
}

.download-steps span {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

.download-steps h2 {
  margin: 16px 0 8px;
  font-size: 28px;
}

.kiosk-qr-box {
  display: grid;
  gap: 10px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(48,48,64,.12);
  border-radius: 18px;
  padding: 12px;
}

.kiosk-qr-box video {
  width: 100%;
  max-height: 210px;
  object-fit: cover;
  border-radius: 14px;
  background: #101828;
}

.kiosk-qr-box small {
  color: var(--muted);
  font-weight: 800;
}

.action-menu {
  position: relative;
  display: inline-block;
}

.action-menu summary {
  list-style: none;
  cursor: pointer;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  min-height: 42px;
  border: 1px solid var(--red-dark);
  border-radius: 9px;
  background: linear-gradient(180deg, var(--red), var(--red-dark));
  color: #fff;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 7px 16px rgba(143,31,24,.2);
  user-select: none;
}

.action-menu summary::-webkit-details-marker {
  display: none;
}

.action-menu summary::after {
  content: "•••";
  display: inline-block;
  margin-left: 8px;
  font-size: 10px;
  letter-spacing: 1px;
  opacity: .9;
}

.action-menu[open] summary {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.action-menu[open] summary::after {
  content: "×";
  font-size: 17px;
  letter-spacing: 0;
}

.action-menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  min-width: 220px;
  display: grid;
  gap: 7px;
  padding: 10px;
  background: #fff;
  border: 1px solid rgba(48,48,64,.14);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(48,48,64,.18);
  max-height: min(420px, calc(100vh - 24px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.action-menu.opens-up > div {
  top: auto;
  bottom: calc(100% + 8px);
}

.action-menu a,
.action-menu button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  background: #f8f7f3;
  color: var(--ink);
  border-radius: 10px;
  min-height: 42px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.25;
  text-decoration: none;
}
.action-menu form { width: 100%; margin: 0; }

.action-menu-item::before { display: inline-grid; place-items: center; flex: 0 0 25px; width: 25px; height: 25px; border-radius: 7px; background: #e9e8e3; color: var(--ink); font-size: 13px; font-weight: 900; content: "→"; }
.action-menu-item.is-view::before { content: "◉"; background: #e7eefc; color: #2458a6; }
.action-menu-item.is-edit::before { content: "✎"; background: #fff0d5; color: #946000; }
.action-menu-item.is-success::before { content: "✓"; background: #dff4e6; color: #176839; }
.action-menu-item.is-danger::before { content: "×"; background: #fde3e1; color: #a52520; }
.action-menu-item.is-danger { color: #a52520; }

.action-menu a:hover,
.action-menu button:hover {
  border-color: rgba(208,64,48,.2);
  background: rgba(208,64,48,.08);
  color: var(--red);
  transform: translateX(2px);
}

td.row-actions > a,
td.row-actions > button:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #cdd8ec;
  border-radius: 9px;
  background: #edf3ff;
  color: #2458a6;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(36,88,166,.08);
}

td.row-actions > a:hover,
td.row-actions > button:not([hidden]):hover {
  border-color: #2458a6;
  background: #2458a6;
  color: #fff;
}

.kiosk-body .kiosk-hero {
  align-items: stretch;
}

.kiosk-body .kiosk-code-card {
  min-width: min(360px, 100%);
  display: grid;
  align-content: center;
  gap: 6px;
  padding: clamp(16px, 2vw, 22px);
}

.kiosk-current-time {
  margin: 8px 0 0;
  display: grid;
  gap: 2px;
  color: rgba(255,255,255,.88);
}

.kiosk-current-time span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.kiosk-current-time b {
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1;
}

.kiosk-grid-marking {
  grid-template-columns: minmax(280px, .85fr) minmax(340px, 1fr) minmax(260px, .75fr);
}

.kiosk-grid-marking > .kiosk-panel:last-child {
  min-width: 0;
}

.kiosk-grid-marking .attendance-list {
  max-height: min(46vh, 440px);
  overflow: auto;
}

.kiosk-qr-box {
  background: linear-gradient(180deg,#fff,#f8f7f3);
  border-color: rgba(208,64,48,.24);
}

.kiosk-qr-box > strong {
  color: var(--ink);
  font-size: 16px;
}

.kiosk-qr-box .button {
  width: 100%;
}

.download-page {
  padding-top: clamp(16px, 3vw, 30px);
}

.download-brand img {
  max-width: 72px;
  max-height: 54px;
}

.download-brand {
  margin-bottom: 18px;
}

.download-hero {
  grid-template-columns: minmax(0, 1.15fr) minmax(230px, .55fr);
  gap: clamp(18px, 4vw, 42px);
}

.download-hero h1 {
  font-size: clamp(42px, 7vw, 76px);
}

.phone-preview {
  min-height: 360px;
  border-width: 8px;
  border-radius: 30px;
}

.phone-preview img {
  max-width: 116px;
  max-height: 82px;
}

.phone-preview strong {
  font-size: 34px;
}

.phone-preview small {
  display: block;
  margin-top: 14px;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.download-steps {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.download-steps article {
  padding: 16px;
}

.download-steps h2 {
  font-size: 22px;
}

.download-steps p {
  font-size: 14px;
}

.service-url-box {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin-top: 10px;
}

.service-url-box code {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid rgba(13, 102, 242, .22);
  border-radius: 10px;
  background: #eef5ff;
  color: #084fae;
  font-family: Inter, Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
  word-break: break-word;
  user-select: all;
}

.service-url-box button {
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  background: #0d66f2;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.service-url-box small {
  min-height: 16px;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 860px) {
  .download-hero,
  .download-steps {
    grid-template-columns: 1fr;
  }

  .phone-preview {
    min-height: 280px;
  }

  .kiosk-grid-marking {
    grid-template-columns: 1fr;
  }
}

/* Refinamiento kiosko QR/codigo */
.kiosk-body .kiosk-hero {
  grid-template-columns: minmax(0, 1fr) minmax(150px, .28fr) minmax(250px, .38fr);
  align-items: stretch;
}

.kiosk-body .kiosk-code-card {
  min-width: 0;
  background: #fff !important;
  color: var(--graphite) !important;
  border: 1px solid rgba(208,64,48,.18);
  box-shadow: 0 14px 34px rgba(48,48,64,.08);
}

.kiosk-body .kiosk-code-card span,
.kiosk-body .kiosk-code-card small {
  color: var(--red);
  opacity: 1;
}

.kiosk-body .kiosk-code-card strong {
  color: var(--graphite);
  font-size: clamp(38px, 4.7vw, 62px);
}

.kiosk-time-strip {
  display: grid;
  place-items: center;
  gap: 3px;
  min-width: 150px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #f8f7f3;
  border: 1px solid rgba(48,48,64,.1);
  color: var(--graphite);
  text-align: center;
}

.kiosk-time-strip span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--muted);
}

.kiosk-time-strip strong {
  color: var(--red);
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
}

.kiosk-time-strip small {
  color: var(--muted);
  font-weight: 900;
}

.kiosk-qr-box {
  border: 2px solid rgba(208,64,48,.22);
}

.kiosk-qr-box video {
  width: 100%;
  height: clamp(180px, 24vh, 260px);
  max-height: none;
  object-fit: cover;
  border-radius: 14px;
  background: #101828;
}

@media (max-width: 980px) {
  .kiosk-body .kiosk-hero {
    grid-template-columns: 1fr;
  }
}

/* Panel administrativo compacto: prioriza tablas completas antes del scroll */
.admin-table {
  font-size: 12.5px;
  line-height: 1.35;
}

.admin-table th,
.admin-table td {
  padding: 9px 7px;
  overflow-wrap: anywhere;
  word-break: normal;
}

.admin-table th {
  font-size: 10.5px;
  line-height: 1.2;
  letter-spacing: .015em;
}

.admin-table small {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.3;
}

.admin-table td.row-actions {
  width: 1%;
  min-width: 108px;
  padding-left: 5px;
  padding-right: 5px;
}

.admin-table .status {
  padding: 4px 6px;
  font-size: 10px;
}

.action-menu summary {
  min-width: 104px;
  min-height: 38px;
  padding: 7px 10px;
  font-size: 12px;
}

@media (min-width: 981px) {
  .admin-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .admin-shell {
    width: calc(100% - 28px);
    max-width: none;
    margin: 0 14px;
  }

  .admin-topbar {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .admin-title {
    margin-bottom: 14px;
  }

  .admin-panel {
    margin-bottom: 12px;
    padding: 14px;
  }

  .admin-panel h2 {
    margin-top: 0;
    font-size: 28px;
  }

  .table-wrap {
    width: 100%;
    overflow-x: visible;
  }

  .admin-table {
    min-width: 0;
    table-layout: auto;
  }

  .datatable-controls,
  .datatable-footer {
    margin: 8px 0;
    gap: 8px;
  }
}

@media (max-width: 980px) {
  .admin-panel {
    padding: 14px;
  }

  .admin-panel h2 {
    font-size: 27px;
  }

  .table-wrap {
    overflow-x: auto;
  }

  .admin-table {
    min-width: 720px;
  }
}
