:root {
  --ink: #101427;
  --muted: #667085;
  --paper: #ffffff;
  --soft: #eef9fb;
  --line: #dce6ef;
  --teal: #38c6c2;
  --green: #9bd37b;
  --pink: #f47ab5;
  --purple: #7856d8;
  --yellow: #ffd966;
  --danger: #d92d20;
  --success: #16875d;
  --shadow: 0 20px 60px rgba(16, 20, 39, .12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #fbfdff;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: #315acb; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 800; text-decoration: none; }
.brand-logo { width: 56px; height: 56px; object-fit: cover; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 10px 30px rgba(120,86,216,.22); }
.brand-text { max-width: 260px; line-height: 1.1; }
.nav-menu { display: flex; align-items: center; gap: 18px; font-weight: 700; }
.nav-menu a { color: var(--ink); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); background: #fff; border-radius: 8px; }
.nav-toggle span { display: block; width: 20px; height: 2px; margin: 5px auto; background: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 8px; border: 1px solid transparent; font-weight: 800; cursor: pointer; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { color: #fff; background: linear-gradient(135deg, #315acb, var(--purple) 58%, #c23aa1); box-shadow: 0 12px 28px rgba(120,86,216,.24); }
.btn-outline { color: var(--ink); background: #fff; border-color: var(--line); }
.btn-light { color: var(--ink); background: #fff; }
.btn-small { min-height: 34px; padding: 0 12px; font-size: .88rem; }
.btn-block { width: 100%; }
.hero { position: relative; min-height: 680px; display: grid; align-items: center; overflow: hidden; color: #fff; background: #12152c; }
.hero-media { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,16,38,.86), rgba(12,16,38,.46)), url('../../fondo2.jpg') center/cover no-repeat; }
.hero-content { position: relative; display: grid; grid-template-columns: 1.05fr .55fr; gap: 48px; align-items: center; padding: 80px 0; }
.hero h1 { font-size: clamp(2.25rem, 5vw, 4.8rem); line-height: 1.02; margin: 0 0 20px; letter-spacing: 0; }
.hero p { font-size: 1.12rem; max-width: 650px; color: rgba(255,255,255,.88); }
.eyebrow { margin: 0 0 10px; color: var(--pink); font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-card { align-self: end; background: rgba(255,255,255,.92); color: var(--ink); padding: 22px; border-radius: 8px; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.65); }
.hero-card img { width: 128px; height: 128px; object-fit: cover; border-radius: 50%; margin-bottom: 16px; }
.hero-card strong { display: block; font-size: 1.25rem; }
.hero-card span { color: var(--muted); }
.section { padding: 76px 0; }
.section-soft { background: linear-gradient(180deg, #f2fbff, #fff7fb); }
.section-head { max-width: 720px; margin-bottom: 28px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: 0; }
h2 { font-size: clamp(1.8rem, 3vw, 2.7rem); margin: 0 0 12px; }
h3 { margin: 0 0 10px; }
.feature-grid, .subject-grid, .mode-grid, .metric-grid { display: grid; gap: 20px; }
.feature-grid { grid-template-columns: repeat(3, 1fr); }
.subject-grid { grid-template-columns: repeat(3, 1fr); }
.mode-grid { grid-template-columns: repeat(2, 1fr); }
.card, .panel, .auth-card, .metric, .appointment-card, .media-card, .testimonials article { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 34px rgba(16,20,39,.07); }
.card { padding: 24px; }
.icon { width: 46px; height: 46px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: #eff7ff; color: var(--purple); font-weight: 900; font-size: 1.4rem; margin-bottom: 16px; }
.split { display: grid; grid-template-columns: .8fr 1fr; gap: 40px; align-items: center; }
.subject-cloud { display: flex; flex-wrap: wrap; gap: 12px; }
.subject-cloud span { padding: 12px 16px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-weight: 800; }
.media-card { overflow: hidden; }
.media-card img { width: 100%; height: 280px; object-fit: cover; }
.media-card div { padding: 22px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.steps div { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.steps b { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 8px; color: #fff; background: var(--purple); margin-bottom: 12px; }
.testimonials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.testimonials article { padding: 26px; }
.cta { padding: 64px 0; background: #101427; color: #fff; }
.cta .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.page-hero { padding: 86px 0; background: linear-gradient(135deg, #eef9fb, #fff4fa); border-bottom: 1px solid var(--line); }
.page-hero.compact { padding: 48px 0; }
.page-hero h1 { margin: 0 0 10px; font-size: clamp(2rem, 4vw, 3.4rem); }
.auth-section { min-height: 72vh; display: grid; place-items: center; padding: 56px 16px; background: linear-gradient(135deg, #eef9fb, #fff4fa); }
.auth-card { width: min(760px, 100%); padding: 30px; }
.auth-narrow { width: min(480px, 100%); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.form-stack { display: grid; gap: 18px; }
.full { grid-column: 1 / -1; }
label, fieldset { display: grid; gap: 7px; font-weight: 800; }
input, select, textarea { width: 100%; min-height: 46px; border: 1px solid #cfd8e3; border-radius: 8px; padding: 10px 12px; font: inherit; background: #fff; color: var(--ink); }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(56,198,194,.22); border-color: var(--teal); }
.alert, .flash { padding: 14px 16px; border-radius: 8px; margin-top: 18px; font-weight: 700; }
.alert-danger, .flash-danger { background: #fff1f0; color: #9b1c14; border: 1px solid #ffd2cc; }
.flash-success, .alert-success { background: #ecfdf3; color: #05603a; border: 1px solid #b7ebc6; }
.alert-warning { background: #fff8df; color: #8a5b00; border: 1px solid #ffe49a; }
.flash-warning { background: #fff8df; color: #8a5b00; border: 1px solid #ffe49a; }
.auth-link { margin-bottom: 0; }
.dashboard-grid { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: start; }
.panel { padding: 24px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.data-list { display: grid; gap: 10px; }
.data-list dt { color: var(--muted); font-weight: 800; }
.data-list dd { margin: 0 0 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: .82rem; text-transform: uppercase; color: var(--muted); }
.badge { display: inline-flex; border-radius: 999px; padding: 5px 10px; font-size: .78rem; font-weight: 900; }
.badge-warning { background: #fff4c5; color: #7a5600; }
.badge-success { background: #dff8e8; color: #05603a; }
.badge-danger { background: #ffe4e0; color: #9b1c14; }
.badge-muted { background: #edf1f5; color: #475467; }
.muted, .empty { color: var(--muted); }
.form-shell { max-width: 840px; }
.segmented { border: 1px solid var(--line); padding: 14px; border-radius: 8px; display: flex; flex-wrap: wrap; gap: 14px; }
.segmented legend { font-weight: 900; padding: 0 6px; }
.segmented label { display: flex; align-items: center; gap: 8px; }
.segmented input { width: auto; min-height: auto; }
.schedule-note { background: #f8fbff; border: 1px solid var(--line); padding: 14px; border-radius: 8px; }
.appointment-list { display: grid; gap: 16px; }
.appointment-card { padding: 20px; display: flex; justify-content: space-between; gap: 20px; }
.admin-layout { display: grid; grid-template-columns: 230px 1fr; gap: 22px; align-items: start; }
.admin-menu { position: sticky; top: 92px; display: grid; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.admin-menu a { padding: 10px 12px; border-radius: 8px; color: var(--ink); font-weight: 800; }
.admin-menu a:hover { background: #f2f7fb; text-decoration: none; }
.admin-content { display: grid; gap: 20px; min-width: 0; }
.metric-grid { grid-template-columns: repeat(5, 1fr); }
.metric { padding: 20px; }
.metric span { display: block; font-size: 2rem; font-weight: 900; color: var(--purple); }
.metric p { margin: 4px 0 0; color: var(--muted); font-weight: 800; }
.filters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.actions { min-width: 240px; }
.actions form { display: flex; gap: 8px; margin-bottom: 8px; }
.meeting-link { display: block; max-width: 280px; margin-top: 8px; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.video-shell { padding: 30px 0 70px; }
.video-actions { margin-bottom: 16px; }
.meeting-card { margin-bottom: 18px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 12px 34px rgba(16,20,39,.07); }
.meeting-card h2 { margin: 0 0 8px; font-size: 1.35rem; }
.meeting-card p { margin: 0 0 12px; color: var(--muted); }
.meeting-url { display: block; overflow-wrap: anywhere; font-weight: 800; }
.mirotalk-frame { display: block; width: 100%; height: min(76vh, 760px); min-height: 640px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #101427; box-shadow: var(--shadow); }
.video-error { margin-top: 16px; }
.site-footer { background: #0f1226; color: rgba(255,255,255,.78); padding-top: 42px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 30px; }
.footer-logo { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin-bottom: 12px; }
.site-footer h3 { color: #fff; }
.footer-bottom { margin-top: 30px; padding: 18px; text-align: center; border-top: 1px solid rgba(255,255,255,.12); }

@media (max-width: 920px) {
  .nav-toggle { display: block; }
  .nav-menu { position: absolute; left: 16px; right: 16px; top: 76px; display: none; flex-direction: column; align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px; box-shadow: var(--shadow); }
  .nav-menu.is-open { display: flex; }
  .hero-content, .split, .dashboard-grid, .admin-layout { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .feature-grid, .subject-grid, .mode-grid, .steps, .metric-grid, .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-menu { position: static; grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 24px, 1120px); }
  .brand-text { font-size: .95rem; max-width: 190px; }
  .brand-logo { width: 48px; height: 48px; }
  .hero-content { padding: 56px 0; }
  .hero-card { display: none; }
  .section { padding: 52px 0; }
  .feature-grid, .subject-grid, .mode-grid, .steps, .testimonials, .form-grid, .metric-grid, .footer-grid, .filters { grid-template-columns: 1fr; }
  .cta .container, .appointment-card { flex-direction: column; align-items: stretch; }
  .auth-card, .panel { padding: 20px; }
  .media-card img { height: 210px; }
  .admin-menu { grid-template-columns: 1fr; }
  .mirotalk-frame { height: 72vh; min-height: 520px; }
}
