@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;0,900;1,400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,300,0,0&display=swap');

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  font-style: normal;
  display: inline-block;
  vertical-align: middle;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
}

:root {
  --cx-teal:          #005e28;
  --cx-teal-hover:    #004820;
  --cx-teal-mid:      #007a35;
  --cx-teal-pale:     #e8f5ed;
  --cx-teal-pale2:    #d0edda;
  --cx-amber:         #E8A020;
  --cx-amber-pale:    #fff8e8;
  --cx-amber-hover:   #c98818;
  --cx-green:         #4ba92b;
  --cx-green-pale:    #edf7e9;
  --cx-red:           #ba1a1a;
  --cx-red-pale:      #fdf2f2;
  --cx-navy:          #1a2533;

  --cx-white:         #eceeef;
  --cx-grey-light:    #e6e8e9;
  --cx-bg:            #f0f2f3;
  --cx-surface:       #ffffff;
  --cx-surface-alt:   #f9fafb;

  --cx-text:          #1a2533;
  --cx-text-muted:    #6b7280;
  --cx-text-faint:    #9ca3af;
  --cx-border:        #d1d5db;
  --cx-border-light:  #e5e7eb;

  --cx-shadow-xs:     0 1px 2px rgba(0,0,0,0.06);
  --cx-shadow-sm:     0 1px 4px rgba(0,0,0,0.08);
  --cx-shadow-md:     0 4px 16px rgba(0,0,0,0.09);
  --cx-shadow-lg:     0 8px 32px rgba(0,0,0,0.12);
  --cx-shadow-teal:   0 4px 14px rgba(0,94,40,0.20);

  --cx-r-sm:          6px;
  --cx-r-md:          10px;
  --cx-r-lg:          14px;
  --cx-r-xl:          20px;
  --cx-r-pill:        9999px;

  --font:             'Poppins', system-ui, -apple-system, sans-serif;
  --sidebar-w:        240px;
  --header-h:         64px;
  --demo-h:           40px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--cx-text);
  background: var(--cx-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}

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

button { cursor: pointer; font-family: var(--font); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--cx-border); border-radius: 4px; }

/* ── Focus ── */
*:focus-visible { outline: 2px solid var(--cx-teal); outline-offset: 2px; border-radius: 4px; }

/* ── Demo nav bar ── */
#demo-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 9999;
  background: var(--cx-navy);
  height: var(--demo-h);
  display: flex; align-items: center;
  padding: 0 12px;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  border-bottom: 2px solid var(--cx-teal);
  overflow-x: auto;
  white-space: nowrap;
}
#demo-nav .demo-label {
  color: var(--cx-amber); margin-right: 8px; flex-shrink: 0; letter-spacing: .03em;
  font-size: 10px; text-transform: uppercase; opacity: .85;
}
#demo-nav button {
  padding: 4px 10px; border-radius: var(--cx-r-pill); border: 1px solid transparent;
  font-size: 11.5px; font-weight: 500; font-family: var(--font);
  color: rgba(255,255,255,.7); background: transparent;
  transition: all .15s;
}
#demo-nav button:hover { color: #fff; background: rgba(255,255,255,.1); }
#demo-nav button.active { background: var(--cx-teal); color: #fff; border-color: var(--cx-teal-mid); }
#demo-nav .demo-sep { width: 1px; height: 18px; background: rgba(255,255,255,.15); margin: 0 4px; flex-shrink: 0; }
#app { padding-top: var(--demo-h); min-height: 100vh; }

/* ── Public Header ── */
.pub-header {
  background: var(--cx-teal);
  color: white;
  box-shadow: var(--cx-shadow-md);
  position: sticky; top: var(--demo-h); z-index: 100;
}
.pub-header-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 32px; gap: 16px;
}
.pub-header-logo img { height: 40px; filter: brightness(0) invert(1); }
.pub-header-nav {
  display: flex; align-items: center; gap: 4px;
}
.pub-header-nav a, .pub-header-nav button {
  padding: 7px 14px; border-radius: var(--cx-r-pill); font-size: 13.5px; font-weight: 500;
  color: rgba(255,255,255,.85); background: transparent; border: none;
  transition: all .15s; cursor: pointer; font-family: var(--font);
}
.pub-header-nav a:hover, .pub-header-nav button:hover {
  background: rgba(255,255,255,.15); color: white; text-decoration: none;
}
.pub-header-nav .nav-active { background: rgba(255,255,255,.18); color: white; }

/* ── Intranet Header ── */
.intra-header {
  background: white; border-bottom: 1px solid var(--cx-border-light);
  box-shadow: var(--cx-shadow-sm);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; height: var(--header-h);
  position: sticky; top: var(--demo-h); z-index: 100;
}
.intra-logo img { height: 36px; }
.intra-user { display: flex; align-items: center; gap: 12px; }
.intra-user-name { font-size: 13.5px; font-weight: 600; color: var(--cx-text); }
.intra-user-colegio { font-size: 11.5px; color: var(--cx-text-muted); }
.intra-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--cx-teal-pale2); color: var(--cx-teal);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.intra-bell {
  position: relative; cursor: pointer; width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--cx-surface-alt);
  border: 1px solid var(--cx-border-light);
}
.intra-bell-badge {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cx-red); border: 2px solid white;
}
.intra-tabs {
  display: flex; padding: 0 32px; gap: 4px;
  border-bottom: 1px solid var(--cx-border-light);
  background: white;
}
.intra-tab {
  padding: 12px 16px; font-size: 13.5px; font-weight: 500;
  border: none; background: transparent; cursor: pointer; font-family: var(--font);
  color: var(--cx-text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all .15s; white-space: nowrap;
}
.intra-tab:hover { color: var(--cx-teal); }
.intra-tab.active { color: var(--cx-teal); border-bottom-color: var(--cx-teal); font-weight: 600; }

/* ── Admin sidebar ── */
.admin-layout { display: flex; min-height: calc(100vh - var(--demo-h)); }
.admin-sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--cx-teal);
  display: flex; flex-direction: column;
  position: sticky; top: var(--demo-h); height: calc(100vh - var(--demo-h)); overflow-y: auto;
}
.admin-sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  display: flex; flex-direction: column; gap: 2px;
}
.admin-sidebar-logo img { height: 32px; filter: brightness(0) invert(1); }
.admin-sidebar-logo span { font-size: 10.5px; color: rgba(255,255,255,.55); margin-top: 2px; }
.admin-nav { flex: 1; padding: 12px 0; }
.admin-nav-section { font-size: 10px; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255,255,255,.4); padding: 12px 20px 4px; font-weight: 600; }
.admin-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px; font-size: 13.5px; color: rgba(255,255,255,.8);
  cursor: pointer; transition: all .15s; border: none; background: transparent;
  width: 100%; text-align: left; font-family: var(--font); font-weight: 500;
}
.admin-nav-item:hover { background: rgba(255,255,255,.12); color: white; }
.admin-nav-item.active { background: rgba(255,255,255,.18); color: white; font-weight: 600; }
.admin-nav-badge {
  margin-left: auto; background: var(--cx-amber); color: var(--cx-navy);
  font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: var(--cx-r-pill);
}
.admin-content { flex: 1; overflow-y: auto; min-height: calc(100vh - var(--demo-h)); }
.admin-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; background: white;
  border-bottom: 1px solid var(--cx-border-light);
  box-shadow: var(--cx-shadow-xs);
}
.admin-topbar h2 { font-size: 17px; font-weight: 700; color: var(--cx-text); }
.admin-inner { padding: 28px; }

/* ── Page wrapper ── */
.page-shell { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }
.page-title { font-size: 22px; font-weight: 700; color: var(--cx-text); margin-bottom: 4px; }
.page-subtitle { font-size: 14px; color: var(--cx-text-muted); margin-bottom: 24px; }
.section-title { font-size: 15px; font-weight: 700; color: var(--cx-text); margin-bottom: 12px; }

/* ── Cards ── */
.card {
  background: var(--cx-surface); border: 1px solid var(--cx-border-light);
  border-radius: var(--cx-r-lg); padding: 24px; box-shadow: var(--cx-shadow-sm);
}
.card-sm { padding: 16px; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 20px; border-radius: var(--cx-r-md);
  font-size: 14px; font-weight: 600; font-family: var(--font);
  border: none; cursor: pointer; transition: all .15s;
  line-height: 1.2; white-space: nowrap;
}
.btn-primary { background: var(--cx-teal); color: white; }
.btn-primary:hover { background: var(--cx-teal-hover); box-shadow: var(--cx-shadow-teal); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--cx-teal); border: 1.5px solid var(--cx-teal); }
.btn-secondary:hover { background: var(--cx-teal-pale); }
.btn-danger { background: var(--cx-red); color: white; }
.btn-danger:hover { background: #9b1515; }
.btn-amber { background: var(--cx-amber); color: var(--cx-navy); }
.btn-amber:hover { background: var(--cx-amber-hover); }
.btn-ghost { background: transparent; color: var(--cx-text-muted); border: 1.5px solid var(--cx-border); }
.btn-ghost:hover { background: var(--cx-surface-alt); color: var(--cx-text); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-lg { padding: 13px 28px; font-size: 15px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--cx-r-pill);
  font-size: 12px; font-weight: 600; line-height: 1.4;
}
.badge-green  { background: var(--cx-green-pale);  color: #2d7a17; }
.badge-amber  { background: var(--cx-amber-pale);  color: #8a5c00; }
.badge-red    { background: var(--cx-red-pale);    color: var(--cx-red); }
.badge-grey   { background: var(--cx-grey-light);  color: var(--cx-text-muted); }
.badge-teal   { background: var(--cx-teal-pale);   color: var(--cx-teal); }
.badge-blue   { background: #e8f0fe; color: #1a5db8; }
.badge::before { content: '●'; font-size: 8px; }

/* ── Forms ── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--cx-text); margin-bottom: 6px;
}
.form-label .req { color: var(--cx-red); margin-left: 2px; }
.form-hint { font-size: 12px; color: var(--cx-text-muted); margin-top: 4px; }
.form-error-msg { font-size: 12px; color: var(--cx-red); margin-top: 4px; font-weight: 500; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 10px 14px; border-radius: var(--cx-r-md);
  border: 1.5px solid var(--cx-border); font-family: var(--font);
  font-size: 14px; color: var(--cx-text); background: white;
  transition: border-color .15s, box-shadow .15s;
  appearance: none; -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--cx-teal); outline: none;
  box-shadow: 0 0 0 3px rgba(0,94,40,.1);
}
.form-input.error, .form-select.error { border-color: var(--cx-red); }
.form-input.success { border-color: var(--cx-green); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-section-title { font-size: 14px; font-weight: 700; color: var(--cx-text); margin-bottom: 16px; margin-top: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--cx-border-light); }
.radio-group { display: flex; flex-direction: column; gap: 10px; }
.radio-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: var(--cx-r-md);
  border: 1.5px solid var(--cx-border); cursor: pointer; transition: all .15s;
}
.radio-card:hover { border-color: var(--cx-teal-pale2); background: var(--cx-teal-pale); }
.radio-card.selected { border-color: var(--cx-teal); background: var(--cx-teal-pale); }
.radio-card input { margin-top: 2px; accent-color: var(--cx-teal); }
.radio-card-title { font-size: 13.5px; font-weight: 600; color: var(--cx-text); }
.radio-card-desc { font-size: 12.5px; color: var(--cx-text-muted); margin-top: 2px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--cx-teal); flex-shrink: 0; margin-top: 2px; }
.checkbox-row span { font-size: 13.5px; color: var(--cx-text); }

/* ── Tables ── */
.cx-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.cx-table th {
  text-align: left; padding: 10px 14px; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--cx-text-muted); background: var(--cx-surface-alt);
  border-bottom: 1px solid var(--cx-border-light); white-space: nowrap;
}
.cx-table td {
  padding: 11px 14px; border-bottom: 1px solid var(--cx-border-light);
  color: var(--cx-text); vertical-align: middle;
}
.cx-table tr:last-child td { border-bottom: none; }
.cx-table tr:nth-child(even) td { background: var(--cx-surface-alt); }
.cx-table tr:hover td { background: var(--cx-teal-pale); }
.cx-table-wrap { background: white; border: 1px solid var(--cx-border-light); border-radius: var(--cx-r-lg); overflow: hidden; box-shadow: var(--cx-shadow-sm); }

/* ── Search + filter bar ── */
.filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.search-input-wrap { position: relative; flex: 1; min-width: 220px; }
.search-input-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--cx-text-faint); }
.search-input { padding-left: 38px !important; }

/* ── Upload zones ── */
.upload-zone {
  border: 2px dashed var(--cx-border); border-radius: var(--cx-r-md);
  padding: 20px 16px; text-align: center; cursor: pointer;
  transition: all .2s; background: var(--cx-surface-alt);
}
.upload-zone:hover { border-color: var(--cx-teal); background: var(--cx-teal-pale); }
.upload-zone.uploaded { border-color: var(--cx-green); background: var(--cx-green-pale); border-style: solid; }
.upload-zone.error { border-color: var(--cx-red); background: var(--cx-red-pale); border-style: solid; }
.upload-zone-icon { font-size: 24px; margin-bottom: 6px; }
.upload-zone-label { font-size: 13px; font-weight: 600; color: var(--cx-text); }
.upload-zone-hint { font-size: 12px; color: var(--cx-text-muted); margin-top: 2px; }

/* ── Progress stepper ── */
.stepper { display: flex; align-items: flex-start; justify-content: center; gap: 0; padding: 20px 24px 0; }
.step-item { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 0; position: relative; }
.step-item:not(:last-child)::after {
  content: ''; position: absolute; top: 18px; left: calc(50% + 18px);
  width: calc(100% - 36px); height: 2px; background: var(--cx-border);
}
.step-item.completed:not(:last-child)::after { background: var(--cx-green); }
.step-item.active:not(:last-child)::after { background: var(--cx-border); }
.step-circle {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; z-index: 1;
  border: 2px solid var(--cx-border); background: white; color: var(--cx-text-muted);
  transition: all .2s;
}
.step-item.completed .step-circle { background: var(--cx-green); border-color: var(--cx-green); color: white; }
.step-item.active .step-circle { background: var(--cx-teal); border-color: var(--cx-teal); color: white; }
.step-label { font-size: 11px; font-weight: 500; margin-top: 6px; text-align: center; color: var(--cx-text-muted); line-height: 1.3; }
.step-item.active .step-label { color: var(--cx-teal); font-weight: 700; }
.step-item.completed .step-label { color: var(--cx-green); }

/* ── Alta header ── */
.alta-shell { min-height: calc(100vh - var(--demo-h)); background: var(--cx-bg); }
.alta-header { background: var(--cx-teal); color: white; }
.alta-header-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 32px; }
.alta-header-logo img { height: 36px; filter: brightness(0) invert(1); }
.alta-header-meta { font-size: 13px; color: rgba(255,255,255,.75); }
.alta-stepper-bar { background: white; border-bottom: 1px solid var(--cx-border-light); box-shadow: var(--cx-shadow-xs); }
.alta-step-body { max-width: 760px; margin: 0 auto; padding: 32px 24px; }
.step-title { font-size: 20px; font-weight: 700; color: var(--cx-text); margin-bottom: 4px; }
.step-subtitle { font-size: 14px; color: var(--cx-text-muted); margin-bottom: 28px; }
.step-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--cx-border-light); }

/* ── Public footer ── */
.pub-footer { background: var(--cx-navy); color: rgba(255,255,255,.75); padding: 32px; font-size: 13px; }
.pub-footer-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.pub-footer h4 { color: white; font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.pub-footer a { color: rgba(255,255,255,.65); display: block; margin-bottom: 6px; font-size: 13px; }
.pub-footer a:hover { color: white; text-decoration: none; }
.pub-footer-bottom { margin-top: 24px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.1); text-align: center; font-size: 12px; color: rgba(255,255,255,.4); max-width: 1100px; margin-left: auto; margin-right: auto; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--cx-teal) 0%, var(--cx-teal-mid) 60%, #00a040 100%);
  padding: 60px 32px;
  text-align: center; color: white;
}
.hero h1 { font-size: 32px; font-weight: 900; color: white; margin-bottom: 8px; }
.hero p { font-size: 16px; color: rgba(255,255,255,.85); margin-bottom: 32px; }
.hero-search-box {
  max-width: 540px; margin: 0 auto;
  display: flex; gap: 0; background: white;
  border-radius: var(--cx-r-pill); overflow: hidden;
  box-shadow: var(--cx-shadow-lg);
}
.hero-search-input {
  flex: 1; padding: 14px 20px; border: none; font-family: var(--font);
  font-size: 15px; color: var(--cx-text); outline: none;
}
.hero-search-btn {
  padding: 14px 24px; background: var(--cx-amber); color: var(--cx-navy);
  font-family: var(--font); font-size: 14px; font-weight: 700; border: none; cursor: pointer;
  transition: background .15s;
}
.hero-search-btn:hover { background: var(--cx-amber-hover); }
.hero-quick { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.hero-quick-link {
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
  color: white; padding: 8px 18px; border-radius: var(--cx-r-pill);
  font-size: 13.5px; font-weight: 500; cursor: pointer; transition: all .15s;
  font-family: var(--font);
}
.hero-quick-link:hover { background: rgba(255,255,255,.25); }

/* ── Stat/summary card ── */
.stat-card {
  background: white; border: 1px solid var(--cx-border-light);
  border-radius: var(--cx-r-lg); padding: 20px 22px;
  box-shadow: var(--cx-shadow-sm);
}
.stat-card-icon { font-size: 24px; margin-bottom: 10px; }
.stat-card-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--cx-text-muted); }
.stat-card-value { font-size: 28px; font-weight: 900; color: var(--cx-teal); line-height: 1.1; margin-top: 4px; }
.stat-card-detail { font-size: 12.5px; color: var(--cx-text-muted); margin-top: 4px; }

/* ── Timeline ── */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 0; bottom: 0; width: 2px; background: var(--cx-border-light); }
.timeline-item { position: relative; margin-bottom: 22px; }
.timeline-dot {
  position: absolute; left: -28px; top: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--cx-teal); border: 2px solid white;
  box-shadow: 0 0 0 2px var(--cx-teal);
}
.timeline-dot.grey { background: var(--cx-border); box-shadow: 0 0 0 2px var(--cx-border); }
.timeline-dot.green { background: var(--cx-green); box-shadow: 0 0 0 2px var(--cx-green); }
.timeline-dot.amber { background: var(--cx-amber); box-shadow: 0 0 0 2px var(--cx-amber); }
.timeline-date { font-size: 11.5px; color: var(--cx-text-muted); font-weight: 500; }
.timeline-text { font-size: 13.5px; color: var(--cx-text); font-weight: 500; margin-top: 1px; }
.timeline-detail { font-size: 12.5px; color: var(--cx-text-muted); margin-top: 2px; }

/* ── Alert bar ── */
.alert-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--cx-r-md); font-size: 13.5px; font-weight: 500;
  border: 1px solid;
}
.alert-bar.amber { background: var(--cx-amber-pale); color: #6d4500; border-color: #f5d080; }
.alert-bar.green { background: var(--cx-green-pale); color: #1e6010; border-color: #b0e09a; }
.alert-bar.red { background: var(--cx-red-pale); color: var(--cx-red); border-color: #f0b0b0; }
.alert-bar.teal { background: var(--cx-teal-pale); color: var(--cx-teal); border-color: var(--cx-teal-pale2); }

/* ── Documento card ── */
.doc-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; background: white;
  border: 1px solid var(--cx-border-light); border-radius: var(--cx-r-md);
  box-shadow: var(--cx-shadow-xs); cursor: pointer; transition: all .15s;
}
.doc-card:hover { box-shadow: var(--cx-shadow-md); border-color: var(--cx-teal-pale2); }
.doc-card.unread { border-left: 3px solid var(--cx-amber); }
.doc-card-icon {
  width: 40px; height: 40px; border-radius: var(--cx-r-sm);
  background: var(--cx-teal-pale); color: var(--cx-teal);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.doc-card-name { font-size: 13.5px; font-weight: 600; color: var(--cx-text); }
.doc-card-meta { font-size: 12px; color: var(--cx-text-muted); margin-top: 1px; }
.doc-card-unread-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cx-amber); flex-shrink: 0; margin-left: auto;
}

/* ── Tramite card ── */
.tramite-card {
  background: white; border: 1.5px solid var(--cx-border-light); border-radius: var(--cx-r-lg);
  padding: 20px; box-shadow: var(--cx-shadow-sm); transition: all .15s; cursor: pointer;
}
.tramite-card:hover { border-color: var(--cx-teal); box-shadow: var(--cx-shadow-md); transform: translateY(-2px); }
.tramite-card-icon { font-size: 28px; margin-bottom: 10px; }
.tramite-card-title { font-size: 14px; font-weight: 700; color: var(--cx-text); margin-bottom: 4px; }
.tramite-card-desc { font-size: 12.5px; color: var(--cx-text-muted); line-height: 1.5; }

/* ── PDF mock ── */
.pdf-mock {
  background: #f3f3f3; border: 1px solid var(--cx-border);
  border-radius: var(--cx-r-md); overflow: hidden;
  display: flex; flex-direction: column;
}
.pdf-mock-toolbar {
  background: #404040; padding: 8px 12px;
  display: flex; align-items: center; gap: 8px;
}
.pdf-mock-toolbar span { color: rgba(255,255,255,.8); font-size: 12px; }
.pdf-mock-body { flex: 1; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.pdf-mock-page { background: white; box-shadow: var(--cx-shadow-md); padding: 24px; }
.pdf-mock-line { height: 8px; background: #e5e7eb; border-radius: 4px; }
.pdf-mock-line.short { width: 40%; }
.pdf-mock-line.med { width: 65%; }

/* ── Pago / Stripe mock ── */
.stripe-card {
  border: 1.5px solid var(--cx-border); border-radius: var(--cx-r-md);
  padding: 14px; background: white;
}
.stripe-card-number {
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--cx-border-light); padding-bottom: 12px; margin-bottom: 12px;
}
.stripe-card-row { display: flex; gap: 12px; }
.stripe-field { flex: 1; }
.stripe-field label { font-size: 11px; font-weight: 600; color: var(--cx-text-muted); text-transform: uppercase; letter-spacing: .05em; display: block; margin-bottom: 4px; }
.stripe-field input { width: 100%; border: none; outline: none; font-family: var(--font); font-size: 14px; color: var(--cx-text); background: transparent; }

/* ── Pagination ── */
.pagination { display: flex; gap: 4px; align-items: center; justify-content: center; margin-top: 20px; }
.pagination button {
  width: 34px; height: 34px; border-radius: var(--cx-r-sm);
  border: 1.5px solid var(--cx-border); background: white;
  font-size: 13px; font-weight: 500; color: var(--cx-text-muted); cursor: pointer;
  font-family: var(--font); transition: all .15s;
}
.pagination button:hover { border-color: var(--cx-teal); color: var(--cx-teal); }
.pagination button.active { background: var(--cx-teal); border-color: var(--cx-teal); color: white; font-weight: 700; }

/* ── Login Admin ── */
.login-page {
  min-height: calc(100vh - var(--demo-h)); background: var(--cx-bg);
  display: flex; align-items: center; justify-content: center;
}
.login-card {
  width: 100%; max-width: 420px;
  background: white; border-radius: var(--cx-r-xl);
  box-shadow: var(--cx-shadow-lg); overflow: hidden;
}
.login-header {
  background: var(--cx-teal); padding: 28px 32px;
  text-align: center;
}
.login-header img { height: 40px; filter: brightness(0) invert(1); margin-bottom: 8px; }
.login-header p { font-size: 13px; color: rgba(255,255,255,.75); margin: 0; }
.login-body { padding: 28px 32px; }
.otp-inputs { display: flex; gap: 8px; justify-content: center; margin: 16px 0; }
.otp-input {
  width: 44px; height: 52px; text-align: center; font-size: 22px; font-weight: 700;
  border: 1.5px solid var(--cx-border); border-radius: var(--cx-r-md);
  font-family: var(--font); color: var(--cx-text); outline: none;
}
.otp-input:focus { border-color: var(--cx-teal); box-shadow: 0 0 0 3px rgba(0,94,40,.1); }

/* ── Error pages ── */
.error-page {
  min-height: calc(100vh - var(--demo-h));
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.error-page-inner { text-align: center; max-width: 480px; }
.error-page-code { font-size: 80px; font-weight: 900; color: var(--cx-teal); opacity: .15; line-height: 1; }
.error-page-title { font-size: 24px; font-weight: 700; color: var(--cx-text); margin-top: -20px; margin-bottom: 8px; }
.error-page-desc { font-size: 15px; color: var(--cx-text-muted); margin-bottom: 28px; }
.error-icon { font-size: 64px; margin-bottom: 16px; }

/* ── Responsive grid helpers ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-2-1 { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }
.text-muted { color: var(--cx-text-muted); font-size: 13px; }
.text-sm { font-size: 13px; }
.font-bold { font-weight: 700; }
.divider { height: 1px; background: var(--cx-border-light); margin: 20px 0; }

/* ── Hamburger button (hidden by default, shown on mobile) ── */
.pub-mobile-btn { display: none; }
.admin-hamburger { display: none; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — tablet ≤ 1024px
══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .pub-header-nav button:not(:last-child):not(.nav-active) { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — mobile ≤ 768px
══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── General ── */
  .page-shell { padding: 20px 16px; }
  .section-title { font-size: 14px; }

  /* ── Grids collapse ── */
  .grid-2, .grid-3, .grid-4, .grid-2-1 { grid-template-columns: 1fr !important; }
  .form-row, .form-row-3 { grid-template-columns: 1fr !important; }

  /* ── Tables: horizontal scroll ── */
  .cx-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cx-table { min-width: 560px; }

  /* ── Public header ── */
  .pub-header-top { padding: 10px 16px; }
  .pub-header-logo img { height: 32px; }
  .pub-header-nav { display: none !important; }
  .pub-mobile-btn {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: var(--cx-r-md);
    background: rgba(255,255,255,.15); border: none; color: white; cursor: pointer;
  }
  .pub-mobile-btn:hover { background: rgba(255,255,255,.25); }
  .pub-mobile-nav {
    background: var(--cx-teal-hover);
    border-top: 1px solid rgba(255,255,255,.12);
    padding: 8px 12px 12px;
    display: flex; flex-direction: column; gap: 2px;
  }
  .pub-mobile-nav button {
    padding: 10px 14px; border: none; border-radius: var(--cx-r-md);
    background: transparent; color: rgba(255,255,255,.85);
    font-family: var(--font); font-size: 14px; font-weight: 500;
    text-align: left; cursor: pointer; transition: background .15s;
  }
  .pub-mobile-nav button:hover { background: rgba(255,255,255,.12); color: white; }
  .pub-mobile-nav .nav-cta {
    background: rgba(255,255,255,.18); color: white; font-weight: 700;
    border: 1px solid rgba(255,255,255,.3); margin-top: 6px;
  }

  /* ── Hero ── */
  .hero { padding: 36px 16px; }
  .hero h1 { font-size: 22px; }
  .hero p { font-size: 14px; }
  .hero-quick { gap: 8px; }
  .hero-quick-link { font-size: 12px; padding: 6px 12px; }

  /* ── Alta stepper ── */
  .alta-header-inner { padding: 10px 16px; }
  .alta-step-body { padding: 20px 16px; }
  .stepper { padding: 14px 6px 0; }
  .step-circle { width: 28px; height: 28px; font-size: 11px; }
  .step-label { font-size: 9px; display: none; }
  .step-item:not(:last-child)::after { top: 13px; left: calc(50% + 14px); width: calc(100% - 28px); }

  /* ── Intranet header ── */
  .intra-header { padding: 0 14px; height: 54px; }
  .intra-user-colegio { display: none; }
  .intra-user-name { font-size: 13px; }

  /* ── Intranet tabs ── */
  .intra-tabs { padding: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .intra-tab { padding: 10px 14px; font-size: 12.5px; flex-shrink: 0; }

  /* ── Admin layout ── */
  .admin-layout { display: block; }
  .admin-sidebar {
    position: fixed; top: var(--demo-h); left: 0; bottom: 0;
    z-index: 400; width: var(--sidebar-w);
    transform: translateX(-100%);
    transition: transform 0.25s var(--ease-smooth);
    box-shadow: var(--cx-shadow-lg);
  }
  .admin-sidebar.sidebar-open { transform: translateX(0); }
  .admin-overlay {
    display: none; position: fixed; inset: 0; top: var(--demo-h);
    background: rgba(0,0,0,.35); z-index: 399;
  }
  .admin-overlay.visible { display: block; }
  .admin-content { margin-left: 0 !important; }
  .admin-hamburger {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: var(--cx-r-md);
    background: var(--cx-surface-alt); border: 1.5px solid var(--cx-border-light);
    cursor: pointer; color: var(--cx-text); flex-shrink: 0;
  }
  .admin-hamburger:hover { background: var(--cx-teal-pale); color: var(--cx-teal); }
  .admin-inner { padding: 16px; }
  .admin-topbar { padding: 12px 16px; gap: 12px; }
  .admin-topbar h2 { font-size: 15px; }

  /* ── Login ── */
  .login-page { padding: 20px 0; align-items: flex-start; padding-top: 24px; }
  .login-card { margin: 0 16px; }
  .login-body { padding: 20px; }
  .login-header { padding: 22px 24px; }

  /* ── Footer ── */
  .pub-footer { padding: 24px 16px; }
  .pub-footer-inner { grid-template-columns: 1fr !important; gap: 20px; }

  /* ── Cards ── */
  .card { padding: 18px; }
  .card-sm { padding: 14px; }
  .stat-card { padding: 16px; }
  .stat-card-value { font-size: 22px; }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — small mobile ≤ 480px
══════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .hero h1 { font-size: 19px; }
  .hero-search-box { flex-direction: column; border-radius: var(--cx-r-lg); }
  .hero-search-input { border-radius: var(--cx-r-lg) var(--cx-r-lg) 0 0; }
  .hero-search-btn { border-radius: 0 0 var(--cx-r-lg) var(--cx-r-lg); width: 100%; text-align: center; }
  .step-item:not(:last-child)::after { height: 1px; }
  .btn-lg { padding: 11px 20px; font-size: 14px; }
  .page-title { font-size: 18px; }
  .otp-inputs { gap: 6px; }
  .otp-input { width: 38px; height: 46px; font-size: 18px; }
  .filter-bar { flex-direction: column; }
  .filter-bar > * { width: 100% !important; }
  .step-actions { flex-direction: column-reverse; }
  .step-actions .btn { justify-content: center; width: 100%; }
}
