/* ============================================================
   DocOffice · Sistema de diseño para mockups
   Hoja de estilo compartida por todos los mockups HTML.
   ============================================================ */

:root {
  /* Marca / primarios */
  --brand: #2563eb;
  --brand-600: #1d4ed8;
  --brand-700: #1e40af;
  --brand-50: #eff6ff;
  --brand-100: #dbeafe;
  --teal: #0d9488;
  --teal-50: #f0fdfa;

  /* Semáforo de estados */
  --ok: #15803d;        --ok-bg: #dcfce7;
  --warn: #b45309;      --warn-bg: #fef3c7;
  --danger: #b91c1c;    --danger-bg: #fee2e2;
  --info: #1d4ed8;      --info-bg: #dbeafe;
  --muted-bg: #e5e7eb;  --muted-fg: #4b5563;

  /* Neutros */
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #111827;
  --text-2: #4b5563;
  --text-3: #9ca3af;

  --shadow-sm: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --shadow-md: 0 4px 12px rgba(16,24,40,.08);
  --shadow-lg: 0 12px 32px rgba(16,24,40,.14);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;

  --sidebar-w: 248px;
  --topbar-h: 60px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3,h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
.num { font-variant-numeric: tabular-nums; }

/* ── App shell ─────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  background: #0f172a;
  color: #cbd5e1;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  min-height: 0; overflow: hidden;
}
.sidebar__brand {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 18px 20px; color: #fff;
}
.sidebar__brand b { font-size: 18px; letter-spacing: -.02em; }
.sidebar__logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--teal));
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px;
}
.sidebar__navigation {
  flex: 1; min-height: 0; overflow-y: auto;
  overscroll-behavior-y: contain;
}
.sidebar__section { padding: 14px 14px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #64748b; }
.nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 10px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 9px; color: #cbd5e1; font-weight: 500;
}
.nav a:hover { background: #1e293b; color: #fff; text-decoration: none; }
.nav a.active { background: var(--brand); color: #fff; }
.nav .ico { width: 18px; text-align: center; opacity: .9; }
.sidebar__user {
  flex-shrink: 0;
  margin-top: auto; padding: 14px 16px; border-top: 1px solid #1e293b;
  display: flex; align-items: center; gap: 10px;
}

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--topbar-h); background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px; position: sticky; top: 0; z-index: 20;
}
.topbar__title { font-size: 16px; font-weight: 650; }
.topbar__crumb { color: var(--text-3); font-size: 13px; }
.search {
  flex: 1; max-width: 460px;
  display: flex; align-items: center; gap: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 14px; color: var(--text-3);
}
.search input { border: 0; background: transparent; outline: none; flex: 1; font-size: 14px; color: var(--text); }
.topbar__spacer { flex: 1; }
.content { padding: 24px; max-width: 1280px; width: 100%; }

/* ── Avatares ──────────────────────────────────────────────── */
.avatar {
  width: 36px; height: 36px; border-radius: 999px; flex: none;
  display: grid; place-items: center; font-weight: 700; color: #fff; font-size: 13px;
  background: var(--brand);
}
.avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.avatar--lg { width: 52px; height: 52px; font-size: 18px; }
.avatar.c1{background:#2563eb}.avatar.c2{background:#0d9488}.avatar.c3{background:#7c3aed}
.avatar.c4{background:#db2777}.avatar.c5{background:#ea580c}.avatar.c6{background:#0891b2}

/* ── Tarjetas ──────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.card__head h3 { font-size: 15px; }
.card__body { padding: 18px; }
.card__foot { padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }

.grid { display: grid; gap: 16px; min-width: 0; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px){ .grid-3,.grid-4{grid-template-columns:repeat(2,1fr)} }
@media (max-width: 680px){ .grid-2,.grid-3,.grid-4{grid-template-columns:1fr} }

/* ── KPIs ──────────────────────────────────────────────────── */
.kpi { padding: 16px 18px; }
.kpi__label { color: var(--text-2); font-size: 13px; display:flex; align-items:center; gap:8px; }
.kpi__value { font-size: 30px; font-weight: 750; margin-top: 6px; letter-spacing: -.02em; }
.kpi__sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.kpi__icon { width: 34px; height: 34px; border-radius: 9px; display:grid; place-items:center; background: var(--brand-50); color: var(--brand-600); font-size:16px; }

/* ── Badges de estado ──────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
  background: var(--muted-bg); color: var(--muted-fg);
}
.badge .dot { width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.badge.ok{background:var(--ok-bg);color:var(--ok)}
.badge.warn{background:var(--warn-bg);color:var(--warn)}
.badge.danger{background:var(--danger-bg);color:var(--danger)}
.badge.info{background:var(--info-bg);color:var(--info)}
.badge.muted{background:var(--muted-bg);color:var(--muted-fg)}

/* ── Botones ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content:center; gap: 8px;
  padding: 9px 16px; border-radius: 9px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; background: var(--surface-2); color: var(--text);
  border-color: var(--border-strong); transition: .12s;
}
.btn:hover { background: #eef2f7; text-decoration: none; }
.btn--primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn--primary:hover { background: var(--brand-600); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { background: #fff; color: var(--danger); border-color: #fca5a5; }
.btn--danger:hover { background: var(--danger-bg); }
.btn--sm { padding: 6px 11px; font-size: 13px; }
.btn--block { width: 100%; }

/* ── Tablas ────────────────────────────────────────────────── */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; color: var(--text-2); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .right { text-align: right; }
.cellbold { font-weight: 600; }
.cellsub { color: var(--text-3); font-size: 12px; }

/* ── Listas / items ────────────────────────────────────────── */
.list { display: flex; flex-direction: column; }
.list__item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.list__item:last-child { border-bottom: 0; }
.list__main { flex: 1; min-width: 0; }
.list__title { font-weight: 600; }
.list__sub { color: var(--text-3); font-size: 12.5px; }

/* ── Alertas proactivas ────────────────────────────────────── */
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid; align-items: flex-start; }
.alert__icon { font-size: 18px; line-height: 1.2; }
.alert__body { flex: 1; }
.alert__title { font-weight: 650; }
.alert.warn { background: var(--warn-bg); border-color: #fcd34d; color: #7c2d12; }
.alert.info { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-700); }
.alert.danger { background: var(--danger-bg); border-color: #fca5a5; color: #7f1d1d; }
.alert.ok { background: var(--ok-bg); border-color: #86efac; color: #14532d; }

/* ── Timeline de estados ───────────────────────────────────── */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 18px 26px; }
.timeline li::before { content:""; position:absolute; left:6px; top:3px; width:11px; height:11px; border-radius:999px; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.timeline li::after { content:""; position:absolute; left:11px; top:14px; bottom:0; width:2px; background: var(--border); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline li.done::before { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.timeline li.cur::before { background: var(--info); box-shadow: 0 0 0 4px var(--info-bg); }
.timeline__time { color: var(--text-3); font-size: 12px; }

/* ── Tabs ──────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.tab { padding: 10px 14px; font-weight: 600; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand-600); border-bottom-color: var(--brand); }

/* ── Wizard (asistente por pasos) ──────────────────────────── */
.steps { display: flex; align-items: center; gap: 0; }
.step { display: flex; align-items: center; gap: 10px; color: var(--text-3); }
.step__num { width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--border-strong); font-weight: 700; font-size: 13px; }
.step__label { font-weight: 600; font-size: 13px; }
.step.done .step__num { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.active { color: var(--text); }
.step.active .step__num { background: var(--brand); border-color: var(--brand); color: #fff; }
.step__line { flex: 1; height: 2px; background: var(--border); margin: 0 12px; min-width: 24px; }
.step.done + .step__line { background: var(--ok); }

/* ── Formularios ───────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.field .hint { color: var(--text-3); font-size: 12px; margin-top: 4px; }
.input, .select, .textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong);
  border-radius: 9px; font-size: 14px; background: var(--surface); color: var(--text); outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Selección tipo tarjeta ────────────────────────────────── */
.choice { border: 1.5px solid var(--border-strong); border-radius: var(--radius); padding: 14px; cursor: pointer; transition: .12s; background: var(--surface); }
.choice:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.choice.sel { border-color: var(--brand); background: var(--brand-50); }
.choice__title { font-weight: 650; }
.choice__sub { color: var(--text-2); font-size: 12.5px; }

/* ── Slots de horario ──────────────────────────────────────── */
.slots { display: flex; flex-wrap: wrap; gap: 8px; }
.slot { padding: 8px 14px; border: 1.5px solid var(--border-strong); border-radius: 999px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.slot:hover { border-color: var(--brand); color: var(--brand-600); }
.slot.sel { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ── Calendario ────────────────────────────────────────────── */
.cal { display: grid; grid-template-columns: 56px repeat(6, 1fr); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.cal__h { padding: 10px 8px; text-align: center; font-weight: 650; font-size: 12.5px; border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); background: var(--surface-2); }
.cal__h:first-child { border-left: 0; }
.cal__time { padding: 6px 8px; text-align: right; font-size: 11px; color: var(--text-3); border-top: 1px solid var(--border); }
.cal__cell { border-left: 1px solid var(--border); border-top: 1px solid var(--border); min-height: 46px; padding: 3px; position: relative; }
.ev { border-radius: 7px; padding: 5px 8px; font-size: 11.5px; font-weight: 600; margin-bottom: 3px; border-left: 3px solid; }
.ev.ok{background:var(--ok-bg);color:var(--ok);border-color:var(--ok)}
.ev.warn{background:var(--warn-bg);color:var(--warn);border-color:var(--warn)}
.ev.info{background:var(--info-bg);color:var(--info);border-color:var(--info)}
.ev.muted{background:var(--muted-bg);color:var(--muted-fg);border-color:var(--text-3)}
.ev.free{background:repeating-linear-gradient(45deg,#f0fdf4,#f0fdf4 6px,#dcfce7 6px,#dcfce7 12px);color:var(--ok);border-color:var(--ok);border-style:dashed}

/* ── Utilidades ────────────────────────────────────────────── */
.flex { display: flex; } .col { flex-direction: column; }
.items-center { align-items: center; } .between { justify-content: space-between; }
.gap-4{gap:4px}.gap-8{gap:8px}.gap-12{gap:12px}.gap-16{gap:16px}
.wrap{flex-wrap:wrap}
.mt-8{margin-top:8px}.mt-12{margin-top:12px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}
.mb-8{margin-bottom:8px}.mb-16{margin-bottom:16px}.mb-24{margin-bottom:24px}
.muted{color:var(--text-2)}.muted3{color:var(--text-3)}
.small{font-size:12.5px}.big{font-size:18px}
.bold{font-weight:650}
.right{text-align:right}.center{text-align:center}
.page-title{font-size:22px;font-weight:720;letter-spacing:-.02em}
.page-sub{color:var(--text-2);margin-top:2px}
.divider{height:1px;background:var(--border);margin:16px 0}
.pill{display:inline-block;padding:2px 9px;border-radius:999px;background:var(--surface-2);border:1px solid var(--border);font-size:12px;font-weight:600}
.tag-role{font-size:11px;padding:2px 8px;border-radius:999px;background:var(--brand-50);color:var(--brand-700);font-weight:700;text-transform:uppercase;letter-spacing:.03em}

/* ── Alias de estados Bootstrap (Appointment::$status['class']) ──
   Permite usar las clases contextuales del backend directamente en .badge / .ev. */
.badge.primary{background:var(--info-bg);color:var(--info)}
.badge.success{background:var(--ok-bg);color:var(--ok)}
.badge.info{background:var(--teal-50);color:var(--teal)}
.badge.warning{background:var(--warn-bg);color:var(--warn)}
.badge.danger{background:var(--danger-bg);color:var(--danger)}
.badge.secondary{background:var(--muted-bg);color:var(--muted-fg)}
.badge.dark{background:#1f2937;color:#fff}
.badge.light{background:var(--muted-bg);color:var(--muted-fg)}
.ev.primary{background:var(--info-bg);color:var(--info);border-color:var(--info)}
.ev.success{background:var(--ok-bg);color:var(--ok);border-color:var(--ok)}
.ev.warning{background:var(--warn-bg);color:var(--warn);border-color:var(--warn)}
.ev.danger{background:var(--danger-bg);color:var(--danger);border-color:var(--danger)}
.ev.secondary{background:var(--muted-bg);color:var(--muted-fg);border-color:var(--text-3)}

/* ── Compatibilidad con formularios Yii (ActiveForm) ──────────── */
.help-block{color:var(--danger);font-size:12px;margin-top:4px}
.has-error .input,.has-error .select,.has-error .textarea{border-color:var(--danger)}

/* ── Responsivo: el sidebar pasa arriba en pantallas chicas ───── */
@media (max-width: 920px){
  .app{display:block;overflow-x:hidden}
  .sidebar{position:static;height:auto;width:100%;flex-direction:column}
  .sidebar__brand{padding:16px}
  .sidebar__section{padding:12px 16px 2px}
  .sidebar .nav{flex-direction:row;flex-wrap:wrap;padding:6px 10px 8px}
  .sidebar__user{margin-top:8px}
  .topbar{height:auto;min-height:var(--topbar-h);position:static;flex-wrap:wrap;gap:10px;padding:10px 14px}
  .topbar__title{min-width:80px}
  .topbar__spacer{display:none}
  .search{order:2;flex:1 1 100%;max-width:none}
  .content{padding:16px}
  .grid[style*="grid-template-columns"]{grid-template-columns:minmax(0,1fr) !important}
  .card{min-width:0;overflow-x:auto}
  .card__body{overflow-x:auto}
  .table{min-width:560px}
  .btn{white-space:normal}
  .page-title{font-size:20px}
}

@media (max-width: 520px){
  .pstat{grid-template-columns:1fr !important}
}

/* ── Paginación (yii\widgets\LinkPager) ──────────────────────── */
.pagination{display:flex;gap:4px;list-style:none;padding:0;margin:18px 0 0;justify-content:center;flex-wrap:wrap}
.pagination .page-item{list-style:none}
.pagination .page-link{display:inline-flex;align-items:center;padding:6px 11px;border:1px solid var(--border-strong);border-radius:8px;color:var(--text);font-weight:600;font-size:13px;background:var(--surface)}
.pagination .page-link:hover{background:var(--surface-2);text-decoration:none}
.pagination .active .page-link{background:var(--brand);border-color:var(--brand);color:#fff}
.pagination .disabled .page-link{opacity:.5;pointer-events:none}

/* ── Separador de letra / grupos en listados ─────────────────── */
.list-letter{font-weight:750;color:var(--brand-700);padding:12px 4px 4px;font-size:13px;letter-spacing:.05em}

/* ── Filtro alfabético ───────────────────────────────────────── */
.alpha{display:flex;flex-wrap:wrap;gap:5px}
.alpha a{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:30px;padding:0 6px;border:1px solid var(--border);border-radius:7px;font-weight:600;font-size:13px;color:var(--text-2);background:var(--surface)}
.alpha a:hover{border-color:var(--brand);color:var(--brand-600);text-decoration:none}

/* Pantallas operativas migradas: calendario, expediente y edición clínica. */
[hidden]{display:none!important}
.table-wrap{overflow-x:auto}
.record-entry+.record-entry{border-top:1px solid var(--border);padding-top:20px;margin-top:20px}
.record-content{overflow-wrap:anywhere;line-height:1.7}
.record-content img,.rich-editor img{max-width:100%;height:auto}
.record-meta{font-size:12px;color:var(--text-2)}
.record-sections{align-self:start;min-width:0}
.record-sections .card__head{padding:10px 12px}
.record-sections .card__head h2{font-size:15px}
.record-sections__list{display:flex;flex-direction:column;gap:4px;padding:8px;max-height:max(180px,calc(100dvh - 240px));overflow-y:auto;overscroll-behavior-y:contain}
.record-section{text-align:left;font:inherit;font-size:13px;width:100%;display:flex;align-items:center;gap:6px;min-height:32px;padding:5px 8px;flex-shrink:0;border-radius:6px;line-height:20px}
.record-section .choice__sub{flex:0 1 auto;max-width:42%;font-size:11px}
.record-section b{flex:1;min-width:0;font-weight:600}
.record-section .choice__sub,.record-section b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rich-editor{min-height:280px;border:1px solid var(--border-strong);border-radius:0 0 9px 9px;padding:16px;line-height:1.7;overflow-wrap:anywhere;background:var(--surface)}
.rich-editor:focus{outline:2px solid var(--brand);outline-offset:1px}
.rich-editor[contenteditable=false]{background:var(--surface-2)}
.editor-toolbar{display:flex;gap:6px;flex-wrap:wrap;padding:8px;border:1px solid var(--border-strong);border-bottom:0;border-radius:9px 9px 0 0;background:var(--surface-2)}
.rich-editor table,.record-content table{width:100%;border-collapse:collapse;table-layout:fixed}
.rich-editor th,.rich-editor td,.record-content th,.record-content td{border:1px solid var(--border-strong);padding:6px 8px;min-width:2em;overflow-wrap:anywhere;vertical-align:top}
.rich-editor th,.record-content th{background:var(--surface-2);font-weight:600;text-align:left}
.editor-table-dialog{width:min(420px,calc(100vw - 32px));max-height:calc(100dvh - 32px);overflow:auto;border:1px solid var(--border);border-radius:12px;padding:24px;background:var(--surface);color:var(--text)}
.editor-table-dialog::backdrop{background:#0f172a88}
.editor-table-dialog h2{margin-bottom:20px}
.editor-table-dimensions{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}
.editor-table-dimensions label{display:grid;gap:6px}
.editor-table-heading{display:flex;align-items:center;gap:8px}
.editor-table-dialog p{margin:12px 0}
.calendar-panel{--fc-border-color:var(--border);--fc-today-bg-color:var(--brand-50);--fc-neutral-bg-color:var(--surface-2)}
.fc{font-family:inherit;font-size:13px}
.fc .fc-toolbar-title{font-size:18px;font-weight:700}
.fc .fc-button-primary{background:var(--surface);border-color:var(--border-strong);color:var(--text);box-shadow:none;font-size:13px;border-radius:8px;padding:7px 12px}
.fc .fc-button-primary:not(:disabled).fc-button-active,.fc .fc-button-primary:not(:disabled):hover{background:var(--brand);border-color:var(--brand);color:white}
.fc .fc-col-header-cell-cushion{padding:10px 4px;color:var(--text-2)}
.fc .fc-timegrid-slot{height:32px}
.fc .fc-timegrid-slot-label{color:var(--text-2);font-variant-numeric:tabular-nums}
.fc .fc-event{border-radius:6px;font-weight:600}
.calendar-status{padding:8px 0}
:focus-visible{outline:2px solid var(--brand);outline-offset:3px}
@media(max-width:700px){.row{grid-template-columns:1fr}.grid-3,.grid-4{grid-template-columns:1fr 1fr}.fc .fc-toolbar{flex-wrap:wrap;gap:12px}.fc .fc-toolbar-title{font-size:16px}.calendar-panel{padding:12px}.steps{flex-wrap:wrap}.fc .fc-button-primary{padding:5px 7px}.fc .fc-timegrid-slot{height:36px}}
.detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:20px;margin:0}.detail-grid dt{font-size:12px;color:var(--text-2);font-weight:600}.detail-grid dd{margin:4px 0 0;overflow-wrap:anywhere}.choice .field:last-child{margin-bottom:0}
/* Formularios y catálogos comparten los componentes nativos de Yii. */
.ui-form .field{margin-bottom:18px}.ui-form h3,.ui-form h5{margin:20px 0 12px}.ui-form .hint{font-size:12px;color:var(--text-2);margin-top:5px}.ui-form input[type=color]{width:120px;height:42px;padding:4px}.ui-form label:has(input[type=checkbox]),.ui-form label:has(input[type=radio]){display:inline-flex;align-items:center;gap:8px;margin:5px 16px 5px 0;font-weight:500}.ui-form .error-summary{border-radius:9px;padding:14px;background:var(--danger-bg);color:var(--danger);margin-bottom:18px}.list-group{list-style:none;margin:0;padding:0}.list-group-item{padding:14px 0;border-bottom:1px solid var(--border)}.list-group-item:last-child{border-bottom:0}.card__body>h2,.card__body>h3{margin-bottom:16px}.card__body hr{border:0;border-top:1px solid var(--border);margin:20px 0}.card__body pre{overflow:auto;max-width:100%;padding:16px;background:var(--surface-2);border-radius:9px}.card__body .row>div{min-width:0}.table-wrap{max-width:100%}.table th,.table td{overflow-wrap:anywhere}.content>h1{text-transform:none}.table-primary,.table-info{background:var(--info-bg)}.table-success{background:var(--ok-bg)}.table-warning{background:var(--warn-bg)}.table-danger{background:var(--danger-bg)}.text-center{text-align:center}.text-end{text-align:right}.fw-bold{font-weight:700}.d-flex{display:flex}.justify-content-between{justify-content:space-between}.w-100{width:100%}.mb-3{margin-bottom:16px}.mt-3{margin-top:16px}
@media(min-width:921px){.row:has(>div:nth-child(3)){grid-template-columns:repeat(3,minmax(0,1fr))}}
.sidebar-toggle,.sidebar-close{display:none}.nav-backdrop{position:fixed;inset:0;border:0;background:#0f172a88;z-index:49}.sidebar-close{position:absolute;right:10px;top:12px;min-width:36px;padding:4px;background:transparent;color:white;border-color:#334155;font-size:24px}
@media(max-width:920px){.sidebar{display:none;position:fixed;inset:0 auto 0 0;width:280px;max-width:85vw;height:100vh;height:100dvh;overflow:hidden;z-index:50}.menu-open .sidebar{display:flex}.menu-open{overflow:hidden}.sidebar .nav{flex-direction:column}.sidebar__brand{padding-right:50px}.sidebar-toggle,.sidebar-close{display:inline-flex}.pub__inner{flex-wrap:wrap}.pub__nav{flex-wrap:wrap}.btn{min-height:38px}.steps{gap:8px}.step__line{display:none}.step{gap:5px}.step__label{font-size:11px}.step__num{width:24px;height:24px}.detail-grid{grid-template-columns:1fr}.content{overflow-wrap:anywhere}.grid-3,.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.grid-3,.grid-4{grid-template-columns:minmax(0,1fr)}.pub__nav{width:100%;margin-left:0}.row{grid-template-columns:minmax(0,1fr)}}
