/* ── TOKENS ──────────────────────────────────────────── */
:root {
  --ink:    #0B1F3A;
  --navy:   #103461;
  --blue:   #1B56A8;
  --sky:    #2D7DD2;
  --sky-l:  #EBF3FC;
  --sky-b:  #BADAF7;
  --jade:   #1A7A5E;
  --jade-l: #E4F5EF;
  --amber:  #B45309;
  --amb-l:  #FEF3C7;
  --rose:   #B91C1C;
  --rose-l: #FEE2E2;
  --violet: #5B21B6;
  --vio-l:  #EDE9FE;
  --teal:   #0E7490;
  --teal-l: #E0F2FE;
  --n0: #FFFFFF; --n1: #F7F9FB; --n2: #EFF2F6;
  --n3: #DDE3EB; --n4: #B8C4D2; --n5: #8497AB;
  --n6: #566878; --n7: #2E3F50; --n8: #0B1F3A;
  --radius: 10px; --radius-sm: 7px; --radius-xs: 5px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,.12);
}

/* ── RESET ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--n1); color: var(--n8); line-height: 1.5; }
a { color: var(--blue); text-decoration: none; }
img { max-width: 100%; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--sky) !important;
  box-shadow: 0 0 0 3px rgba(45,125,210,.18); }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: var(--n4); border-radius: 3px; }

/* ── TOPBAR ──────────────────────────────────────────── */
.topbar {
  height: 54px; background: var(--ink); display: flex;
  align-items: center; justify-content: space-between;
  padding: 0 20px; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.topbar-logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 32px; height: 32px; background: rgba(255,255,255,.1);
  border-radius: 9px; display: flex; align-items: center;
  justify-content: center; border: 1px solid rgba(255,255,255,.12);
}
.logo-text { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: -.5px; }
.logo-text span { color: #FBBF24; }
.topbar-nav { display: flex; gap: 2px; }
.nav-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 13px; background: transparent; color: rgba(255,255,255,.5);
  border: none; border-radius: 7px; font-size: 13px; cursor: pointer;
  font-weight: 400; transition: all .12s;
}
.nav-btn:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.8); }
.nav-btn.active { background: rgba(255,255,255,.15); color: #fff; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.sede-badge {
  display: flex; align-items: center; gap: 6px; padding: 4px 10px;
  background: rgba(255,255,255,.08); border-radius: 6px;
  border: 1px solid rgba(255,255,255,.1); font-size: 11px;
  color: rgba(255,255,255,.6); font-weight: 500;
}
.sede-badge.admin { background: rgba(251,191,36,.12); border-color: rgba(251,191,36,.2); color: #FBBF24; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--sky));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
  border: 2px solid rgba(255,255,255,.2); flex-shrink: 0; cursor: pointer;
}
.avatar.sm { width: 30px; height: 30px; font-size: 10px; }
.avatar.md { width: 38px; height: 38px; font-size: 12px; }
.user-info { text-align: right; }
.user-info .name { font-size: 12px; font-weight: 600; color: #fff; }
.user-info .role { font-size: 10px; color: rgba(255,255,255,.4); }
.btn-logout { background: none; border: none; cursor: pointer; 
  opacity: .5; display: flex; align-items: center; }
.btn-logout:hover { opacity: 1; }
.topbar-divider { width: 1px; height: 28px; background: rgba(255,255,255,.1); }

/* ── LOGIN PAGE ──────────────────────────────────────── */
.login-bg {
  min-height: 100vh;
  background: linear-gradient(160deg, var(--ink) 0%, var(--navy) 55%, #0D3563 100%);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.login-grid {
  position: fixed; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(16,52,97,.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16,52,97,.3) 1px, transparent 1px);
  background-size: 36px 36px;
}
.login-card { width: 100%; max-width: 410px; position: relative; }
.login-logo { text-align: center; margin-bottom: 32px; }
.login-icon {
  width: 56px; height: 56px; background: rgba(255,255,255,.1);
  border-radius: 16px; border: 1px solid rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.login-title { font-size: 26px; font-weight: 700; color: #fff; letter-spacing: -1px; }
.login-title span { color: #FBBF24; }
.login-sub { font-size: 11px; color: rgba(255,255,255,.35); margin-top: 5px; letter-spacing: .5px; }
.login-box {
  background: #fff; border-radius: 16px; padding: 32px;
  box-shadow: 0 32px 80px rgba(0,0,0,.45);
}
.login-box h2 { font-size: 18px; font-weight: 700; color: var(--n8); margin-bottom: 4px; }
.login-box .sub { font-size: 13px; color: var(--n5); margin-bottom: 24px; }
.login-sedes { display: flex; justify-content: center; flex-wrap: wrap;
  gap: 8px 20px; margin-top: 20px; }
.login-sede { display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: rgba(255,255,255,.3); }
.login-sede .dot { width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255,255,255,.25); }
.login-footer { text-align: center; margin-top: 12px;
  font-size: 11px; color: rgba(255,255,255,.2); }
.login-error { background: var(--rose-l); border: 1px solid #fca5a5;
  color: var(--rose); padding: 10px 14px; border-radius: 7px;
  font-size: 13px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }

/* ── FORM FIELDS ─────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label, .field-label {
  display: block; font-size: 10px; font-weight: 700; color: var(--n5);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 5px;
}
.field input, .field select, .field textarea,
input.inp, select.inp, textarea.inp {
  width: 100%; border: 1.5px solid var(--n3); border-radius: var(--radius-sm);
  padding: 0 10px; font-size: 13px; color: var(--n8); background: #fff;
  transition: border-color .15s;
}
.field input, input.inp { height: 36px; }
.field select, select.inp { height: 36px; }
.field textarea, textarea.inp { padding: 8px 10px; resize: vertical; line-height: 1.6; }
.field input[readonly], input[readonly] { background: var(--n1); color: var(--n5); }

/* ── BUTTONS ─────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 18px; border-radius: var(--radius-sm); font-size: 13px;
  font-weight: 600; cursor: pointer; border: none; transition: all .15s;
  font-family: inherit; white-space: nowrap; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--navy); }
.btn-secondary { background: var(--n1); color: var(--n7); border: 1px solid var(--n3); }
.btn-secondary:hover { background: var(--n2); }
.btn-ghost { background: transparent; color: var(--blue); border: 1px solid var(--sky-b); }
.btn-ghost:hover { background: var(--sky-l); }
.btn-danger { background: var(--rose-l); color: var(--rose); border: 1px solid #fca5a5; }
.btn-danger:hover { background: #fecaca; }
.btn-success { background: var(--jade-l); color: var(--jade); border: 1px solid #86efac; }
.btn-success:hover { background: #bbf7d0; }
.btn-sm { padding: 5px 12px; font-size: 11px; }
.btn-lg { padding: 11px 24px; font-size: 15px; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── CARDS ───────────────────────────────────────────── */
.card { background: var(--n0); border: 1px solid var(--n3);
  border-radius: var(--radius); padding: 20px; }
.card-header { display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; border-bottom: 1px solid var(--n3); }
.card-title { font-size: 14px; font-weight: 700; color: var(--n8);
  display: flex; align-items: center; gap: 8px; }
.card-body { padding: 18px; }

/* ── STAT CARDS ──────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--n0); border: 1px solid var(--n3);
  border-radius: var(--radius); padding: 18px;
  border-top: 3px solid var(--blue); }
.stat-val { font-size: 32px; font-weight: 700; letter-spacing: -1px; line-height: 1; }
.stat-label { font-size: 12px; font-weight: 600; color: var(--n7); margin-top: 5px; }
.stat-sub { font-size: 11px; color: var(--n4); margin-top: 2px; }

/* ── BADGES ──────────────────────────────────────────── */
.badge { display: inline-block; padding: 2px 9px; border-radius: 99px;
  font-size: 10px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; }
.badge-complete  { background: var(--jade-l); color: var(--jade); }
.badge-draft     { background: var(--amb-l);  color: var(--amber); }
.badge-locked    { background: var(--sky-l);  color: var(--blue); }
.badge-active    { background: var(--jade-l); color: var(--jade); }
.badge-inactive  { background: var(--n2);     color: var(--n5); }
.badge-admin     { background: var(--sky-l);  color: var(--blue); }
.badge-super     { background: var(--vio-l);  color: var(--violet); }
.badge-dentist   { background: var(--jade-l); color: var(--jade); }

/* ── TABLES ──────────────────────────────────────────── */
.table-wrap { background: var(--n0); border: 1px solid var(--n3);
  border-radius: var(--radius); overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead tr { background: var(--n2); }
th { padding: 10px 14px; text-align: left; font-size: 10px; font-weight: 700;
  color: var(--n6); text-transform: uppercase; letter-spacing: .4px;
  border: 1px solid var(--n3); }
td { padding: 11px 14px; border: 1px solid var(--n3); vertical-align: middle; }
tbody tr:nth-child(even) { background: var(--n1); }
tbody tr:hover { background: var(--sky-l); cursor: pointer; }

/* ── PAGE LAYOUT ─────────────────────────────────────── */
.page-wrap { padding: 28px; max-width: 1060px; margin: 0 auto; }
.page-header { display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: 24px; }
.page-title { font-size: 20px; font-weight: 700; color: var(--n8); letter-spacing: -.3px; }
.page-sub { font-size: 13px; color: var(--n5); margin-top: 3px;
  display: flex; align-items: center; gap: 6px; }

/* ── SEARCH BAR ──────────────────────────────────────── */
.search-bar { background: var(--n0); border: 1px solid var(--n3); border-radius: var(--radius);
  padding: 10px 14px; margin-bottom: 16px; display: flex; gap: 10px; align-items: center; }
.search-bar input { flex: 1; border: none; font-size: 14px;
  color: var(--n8); background: transparent; }
.search-bar input::placeholder { color: var(--n4); }

/* ── FORM WIZARD LAYOUT ──────────────────────────────── */
.wizard-layout { display: flex; height: calc(100vh - 54px); overflow: hidden; }
.wizard-sidebar { width: 212px; flex-shrink: 0; background: var(--n0);
  border-right: 1px solid var(--n3); display: flex; flex-direction: column; }
.wizard-content { flex: 1; overflow-y: auto; background: var(--n1); }
.wizard-inner { max-width: 940px; margin: 0 auto; padding: 22px; }

.patient-chip { padding: 14px; border-bottom: 1px solid var(--n3); }
.patient-chip .name { font-size: 12px; font-weight: 700; color: var(--n8); line-height: 1.3; }
.patient-chip .meta { font-size: 10px; color: var(--n5); margin-top: 2px; }

.progress-bar { height: 5px; background: var(--n3); border-radius: 3px; margin: 10px 0 4px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--sky));
  border-radius: 3px; transition: width .4s; }
.progress-label { font-size: 10px; color: var(--n5); }

.tab-pills { display: flex; gap: 4px; padding: 8px 8px 0; }
.tab-pill { flex: 1; padding: 5px 4px; background: transparent; color: var(--n5);
  border: 1px solid transparent; border-radius: 7px; font-size: 11px;
  font-weight: 700; cursor: pointer; transition: all .1s; text-align: center; }
.tab-pill.active { background: var(--sky-l); color: var(--blue); border-color: var(--sky-b); }

.sec-list { flex: 1; overflow-y: auto; padding: 5px; }
.sec-item { display: flex; align-items: center; gap: 8px; padding: 8px 9px;
  border-radius: 8px; cursor: pointer; margin-bottom: 1px;
  border: 1px solid transparent; transition: all .1s; }
.sec-item:hover { background: var(--n1); }
.sec-item.active { background: var(--sky-l); border-color: var(--sky-b); }
.sec-dot { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; background: var(--n3); color: var(--n5); }
.sec-dot.done { background: var(--jade); color: #fff; }
.sec-dot.active { background: var(--blue); color: #fff; }
.sec-label { font-size: 11px; line-height: 1.35; color: var(--n7); font-weight: 400; }
.sec-item.active .sec-label { color: var(--blue); font-weight: 600; }

.sidebar-actions { padding: 10px; border-top: 1px solid var(--n3);
  display: flex; flex-direction: column; gap: 6px; }

.section-header { background: var(--n0); border: 1px solid var(--n3);
  border-radius: var(--radius); padding: 15px 20px; margin-bottom: 16px;
  display: flex; justify-content: space-between; align-items: center; }
.section-tag { font-size: 10px; font-weight: 700; color: var(--n4);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.section-title { font-size: 17px; font-weight: 700; color: var(--n8); letter-spacing: -.2px; }
.autosave-status { display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--n5); }
.autosave-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--jade); }
.autosave-dot.saving { background: var(--amber); animation: pulse .8s infinite; }

@keyframes pulse { 0%,100%{ opacity:1 } 50%{ opacity:.4 } }

.section-content { background: var(--n0); border: 1px solid var(--n3);
  border-radius: var(--radius); padding: 22px; }

.wizard-nav { display: flex; justify-content: space-between;
  align-items: center; margin-top: 16px; }

/* ── FORM SECTIONS ───────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 12px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 10px; }
.col-span-2 { grid-column: span 2; }
.col-span-full { grid-column: 1/-1; }

.antecedente-row { display: grid; grid-template-columns: 22px 200px 1fr; gap: 10px;
  align-items: center; padding: 7px 12px; border-radius: 7px;
  border: 1px solid var(--n3); margin-bottom: 4px; }
.antecedente-row:nth-child(odd) { background: var(--n1); }
.antecedente-row label { font-size: 12px; font-weight: 600; color: var(--n8); }

.vital-card { background: var(--n1); border: 1px solid var(--n3);
  border-radius: var(--radius); padding: 14px; }
.vital-label { font-size: 10px; font-weight: 700; color: var(--n5);
  text-transform: uppercase; letter-spacing: .4px; margin-bottom: 8px; }
.vital-input { display: flex; align-items: baseline; gap: 6px; }
.vital-input input { width: 76px; height: 42px; border: 1.5px solid var(--n3);
  border-radius: 8px; text-align: center; font-size: 22px;
  font-weight: 700; color: var(--n8); }
.vital-unit { font-size: 12px; color: var(--n4); }

.stoma-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.stoma-table th, .stoma-table td { padding: 7px 12px; border: 1px solid var(--n3); }
.stoma-table thead { background: var(--n2); }
.stoma-table th { font-size: 10px; font-weight: 700; color: var(--n6);
  text-transform: uppercase; letter-spacing: .4px; }
.stoma-table tbody tr:nth-child(odd) { background: var(--n0); }
.stoma-table tbody tr:nth-child(even) { background: var(--n1); }
.stoma-table input[type=text] { width: 100%; border: none; background: transparent;
  font-size: 12px; color: var(--n7); }

/* ── ODONTOGRAM ──────────────────────────────────────── */
.odonto-tools { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.tool-btn { display: flex; align-items: center; gap: 5px; padding: 5px 12px;
  border-radius: 6px; font-size: 11px; font-weight: 500; cursor: pointer;
  border: 1.5px solid var(--n3); background: #fff; color: var(--n6);
  transition: all .1s; font-family: inherit; }
.tool-btn .sym { font-family: monospace; font-size: 10px; font-weight: 800;
  color: #fff; border-radius: 3px; padding: 1px 4px; line-height: 1.4; }
.tool-btn.active { border-color: currentColor; font-weight: 700; }
.odonto-grid { background: var(--n1); border: 1px solid var(--n3);
  border-radius: 10px; padding: 10px 10px 14px; overflow-x: auto; min-width: 580px; }
.odonto-row { display: flex; gap: 1px; align-items: flex-end; margin: 2px 0; }
.odonto-lbl { width: 26px; font-size: 7px; font-weight: 700; color: var(--n5);
  text-align: right; padding-right: 3px; flex-shrink: 0; align-self: center; }
.odonto-sep { border-top: 1.5px dashed var(--n4); margin: 5px 28px; }
.odonto-legend { margin-top: 12px; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 3px 10px; }
.odonto-legend .item { display: flex; gap: 6px; align-items: center;
  font-size: 10px; color: var(--n6); }
.odonto-legend .sym { font-family: monospace; font-weight: 700; color: var(--n8); 
  width: 48px; flex-shrink: 0; }
.mini-input { height: 13px; border: 1px solid var(--n3); border-radius: 2px;
  text-align: center; font-size: 8px; padding: 0;
  background: #fff; color: var(--n6); flex-shrink: 0; }
.gap-mid { width: 8px; flex-shrink: 0; border-left: 1.5px dashed var(--n3); align-self: stretch; }

/* ── SIGNATURE ───────────────────────────────────────── */
.sig-wrap { position: relative; border: 1.5px solid var(--n3);
  border-radius: 8px; overflow: hidden; background: #FAFCFF; }
.sig-placeholder { position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; pointer-events: none;
  font-size: 13px; color: var(--n4); font-style: italic; }
.sig-line { position: absolute; bottom: 12px; left: 14px; right: 14px;
  border-top: 1px dashed var(--n3); pointer-events: none; }
#sigCanvas { display: block; cursor: crosshair; touch-action: none; }

/* ── DIAGNOSES TABLE ─────────────────────────────────── */
.diag-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.diag-table th, .diag-table td { padding: 8px 10px; border: 1px solid var(--n3); }
.diag-table thead { background: var(--n2); }
.diag-table th { font-size: 10px; font-weight: 700; color: var(--n6);
  text-transform: uppercase; letter-spacing: .4px; }
.diag-table tbody tr:nth-child(even) { background: var(--n1); }
.diag-table input[type=text], .diag-table select { width: 100%; border: none;
  background: transparent; font-size: 12px; font-family: inherit; }
.diag-num { font-weight: 700; color: var(--blue); text-align: center; }
.btn-del { background: none; border: none; cursor: pointer; color: var(--rose);
  font-size: 16px; display: flex; align-items: center; }

/* ── TREATMENT TABLE ─────────────────────────────────── */
.treat-table { width: 100%; border-collapse: collapse; font-size: 11px; table-layout: fixed; }
.treat-table th, .treat-table td { padding: 7px 8px; border: 1px solid var(--n3);
  vertical-align: top; }
.treat-table thead { background: var(--n2); }
.treat-table th { font-size: 10px; font-weight: 700; color: var(--n6);
  text-transform: uppercase; letter-spacing: .3px; }
.treat-table tbody tr:nth-child(even) { background: var(--n1); }
.treat-table textarea { width: 100%; border: none; background: transparent;
  font-size: 11px; resize: none; font-family: inherit; line-height: 1.5; }
.treat-table input[type=date] { border: none; background: transparent;
  font-size: 11px; font-family: inherit; width: 100%; }
.ses-no { font-weight: 700; color: var(--blue); font-size: 14px;
  text-align: center; vertical-align: middle !important; }

/* ── ADMIN ───────────────────────────────────────────── */
.tab-row { display: flex; gap: 2px; margin-bottom: 20px;
  border-bottom: 2px solid var(--n3); padding-bottom: 0; }
.tab-lnk { display: flex; align-items: center; gap: 6px; padding: 9px 16px;
  background: transparent; color: var(--n5); border: none;
  border-bottom: 2px solid transparent; font-size: 13px; font-weight: 400;
  cursor: pointer; font-family: inherit; margin-bottom: -2px;
  transition: color .15s; }
.tab-lnk.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 700; }
.branch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.branch-card { background: var(--n0); border: 1px solid var(--n3);
  border-radius: var(--radius); padding: 18px;
  border-left: 4px solid var(--blue); }
.branch-card.inactive { border-left-color: var(--n3); }
.branch-card-name { font-size: 14px; font-weight: 700; color: var(--n8); margin-bottom: 10px; }
.branch-meta { font-size: 12px; color: var(--n6); margin-bottom: 3px;
  display: flex; align-items: center; gap: 5px; }

/* ── MODAL ───────────────────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; z-index: 500;
  animation: fadeIn .15s; }
.modal { background: #fff; border-radius: 14px; padding: 28px;
  width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-md); animation: slideUp .2s; }
.modal h3 { font-size: 17px; font-weight: 700; color: var(--n8);
  margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
@keyframes slideUp { from{transform:translateY(14px);opacity:0} to{transform:translateY(0);opacity:1} }

/* ── ALERTS ──────────────────────────────────────────── */
.alert { padding: 10px 14px; border-radius: 7px; font-size: 13px;
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.alert-info { background: var(--sky-l); border: 1px solid var(--sky-b); color: var(--blue); }
.alert-warn { background: var(--amb-l); border: 1px solid #fcd34d; color: var(--amber); }
.alert-success { background: var(--jade-l); border: 1px solid #86efac; color: var(--jade); }

/* ── PDF PRINT ───────────────────────────────────────── */
@media print {
  .no-print { display: none !important; }
  body { background: #fff; font-size: 9pt; }
  .pdf-page { page-break-after: always; }
  .pdf-header table { font-size: 7pt; }
  .pdf-section { page-break-inside: avoid; }
}
.pdf-wrap { max-width: 800px; margin: 0 auto; padding: 20px; font-family: Arial, sans-serif; font-size: 10px; }
.pdf-form-header { border: 1px solid #000; margin-bottom: 2mm; }
.pdf-cell { border: 0.5px solid #000; padding: 1mm 2mm; }
.pdf-sec-hdr { background: #d0d0d0; font-weight: bold; font-size: 7pt;
  text-transform: uppercase; padding: 1mm 2mm; border: 0.5px solid #000; }

/* ── TOASTS ──────────────────────────────────────────── */
#toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 500;
  color: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.2); animation: slideUp .2s;
  display: flex; align-items: center; gap: 8px; max-width: 320px; }
.toast-ok   { background: var(--jade); }
.toast-err  { background: var(--rose); }
.toast-info { background: var(--blue); }

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 768px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .wizard-sidebar { width: 180px; }
  .page-wrap { padding: 16px; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .topbar-nav { display: none; }
}

/* ── MISC ────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--n5); font-size: 11px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mb-16 { margin-bottom: 16px; }
.flex { display: flex; } .items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.hidden { display: none !important; }
.mono { font-family: monospace; }
.fw-bold { font-weight: 700; }
