/* ============================================================================
   PROFEPLAN PERÚ v2.0 — SISTEMA DE DISEÑO (UI/UX MODERNO, MÓVIL + LAPTOP)
   Paleta oficial: #073B43 (petróleo) · #087E83 (turquesa) · #27D7C4 (cian)
                   #E9A82D (dorado) · #F4F7F8 (blanco suave)
   ============================================================================ */

:root {
  --petrol: #073B43;
  --teal: #087E83;
  --teal-hover: #066367;
  --cyan: #27D7C4;
  --gold: #E9A82D;
  --gold-dark: #B97D10;
  --bg: #F4F7F8;
  --surface: #FFFFFF;
  --surface-2: #EEF4F5;
  --fg: #0E2226;
  --muted: #52686D;
  --border: #D5E2E4;
  --ok: #15803D;
  --danger: #DC2626;
  --warn-bg: #FEF3C7;
  --warn-fg: #92400E;
  --warn-bd: #F59E0B;
  --shadow-sm: 0 2px 8px rgba(7, 59, 67, 0.06);
  --shadow-md: 0 10px 28px rgba(7, 59, 67, 0.10);
  --radius: 16px;
  --radius-sm: 11px;
  --nav-h: 64px;
  --mobbar-h: 68px;
  box-sizing: border-box;
}

:root[data-theme="dark"] {
  --bg: #081518;
  --surface: #0E2226;
  --surface-2: #143036;
  --fg: #EDF6F7;
  --muted: #98B6BC;
  --border: #1F444C;
  --teal: #1AB3B8;
  --teal-hover: #27D7C4;
  --warn-bg: #2D2106;
  --warn-fg: #FDE68A;
  --warn-bd: #B45309;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
  min-height: 100dvh;
}

h1, h2, h3, h4 {
  font-family: 'Poppins', 'Inter', system-ui, sans-serif;
  margin: 0;
  letter-spacing: -0.02em;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
.hide { display: none !important; }

/* === CONTROLES BASE ACCESIBLES (>= 44px TÁCTIL) === */
button, input, select, textarea {
  font: inherit;
  color: var(--fg);
  border-radius: var(--radius-sm);
  min-height: 44px;
  min-width: 0;
}

input, select, textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  padding: 10px 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

textarea { resize: vertical; min-height: 82px; }
input[type="file"] { padding: 7px 10px; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 28%, transparent);
}

label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: var(--teal); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary { background: var(--teal); border-color: var(--teal); color: #FFFFFF; }
:root[data-theme="dark"] .btn-primary { color: #051F24; }
.btn-primary:hover:not(:disabled) { background: var(--teal-hover); border-color: var(--teal-hover); }

.btn-gold { background: var(--gold); border-color: var(--gold); color: #141B1D; }
.btn-gold:hover:not(:disabled) { background: #F0B844; border-color: #F0B844; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #FFFFFF; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #FFFFFF; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); border-color: var(--border); }
.btn-top-ghost { background: rgba(255,255,255,0.10); border-color: rgba(255,255,255,0.22); color: #FFFFFF; }
.btn-top-ghost:hover:not(:disabled) { background: rgba(255,255,255,0.20); border-color: var(--cyan); }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 12.5px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: color-mix(in srgb, var(--teal) 14%, transparent);
  color: var(--teal);
}
.badge-gold { background: color-mix(in srgb, var(--gold) 24%, transparent); color: #8A5A00; }
:root[data-theme="dark"] .badge-gold { color: #FCD34D; }
.badge-ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge-danger { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.muted { color: var(--muted); font-size: 13px; }
.small { font-size: 12px; color: var(--muted); }
.err-txt { color: var(--danger); font-size: 12.5px; font-weight: 600; }

/* === BANNERS SUPERIORES === */
.sys-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 18px;
  font-size: 13px;
}
.sys-banner.update { background: #05292E; color: #FFFFFF; border-bottom: 1px solid var(--cyan); }
.sys-banner.news { background: color-mix(in srgb, var(--cyan) 14%, var(--surface)); border-bottom: 1px solid color-mix(in srgb, var(--teal) 30%, var(--border)); }
.sys-banner.warn { background: var(--warn-bg); color: var(--warn-fg); border-bottom: 1px solid var(--warn-bd); }

/* === 1. LANDING PAGE PÚBLICA === */
.land-nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(7, 59, 67, 0.96);
  backdrop-filter: blur(10px);
  color: #FFFFFF;
  border-bottom: 1px solid rgba(39, 215, 196, 0.22);
}
.land-nav-in {
  max-width: 1200px; margin: 0 auto; padding: 10px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.land-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: #FFFFFF; }
.land-brand img { width: 38px; height: 38px; border-radius: 10px; }
.land-links { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.land-links a { color: #D7EEF1; font-weight: 500; font-size: 13.5px; }
.land-links a:hover { color: var(--cyan); text-decoration: none; }

.hero {
  background: radial-gradient(circle at 85% 20%, rgba(39, 215, 196, 0.24), transparent 45%),
              linear-gradient(135deg, #073B43 0%, #095862 55%, #073B43 100%);
  color: #FFFFFF;
  padding: 46px 20px 58px;
}
.hero-in {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 34px; align-items: center;
}
.hero h1 { font-size: clamp(27px, 4vw, 42px); line-height: 1.15; margin: 14px 0; }
.hero h1 span { color: var(--gold); }
.hero p { color: #D5ECEF; font-size: 15.5px; margin: 0 0 22px; max-width: 540px; }
.hero-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-media img {
  width: 100%; border-radius: 20px;
  border: 2px solid rgba(39, 215, 196, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.hero-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.hero-pill {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.20);
  padding: 6px 12px; border-radius: 999px; font-size: 12px; color: #E7F7F8;
}

.land-sec { max-width: 1200px; margin: 0 auto; padding: 48px 20px; }
.land-sec-hdr { text-align: center; max-width: 700px; margin: 0 auto 28px; }
.land-sec-hdr h2 { font-size: clamp(22px, 3vw, 30px); margin: 8px 0; }

.step-num {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--petrol); color: var(--cyan);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; margin-bottom: 10px;
}

.plans-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.plan-card {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 24px; border-radius: 20px; background: var(--surface);
  border: 1.5px solid var(--border); box-shadow: var(--shadow-sm); position: relative;
}
.plan-card.featured { border-color: var(--gold); box-shadow: 0 14px 36px rgba(233, 168, 45, 0.18); }
.plan-price { font-size: 32px; font-weight: 800; color: var(--petrol); margin: 10px 0 4px; }
:root[data-theme="dark"] .plan-price { color: var(--cyan); }
.plan-price small { font-size: 13px; font-weight: 500; color: var(--muted); }
.plan-list { list-style: none; padding: 0; margin: 14px 0 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.plan-list li { display: flex; gap: 8px; align-items: flex-start; }

.land-footer {
  background: var(--petrol); color: #C8E3E7; padding: 28px 20px; text-align: center; font-size: 13px;
}

/* === 2. SHELL APP AUTENTICADA === */
.app-topbar {
  position: sticky; top: 0; z-index: 25; height: var(--nav-h);
  background: var(--petrol); color: #FFFFFF;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 14px; box-shadow: var(--shadow-sm);
}
.app-topbar .brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.app-topbar .brand img { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; }
.app-topbar .brand-title { font-weight: 800; font-size: 16px; line-height: 1.1; }
.app-topbar .brand-sub { font-size: 11.5px; color: #B9DCE0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.app-topbar .top-right { display: flex; align-items: center; gap: 6px; }
.credit-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(233, 168, 45, 0.22); border: 1px solid rgba(233, 168, 45, 0.6);
  color: #FFE29A; padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 700;
}

.app-layout { display: grid; grid-template-columns: 242px minmax(0, 1fr); min-height: calc(100dvh - var(--nav-h)); }
.app-sidebar {
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 14px 10px; display: flex; flex-direction: column; gap: 3px;
  position: sticky; top: var(--nav-h); height: calc(100dvh - var(--nav-h)); overflow-y: auto;
}
.nav-item {
  width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 12px; border-radius: 12px; border: none; background: transparent; color: var(--fg);
  font-weight: 600; font-size: 13.5px; cursor: pointer; text-align: left;
}
.nav-item:hover { background: var(--surface-2); }
.nav-item.active { background: color-mix(in srgb, var(--teal) 14%, var(--surface)); color: var(--teal); }
.nav-sep { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 700; padding: 12px 12px 4px; }

.app-main { padding: 18px 20px 44px; max-width: 1440px; width: 100%; margin: 0 auto; min-width: 0; }

.mob-bottom-bar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  height: var(--mobbar-h); background: var(--surface); border-top: 1px solid var(--border);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  grid-template-columns: repeat(5, 1fr); gap: 4px;
  box-shadow: 0 -4px 16px rgba(7, 59, 67, 0.08);
}
.mob-bottom-bar button {
  min-height: 48px; border: none; background: transparent; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 10.5px; font-weight: 600; color: var(--muted); padding: 4px 2px; cursor: pointer;
}
.mob-bottom-bar button.active { color: var(--teal); background: color-mix(in srgb, var(--teal) 12%, transparent); }
.mob-bottom-bar button span.ico { font-size: 18px; line-height: 1; }

/* === 3. DASHBOARD, WIZARD 5 PASOS Y EDITOR A4 === */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 12px; }
.quick-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 16px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--border);
  text-align: left; cursor: pointer; transition: transform .12s ease, border-color .15s ease, box-shadow .15s ease;
}
.quick-card:hover { transform: translateY(-2px); border-color: var(--teal); box-shadow: var(--shadow-md); }
.quick-ico {
  width: 42px; height: 42px; border-radius: 12px;
  background: color-mix(in srgb, var(--teal) 14%, var(--surface-2));
  display: inline-flex; align-items: center; justify-content: center; font-size: 20px;
}

.wizard-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.wiz-step {
  padding: 10px 8px; border-radius: 12px; border: 1.5px solid var(--border);
  background: var(--surface); font-size: 12px; font-weight: 600; color: var(--muted);
  cursor: pointer; text-align: center;
}
.wiz-step.active { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 12%, var(--surface)); color: var(--teal); }
.wiz-step.done { border-color: var(--ok); color: var(--ok); }

.workspace-split { display: grid; grid-template-columns: 425px minmax(0, 1fr); gap: 16px; align-items: start; }
.mob-split-tabs { display: none; gap: 8px; margin-bottom: 12px; }
.mob-split-tabs button { flex: 1; }

.chip-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px;
  background: var(--surface-2); border: 1.5px solid var(--border); font-size: 12.5px; font-weight: 600;
  cursor: pointer; user-select: none; min-height: 36px;
}
.chip input { width: 16px; height: 16px; min-height: 16px; margin: 0; padding: 0; }
.chip.active { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 14%, var(--surface)); color: var(--teal); }

.doc-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.doc-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.doc-sheet {
  position: relative; background: #FFFFFF; color: #111827; border: 1px solid #CBD5E1;
  border-radius: 12px; padding: 24px; box-shadow: 0 8px 24px rgba(7, 59, 67, 0.08);
  overflow-x: auto; min-height: 520px;
}
.doc-wm {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  pointer-events: none; font-size: 46px; font-weight: 900; color: rgba(7, 59, 67, 0.07);
  transform: rotate(-28deg); text-transform: uppercase; text-align: center; z-index: 2;
}
.doc-inner { position: relative; z-index: 1; }
.doc-sheet h2 { color: #073B43; font-size: 15px; margin: 16px 0 8px; padding-bottom: 4px; border-bottom: 2px solid #087E83; }
.doc-sheet h3 { color: #1E293B; font-size: 13.5px; margin: 12px 0 6px; }
.doc-sheet table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: 12px; }
.doc-sheet th, .doc-sheet td { border: 1px solid #94A3B8; padding: 6px 8px; vertical-align: top; text-align: left; }
.doc-sheet th { background: #E6F4F4; color: #073B43; font-weight: 700; }
.doc-sheet .hdr-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 3px solid #073B43; padding-bottom: 10px; margin-bottom: 12px; }
.doc-sheet .hdr-logo { max-height: 58px; max-width: 110px; object-fit: contain; }
.doc-sheet .ef-blank { background: #F8FAFC; color: #475569; font-style: italic; border-left: 4px solid #94A3B8; padding: 8px 10px; }
.doc-sheet .ficha-box { border: 2px dashed #087E83; border-radius: 10px; padding: 14px; margin-top: 14px; background: #F9FEFE; }
.doc-sheet .nee-box { border-left: 4px solid #E9A82D; background: #FFFBEB; padding: 10px 12px; border-radius: 8px; margin-top: 10px; font-size: 12px; }
.doc-sheet .norma-box { border-left: 4px solid #087E83; background: #F0FDFA; padding: 10px 12px; border-radius: 8px; margin-top: 10px; font-size: 12px; }
.doc-sheet .mini-btn { background: #087E83; color: #FFFFFF; border: none; border-radius: 6px; padding: 5px 9px; font-size: 11.5px; min-height: 28px; cursor: pointer; }

.grade-btn {
  min-width: 38px; min-height: 32px; padding: 2px 8px; border-radius: 8px;
  border: 1px solid #CBD5E1; font-weight: 800; font-size: 12px; cursor: pointer;
}
.g-AD { background: #DCFCE7; border-color: #15803D; color: #14532D; }
.g-A  { background: #DBEAFE; border-color: #1D4ED8; color: #1E3A8A; }
.g-B  { background: #FEF9C3; border-color: #CA8A04; color: #713F12; }
.g-C  { background: #FEE2E2; border-color: #DC2626; color: #7F1D1D; }

.chat-log { max-height: 170px; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; margin: 10px 0; }
.chat-msg { padding: 8px 12px; border-radius: 11px; font-size: 13px; background: var(--surface-2); border: 1px solid var(--border); }
.chat-msg.u { border-left: 4px solid var(--gold); }
.chat-msg.a { border-left: 4px solid var(--teal); }
.chat-row { display: flex; gap: 8px; }
.chat-row input { flex: 1; }

/* === 4. SIMULADOR, TABLAS, MODALES, TOAST === */
.sim-q { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.sim-opt {
  display: block; width: 100%; text-align: left; margin: 7px 0; padding: 11px 14px;
  border-radius: 10px; background: var(--surface-2); border: 1.5px solid var(--border); font-weight: 500; cursor: pointer;
}
.sim-opt.sel { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 14%, var(--surface)); }
.sim-opt.ok  { border-color: var(--ok); background: #DCFCE7; color: #14532D; }
.sim-opt.bad { border-color: var(--danger); background: #FEE2E2; color: #7F1D1D; }
.sim-exp { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--cyan) 12%, var(--surface)); border-left: 4px solid var(--teal); font-size: 13px; }

.data-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-tbl th, .data-tbl td { border-bottom: 1px solid var(--border); padding: 9px 8px; text-align: left; vertical-align: middle; }
.data-tbl th { font-size: 11.5px; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }

.stat-card { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.stat-val { font-size: 24px; font-weight: 800; color: var(--teal); margin-top: 4px; }

.modal-bg {
  position: fixed; inset: 0; background: rgba(5, 22, 26, 0.65); backdrop-filter: blur(4px);
  z-index: 60; display: flex; align-items: center; justify-content: center; padding: 14px;
}
.modal-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 22px; max-width: 500px; width: 100%; max-height: 90dvh; overflow-y: auto; box-shadow: var(--shadow-md);
}

.spinner {
  width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: #FFFFFF; border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  height: 18px; border-radius: 8px; margin-bottom: 10px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
  background-size: 200% 100%; animation: shimmer 1.2s infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

#toast-wrap { position: fixed; right: 16px; bottom: 84px; z-index: 80; display: flex; flex-direction: column; gap: 8px; max-width: 340px; }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--petrol); color: #FFFFFF; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-md); border-left: 4px solid var(--cyan); }
.toast.err { border-left-color: var(--danger); background: #450A0A; }
.toast.ok  { border-left-color: #4ADE80; }

/* === 5. RESPONSIVE === */
@media (max-width: 1080px) {
  .workspace-split { grid-template-columns: 1fr; }
  .mob-split-tabs { display: flex; }
  .split-pane.mob-hidden { display: none; }
  .plans-grid { grid-template-columns: 1fr; }
  .hero-in { grid-template-columns: 1fr; text-align: center; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-acts, .hero-pills { justify-content: center; }
}

@media (max-width: 860px) {
  .app-layout { grid-template-columns: 1fr; }
  .app-sidebar { display: none; }
  .mob-bottom-bar { display: grid; }
  .app-main { padding: 14px 12px calc(var(--mobbar-h) + 24px); }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .wizard-bar { gap: 4px; }
  .wiz-step span { display: none; }
  .doc-sheet { padding: 14px; }
  .app-topbar .brand-sub { max-width: 150px; }
}

/* === 6. IMPRESIÓN / PDF A4 === */
@media print {
  .app-topbar, .app-sidebar, .mob-bottom-bar, .sys-banner, .wizard-bar,
  .mob-split-tabs, .doc-toolbar, .doc-tabs, #pane-editor, #toast-wrap, .modal-bg, .no-print {
    display: none !important;
  }
  body { background: #FFFFFF; color: #000000; }
  .app-layout, .app-main, .workspace-split { display: block !important; padding: 0 !important; margin: 0 !important; max-width: 100% !important; }
  .doc-sheet { border: none !important; box-shadow: none !important; padding: 0 !important; overflow: visible !important; }
  .doc-sheet tr { break-inside: avoid; }
}
