/* ════════════════════════════════════════════════════════
   Latin Aero Aviation Suite — Estilos mobile-first
   ════════════════════════════════════════════════════════ */
:root {
  --brand: #0086A6;
  --brand-dark: #00657D;
  --brand-pale: #E4F2F5;
  --charcoal: #3E464A;
  --charcoal-2: #2B3134;
  --bg: #F2F5F6;
  --card: #FFFFFF;
  --border: #DCE3E6;
  --muted: #7C898E;
  --g3: #1E8E5A; --g3-bg: #E7F6EE;
  --g2: #0086A6; --g2-bg: #E4F2F5;
  --g1: #D64545; --g1-bg: #FBEAEA;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(35,45,48,.08), 0 4px 16px -8px rgba(35,45,48,.18);
  --tap: 44px; /* mínimo touch target iOS/Android */
}

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

html { font-size: 16px; /* evita zoom en iOS en inputs */ -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  background: var(--bg); color: var(--charcoal-2);
  min-height: 100vh; -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

#app { min-height: 100vh; }

/* ── Sidebar lateral ─────────────────────────────────── */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: 232px;
  background: var(--charcoal-2); color: #fff; z-index: 200;
  display: flex; flex-direction: column;
  box-shadow: 2px 0 12px rgba(0,0,0,.12);
  transform: translateX(-100%); transition: transform .22s ease;
}
.sidebar.open { transform: translateX(0); }
.sidebar-brand {
  padding: 16px 14px 14px; border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex; flex-direction: column; gap: 6px; align-items: center; text-align: center;
}
.sidebar-brand img { background: rgba(255,255,255,.95); border-radius: 8px; padding: 8px; }
.sidebar-brand .logo-text { font-weight: 800; font-size: 16px; color: #fff; }
.sidebar-appname { font-size: 12px; font-weight: 600; color: #CBE8EE; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 10px 0; display: flex; flex-direction: column; }
.sidebar-nav button {
  background: none; border: none; color: #B9C2C5; text-align: left;
  padding: 0 20px; height: 46px; font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  display: flex; align-items: center; gap: 8px; border-left: 3px solid transparent;
}
.sidebar-nav button:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav button.active { color: #fff; border-left-color: var(--brand); background: rgba(0,134,166,.15); }
.sidebar-footer {
  padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-direction: column; gap: 10px;
}
.sidebar-user { display: flex; flex-direction: column; font-size: 12px; color: #B9C2C5; }
.sidebar-user b { color: #fff; font-size: 13px; }
.btn-ghost-dark {
  background: transparent; border: 1px solid rgba(255,255,255,.3); color: #fff;
  border-radius: 7px; padding: 0 12px; height: 36px;
  font-size: 12.5px; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.btn-ghost-dark:hover { background: rgba(255,255,255,.1); }

.hamburger {
  display: flex; position: fixed; top: 10px; left: 10px; z-index: 150;
  background: var(--charcoal-2); color: #fff; border: none;
  width: 42px; height: 42px; border-radius: 9px; cursor: pointer;
  align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.sidebar-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 190;
}
.sidebar-overlay.show { display: block; }
.accent-bar { display: none; }

/* Móvil (default): contenido ocupa todo el ancho, con espacio arriba para la hamburguesa */
main { flex: 1; width: 100%; }
.content { padding: 20px 16px; max-width: 1080px; margin: 0 auto; }
/* El div de contenido de cada pantalla (el que sigue al sidebar) */
#app > div[style*="flex"] { margin-left: 0; padding-top: 56px; }

/* ── Pantalla de login ───────────────────────────────── */
.center-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
/* El login no tiene sidebar: anula el desplazamiento del layout general */
#app > .center-wrap { margin-left: 0 !important; padding-top: 24px !important; }
.auth-card {
  width: 100%; max-width: 400px; background: var(--card);
  border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); padding: 28px 24px;
}
.auth-card .company-logo { max-height: 52px; width: auto; display: block; margin: 0 auto 20px; }
.auth-card .company-name { font-weight: 800; font-size: 20px; text-align: center; margin-bottom: 20px; color: var(--charcoal-2); }
.auth-card h1 { font-size: 16px; font-weight: 700; text-align: center; margin-bottom: 4px; }
.auth-card .sub { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 22px; }
.link-row { text-align: center; margin-top: 16px; font-size: 13px; color: var(--muted); }
.link-row a { color: var(--brand); text-decoration: none; cursor: pointer; font-weight: 600; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.alert { font-size: 13px; padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; line-height: 1.5; }
.alert-error { background: var(--g1-bg); color: #9B2C2C; border: 1px solid #F1C5C5; }
.alert-success { background: var(--g3-bg); color: #1A6B45; border: 1px solid #BCE6CF; }

/* ── Campos de formulario ────────────────────────────── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--charcoal); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px;
  border: 1.4px solid var(--border); border-radius: 8px;
  font-size: 16px; /* 16px evita zoom en iOS */ font-family: inherit;
  color: var(--charcoal-2); background: #fff;
  height: var(--tap); /* touch target */
  -webkit-appearance: none; appearance: none;
}
.field textarea { height: auto; min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-pale);
}
/* Los checkbox/radio dentro de .field NO deben heredar el estilo de campo de
   texto (ancho 100%, appearance:none, etc.) — deben verse como casillas
   normales que se pintan con un visto al marcarse, en toda la app. */
.field input[type="checkbox"], .field input[type="radio"] {
  width: 18px; height: 18px; padding: 0; flex-shrink: 0;
  border-radius: 4px; appearance: auto; -webkit-appearance: auto;
  accent-color: var(--brand);
}
.field input[type="radio"] { border-radius: 50%; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237C898E' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* ── Botones ─────────────────────────────────────────── */
.btn-primary {
  width: 100%; background: var(--brand); color: #fff; border: none;
  border-radius: 8px; padding: 0 20px; height: var(--tap);
  font-size: 15px; font-weight: 600; cursor: pointer; font-family: inherit;
  touch-action: manipulation;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary.secondary { background: var(--charcoal-2); }
.btn-sm {
  background: var(--brand); color: #fff; border: none; border-radius: 7px;
  padding: 0 16px; height: var(--tap); font-size: 13.5px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap; touch-action: manipulation;
}
.btn-sm:hover { background: var(--brand-dark); }
.btn-outline {
  background: #fff; color: var(--charcoal); border: 1.4px solid var(--border);
  border-radius: 7px; padding: 0 13px; height: 38px; min-width: 38px;
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
  touch-action: manipulation;
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-danger { background: #fff; color: var(--g1); border: 1.4px solid #F1C5C5; border-radius: 7px; padding: 0 13px; height: 38px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
button[disabled] { opacity: .55; cursor: not-allowed; }

/* ── Cards y layout ──────────────────────────────────── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.card-pad { padding: 16px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h2 { font-size: 20px; margin: 0 0 2px; }
.page-head .desc { font-size: 13px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 14px; }
.grid-5 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ── Tablas ──────────────────────────────────────────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.data-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 14px; border-bottom: 1.4px solid var(--border); font-weight: 700; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #FAFCFC; }

/* ── Tags ────────────────────────────────────────────── */
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; text-transform: uppercase; letter-spacing: .02em; }
.tag-blue { background: var(--g2-bg); color: var(--brand-dark); }
.tag-purple { background: #EFEAFB; color: #5B3FA0; }
.tag-orange { background: #FFF1DD; color: #9A6400; }
.tag-red { background: #FCE4E4; color: #B42318; }
.tag-green { background: var(--g3-bg); color: var(--g3); }
.tag-gray { background: #EEF1F2; color: #6B777B; }

.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state .icn { font-size: 36px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

/* ── Toasts ──────────────────────────────────────────── */
#toastHost { position: fixed; z-index: 9999; display: flex; flex-direction: column; gap: 8px; max-width: 320px; }
.toast { padding: 12px 16px; border-radius: 9px; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow); animation: toastIn .18s ease-out; }
.toast.success { background: #1E8E5A; color: #fff; }
.toast.error   { background: #D64545; color: #fff; }
.toast.info    { background: var(--charcoal-2); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ── Selector de tipo (templates) ───────────────────── */
.type-choice { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.type-card { border: 1.6px solid var(--border); border-radius: 10px; padding: 14px; cursor: pointer; background: #fff; }
.type-card.active { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-pale); }
.type-card h3 { margin: 0 0 3px; font-size: 14px; }
.type-card p { margin: 0; font-size: 12.5px; color: var(--muted); }

/* ── Grading ─────────────────────────────────────────── */
.category-block { margin-bottom: 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; overflow: hidden; }
.category-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; cursor: pointer; background: #FAFBFC; -webkit-tap-highlight-color: transparent; }
.category-head h4 { margin: 0; font-size: 14px; }
.category-head .meta { font-size: 12px; color: var(--muted); }
.category-body { padding: 4px 14px 12px; }
.event-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-top: 1px solid #F0F3F4; }
.category-body .event-row:first-child { border-top: none; }
.event-row .ev-name { font-size: 13px; flex: 1; line-height: 1.35; }
.grade-group { display: flex; gap: 5px; flex-shrink: 0; }

/* Grade buttons — TOUCH OPTIMIZADO */
.grade-btn {
  width: 38px; height: 38px; border-radius: 7px;
  border: 1.4px solid var(--border); background: #fff;
  font-size: 11px; font-weight: 700; cursor: pointer; color: var(--muted);
  font-family: inherit; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  display: flex; align-items: center; justify-content: center;
}
.grade-btn.active { background: var(--g2-bg); border-color: var(--g2); color: var(--brand-dark); }
.grade-btn:active { transform: scale(.94); }

/* Progress sticky en mobile (reemplaza el sidebar) */
.grading-progress-bar {
  position: sticky; bottom: 0; left: 0; right: 0;
  background: var(--charcoal-2); color: #fff;
  padding: 10px 16px; display: flex; align-items: center; gap: 14px;
  box-shadow: 0 -2px 10px rgba(0,0,0,.2); z-index: 50;
}
.progress-pct { font-size: 18px; font-weight: 800; flex-shrink: 0; }
.progress-track { flex: 1; height: 6px; background: rgba(255,255,255,.2); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--brand); border-radius: 99px; transition: width .2s; }
.progress-lbl { font-size: 11.5px; color: rgba(255,255,255,.7); flex-shrink: 0; }

/* Sidebar de progreso (visible en desktop) */
.grading-layout { display: flex; gap: 20px; align-items: flex-start; }
.grading-main { flex: 1; min-width: 0; }
.grading-side { width: 220px; flex-shrink: 0; position: sticky; top: 60px; display: none; }
.progress-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: var(--shadow); }
.progress-card .pct { font-size: 26px; font-weight: 800; color: var(--brand-dark); }
.progress-card .lbl { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.cat-jump { display: block; width: 100%; text-align: left; background: none; border: none; padding: 6px 0; font-size: 12px; color: var(--charcoal); cursor: pointer; font-family: inherit; border-bottom: 1px solid #EEF1F2; }

/* ── Firmas ──────────────────────────────────────────── */
.sig-block { margin-top: 14px; }
.sig-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sig-head label { font-size: 13px; font-weight: 600; }
.sig-pad-wrap { position: relative; border: 1.6px dashed var(--border); border-radius: 10px; background: #FAFBFC; overflow: hidden; touch-action: none; }
.sig-canvas { display: block; width: 100%; height: 130px; cursor: crosshair; background: #fff; touch-action: none; }
.sig-baseline { position: absolute; left: 20px; right: 20px; bottom: 30px; height: 1px; background: #D5DBDD; pointer-events: none; }
.sig-caption { font-size: 11.5px; color: var(--muted); margin-top: 6px; text-align: right; }
.sig-meta { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.7; word-break: break-all; }
.sig-verify { margin-top: 4px; font-weight: 600; padding: 5px 10px; border-radius: 7px; display: inline-block; font-size: 12.5px; }
.sig-verify.ok { background: var(--g3-bg); color: var(--g3); }
.sig-verify.warn { background: var(--g1-bg); color: var(--g1); }

/* ── Detalle de sesión ───────────────────────────────── */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.detail-field { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; }
.detail-field .k { font-size: 10.5px; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; letter-spacing: .03em; }
.detail-field .v { font-size: 14px; font-weight: 600; }

/* ── Horas / balance ──────────────────────────────────── */
.balance-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: #fff; margin-bottom: 10px; }
.balance-card .bname { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.balance-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid #F0F3F4; padding-top: 10px; }
.balance-stat .num { font-size: 22px; font-weight: 800; }
.balance-stat .lbl { font-size: 10.5px; color: var(--muted); text-transform: uppercase; margin-top: 1px; }
.balance-stat.warn .num { color: var(--g1); }
.balance-stat.ok .num { color: var(--g3); }

/* ── Builder de categorías ──────────────────────────── */
.cat-builder { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 10px; background: #FAFBFC; }
.item-row { display: flex; gap: 8px; margin-bottom: 6px; align-items: center; }
.item-row input { flex: 1; height: 38px; }

/* ── Módulos (switch) ────────────────────────────────── */
.module-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #F0F3F4; min-height: var(--tap); }
.module-toggle:first-child { border-top: none; }
.module-toggle > span:first-child { font-size: 14px; color: var(--charcoal-2); }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: #CDD4D7; border-radius: 99px; transition: background .18s ease; }
.switch .slider:before { content: ''; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .18s ease; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider:before { transform: translateX(20px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ── Print ───────────────────────────────────────────── */
.print-only { display: none; }
@media print {
  .sidebar, .hamburger, .btn-outline, .btn-sm, .btn-danger, .no-print,
  .grading-progress-bar, .sig-head .btn-outline { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  .print-only { display: flex !important; align-items: center; gap: 12px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 2px solid var(--charcoal-2); }
  .content { padding: 0; }
}

/* ════════════════════════════════════════════════════════
   RESPONSIVE — tablet / desktop (breakpoint: 640px)
   ════════════════════════════════════════════════════════ */
@media (min-width: 640px) {
  .content { padding: 24px 28px; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  .grid-5 { grid-template-columns: repeat(5, 1fr); }
  .type-choice { flex-direction: row; }
  .type-card { flex: 1; }
  .detail-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .auth-card { padding: 30px 28px; }
}

@media (min-width: 900px) {
  .grading-side { display: block; }
  .grading-progress-bar { display: none; }
  .grade-btn { width: 34px; height: 32px; }
  /* Sidebar fijo visible en desktop, sin hamburguesa */
  .sidebar { transform: none; }
  .hamburger { display: none; }
  .sidebar-overlay { display: none !important; }
  #app > div[style*="flex"] { margin-left: 232px; padding-top: 0; }
}

/* Toasts: arriba a la derecha en desktop, abajo en mobile */
#toastHost {
  bottom: 16px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 32px);
}
@media (min-width: 640px) {
  #toastHost { top: 16px; bottom: auto; right: 16px; left: auto; transform: none; width: auto; }
}

/* ════════════════════════════════════════════════════════
   FOOTER + LEYENDA INSTITUCIONAL
   ════════════════════════════════════════════════════════ */
.app-footer {
  text-align: center;
  padding: 14px 16px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--bg);
  line-height: 1.7;
}
.app-footer a { color: var(--muted); text-decoration: none; font-weight: 600; }
.app-footer a:hover { color: var(--brand); }
.app-footer .sep { margin: 0 6px; }

/* ════════════════════════════════════════════════════════
   PERFIL DE USUARIO
   ════════════════════════════════════════════════════════ */
.profile-section { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
.profile-section:first-child { border-top: none; padding-top: 0; margin-top: 0; }

/* ════════════════════════════════════════════════════════
   SMS — MATRIZ DE RIESGO
   ════════════════════════════════════════════════════════ */
.risk-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px;
  font-size: 13px; font-weight: 800;
}
.risk-low    { background: var(--g3-bg); color: var(--g3); }
.risk-medium { background: #FFF1DD; color: #9A6400; }
.risk-high   { background: #FBEAEA; color: var(--g1); }
.risk-critical { background: var(--g1); color: #fff; }

/* ════════════════════════════════════════════════════════
   BITÁCORAS
   ════════════════════════════════════════════════════════ */
.logbook-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden;
}
.logbook-card .lc-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: #FAFBFC; border-bottom: 1px solid var(--border);
  flex-wrap: wrap; gap: 8px;
}
.logbook-card .lc-body { padding: 14px 16px; }

/* ════════════════════════════════════════════════════════
   SUBIDA DE ARCHIVOS
   ════════════════════════════════════════════════════════ */
.upload-area {
  border: 2px dashed var(--border); border-radius: 10px; padding: 20px;
  text-align: center; cursor: pointer; background: #FAFBFC; transition: border-color .15s;
}
.upload-area:hover, .upload-area.drag-over { border-color: var(--brand); background: var(--brand-pale); }
.upload-area .icon { font-size: 24px; margin-bottom: 6px; }
.upload-area .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ════════════════════════════════════════════════════════
   CONFIGURACIÓN DE EMPRESA
   ════════════════════════════════════════════════════════ */
.color-preview {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
  display: inline-block; vertical-align: middle; margin-left: 8px;
}

/* Active tab in pill style */
.active-tab { background: var(--brand) !important; color: #fff !important; border-color: var(--brand) !important; }

/* Print cotización */
@media print {
  .no-print { display: none !important; }
  .print-only { display: block !important; }
  /* Cotización: imprimir SOLO el bloque #quotePrintable, sin menús ni topbar */
  body.printing-quote .sidebar,
  body.printing-quote .hamburger,
  body.printing-quote .app-footer { display: none !important; }
  body.printing-quote #quotePrintable {
    position: absolute; left: 0; top: 0; width: 100%;
    box-shadow: none !important; border: none !important; margin: 0; padding: 0;
  }
  /* Programación: imprimir solo la tabla ordenada */
  body.printing-sched .sidebar,
  body.printing-sched .hamburger,
  body.printing-sched .app-footer,
  body.printing-sched .page-head,
  body.printing-sched .no-print { display: none !important; }
  body.printing-sched .print-only { display: block !important; }
  body.printing-sched #schedPrintable {
    position: absolute; left: 0; top: 0; width: 100%;
  }

  /* Impresión de la orden de vuelo/simulador del roster */
  body.printing-roster > #app { display: none !important; }
  body.printing-roster #rosterPrintHolder { display: block !important; position: absolute; left: 0; top: 0; width: 100%; }
}

/* En pantalla, el holder de impresión del roster está oculto */
#rosterPrintHolder { display: none; }


/* Márgenes de página al imprimir a PDF (reduce headers/footers del navegador) */
@page { margin: 12mm 10mm; }

/* Resultados de búsqueda de alumno */
.search-result:hover { border-color: var(--brand) !important; background: var(--brand-pale); }

/* ════════════════════════════════════════════════════════
   MODAL DE CONFIRMACIÓN
   ════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(43,49,52,.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 20px; animation: modalFade .12s ease;
}
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: #fff; border-radius: 14px; max-width: 420px; width: 100%;
  padding: 24px; box-shadow: 0 12px 40px rgba(0,0,0,.25);
  animation: modalPop .15s ease;
}
@keyframes modalPop { from { transform: scale(.94); opacity: .6; } to { transform: scale(1); opacity: 1; } }
.modal-title { font-size: 18px; font-weight: 800; color: var(--charcoal); margin-bottom: 8px; }
.modal-message { font-size: 14px; color: var(--charcoal-2); line-height: 1.55; margin-bottom: 8px; }
.modal-detail {
  font-size: 13px; color: var(--muted); background: #F7F9FA;
  border-radius: 8px; padding: 10px 12px; margin-bottom: 4px;
  border-left: 3px solid var(--brand);
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.modal-actions button { min-width: 100px; }
