/* =========================================================
   PROVEXA · Plataforma de Gestión de Proveedores
   Identidad: azul institucional profundo + acento cobalto,
   detalle dorado. Pensado para gobierno corporativo.
   ========================================================= */
:root {
  --navy-950: #071427;
  --navy-900: #0B1D38;
  --navy-800: #12294C;
  --navy-700: #1B3763;
  --brand: #2557D6;
  --brand-600: #1E48B5;
  --brand-50: #EEF3FF;
  --brand-100: #DCE6FF;
  --gold: #C8A04A;

  --bg: #F3F5F9;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --border: #E2E7EF;
  --border-strong: #CBD3DF;
  --text: #0E1A2B;
  --text-2: #3D4B60;
  --muted: #6B7889;

  --good: #0F8A5F;    --good-bg: #E6F6EF;
  --warn: #B26A00;    --warn-bg: #FFF4E0;
  --bad: #C2362F;     --bad-bg: #FDECEB;
  --info: #2557D6;    --info-bg: #EEF3FF;
  --neutral-bg: #EEF1F5;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(14, 26, 43, .06);
  --shadow: 0 4px 16px rgba(14, 26, 43, .08);
  --shadow-lg: 0 18px 48px rgba(7, 20, 39, .22);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --sidebar-w: 264px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -.01em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- LOGIN ---------- */
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(1200px 600px at -10% -10%, #1F4FC4 0%, transparent 55%),
              radial-gradient(900px 600px at 110% 110%, #13305E 0%, transparent 60%),
              var(--navy-950);
  color: #fff;
  padding: 56px 64px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  pointer-events: none;
}
.login-hero > * { position: relative; z-index: 1; }
.login-hero h1 { font-size: 40px; line-height: 1.12; max-width: 520px; margin-top: 18px; font-weight: 700; }
.login-hero h1 em { font-style: normal; color: var(--gold); }
.login-hero p.lead { color: #B9C6DD; font-size: 16px; max-width: 480px; margin-top: 18px; }
.hero-pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 620px; }
.hero-pillars div { border-top: 1px solid rgba(255,255,255,.18); padding-top: 12px; }
.hero-pillars b { display: block; font-family: var(--font-display); font-size: 15px; }
.hero-pillars span { color: #9FB0CC; font-size: 12.5px; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--surface); }
.login-card { width: 100%; max-width: 400px; }
.login-card h2 { font-size: 24px; }
.login-card .sub { color: var(--muted); margin: 6px 0 26px; }
.login-foot { margin-top: 28px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); padding-top: 16px; display: flex; gap: 8px; align-items: flex-start; }

/* ---------- BRAND ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: .14em; }
.brand-tag { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: #8FA2C2; margin-top: -2px; }

/* ---------- SHELL ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-950) 100%);
  color: #C9D4E7;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  border-right: 1px solid #0A1830;
}
.sidebar .brand { padding: 22px 22px 18px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.06); }
.org-chip { margin: 14px 16px 6px; padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); font-size: 12px; }
.org-chip b { display: block; color: #fff; font-size: 13px; }
.nav { flex: 1; overflow-y: auto; padding: 8px 10px 20px; scrollbar-width: thin; scrollbar-color: #2A4370 transparent; }
.nav-group { margin-top: 14px; }
.nav-group-title { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #6F84A8; padding: 6px 12px; }
.nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 8px 12px; border-radius: 8px; color: #C9D4E7; font-size: 13.5px;
  text-decoration: none; position: relative;
}
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: linear-gradient(90deg, rgba(37,87,214,.35), rgba(37,87,214,.12)); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--gold); }
.nav a .count { margin-left: auto; font-size: 11px; background: rgba(255,255,255,.1); padding: 1px 7px; border-radius: 99px; }
.nav a .count.alert { background: #C2362F; color: #fff; }
.sidebar-foot { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.06); font-size: 11.5px; color: #6F84A8; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 64px; position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px; padding: 0 28px;
}
.icon-btn.menu-btn { display: none; }
.crumbs { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs b { color: var(--text); font-weight: 600; }
.search { margin-left: auto; position: relative; width: min(360px, 40vw); }
.search input { width: 100%; height: 38px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 9px; padding: 0 12px 0 36px; outline: none; }
.search input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-100); }
.search > svg { position: absolute; left: 11px; top: 10px; color: var(--muted); }
.search-results { position: absolute; top: 44px; left: 0; right: 0; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); max-height: 360px; overflow: auto; padding: 6px; }
.search-results a { display: block; padding: 8px 10px; border-radius: 7px; color: var(--text); }
.search-results a:hover { background: var(--brand-50); text-decoration: none; }
.search-results small { color: var(--muted); display: block; }
.icon-btn { width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--border); background: #fff; display: grid; place-items: center; cursor: pointer; position: relative; color: var(--text-2); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .dot { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); border: 2px solid #fff; }
.user-btn { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 99px; border: 1px solid var(--border); background: #fff; cursor: pointer; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--navy-800); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; font-family: var(--font-display); flex: none; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.user-btn .meta { text-align: left; line-height: 1.15; }
.user-btn .meta b { font-size: 13px; display: block; }
.user-btn .meta span { font-size: 11px; color: var(--muted); }
.dropdown { position: absolute; right: 28px; top: 58px; width: 300px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 8px; z-index: 40; }
.dropdown .dd-head { padding: 10px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.dropdown button.dd-item, .dropdown a.dd-item { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; text-align: left; color: var(--text); }
.dropdown .dd-item:hover { background: var(--surface-2); text-decoration: none; }
.notif { padding: 10px; border-radius: 8px; display: flex; gap: 10px; }
.notif:hover { background: var(--surface-2); }
.notif p { margin: 0; font-size: 13px; }
.notif small { color: var(--muted); }

.content { padding: 28px; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 700; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 760px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 4px; }

/* ---------- BUTTONS / FORMS ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--border-strong); background: #fff; cursor: pointer; font-weight: 500; white-space: nowrap; color: var(--text); }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(37,87,214,.35); }
.btn.primary:hover { background: var(--brand-600); }
.btn.dark { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.btn.danger { color: var(--bad); border-color: #F1C3C0; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn.block { width: 100%; justify-content: center; height: 44px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .field input:not([type=checkbox]), .field select, .field textarea {
  width: 100%; min-height: 40px; border: 1px solid var(--border-strong); border-radius: 8px; padding: 8px 11px; background: #fff; outline: none;
}
.field textarea { min-height: 84px; resize: vertical; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .span-2 { grid-column: span 2; }
.alert { padding: 11px 13px; border-radius: 9px; font-size: 13px; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; }
.alert.error { background: var(--bad-bg); color: #8E211B; }
.alert.info { background: var(--info-bg); color: #1A3E9C; }
.alert.warn { background: var(--warn-bg); color: #7A4800; }

/* ---------- CARDS / KPIs ---------- */
.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; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 15px; font-weight: 700; }
.card-head p { margin: 0; font-size: 12.5px; color: var(--muted); }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 18px; }
.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.mb { margin-bottom: 18px; }

.kpi { padding: 16px 18px; position: relative; }
.kpi .label { font-size: 12px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.kpi .label svg { width: 16px; height: 16px; color: var(--brand); }
.kpi { min-width: 0; }
.kpi .value { font-family: var(--font-display); font-size: clamp(20px, 1.75vw, 26px); font-weight: 700; margin-top: 6px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.kpi .value small { font-size: .55em; font-weight: 600; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpi.accent .value small { color: #AFC0DD; }
.kpi .delta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi .delta.bad { color: var(--bad); }
.kpi .delta.good { color: var(--good); }
.kpi.accent { background: linear-gradient(135deg, var(--navy-900), var(--navy-700)); color: #fff; border-color: var(--navy-800); }
.kpi.accent .label, .kpi.accent .delta { color: #AFC0DD; }
.kpi.accent .label svg { color: var(--gold); }

/* ---------- TABLE ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.toolbar .input { width: auto; min-height: 34px; padding: 5px 10px; }
.toolbar .search-in { position: relative; }
.toolbar .search-in input { padding-left: 32px; width: 260px; }
.toolbar .search-in svg { position: absolute; left: 9px; top: 8px; width: 16px; height: 16px; color: var(--muted); }
.toolbar .spacer { flex: 1; }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t tbody tr.clickable { cursor: pointer; }
table.t tbody tr.clickable:hover td { background: #F7F9FD; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.t td.center, table.t th.center { text-align: center; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 36px; height: 36px; color: var(--border-strong); margin-bottom: 6px; }
.cell-main { font-weight: 600; }
.cell-sub { font-size: 12px; color: var(--muted); }
.vendor-cell { display: flex; align-items: center; gap: 10px; }
.vlogo { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 800; font-family: var(--font-display); background: var(--brand-50); color: var(--brand-600); border: 1px solid var(--brand-100); flex: none; }

/* ---------- BADGES ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--neutral-bg); color: var(--text-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }
.tag { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); margin: 1px 2px 1px 0; }

/* ---------- TABS ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs button:hover { color: var(--text); }

/* ---------- MODAL / DRAWER / TOAST ---------- */
.overlay { position: fixed; inset: 0; background: rgba(7, 20, 39, .5); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; animation: fade .15s ease; }
.modal { width: 100%; max-width: 640px; background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); animation: rise .18s ease; }
.modal.lg { max-width: 1040px; }
.modal.sm { max-width: 440px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 17px; }
.modal-head .x { margin-left: auto; }
.modal-body { padding: 20px 22px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 14px 14px; }
.modal-foot .left { margin-right: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.toasts { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--navy-900); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13.5px; display: flex; gap: 10px; align-items: center; animation: rise .2s ease; max-width: 380px; }
.toast.error { background: #8E211B; }
.toast.good svg { color: #6EE7B7; }

/* ---------- PIPELINE / STEPPER ---------- */
.stepper { display: flex; gap: 0; overflow-x: auto; padding-bottom: 4px; }
.step { flex: 1; min-width: 92px; text-align: center; position: relative; font-size: 11.5px; color: var(--muted); padding: 0 4px; }
.step .dot { width: 26px; height: 26px; border-radius: 50%; margin: 0 auto 6px; display: grid; place-items: center; background: #fff; border: 2px solid var(--border-strong); font-weight: 700; font-size: 11px; position: relative; z-index: 1; color: var(--muted); }
.step::before { content: ""; position: absolute; top: 12px; left: -50%; right: 50%; height: 2px; background: var(--border-strong); }
.step:first-child::before { display: none; }
.step.done .dot { background: var(--good); border-color: var(--good); color: #fff; }
.step.done::before, .step.current::before { background: var(--good); }
.step.current .dot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px var(--brand-100); }
.step.current { color: var(--text); font-weight: 600; }
.step.clickable { cursor: pointer; }

.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: #EBEFF5; border-radius: 12px; padding: 10px; min-height: 200px; }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 700; font-size: 13px; }
.kcol-head span { margin-left: auto; color: var(--muted); font-weight: 600; font-size: 12px; }
.kcard { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 10px; cursor: pointer; box-shadow: var(--shadow-sm); }
.kcard:hover { border-color: var(--brand); }
.kcard h4 { font-size: 13.5px; font-family: var(--font); font-weight: 600; }
.kcard .meta { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.progress { height: 6px; border-radius: 99px; background: var(--neutral-bg); overflow: hidden; margin-top: 10px; }
.progress > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.progress.good > i { background: var(--good); }
.progress.warn > i { background: var(--warn); }

/* ---------- MATRIX ---------- */
table.matrix td.mcell { text-align: center; padding: 6px; }
.mbox { width: 26px; height: 26px; border-radius: 7px; border: 1.5px solid var(--border-strong); display: inline-grid; place-items: center; cursor: pointer; background: #fff; color: transparent; transition: .12s; }
.mbox:hover { border-color: var(--brand); }
.mbox.on { background: var(--good); border-color: var(--good); color: #fff; }
.mbox.ro { cursor: default; }
.mbox svg { width: 14px; height: 14px; stroke-width: 2.6; }

/* ---------- CHARTS ---------- */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .bar { fill: var(--brand); }
.chart .bar:hover, .chart .bar.hover { fill: var(--navy-700); }
.chart .line { stroke: var(--brand); stroke-width: 2; fill: none; }
.chart .area { fill: var(--brand); opacity: .08; }
.chart .marker { fill: var(--brand); stroke: #fff; stroke-width: 2; }
.chart .val-label { fill: var(--text-2); font-size: 11px; font-weight: 600; font-family: var(--font); }
.chart-tip { position: absolute; pointer-events: none; background: var(--navy-900); color: #fff; font-size: 12px; padding: 6px 9px; border-radius: 7px; white-space: nowrap; transform: translate(-50%, -110%); box-shadow: var(--shadow); z-index: 5; }
.chart-tip b { display: block; font-size: 13px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }
.list .ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--brand-50); color: var(--brand); }
.list .ico.bad { background: var(--bad-bg); color: var(--bad); }
.list .ico.warn { background: var(--warn-bg); color: var(--warn); }
.list .ico.good { background: var(--good-bg); color: var(--good); }
.list .ico svg { width: 16px; height: 16px; }
.list p { margin: 0; font-size: 13.5px; }
.list small { color: var(--muted); font-size: 12px; }

.process-card { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.process-card .num { font-family: var(--font-display); font-weight: 800; font-size: 13px; color: var(--brand); background: var(--brand-50); width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.process-card h3 { font-size: 15px; }
.process-card ol { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13px; }
.process-card ol li { margin: 2px 0; }
.process-card .foot { margin-top: auto; display: flex; gap: 8px; align-items: center; padding-top: 6px; border-top: 1px dashed var(--border); }

.detail-head { display: flex; gap: 16px; align-items: center; }
.detail-head .vlogo { width: 52px; height: 52px; font-size: 16px; border-radius: 12px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.perm-table td.center svg { color: var(--good); }
.perm-table td.center .no { color: var(--border-strong); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.row { display: flex; gap: 8px; align-items: center; }
.mt { margin-top: 14px; }
code.k { font-size: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; }

/* ---------- EXPERIENCIA: MI DÍA, CICLO, SALUD, TOUR ---------- */
.stat-link { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.stat-link:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-1px); }
.stat-link .ico, .tl-item .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); flex: none; }
.stat-link .ico.bad, .tl-item .ico.bad { background: var(--bad-bg); color: var(--bad); }
.stat-link .ico.warn, .tl-item .ico.warn { background: var(--warn-bg); color: var(--warn); }
.tl-item .ico.good { background: var(--good-bg); color: var(--good); }
.tl-item .ico.info { background: var(--info-bg); color: var(--info); }
.stat-link b { display: block; font-family: var(--font-display); font-size: 22px; line-height: 1.1; }
.stat-link span:not(.ico) { font-size: 12.5px; color: var(--muted); }
.task-list li { align-items: center; }
.task-list p { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.task-actions { display: flex; gap: 6px; flex: none; }
.task-list li.group-head { background: var(--surface-2); padding: 9px 18px; }
.task-list li.group-head small { display: block; }
.task-list li.more { justify-content: center; padding: 6px; }
.celebrate { background: linear-gradient(90deg, var(--good-bg), transparent); }
.progress.big { height: 10px; margin-top: 8px; }
.mini-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; margin-top: 14px; }
.mday { border: 1px solid var(--border); border-radius: 9px; padding: 6px 8px; text-align: center; color: var(--text); text-decoration: none; background: var(--surface-2); }
.mday:hover { border-color: var(--brand); text-decoration: none; }
.mday b { display: block; font-family: var(--font-display); font-size: 16px; }
.mday span { font-size: 10.5px; color: var(--muted); }
.mday.done { background: var(--good-bg); border-color: #BFE6D3; }
.mday.overdue { background: var(--bad-bg); border-color: #F3C9C6; }
.mday.today { border: 2px solid var(--brand); }
.clickable-li { cursor: pointer; }
.clickable-li:hover { background: var(--surface-2); }
.month-nav { display: flex; align-items: center; gap: 10px; }
.month-nav b { min-width: 140px; text-align: center; font-family: var(--font-display); }
.month-nav .icon-btn { font-size: 20px; text-decoration: none; color: var(--text); }
.timeline { display: flex; flex-direction: column; gap: 14px; }
.tl-day { display: grid; grid-template-columns: 64px 1fr; gap: 14px; }
.tl-date { background: #fff; border: 1px solid var(--border); border-radius: 12px; text-align: center; padding: 10px 4px; height: fit-content; position: sticky; top: 76px; }
.tl-date b { display: block; font-family: var(--font-display); font-size: 22px; line-height: 1; }
.tl-date span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.tl-date.today { background: var(--brand); border-color: var(--brand); color: #fff; }
.tl-date.today span { color: #DCE6FF; }
.tl-items { display: flex; flex-direction: column; gap: 8px; }
.tl-item { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--border-strong); border-radius: 10px; padding: 12px 14px; }
.tl-item.overdue { border-left-color: var(--bad); }
.tl-item.today, .tl-item.week { border-left-color: var(--brand); }
.tl-item.done { border-left-color: var(--good); background: #FBFDFC; }
.tl-item.done b { color: var(--text-2); }
.tl-item small { color: var(--muted); font-size: 12.5px; }
.health { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; padding: 2px 10px 2px 3px; border-radius: 99px; white-space: nowrap; background: var(--neutral-bg); }
.health b { min-width: 30px; height: 22px; border-radius: 99px; display: grid; place-items: center; color: #fff; font-size: 11.5px; background: var(--muted); }
.health.good { background: var(--good-bg); color: var(--good); } .health.good b { background: var(--good); }
.health.warn { background: var(--warn-bg); color: var(--warn); } .health.warn b { background: var(--warn); }
.health.bad { background: var(--bad-bg); color: var(--bad); } .health.bad b { background: var(--bad); }
.health-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--surface); }
.health-bar span.good { background: var(--good); } .health-bar span.warn { background: #E2A43B; } .health-bar span.bad { background: var(--bad); }
.health-panel { display: flex; gap: 18px; align-items: flex-start; padding: 16px; border-radius: 12px; border: 1px solid var(--border); }
.health-panel.good { background: var(--good-bg); border-color: #BFE6D3; } .health-panel.warn { background: var(--warn-bg); border-color: #F2D9A6; } .health-panel.bad { background: var(--bad-bg); border-color: #F3C9C6; }
.hp-score { text-align: center; min-width: 74px; }
.hp-score b { display: block; font-family: var(--font-display); font-size: 34px; line-height: 1; }
.health-panel.good .hp-score b { color: var(--good); } .health-panel.warn .hp-score b { color: var(--warn); } .health-panel.bad .hp-score b { color: var(--bad); }
.hp-score span { font-size: 11px; color: var(--muted); }
.health-panel ul { margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; }
.health-panel li { margin: 4px 0; display: flex; gap: 8px; align-items: center; }
.onb .onb-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 14px 18px 18px; }
.onb-step { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; }
.onb-step:hover { border-color: var(--brand); text-decoration: none; background: var(--brand-50); }
.onb-step .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-weight: 700; font-size: 12px; flex: none; }
.onb-step b { display: block; font-size: 13px; }
.onb-step small { color: var(--muted); font-size: 11.5px; }
.onb-step.done { opacity: .65; } .onb-step.done .n { background: var(--good); color: #fff; } .onb-step.done b { text-decoration: line-through; }
.onb-step .n svg { width: 14px; height: 14px; }
.modal.tour { max-width: 520px; }
.tour-slide { text-align: center; padding: 18px 8px 4px; }
.tour-ico { width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 16px; display: grid; place-items: center; background: linear-gradient(135deg, var(--navy-900), var(--brand)); color: #fff; box-shadow: 0 10px 24px rgba(37,87,214,.3); }
.tour-ico svg { width: 32px; height: 32px; }
.tour-slide h2 { font-size: 22px; margin: 4px 0 10px; }
.tour-slide p { color: var(--text-2); font-size: 14.5px; max-width: 420px; margin: 0 auto; }
.tour-dots { display: flex; gap: 6px; justify-content: center; margin-top: 22px; }
.tour-dots span { width: 8px; height: 8px; border-radius: 99px; background: var(--border-strong); transition: width .2s; }
.tour-dots span.on { width: 24px; background: var(--brand); }
.num-badge { font-family: var(--font-display); font-weight: 800; color: var(--brand); background: var(--brand-50); width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.help-proc + .help-proc { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.help-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.help-steps li { counter-increment: s; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); font-size: 13px; }
.help-steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; background: var(--navy-800); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; flex: none; }
.email-chip { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 6px; border: 1px solid var(--border); border-radius: 99px; margin: 10px 0 22px; font-size: 13.5px; }
.email-chip .btn { margin-left: auto; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 42px !important; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 6px; }
.pw-eye:hover { color: var(--text); background: var(--surface-2); }
.pw-rules { list-style: none; padding: 0; margin: -6px 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 12.5px; color: var(--muted); }
.pw-rules li { display: flex; gap: 6px; align-items: center; }
.pw-rules svg { width: 14px; height: 14px; stroke-width: 2.4; opacity: .35; }
.pw-rules li.ok { color: var(--good); } .pw-rules li.ok svg { opacity: 1; }

/* ---------- TARIFARIO ---------- */
.seg { display: inline-flex; background: var(--neutral-bg); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); display: inline-flex; gap: 6px; align-items: center; }
.seg button svg { width: 15px; height: 15px; }
.seg button.on { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }
.tarif-wrap { max-height: 64vh; overflow: auto; }
table.tarif { font-size: 12.5px; }
table.tarif th { position: sticky; top: 0; z-index: 2; }
table.tarif .sticky { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 230px; box-shadow: 1px 0 0 var(--border); }
table.tarif th.sticky { z-index: 3; background: var(--surface-2); }
table.tarif td, table.tarif th { padding: 8px 10px; }
table.tarif th.vcol { text-transform: none; letter-spacing: 0; font-size: 11.5px; color: var(--text-2); min-width: 84px; }
table.tarif .imp { display: block; font-size: 10px; color: var(--muted); font-weight: 500; }
table.tarif tbody tr.clickable:hover td.sticky { background: #F7F9FD; }
td.hcell { background: rgba(37, 87, 214, var(--h)); font-variant-numeric: tabular-nums; }
td.hcell.best { background: var(--good-bg); color: var(--good); font-weight: 700; box-shadow: inset 0 0 0 1.5px #9ED8BD; }
.legend { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.legend .lg::before { content: ""; width: 14px; height: 14px; border-radius: 4px; }
.legend .lg.best::before { background: var(--good-bg); box-shadow: inset 0 0 0 1.5px #9ED8BD; }
.legend .lg.heat::before { width: 48px; background: linear-gradient(90deg, rgba(37,87,214,0), rgba(37,87,214,.32)); }
.rankbar { width: 90px; height: 6px; border-radius: 99px; background: var(--neutral-bg); display: inline-block; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.rankbar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.rank-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.rank-row { display: grid; grid-template-columns: 26px 150px 1fr 70px 64px; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 8px; font-size: 13px; }
.rank-row:hover { background: var(--surface-2); }
.rank-row .rk { width: 24px; height: 24px; border-radius: 50%; background: var(--neutral-bg); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.rank-row .bar { height: 10px; background: var(--neutral-bg); border-radius: 99px; overflow: hidden; }
.rank-row .bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.rank-row b { text-align: right; font-variant-numeric: tabular-nums; }
.rank-row .df { font-size: 12px; color: var(--muted); text-align: right; }
.rank-row.best { background: var(--good-bg); }
.rank-row.best .rk { background: var(--good); color: #fff; }
.rank-row.best .bar i { background: var(--good); }
.rank-row.best .df { color: var(--good); font-weight: 700; }
@media (max-width: 900px) { .rank-row { grid-template-columns: 24px 1fr 64px; } .rank-row .bar, .rank-row .df { display: none; } table.tarif .sticky { min-width: 160px; } }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1200px) {
  .g-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: 1fr; }
  .onb .onb-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { padding: 36px 24px; min-height: auto; }
  .login-hero h1 { font-size: 28px; }
  .hero-pillars { display: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w); z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .shell.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .icon-btn.menu-btn { display: grid; }
  .topbar { padding: 0 16px; }
  .content { padding: 18px 16px; }
  .g-2, .g-3 { grid-template-columns: 1fr; }
  .user-btn .meta { display: none; }
  .search { width: auto; flex: 1; }
  .crumbs { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .toolbar .search-in input { width: 100%; }
  .toolbar .search-in { flex: 1; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .onb .onb-steps { grid-template-columns: 1fr; }
  .task-list li, .tl-item { flex-wrap: wrap; }
  .task-actions { width: 100%; justify-content: flex-end; }
  .tl-day { grid-template-columns: 48px 1fr; gap: 10px; }
  .health-panel { flex-direction: column; gap: 8px; }
  .pw-rules { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .g-6, .g-4 { grid-template-columns: 1fr 1fr; }
  .kpi .value { font-size: 21px; }
}
