/* SAFIT — hoja de estilos base, tokens tomados del canvas de diseño (Spruko Nilova + marca PIME Digital) */

:root{
  --bg:#f4f6fa; --surface:#ffffff; --surface-2:#f4f6fa;
  --ink:#464652; --ink-strong:#2b2b2f; --ink-muted:#818791;
  --border:#e5e7ee;
  --menu-bg:#181d28; --menu-text:#aab1c1; --menu-border:rgba(255,255,255,0.08);
  --brand-green:#97d429; --brand-green-deep:#5e8a1b; --brand-soft:#eaf3d6; --brand-ink:#1f2611;
  --info:#429fd5; --info-soft:rgba(66,159,213,0.15);
  --success:#02bc9c; --success-soft:rgba(2,188,156,0.15);
  --warning:#db991b; --warning-soft:rgba(219,153,27,0.15);
  --danger:#e14311; --danger-soft:rgba(225,67,17,0.12);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:"Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size:14px; line-height:1.5;
}
a{ color:var(--brand-green-deep); text-decoration:none; }
a:hover{ text-decoration:underline; }
h1,h2,h3,h4{ margin:0; color:var(--ink-strong); }
.num{ font-variant-numeric:tabular-nums; }

/* ---- Auth (login) ---- */
.auth-shell{ min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:28px; padding:40px; }
.auth-brand img{ width:100px; height:auto; }
.auth-card{
  width:100%; max-width:420px; background:var(--surface); border:1px solid var(--border);
  border-radius:20px; padding:40px 36px; box-shadow:0 1px 2px rgba(64,64,64,.06), 0 20px 44px -20px rgba(64,64,64,.22);
}
.auth-card h1{ font-size:22px; margin-bottom:6px; }
.auth-card .sub{ color:var(--ink-muted); font-size:14px; margin-bottom:22px; }

/* ---- Forms ---- */
.field{ display:flex; flex-direction:column; gap:6px; margin-bottom:16px; }
.field label{ font-size:13px; font-weight:600; color:#33333a; }
.field .hint{ font-size:12px; color:var(--ink-muted); }
.field .error{ font-size:12px; color:var(--danger); }
.form-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:16px; }
.form-grid .span-2{ grid-column:1 / -1; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=file],
input[type=number], input[type=date], input[type=datetime-local], input[type=time], select, textarea{
  width:100%; font:inherit; font-size:14px; color:var(--ink);
  background:var(--surface); border:1px solid var(--border); border-radius:8px;
  padding:10px 12px; outline:none;
}
input:focus, select:focus, textarea:focus{ border-color:var(--brand-green-deep); box-shadow:0 0 0 3px rgba(151,212,41,.22); }
select.is-locked{ pointer-events:none; background:var(--surface-2); color:var(--ink-muted); }
.checkbox-row{ display:flex; align-items:center; gap:8px; font-size:13.5px; }
.checkbox-row input{ width:15px; height:15px; accent-color:var(--brand-green-deep); }

.btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; border:none; border-radius:8px; padding:10px 18px; font:inherit; font-size:14px; font-weight:700; cursor:pointer; }
.btn-primary{ background:var(--brand-green); color:var(--brand-ink); }
.btn-primary:hover{ background:#86be22; text-decoration:none; }
.btn-secondary{ background:var(--surface-2); color:var(--ink-strong); border:1px solid var(--border); }
.btn-secondary:hover{ text-decoration:none; background:#eceef4; }
.btn-info{ background:#2b78ab; color:#fff; }
.btn-info:hover{ background:#236490; text-decoration:none; }
.btn-warning{ background:#f0b429; color:#3a2a00; }
.btn-warning:hover{ background:#dfa219; text-decoration:none; }
.btn-dark{ background:#4b5563; color:#fff; }
.btn-dark:hover{ background:#3b434e; text-decoration:none; }
.btn-danger{ background:var(--danger-soft); color:var(--danger); }
.btn-danger:hover{ text-decoration:none; background:rgba(225,67,17,.2); }
.btn-block{ width:100%; }
.btn-sm{ padding:7px 12px; font-size:12.5px; }

/* ---- Alerts / flash ---- */
.alert{ padding:12px 16px; border-radius:8px; font-size:13.5px; margin-bottom:18px; }
.alert-success{ background:var(--success-soft); color:#046656; }
.alert-error{ background:var(--danger-soft); color:#8a2c14; }
.field-errors{ list-style:none; margin:0 0 18px; padding:12px 16px; background:var(--danger-soft); color:#8a2c14; border-radius:8px; font-size:13px; }
.field-errors li{ margin-bottom:2px; }
.field-errors li:last-child{ margin-bottom:0; }

/* ---- App shell ---- */
.app-shell{ display:flex; min-height:100vh; }
.sidebar{ width:256px; flex:none; background:var(--menu-bg); color:var(--menu-text); display:flex; flex-direction:column; }
.side-brand{ display:flex; align-items:center; padding:24px 22px 20px; }
.side-brand img{ height:24px; width:auto; }
.side-scroll{ flex:1; overflow-y:auto; padding:6px 14px 16px; }
.side-section{ margin-top:18px; }
.side-section:first-child{ margin-top:0; }
.side-eyebrow{ font-size:10.5px; font-weight:700; letter-spacing:.09em; text-transform:uppercase; color:#5b6274; padding:0 10px 8px; }
.side-item{ display:flex; align-items:center; gap:11px; padding:9px 10px; border-radius:8px; font-size:13.5px; font-weight:500; color:var(--menu-text); margin-bottom:2px; }
.side-item:hover{ background:rgba(255,255,255,.05); color:#fff; text-decoration:none; }
.side-item svg{ width:18px; height:18px; flex:none; color:#6b7386; }
.side-item.active{ background:rgba(151,212,41,.14); color:#fff; }
.side-item.active svg{ color:var(--brand-green); }
.side-foot{ border-top:1px solid var(--menu-border); padding:14px 18px; display:flex; align-items:center; gap:10px; }
.side-avatar{ width:34px; height:34px; border-radius:50%; background:#2a3140; color:#fff; display:flex; align-items:center; justify-content:center; font-size:12.5px; font-weight:700; flex:none; }
.side-foot .who{ font-size:12.5px; line-height:1.4; flex:1; min-width:0; }
.side-foot .who b{ display:block; color:#fff; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.side-foot .who span{ color:#7a8296; }
.side-foot a.logout{ color:#7a8296; }
.side-foot a.logout:hover{ color:#fff; }

.shell{ flex:1; min-width:0; display:flex; flex-direction:column; }
.topbar{ height:68px; flex:none; background:var(--surface); border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; padding:0 28px; gap:14px; }
.menu-toggle{ display:none; align-items:center; justify-content:center; width:38px; height:38px; flex:none; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--ink-strong); cursor:pointer; }
.menu-toggle svg{ width:19px; height:19px; }
.sidebar-backdrop{ display:none; position:fixed; inset:0; background:rgba(15,17,23,.45); z-index:1000; opacity:0; transition:opacity .2s ease; }
.crumb{ font-size:13px; color:var(--ink-muted); }
.crumb b{ color:var(--ink-strong); font-weight:600; }
.top-right{ display:flex; align-items:center; gap:14px; }
.company-chip{ display:flex; align-items:center; gap:8px; border:1px solid var(--border); border-radius:9px; padding:8px 12px; font-size:12.5px; color:var(--ink-strong); font-weight:600; }
.company-chip svg{ width:15px; height:15px; color:var(--brand-green-deep); flex:none; }

.main{ flex:1; padding:26px 28px 40px; }
.page-head{ display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:22px; }
.page-head h1{ font-size:22px; }
.page-head p{ margin:4px 0 0; font-size:13.5px; color:var(--ink-muted); }

.card{ background:var(--surface); border:1px solid var(--border); border-radius:14px; overflow-x:auto; }
.card-head{ display:flex; align-items:center; justify-content:space-between; padding:18px 20px; border-bottom:1px solid var(--border); }
.card-head h2{ font-size:15px; display:flex; align-items:center; gap:9px; }
.card-head h2 svg{ width:16px; height:16px; color:var(--brand-green-deep); flex:none; }
.card-head .tag{ font-size:11px; font-weight:700; color:var(--ink-muted); background:var(--surface-2); padding:3px 9px; border-radius:99px; }
.card-body{ padding:20px; }

.cards-2{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
@media (max-width:760px){ .cards-2{ grid-template-columns:1fr; } }

.entity-name{ font-size:16px; font-weight:800; color:var(--ink-strong); margin-bottom:2px; }
.entity-rfc{ font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size:13px; color:var(--brand-green-deep); font-weight:600; letter-spacing:.02em; }
.mono{ font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric:tabular-nums; }

.totales{ display:flex; flex-direction:column; gap:0; max-width:380px; margin-left:auto; }
.totales .fila{ display:flex; justify-content:space-between; gap:16px; padding:9px 0; border-bottom:1px dashed var(--border); font-size:13px; }
.totales .fila span:first-child{ color:var(--ink-muted); }
.totales .fila span:last-child{ font-weight:600; color:var(--ink-strong); }
.totales .fila.total{ border-bottom:none; padding-top:14px; margin-top:4px; border-top:2px solid var(--ink-strong); }
.totales .fila.total span:first-child{ font-weight:700; color:var(--ink-strong); font-size:14px; }
.totales .fila.total span:last-child{ font-weight:800; color:var(--brand-green-deep); font-size:19px; }

table{ width:100%; border-collapse:collapse; }
thead th{ text-align:left; font-size:10.5px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--ink-muted); padding:10px 20px; border-bottom:1px solid var(--border); }
tbody td{ padding:14px 20px; font-size:13px; color:var(--ink); border-bottom:1px solid var(--border); vertical-align:middle; }
tbody tr:last-child td{ border-bottom:none; }
tbody tr:hover{ background:var(--surface-2); }

.badge{ display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:600; padding:4px 9px; border-radius:6px; }
.badge-success{ background:var(--success-soft); color:var(--success); }
.badge-warning{ background:var(--warning-soft); color:var(--warning); }
.badge-danger{ background:var(--danger-soft); color:var(--danger); }
.badge-neutral{ background:var(--surface-2); color:var(--ink-muted); }

.empty{ text-align:center; padding:48px 20px; color:var(--ink-muted); font-size:13.5px; }

.tabs{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; }
.tab{ padding:8px 14px; border-radius:20px; font-size:12.5px; font-weight:600; color:var(--ink-muted); background:var(--surface-2); border:1px solid transparent; }
.tab:hover{ text-decoration:none; color:var(--ink-strong); }
.tab.active{ background:rgba(151,212,41,.16); color:var(--brand-ink); border-color:var(--brand-green); }

.tab-panel{ display:none; }
.tab-panel.active{ display:block; }

.search-row{ display:flex; gap:10px; padding:16px 20px; border-bottom:1px solid var(--border); }
.search-row input{ flex:1; max-width:320px; }

.filtros-columna th{ padding:8px 10px; font-weight:400; text-transform:none; letter-spacing:normal; }
.filtros-columna input, .filtros-columna select{ font-size:12.5px; padding:6px 9px; }

.pagination{ list-style:none; display:flex; flex-wrap:wrap; gap:6px; margin:0; padding:0; }
.pagination li{ display:flex; }
.pagination a{ display:inline-flex; align-items:center; justify-content:center; min-width:36px; height:36px; padding:0 12px; border-radius:8px; background:var(--surface-2); color:var(--ink-strong); font-size:12.5px; font-weight:600; border:1px solid transparent; }
.pagination a:hover{ background:#eceef4; text-decoration:none; }
.pagination li.active a{ background:var(--brand-green); color:var(--brand-ink); }

.cert-box{ background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:18px 20px; margin-bottom:16px; }
.cert-box-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.cert-box-head h3{ font-size:14px; }
.cert-status{ font-size:12px; color:var(--ink-muted); }
.cert-meta{ display:flex; flex-wrap:wrap; gap:18px; margin-top:12px; font-size:12.5px; color:var(--ink-muted); }
.cert-meta b{ display:block; color:var(--ink-strong); font-size:13px; }

/* ---- Formularios largos: secciones numeradas ---- */
.form-section{ margin-top:32px; padding-top:24px; border-top:1px solid var(--border); }
.form-section:first-child{ margin-top:0; padding-top:0; border-top:none; }
.form-section-title{ display:flex; align-items:center; gap:10px; margin-bottom:16px; }
.form-section-title .step{ display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; border-radius:7px; background:var(--brand-soft); color:var(--brand-green-deep); font-size:12px; font-weight:700; flex:none; }
.form-section-title h3{ font-size:15px; }
.form-section-title .hint{ font-weight:400; margin-left:2px; }
.form-section-row{ display:grid; grid-template-columns:repeat(3, 1fr); gap:24px; align-items:start; }
.form-section-row .entity-card{ height:100%; }
@media (max-width: 900px){
  .form-section-row{ grid-template-columns:1fr; }
}
.field-align-end{ align-self:flex-end; }
.btn-add-row{ margin:12px 0 20px; }

/* ---- Validación en línea por campo ---- */
.field.has-error input, .field.has-error select, .field.has-error textarea{ border-color:var(--danger); box-shadow:0 0 0 3px var(--danger-soft); }
.field-error-msg{ display:block; font-size:12px; color:var(--danger); margin-top:2px; }

/* ---- Paneles plegables (cliente rápido, tipo de cambio) ---- */
.reveal{ overflow:hidden; max-height:0; opacity:0; margin-bottom:0; transition:max-height .22s ease, opacity .18s ease, margin-bottom .22s ease; }
.reveal.abierto{ max-height:480px; opacity:1; }
.field.reveal.abierto{ margin-bottom:16px; }
#cliente-rapido-caja.reveal.abierto{ margin:6px 0 14px; }

@keyframes fade-in{ from{ opacity:0; transform:translateY(-2px); } to{ opacity:1; transform:translateY(0); } }
.fade-in{ animation:fade-in .18s ease; }

/* ---- Indicador de búsqueda asíncrona ---- */
.spinner-inline{ display:inline-block; width:13px; height:13px; border:2px solid var(--border); border-top-color:var(--brand-green-deep); border-radius:50%; animation:girar .6s linear infinite; vertical-align:-2px; margin-left:6px; }
@keyframes girar{ to{ transform:rotate(360deg); } }

/* ---- Tabla de conceptos (CFDI) ---- */
#conceptos-tabla .campo-importe{ font-weight:600; }

.relacionado-fila{ display:flex; gap:10px; align-items:center; margin-bottom:8px; }
.relacionado-fila input{ flex:1; }

/* ---- Utilidad: oculto visualmente pero presente para el formulario
   (a diferencia de display:none, un campo required aquí sigue siendo
   válido para la validación nativa/foco del navegador). ---- */
.visually-hidden{ position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

/* ---- Botón de ícono (acciones junto a tarjetas/campos) ---- */
.icon-btn{ display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; flex:none; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--ink-strong); cursor:pointer; transition:border-color .15s ease, background .15s ease; }
.icon-btn:hover{ border-color:var(--brand-green); background:var(--brand-soft); }
.icon-btn svg{ width:17px; height:17px; }
.icon-btn.icon-btn-primary{ background:var(--brand-green); border-color:var(--brand-green); color:var(--brand-ink); }
.icon-btn.icon-btn-primary:hover{ background:#86be22; border-color:#86be22; text-decoration:none; }
.icon-btn.icon-btn-danger{ color:var(--danger); }
.icon-btn.icon-btn-danger:hover{ border-color:var(--danger); background:var(--danger-soft); }
.icon-btn-sm{ width:28px; height:28px; }
.icon-btn-sm svg{ width:14px; height:14px; }

/* ---- Tarjeta de entidad seleccionada (empresa emisora / receptor) ---- */
.entity-card{ display:flex; align-items:center; justify-content:space-between; gap:14px; background:var(--surface-2); border:1px solid var(--border); border-radius:10px; padding:14px 16px; }
.entity-card-body b{ display:block; font-size:14px; color:var(--ink-strong); }
.entity-card-body .hint{ display:block; margin-top:2px; }
.entity-card-actions{ display:flex; gap:8px; flex:none; }
.entity-card.is-empty .entity-card-body b{ color:var(--ink-muted); font-weight:600; }

/* ---- Resumen de datos generales (serie/folio, forma de pago, etc.) ---- */
.summary-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:14px 20px; flex:1; }
.summary-item b{ display:block; font-size:13.5px; color:var(--ink-strong); }
.summary-item span{ display:block; font-size:11.5px; color:var(--ink-muted); font-weight:600; text-transform:uppercase; letter-spacing:.04em; margin-bottom:3px; }

/* ---- Modal ---- */
.modal-backdrop{ display:none; position:fixed; inset:0; background:rgba(20,22,28,.5); z-index:1000; align-items:center; justify-content:center; padding:24px; }
.modal-backdrop.abierto{ display:flex; }
.modal{ background:var(--surface); border-radius:16px; box-shadow:0 24px 60px -20px rgba(20,22,28,.4); width:100%; max-width:560px; max-height:90vh; display:flex; flex-direction:column; animation:modal-in .16s ease; }
.modal.modal-lg{ max-width:760px; }
@keyframes modal-in{ from{ opacity:0; transform:translateY(8px) scale(.98); } to{ opacity:1; transform:none; } }
.modal-head{ display:flex; align-items:center; justify-content:space-between; padding:18px 20px; border-bottom:1px solid var(--border); flex:none; }
.modal-head h3{ font-size:15.5px; }
.modal-body{ padding:20px; overflow-y:auto; }
.modal-foot{ padding:16px 20px; border-top:1px solid var(--border); display:flex; justify-content:flex-end; gap:10px; flex:none; }

.modal-select-list{ list-style:none; margin:0; padding:0; max-height:340px; overflow-y:auto; border:1px solid var(--border); border-radius:10px; }
.modal-select-list li{ border-bottom:1px solid var(--border); }
.modal-select-list li:last-child{ border-bottom:none; }
.modal-select-list button{ width:100%; text-align:left; padding:12px 14px; background:none; border:none; cursor:pointer; font:inherit; color:var(--ink); transition:background .12s ease; }
.modal-select-list button:hover, .modal-select-list button.activo{ background:var(--brand-soft); }
.modal-select-list button b{ display:block; font-size:13.5px; color:var(--ink-strong); }
.modal-select-list button .hint{ display:block; margin-top:2px; }

/* ---- Dashboard ---- */
.stat-grid{ display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:16px; margin-bottom:20px; }
.stat-card{ background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:18px 20px; }
.stat-card.is-link{ display:block; transition:border-color .15s ease, transform .15s ease; }
.stat-card.is-link:hover{ border-color:var(--brand-green); transform:translateY(-1px); text-decoration:none; }
.stat-label{ display:block; font-size:12.5px; color:var(--ink-muted); font-weight:600; margin-bottom:8px; }
.stat-value{ display:block; font-size:26px; font-weight:700; color:var(--ink-strong); font-variant-numeric:tabular-nums; }
.stat-sub{ display:block; font-size:12.5px; color:var(--ink-muted); margin-top:4px; }
.stat-card.is-warning .stat-value{ color:var(--warning); }

.stat-card-donut{ display:flex; align-items:center; gap:14px; }
.stat-card-donut .stat-donut-canvas{ position:relative; width:64px; height:64px; flex:none; }
.stat-card-donut .stat-donut-pct{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; color:var(--ink-strong); }
.stat-card-donut .stat-donut-info{ display:flex; flex-direction:column; min-width:0; }
.stat-card-donut.is-warning .stat-donut-pct{ color:var(--warning); }

.shortcut-grid{ display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:12px; }
.shortcut{ display:flex; flex-direction:column; align-items:center; gap:10px; padding:18px 12px; border:1px solid var(--border); border-radius:12px; color:var(--ink-strong); font-size:13px; font-weight:600; text-align:center; transition:border-color .15s ease, background .15s ease, transform .15s ease; }
.shortcut:hover{ border-color:var(--brand-green); background:var(--brand-soft); text-decoration:none; transform:translateY(-1px); }
.shortcut svg{ width:26px; height:26px; color:var(--brand-green-deep); flex:none; }

.cert-alert-list{ list-style:none; margin:8px 0 0; padding:0; }
.cert-alert-list li{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:6px 0; border-top:1px solid rgba(0,0,0,.06); }
.cert-alert-list li:first-child{ border-top:none; }

.dashboard-grid{ display:grid; grid-template-columns:2fr 1fr; gap:20px; align-items:start; margin-bottom:20px; }
.dashboard-grid .card-head select{ font-size:12.5px; padding:6px 10px; }
.top-clientes-tabla{ width:100%; }
.top-clientes-tabla td.num{ text-align:right; font-variant-numeric:tabular-nums; }
.top-clientes-rank{ display:inline-flex; align-items:center; justify-content:center; width:22px; height:22px; border-radius:50%; background:var(--surface-2); color:var(--ink-muted); font-size:11px; font-weight:700; margin-right:8px; }

/* ---- Bandeja de WhatsApp ---- */
.wa-hilo{ display:flex; flex-direction:column; gap:2px; padding:20px; max-height:60vh; overflow-y:auto; }
.wa-burbuja-fila{ display:flex; margin-bottom:8px; }
.wa-burbuja{ max-width:70%; padding:9px 12px; border-radius:12px; font-size:13.5px; line-height:1.45; word-break:break-word; overflow-wrap:anywhere; }
.wa-entrante .wa-burbuja{ background:var(--surface-2); color:var(--ink); border-bottom-left-radius:3px; }
.wa-saliente{ justify-content:flex-end; }
.wa-saliente .wa-burbuja{ background:var(--brand-soft); color:var(--brand-ink); border-bottom-right-radius:3px; }
.wa-adjunto{ font-style:italic; color:var(--ink-muted); }
.wa-meta{ margin-top:4px; font-size:10.5px; color:var(--ink-muted); }
.wa-error{ margin-top:4px; font-size:11px; color:var(--danger); }
.wa-form-responder{ display:flex; gap:10px; align-items:flex-end; padding:16px 20px; border-top:1px solid var(--border); }
.wa-form-responder textarea{ flex:1; resize:vertical; font:inherit; padding:9px 12px; border:1px solid var(--border); border-radius:8px; }

@media (max-width: 900px){
  .app-shell{ flex-direction:column; }
  .menu-toggle{ display:inline-flex; }
  .sidebar{
    position:fixed; top:0; left:0; z-index:1001;
    width:264px; max-width:82vw; height:100vh;
    transform:translateX(-100%);
    transition:transform .25s ease;
  }
  .sidebar.is-open{ transform:translateX(0); box-shadow:24px 0 48px -24px rgba(15,17,23,.45); }
  .sidebar-backdrop.is-open{ display:block; opacity:1; }
  .form-grid{ grid-template-columns:1fr; }
  .dashboard-grid{ grid-template-columns:1fr; }
}

body.no-scroll{ overflow:hidden; }

/* ---- Editor de texto enriquecido (Quill Snow) ---- */
.editor-rico{ font-family:inherit; }
.editor-rico .ql-toolbar.ql-snow{ border:1px solid var(--border); border-radius:8px 8px 0 0; background:var(--surface-2); font-family:inherit; }
.editor-rico .ql-container.ql-snow{ border:1px solid var(--border); border-top:none; border-radius:0 0 8px 8px; background:var(--surface); font-family:inherit; font-size:14px; }
.editor-rico .ql-editor{ min-height:110px; color:var(--ink); }
.editor-rico .ql-editor.ql-blank::before{ color:var(--ink-muted); font-style:normal; }
.editor-rico:focus-within .ql-container.ql-snow{ border-color:var(--brand-green-deep); }
.notas-lectura.ql-editor{ padding:0; min-height:0; height:auto; overflow:visible; font-size:13px; color:var(--ink); }
.notas-lectura.ql-editor > *{ margin:0 0 4px; }
