/* =====================================================================
   ZeroPaper GAD · Tema "Liquid Glass" blanco
   GAD Municipal del Cantón Santa Lucía
   ===================================================================== */
@font-face { font-family: "InterZP"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin-wght-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "InterZP"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/inter-latin-ext-wght-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Tinta y neutros */
  --ink: #111216; --ink-2: #2c2e35; --ink-3: #4a4d57; --muted: #737784; --faint: #a3a6b0;
  --line: rgba(17,18,22,.08); --line-2: rgba(17,18,22,.05);
  /* Semánticos (solo puntos y acentos pequeños) */
  --ok: #2f8a5b; --warn: #c58716; --bad: #d1453b; --info: #5b5f6b;
  /* Compatibilidad con estilos inline existentes */
  --navy: var(--ink); --navy-2: var(--ink-2); --teal: var(--ink); --teal-2: var(--ink-2); --green: var(--ok); --amber: var(--warn); --red: var(--bad); --blue: var(--ink);
  /* Vidrio */
  --glass: rgba(255,255,255,.56);
  --glass-2: rgba(255,255,255,.72);
  --glass-3: rgba(255,255,255,.88);
  --glass-edge: rgba(255,255,255,.95);
  --glass-blur: blur(28px) saturate(185%);
  --glass-shadow: 0 1px 0 rgba(255,255,255,.95) inset, 0 -1px 0 rgba(17,18,22,.035) inset, 0 0 0 1px rgba(255,255,255,.55) inset, 0 1px 2px rgba(17,18,22,.04), 0 10px 34px -6px rgba(17,18,22,.10);
  --glass-shadow-lg: 0 1px 0 rgba(255,255,255,.95) inset, 0 0 0 1px rgba(255,255,255,.6) inset, 0 2px 6px rgba(17,18,22,.05), 0 30px 80px -12px rgba(17,18,22,.22);
  --sheen: linear-gradient(155deg, rgba(255,255,255,.80) 0%, rgba(255,255,255,.42) 38%, rgba(255,255,255,.30) 62%, rgba(255,255,255,.55) 100%);
  --sidebar-w: 276px;
  --radius: 22px; --radius-sm: 14px; --radius-xs: 10px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "InterZP", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px; line-height: 1.45; color: var(--ink); -webkit-font-smoothing: antialiased;
  background: #f3f3f5;
  background-image:
    radial-gradient(1100px 700px at 8% -10%, #ffffff 0%, rgba(255,255,255,0) 60%),
    radial-gradient(900px 620px at 105% 8%, #e9e9ee 0%, rgba(233,233,238,0) 62%),
    radial-gradient(800px 700px at 70% 110%, #ebe7e0 0%, rgba(235,231,224,0) 60%),
    linear-gradient(180deg, #f7f7f9 0%, #efeff2 100%);
  background-attachment: fixed;
}
/* Orbes de luz que el vidrio refracta */
body::before, body::after { content: ""; position: fixed; z-index: -1; border-radius: 50%; filter: blur(70px); pointer-events: none; opacity: .9; }
body::before { width: 620px; height: 620px; left: 22%; top: 8%; background: radial-gradient(circle at 30% 30%, #ffffff, #dcdde3 55%, rgba(220,221,227,0) 72%); animation: drift1 26s var(--ease) infinite alternate; }
body::after { width: 560px; height: 560px; right: 4%; bottom: -6%; background: radial-gradient(circle at 60% 40%, #f3eee6, #e2dcd2 50%, rgba(226,220,210,0) 72%); animation: drift2 32s var(--ease) infinite alternate; }
@keyframes drift1 { to { transform: translate(120px, 80px) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-140px, -60px) scale(.92); } }
@media (prefers-reduced-motion: reduce) { body::before, body::after { animation: none; } * { transition: none !important; } }

a { color: var(--ink); text-decoration: none; font-weight: 550; text-decoration-color: rgba(17,18,22,.25); text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(17,18,22,.14); }
h1, h2, h3 { margin: 0 0 8px; font-weight: 650; letter-spacing: -.022em; color: var(--ink); }
h1 { font-size: 26px; line-height: 1.15; letter-spacing: -.03em; }
h2 { font-size: 15.5px; }
h3 { font-size: 13.5px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 11.5px; letter-spacing: -.01em; }
.hidden { display: none !important; }
.svg-ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* ---------- Superficie de vidrio reutilizable ---------- */
.glass, .card, .kpi, .sidebar, .topbar, .modal, .drop, .login-card, .filters, .tabs, .toast {
  background: var(--sheen), var(--glass);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow);
}

/* =====================================================================
   LOGIN
   ===================================================================== */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 40px; padding: 40px clamp(24px, 6vw, 96px); position: relative; overflow: hidden; }
.login-wrap .watermark { position: fixed; right: -120px; bottom: -140px; width: 640px; height: 640px; opacity: .06; filter: grayscale(1); pointer-events: none; z-index: -1; object-fit: contain; }
.login-left { color: var(--ink); display: flex; flex-direction: column; gap: 28px; max-width: 640px; }
.login-left .hero-logo { display: flex; align-items: center; gap: 20px; }
.login-left .hero-logo .logo-gad { width: 96px; height: 96px; border-radius: 28px; padding: 10px; }
.login-left .hero-logo b { display: block; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.login-left .hero-logo strong { display: block; font-size: 22px; letter-spacing: -.02em; line-height: 1.2; margin-top: 2px; }
.login-left .hero-logo span { display: block; font-size: 14px; color: var(--ink-3); font-style: italic; margin-top: 4px; }
.login-left h1 { font-size: clamp(34px, 3.6vw, 52px); line-height: 1.04; letter-spacing: -.045em; font-weight: 700; margin: 0; }
.login-left h1 em { font-style: normal; color: var(--faint); }
.login-left p { color: var(--ink-3); max-width: 540px; font-size: 15.5px; line-height: 1.6; margin: 0; }
.login-feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 580px; }
.login-feats > div { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; font-size: 13px; color: var(--ink-3); line-height: 1.4; }
.login-feats > div b { display: block; color: var(--ink); font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.login-feats .ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; background: linear-gradient(180deg, #2b2e35, #111216); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 4px 10px rgba(17,18,22,.2); }
.login-left .vendor { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.login-right { display: flex; align-items: center; justify-content: center; }
.login-card { width: 100%; max-width: 420px; border-radius: 32px; padding: 34px 34px 28px; box-shadow: var(--glass-shadow-lg); background: var(--sheen), var(--glass-2); }
.login-card .inst { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; margin-bottom: 22px; }
.login-card .inst .logo-gad { width: 74px; height: 74px; border-radius: 22px; padding: 6px; }
.login-card .inst b { display: block; font-size: 15px; letter-spacing: -.01em; }
.login-card .inst span { font-size: 12.5px; color: var(--muted); }
.login-card h2 { font-size: 22px; letter-spacing: -.03em; text-align: center; margin-bottom: 4px; }
.login-card .sub { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.login-card .btn.primary { width: 100%; justify-content: center; padding: 13px; font-size: 14.5px; border-radius: 16px; }
.login-card .secure { display: flex; gap: 10px; align-items: flex-start; margin-top: 18px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.9); font-size: 11.8px; color: var(--muted); line-height: 1.5; }
.login-card .secure .svg-ico { color: var(--ink-3); margin-top: 1px; }
@media (max-width: 980px) { .login-wrap { grid-template-columns: 1fr; } .login-feats { grid-template-columns: 1fr; } }

/* =====================================================================
   LAYOUT
   ===================================================================== */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; gap: 0; }
.sidebar { position: sticky; top: 14px; margin: 14px 0 14px 14px; height: calc(100vh - 28px); border-radius: 28px; display: flex; flex-direction: column; overflow: hidden; color: var(--ink-2); z-index: 6; }
.sidebar .brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 16px; position: relative; }
.sidebar .brand::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }
.sidebar .brand .logo-gad { width: 48px; height: 48px; border-radius: 15px; padding: 4px; }
.sidebar .brand b { color: var(--ink); font-size: 14px; display: block; letter-spacing: -.015em; line-height: 1.2; }
.sidebar .brand span { font-size: 11.5px; color: var(--muted); display: block; margin-top: 2px; }
.sidebar nav { padding: 10px 12px; overflow-y: auto; flex: 1; scrollbar-width: thin; scrollbar-color: rgba(17,18,22,.12) transparent; }
.sidebar .sec { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); padding: 16px 12px 6px; font-weight: 650; }
.sidebar a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 13px; color: var(--ink-3); font-size: 13.5px; font-weight: 520; text-decoration: none; transition: background .25s var(--ease), color .2s, box-shadow .25s var(--ease), transform .2s var(--ease); position: relative; }
.sidebar a:hover { background: rgba(255,255,255,.6); color: var(--ink); }
.sidebar a:active { transform: scale(.98); }
.sidebar a.active { color: var(--ink); font-weight: 620; background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.78)); box-shadow: 0 1px 0 #fff inset, 0 0 0 1px rgba(17,18,22,.05), 0 6px 16px -4px rgba(17,18,22,.16); }
.sidebar a.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ink); }
.sidebar a .ico { width: 20px; display: grid; place-items: center; color: inherit; opacity: .85; }
.sidebar a.active .ico { opacity: 1; }
.sidebar a .badge { margin-left: auto; }
.sidebar .user { margin: 10px; padding: 12px; border-radius: 20px; background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.95); box-shadow: 0 1px 0 #fff inset, 0 4px 14px -6px rgba(17,18,22,.12); display: grid; grid-template-columns: auto 1fr auto auto; gap: 6px 8px; align-items: center; font-size: 11.5px; color: var(--muted); }
.sidebar .user b { display: block; color: var(--ink); font-size: 13px; font-weight: 620; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .user .u-meta { min-width: 0; line-height: 1.35; }
.sidebar .user .u-meta span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: 13px; color: #fff; background: linear-gradient(160deg, #3a3d45, #111216); box-shadow: 0 1px 0 rgba(255,255,255,.3) inset, 0 4px 10px rgba(17,18,22,.22); letter-spacing: .02em; flex: none; }
.icon-btn { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.95); background: rgba(255,255,255,.6); cursor: pointer; color: var(--ink-3); transition: all .2s var(--ease); box-shadow: 0 1px 0 #fff inset, 0 2px 6px rgba(17,18,22,.06); }
.icon-btn:hover { color: var(--ink); background: #fff; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 14px; z-index: 5; display: flex; align-items: center; gap: 14px; margin: 14px 14px 0 14px; padding: 10px 12px 10px 20px; border-radius: 22px; }
.topbar .inst { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar .inst .logo-gad { width: 38px; height: 38px; border-radius: 12px; padding: 3px; }
.topbar .inst b { font-size: 13.5px; color: var(--ink); display: block; letter-spacing: -.01em; white-space: nowrap; }
.topbar .inst span { font-size: 11.5px; color: var(--muted); font-style: italic; }
.topbar .spacer { flex: 1; }
.topbar .search { width: min(420px, 38vw); position: relative; }
.topbar .search .svg-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.topbar .search input { width: 100%; padding: 10px 64px 10px 40px; border-radius: 14px; border: 1px solid rgba(17,18,22,.06); background: rgba(255,255,255,.62); box-shadow: 0 1px 2px rgba(17,18,22,.04) inset; outline: none; transition: all .25s var(--ease); }
.topbar .search input:focus { background: #fff; box-shadow: 0 0 0 4px rgba(17,18,22,.06); border-color: rgba(17,18,22,.14); }
.topbar .search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font: 600 10.5px/1 "InterZP", sans-serif; color: var(--faint); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; background: rgba(255,255,255,.7); }
.topbar .clock { font-size: 12px; color: var(--muted); text-align: right; line-height: 1.25; white-space: nowrap; }
.topbar .clock b { display: block; color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.content { padding: 26px 28px 56px; animation: rise .45s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .grow { flex: 1; min-width: 280px; }
.page-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-head .muted { font-size: 13.5px; max-width: 860px; margin-top: 2px; }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.crumbs a { color: var(--muted); font-weight: 520; }
.crumbs a:hover { color: var(--ink); }

/* =====================================================================
   COMPONENTES
   ===================================================================== */
.card { border-radius: var(--radius); padding: 20px 22px; position: relative; }
.card + .card { margin-top: 16px; }
.card h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.card h2 .svg-ico { color: var(--ink-3); }
.card .card { background: rgba(255,255,255,.5); box-shadow: 0 1px 0 #fff inset, 0 1px 3px rgba(17,18,22,.04); -webkit-backdrop-filter: none; backdrop-filter: none; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-2-1, .g-1-2 { grid-template-columns: 1fr; } }

/* KPI */
.kpi { border-radius: var(--radius); padding: 18px 20px 16px; position: relative; overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--glass-shadow-lg); }
.kpi .k-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.kpi .k-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.75); border: 1px solid #fff; color: var(--ink-2); box-shadow: 0 1px 0 #fff inset, 0 3px 8px -2px rgba(17,18,22,.12); }
.kpi .k-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); box-shadow: 0 0 0 4px rgba(163,166,176,.15); }
.kpi.good .k-dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(47,138,91,.14); }
.kpi.warn .k-dot { background: var(--warn); box-shadow: 0 0 0 4px rgba(197,135,22,.15); }
.kpi.bad .k-dot { background: var(--bad); box-shadow: 0 0 0 4px rgba(209,69,59,.15); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(209,69,59,.05); } }
.kpi .v { font-size: 34px; font-weight: 680; color: var(--ink); line-height: 1; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.4; }
.kpi .l b { color: var(--ink-2); font-weight: 600; }
.kpi.dark { background: linear-gradient(160deg, rgba(45,47,54,.92), rgba(17,18,22,.94)); border-color: rgba(255,255,255,.14); box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 18px 40px -12px rgba(17,18,22,.45); }
.kpi.dark .v { color: #fff; } .kpi.dark .l { color: rgba(255,255,255,.62); } .kpi.dark .l b { color: #fff; }
.kpi.dark .k-ic { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.16); color: #fff; box-shadow: none; }

/* Botones */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: 13px; border: 1px solid rgba(255,255,255,.95); background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.62)); color: var(--ink); cursor: pointer; font-size: 13px; font-weight: 580; letter-spacing: -.005em; text-decoration: none !important; white-space: nowrap;
  box-shadow: 0 1px 0 #fff inset, 0 0 0 1px rgba(17,18,22,.06), 0 2px 6px -1px rgba(17,18,22,.08); -webkit-backdrop-filter: blur(14px) saturate(170%); backdrop-filter: blur(14px) saturate(170%); transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .25s; }
.btn:hover { background: #fff; box-shadow: 0 1px 0 #fff inset, 0 0 0 1px rgba(17,18,22,.08), 0 8px 18px -6px rgba(17,18,22,.18); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn .svg-ico { width: 16px; height: 16px; }
.btn.primary, .btn.navy { color: #fff; border-color: rgba(255,255,255,.12); background: linear-gradient(180deg, #34373f 0%, #16171b 100%); box-shadow: 0 1px 0 rgba(255,255,255,.22) inset, 0 0 0 1px rgba(17,18,22,.9), 0 8px 20px -8px rgba(17,18,22,.55); }
.btn.primary:hover, .btn.navy:hover { background: linear-gradient(180deg, #41444d 0%, #1d1e23 100%); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: #fff6f5; }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 10px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Badges: píldora de vidrio con punto semántico */
.badge { --dot: var(--faint); display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: -.005em; color: var(--ink-2); white-space: nowrap; background: rgba(255,255,255,.78); border: 1px solid rgba(255,255,255,.95); box-shadow: 0 0 0 1px rgba(17,18,22,.07), 0 1px 0 #fff inset; vertical-align: middle; line-height: 1.5; text-decoration: none !important; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--dot); flex: none; }
h1 .badge { font-size: 12px; letter-spacing: 0; }
.badge.pendiente, .badge.abierto, .badge.borrador { --dot: #8b8f9b; }
.badge.en_proceso, .badge.en_tramite, .badge.interno { --dot: var(--warn); }
.badge.atendido, .badge.formalizado, .badge.firmado, .badge.verificado, .badge.ok, .badge.adjudicado, .badge.publico { --dot: var(--ok); }
.badge.finalizado, .badge.archivado { --dot: var(--ink-2); }
.badge.vencido, .badge.error, .badge.denegado, .badge.fallido, .badge.bloqueado, .badge.confidencial, .badge.anulado, .badge.alerta { --dot: var(--bad); color: #a3271f; }
.badge.vencido { background: rgba(255,240,238,.9); }
.badge.teal { --dot: var(--ink); color: #fff; background: linear-gradient(180deg, #34373f, #16171b); border-color: rgba(255,255,255,.1); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset; }
.badge.teal::before { background: #fff; }
.badge.firmado::before { content: ""; }

/* Tablas */
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
table.tbl th { text-align: left; font-size: 10.8px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--line); background: transparent; position: sticky; top: 0; }
table.tbl td { padding: 12px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; transition: background .2s; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover td { background: rgba(255,255,255,.66); }
table.tbl tbody tr:hover td:first-child { border-radius: 12px 0 0 12px; } table.tbl tbody tr:hover td:last-child { border-radius: 0 12px 12px 0; }
table.tbl tr.click { cursor: pointer; }
table.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl td a { font-weight: 620; }
.tbl-wrap { overflow: auto; margin: 0 -8px; padding: 0 8px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty::before { content: ""; display: block; width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 14px; background: rgba(255,255,255,.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3a6b0' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 12h-6l-2 3h-4l-2-3H2'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") center/22px no-repeat; box-shadow: 0 0 0 1px var(--line), 0 1px 0 #fff inset; }
.loading { padding: 60px 20px; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 2.5px solid rgba(17,18,22,.1); border-top-color: var(--ink); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Formularios */
.form { display: grid; gap: 14px; }
.form .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form .row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 11.8px; font-weight: 620; color: var(--ink-3); letter-spacing: -.005em; }
.field input, .field select, .field textarea, .filters input, .filters select {
  padding: 10px 12px; border: 1px solid rgba(17,18,22,.08); border-radius: 12px; background: rgba(255,255,255,.7); width: 100%; outline: none;
  box-shadow: 0 1px 2px rgba(17,18,22,.04) inset; transition: border-color .2s, box-shadow .25s var(--ease), background .2s; }
.field input:hover, .field select:hover, .field textarea:hover { background: rgba(255,255,255,.9); }
.field input:focus, .field select:focus, .field textarea:focus { background: #fff; border-color: rgba(17,18,22,.28); box-shadow: 0 0 0 4px rgba(17,18,22,.07); }
.field input:disabled { opacity: .6; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737784' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; background-size: 15px; }
.field textarea { min-height: 84px; resize: vertical; }
.field input[type=file] { padding: 8px; }
input[type=file]::file-selector-button { border: none; border-radius: 9px; padding: 6px 12px; margin-right: 10px; background: linear-gradient(180deg, #34373f, #16171b); color: #fff; font-weight: 600; cursor: pointer; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; padding: 14px; border-radius: var(--radius); }
.filters .field { min-width: 150px; flex: 0 1 auto; }
.filters .field.wide { min-width: 260px; flex: 1; }
.filters input, .filters select { padding: 9px 11px; }

/* Pestañas: control segmentado de vidrio */
.tabs { display: inline-flex; gap: 4px; padding: 5px; border-radius: 16px; margin-bottom: 16px; flex-wrap: wrap; max-width: 100%; }
.tabs button { background: none; border: none; padding: 8px 16px; cursor: pointer; color: var(--muted); font-weight: 580; border-radius: 11px; font-size: 13px; transition: all .25s var(--ease); }
.tabs button:hover { color: var(--ink); }
.tabs button.active { color: var(--ink); background: linear-gradient(180deg, #fff, rgba(255,255,255,.85)); box-shadow: 0 1px 0 #fff inset, 0 0 0 1px rgba(17,18,22,.05), 0 4px 12px -4px rgba(17,18,22,.18); }

/* Toasts */
.toast-wrap { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 100; }
.toast { color: var(--ink); padding: 12px 16px 12px 14px; border-radius: 16px; font-size: 13px; max-width: 440px; display: flex; gap: 10px; align-items: flex-start; box-shadow: var(--glass-shadow-lg); background: var(--sheen), var(--glass-3); animation: toastIn .4s var(--ease); font-weight: 520; }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; margin-top: 5px; }
.toast.ok::before { background: var(--ok); } .toast.err::before { background: var(--bad); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.97); } }

/* Modales */
.modal-bg { position: fixed; inset: 0; background: rgba(240,240,243,.35); -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { border-radius: 28px; width: 100%; max-width: 660px; max-height: 92vh; overflow: auto; box-shadow: var(--glass-shadow-lg); background: var(--sheen), rgba(255,255,255,.82); animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.modal.wide { max-width: 1000px; }
.modal .mh { display: flex; align-items: center; padding: 20px 24px 12px; }
.modal .mh h2 { flex: 1; font-size: 18px; margin: 0; letter-spacing: -.025em; }
.modal .mb { padding: 8px 24px 20px; }
.modal .mf { padding: 14px 24px 20px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line-2); }
.x { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255,255,255,.95); background: rgba(255,255,255,.7); font-size: 18px; line-height: 1; cursor: pointer; color: var(--muted); box-shadow: 0 0 0 1px var(--line); transition: all .2s; }
.x:hover { color: var(--ink); background: #fff; }

/* Línea de tiempo (hoja de ruta / trazabilidad) */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, rgba(17,18,22,.22), rgba(17,18,22,.04)); }
.tl { position: relative; padding: 0 0 18px; }
.tl:last-child { padding-bottom: 0; }
.tl::before { content: ""; position: absolute; left: -23px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(17,18,22,.18), 0 2px 6px rgba(17,18,22,.2); }
.tl.gray::before { background: var(--faint); }
.tl.red::before { background: var(--bad); }
.tl .t { font-size: 11.5px; color: var(--muted); }
.tl .d { font-weight: 620; margin: 2px 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Pasos de fases (contratación) */
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin: 2px 0 20px; }
.step { padding: 12px 12px; border-radius: 16px; color: var(--muted); font-size: 12.5px; font-weight: 620; text-align: left; position: relative; background: rgba(255,255,255,.45); border: 1px solid rgba(255,255,255,.9); box-shadow: 0 0 0 1px var(--line-2); }
.step::before { content: ""; display: block; height: 4px; border-radius: 4px; background: rgba(17,18,22,.08); margin-bottom: 10px; }
.step.done { color: var(--ink-2); background: rgba(255,255,255,.75); }
.step.done::before { background: linear-gradient(90deg, var(--ink-3), var(--ink)); }
.step.cur { color: #fff; background: linear-gradient(160deg, #34373f, #111216); border-color: rgba(255,255,255,.15); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 12px 28px -10px rgba(17,18,22,.55); }
.step.cur::before { background: linear-gradient(90deg, #fff 50%, rgba(255,255,255,.25) 50%); }
.step small { display: block; font-weight: 500; font-size: 11px; margin-top: 3px; opacity: .8; }

/* Checklist */
.check { display: flex; align-items: center; gap: 10px; padding: 10px 6px; border-bottom: 1px solid var(--line-2); }
.check:last-child { border-bottom: none; }
.check .dot { width: 18px; height: 18px; border-radius: 50%; flex: none; display: grid; place-items: center; background: rgba(255,255,255,.8); box-shadow: 0 0 0 1.5px rgba(17,18,22,.15) inset; }
.check.ok .dot { background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat; box-shadow: 0 2px 6px rgba(17,18,22,.25); }
.check.req .dot { box-shadow: 0 0 0 1.5px var(--bad) inset; }
.check.opt .dot { box-shadow: 0 0 0 1.5px rgba(17,18,22,.2) inset; background: repeating-linear-gradient(45deg, transparent 0 3px, rgba(17,18,22,.06) 3px 5px); }
.check .n { flex: 1; }

/* Listas de definición */
.dl { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 9px 14px; font-size: 13px; }
.dl dt { color: var(--muted); font-size: 12.5px; }
.dl dd { margin: 0; font-weight: 520; overflow-wrap: anywhere; }

.viewer { width: 100%; height: 74vh; border-radius: var(--radius); border: 1px solid rgba(255,255,255,.95); background: rgba(255,255,255,.6); box-shadow: var(--glass-shadow); }

/* Barras de progreso y gráficos */
.bar { height: 8px; border-radius: 8px; background: rgba(17,18,22,.06); overflow: hidden; box-shadow: 0 1px 2px rgba(17,18,22,.06) inset; }
.bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #5a5e69, #111216); transition: width .8s var(--ease); }
.chart-bars { display: flex; align-items: flex-end; justify-content: space-around; gap: 14px; height: 170px; padding: 22px 6px 0; border-bottom: 1px solid var(--line); position: relative;
  background-image: linear-gradient(to top, var(--line-2) 1px, transparent 1px); background-size: 100% 25%; }
.chart-bars div { flex: 1; max-width: 64px; border-radius: 12px 12px 4px 4px; position: relative; min-height: 3px; background: linear-gradient(180deg, #4a4d57 0%, #111216 100%); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 8px 20px -8px rgba(17,18,22,.5); transition: height .8s var(--ease); }
.chart-bars div span { position: absolute; bottom: -22px; left: -20px; right: -20px; text-align: center; font-size: 11px; color: var(--muted); }
.chart-bars div b { position: absolute; top: -20px; left: -10px; right: -10px; text-align: center; font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Alertas */
.alert { padding: 12px 14px; border-radius: 16px; font-size: 13px; line-height: 1.5; background: rgba(255,255,255,.62); border: 1px solid rgba(255,255,255,.95); box-shadow: 0 0 0 1px var(--line), 0 1px 0 #fff inset; color: var(--ink-2); position: relative; padding-left: 38px; }
.alert::before { content: ""; position: absolute; left: 14px; top: 15px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); box-shadow: 0 0 0 4px rgba(17,18,22,.06); }
.alert.warn::before { background: var(--warn); box-shadow: 0 0 0 4px rgba(197,135,22,.14); }
.alert.ok::before { background: var(--ok); box-shadow: 0 0 0 4px rgba(47,138,91,.14); }
.alert.err { color: #8f2219; background: rgba(255,246,245,.8); }
.alert.err::before { background: var(--bad); box-shadow: 0 0 0 4px rgba(209,69,59,.14); }
.alert.small { font-size: 12px; }

/* Notificaciones */
.notif-dot { position: absolute; top: -5px; right: -5px; background: var(--bad) !important; color: #fff !important; font-size: 10px; border-radius: 999px; padding: 1px 6px !important; border: 2px solid #fff !important; box-shadow: 0 2px 6px rgba(209,69,59,.4) !important; }
.notif-dot::before { display: none; }
.rel { position: relative; }
.drop { position: absolute; right: 0; top: 48px; width: 420px; border-radius: 22px; z-index: 20; max-height: 480px; overflow: auto; box-shadow: var(--glass-shadow-lg); background: var(--sheen), rgba(255,255,255,.86); padding: 8px; animation: pop .3s var(--ease); }
.drop .it { padding: 11px 12px; border-radius: 14px; font-size: 12.5px; line-height: 1.5; }
.drop .it + .it { margin-top: 2px; }
.drop .it:hover { background: rgba(255,255,255,.7); }
.drop .it b { display: block; }
.drop .it.alerta-box { background: rgba(255,248,236,.85); box-shadow: 0 0 0 1px rgba(197,135,22,.18); }

/* Matriz de permisos */
.perm-grid { display: grid; font-size: 12px; overflow: auto; }
.perm-grid > div { padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
.perm-grid .h { font-weight: 650; position: sticky; top: 0; background: rgba(255,255,255,.6); }

.code { background: linear-gradient(160deg, #24262c, #111216); color: #e6e7ea; padding: 16px 18px; border-radius: 16px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; overflow: auto; white-space: pre; line-height: 1.65; box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 12px 30px -12px rgba(17,18,22,.5); }

/* Marca institucional */
.logo-gad { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; flex: none; background: linear-gradient(180deg, #fff, rgba(255,255,255,.82)); border: 1px solid #fff; box-shadow: 0 1px 0 #fff inset, 0 0 0 1px rgba(17,18,22,.05), 0 6px 18px -6px rgba(17,18,22,.22); }
.logo-gad img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.zp-mark { width: 34px; height: 34px; border-radius: 11px; background: linear-gradient(160deg, #3a3d45, #111216); display: grid; place-items: center; color: #fff; font-weight: 750; font-size: 12.5px; letter-spacing: -.02em; box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 4px 10px rgba(17,18,22,.25); flex: none; }

.dropzone { border: 1.5px dashed rgba(17,18,22,.18); border-radius: 18px; padding: 26px 18px; text-align: center; color: var(--muted); background: rgba(255,255,255,.5); transition: all .25s var(--ease); }
.dropzone.over { border-color: var(--ink); background: rgba(255,255,255,.9); transform: scale(1.01); }
.dropzone label { color: var(--ink) !important; font-weight: 650; text-decoration: underline; }
.kv { font-size: 12px; color: var(--muted); }
.tag { display: inline-block; font-size: 10.5px; font-weight: 650; letter-spacing: .02em; color: var(--ink-3); background: rgba(255,255,255,.75); border: 1px solid #fff; box-shadow: 0 0 0 1px var(--line); padding: 1px 7px; border-radius: 6px; margin-right: 5px; }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.list-row { padding: 9px 2px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.list-row:last-child { border-bottom: none; }

/* Panel de bienvenida del tablero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 26px 28px; border-radius: 28px; margin-bottom: 16px; overflow: hidden; position: relative; }
.hero h1 { font-size: 30px; margin-bottom: 6px; }
.hero .muted { font-size: 13.5px; }
.hero .hero-mark { position: absolute; right: -40px; top: 50%; transform: translateY(-50%); width: 300px; height: 300px; opacity: .07; filter: grayscale(1); pointer-events: none; object-fit: contain; }
.hero .btn-row { position: relative; }
.section-title { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 650; margin: 26px 2px 10px; }

/* Barra de dependencia */
.dep-row { margin: 10px 0; }
.dep-row .top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; color: var(--ink-3); }
.dep-row .top b { color: var(--ink); font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: relative; top: 0; height: auto; margin: 12px; }
  .sidebar nav { max-height: 40vh; }
  .topbar { margin: 0 12px; top: 8px; flex-wrap: wrap; }
  .topbar .search { width: 100%; order: 5; }
  .topbar .clock { display: none; }
  .content { padding: 20px 14px 40px; }
  .form .row, .form .row3 { grid-template-columns: 1fr; }
}

@media print {
  body { background: #fff; } body::before, body::after { display: none; }
  .sidebar, .topbar, .btn, .filters, .tabs, .toast-wrap { display: none !important; }
  .app { grid-template-columns: 1fr; }
  .card, .kpi { box-shadow: none; border: 1px solid #ddd; backdrop-filter: none; background: #fff; }
}

/* ---- Ajustes finos ---- */
.logo-gad img { height: 86% !important; max-height: 86%; width: auto !important; }
.g-form { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
@media (max-width: 1180px) { .g-form { grid-template-columns: 1fr; } }
table.tbl td .btn-row { flex-wrap: nowrap; justify-content: flex-end; }
.badge.teal { color: var(--ink); background: rgba(255,255,255,.9); border-color: #fff; box-shadow: 0 0 0 1px rgba(17,18,22,.22), 0 1px 0 #fff inset; }
.badge.teal::before { background: var(--ink); }
.topbar .inst img { height: 46px !important; }

/* =====================================================================
   TABLA DE DATOS (búsqueda + paginación + exportación)
   ===================================================================== */
.dgrid { display: flex; flex-direction: column; gap: 6px; }
.dg-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.dg-bar .grow, .pager .grow { flex: 1; }
.dg-search { position: relative; flex: 0 1 380px; min-width: 220px; }
.dg-search .svg-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 16px; height: 16px; pointer-events: none; }
.dg-search input { width: 100%; padding: 9px 12px 9px 36px; border-radius: 12px; border: 1px solid rgba(17,18,22,.08); background: rgba(255,255,255,.75); outline: none; box-shadow: 0 1px 2px rgba(17,18,22,.04) inset; transition: all .2s var(--ease); }
.dg-search input:focus { background: #fff; border-color: rgba(17,18,22,.25); box-shadow: 0 0 0 4px rgba(17,18,22,.06); }
.dg-count { font-size: 12px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
tr.pg-off { display: none; }
.pager { display: flex; align-items: center; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line-2); margin-top: 4px; flex-wrap: wrap; }
.pg-btn { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 10px; border: 1px solid rgba(255,255,255,.95); background: rgba(255,255,255,.7); box-shadow: 0 0 0 1px var(--line), 0 1px 0 #fff inset; cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--ink-3); transition: all .2s var(--ease); font-variant-numeric: tabular-nums; }
.pg-btn:hover:not(:disabled) { background: #fff; color: var(--ink); }
.pg-btn.on { color: #fff; background: linear-gradient(180deg, #34373f, #16171b); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 4px 10px -4px rgba(17,18,22,.5); }
.pg-btn:disabled { opacity: .35; cursor: default; }
.pg-gap { color: var(--faint); padding: 0 2px; }
.pg-size { padding: 6px 28px 6px 10px; border-radius: 10px; border: 1px solid rgba(17,18,22,.08); background: rgba(255,255,255,.75) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737784' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 8px center/13px no-repeat; appearance: none; -webkit-appearance: none; font-size: 12px; font-weight: 600; color: var(--ink-3); cursor: pointer; margin-right: 6px; }
th.acc, td.acc { text-align: right; width: 1%; white-space: nowrap; }
.acts { display: inline-flex; gap: 4px; justify-content: flex-end; }
.act { width: 32px; height: 32px; border-radius: 10px; display: inline-grid; place-items: center; border: 1px solid rgba(255,255,255,.95); background: rgba(255,255,255,.72); box-shadow: 0 0 0 1px var(--line), 0 1px 0 #fff inset; color: var(--ink-3); cursor: pointer; transition: all .2s var(--ease); text-decoration: none !important; }
.act .svg-ico { width: 16px; height: 16px; }
.act:hover { color: var(--ink); background: #fff; box-shadow: 0 0 0 1px rgba(17,18,22,.12), 0 6px 14px -6px rgba(17,18,22,.3); transform: translateY(-1px); }
.act.danger { color: var(--bad); }
.act.danger:hover { background: #fff6f5; }
.list-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.list-head h2 { margin: 0; }

/* =====================================================================
   SELECT CON BUSCADOR (estilo ng-select)
   ===================================================================== */
.ss { position: relative; width: 100%; }
.ss > select { position: absolute !important; left: 50%; bottom: 0; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; padding: 0 !important; border: 0 !important; }
.ss-btn { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; padding: 10px 12px; border: 1px solid rgba(17,18,22,.08); border-radius: 12px; background: rgba(255,255,255,.7); box-shadow: 0 1px 2px rgba(17,18,22,.04) inset; cursor: pointer; transition: border-color .2s, box-shadow .25s var(--ease), background .2s; min-height: 41px; color: var(--ink); }
.filters .ss-btn { padding: 9px 11px; min-height: 39px; }
.ss-btn span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-btn span.ph { color: var(--muted); }
.ss-btn:hover { background: rgba(255,255,255,.92); }
.ss-btn:focus-visible, .ss-btn.open { outline: none; background: #fff; border-color: rgba(17,18,22,.28); box-shadow: 0 0 0 4px rgba(17,18,22,.07); }
.ss-btn:disabled { opacity: .6; cursor: not-allowed; }
.ss-car { width: 15px; height: 15px; color: var(--muted); transition: transform .25s var(--ease); flex: none; }
.ss-btn.open .ss-car { transform: rotate(180deg); }
.ss-clear { font-style: normal; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; line-height: 1; color: var(--muted); background: rgba(17,18,22,.06); flex: none; }
.ss-clear:hover { color: #fff; background: var(--ink-3); }
.ss-panel { position: fixed; z-index: 200; max-width: min(520px, calc(100vw - 16px)); border-radius: 18px; padding: 8px; background: var(--sheen), rgba(255,255,255,.9); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); border: 1px solid #fff; box-shadow: var(--glass-shadow-lg); animation: pop .22s var(--ease); }
.ss-q { position: relative; display: block; margin-bottom: 6px; }
.ss-q .svg-ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--faint); }
.ss-q input { width: 100%; padding: 8px 10px 8px 32px; border-radius: 11px; border: 1px solid rgba(17,18,22,.08); background: rgba(255,255,255,.9); outline: none; font-size: 13px; }
.ss-q input:focus { border-color: rgba(17,18,22,.22); box-shadow: 0 0 0 3px rgba(17,18,22,.06); }
.ss-list { max-height: 260px; overflow: auto; scrollbar-width: thin; }
.ss-opt { padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.ss-opt.ph { color: var(--muted); }
.ss-opt.hl { background: rgba(17,18,22,.06); color: var(--ink); }
.ss-opt.sel { font-weight: 650; color: var(--ink); }
.ss-opt.sel::after { content: "✓"; float: right; margin-left: 10px; }
.ss-none { padding: 12px; text-align: center; color: var(--muted); font-size: 12.5px; }

/* ===== Metadatos personalizados ===== */
.meta-box { border: 1px dashed rgba(17,18,22,.14); border-radius: 14px; padding: 10px 12px 2px; background: rgba(255,255,255,.45); }
.meta-h { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.meta-h .svg-ico { width: 14px; height: 14px; }

/* ===== Semáforo (único uso de color semántico además de los puntos de estado) ===== */
.sem { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.sem i { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px rgba(255,255,255,.8), 0 1px 3px rgba(0,0,0,.25); }
.sem-verde i { background: #1f9d55; } .sem-amarillo i { background: #e3a008; } .sem-rojo i { background: #d64545; } .sem-gris i { background: #c3c6cd; }
.sem-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 4px 0 12px; }
.fase-resp { display: flex; align-items: center; gap: 8px; margin: 2px 0 6px; font-size: 12px; color: var(--muted); }
.fase-resp .ss { min-width: 230px; }
.fase-resp select { min-width: 230px; }
.step .sem { margin-top: 4px; font-size: 11px; font-weight: 500; }
.venc-chip { display: inline-flex; align-items: center; gap: 6px; }
td.col-obj, th.col-obj { min-width: 300px; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== Recorrido guiado ===== */
.tour-btn { white-space: nowrap; }
.tour-btn .svg-ico { width: 16px; height: 16px; }
.tour-ov { position: fixed; inset: 0; z-index: 300; pointer-events: none; }
.tour-ov.on { pointer-events: auto; }
.tour-hole { position: fixed; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(17,18,22,.52), 0 0 0 2px #fff, 0 0 0 6px rgba(255,255,255,.35); transition: all .35s var(--ease, ease); pointer-events: none; }
.tour-pop { position: fixed; border-radius: 22px; padding: 16px 18px 14px; background: var(--sheen, none), rgba(255,255,255,.94); -webkit-backdrop-filter: blur(24px) saturate(160%); backdrop-filter: blur(24px) saturate(160%); border: 1px solid #fff; box-shadow: 0 24px 60px -12px rgba(17,18,22,.45); transition: left .3s var(--ease, ease), top .3s var(--ease, ease); animation: pop .25s var(--ease, ease); }
.tour-pop h3 { margin: 4px 0 6px; font-size: 16px; }
.tour-k { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tour-d { font-size: 13.5px; line-height: 1.55; color: var(--ink-2, #333); }
.tour-bar { display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.tour-prog { flex: 1; height: 4px; border-radius: 4px; background: rgba(17,18,22,.08); overflow: hidden; margin-right: 6px; }
.tour-prog i { display: block; height: 100%; background: var(--ink, #111); border-radius: 4px; transition: width .3s; }

/* ===== Firma electrónica pendiente ===== */
.badge.pend-firma { background: rgba(227,160,8,.12); color: #8a5a00; box-shadow: 0 0 0 1px rgba(227,160,8,.35) inset; }
.badge.pend-firma .svg-ico { width: 11px; height: 11px; }
.alert.firma-pend { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.alert.firma-pend > div { flex: 1; }
.firma-pasos { margin: 0 0 12px; padding-left: 20px; line-height: 1.7; font-size: 13.5px; }
.firma-pasos .btn { margin-left: 6px; vertical-align: middle; }
.toast.warn::before { background: #e3a008; }

/* ---- Firma electrónica (FirmaEC) ---- */
.sidebar .user { grid-template-columns: auto 1fr auto auto auto; }
.firma-bar { display:flex; align-items:center; gap:12px; padding:12px 16px; margin:0 0 14px; border-radius:18px; background:rgba(255,255,255,.7); border:1px solid #fff; box-shadow:0 0 0 1px var(--line), 0 6px 18px -10px rgba(17,18,22,.18); }
.firma-bar > .svg-ico { width:26px; height:26px; color:var(--ink); }
.firma-bar .grow { flex:1; }
.firma-item { padding:10px 0; border-bottom:1px solid var(--line-2); }
.firma-item:last-child { border-bottom:none; }
.firma-item .fi-head { display:flex; gap:8px; align-items:center; justify-content:space-between; margin-bottom:4px; }
.firma-item .dl { margin:0; }
.cert-card { padding:14px; border-radius:16px; background:linear-gradient(180deg,#fff,#f7f8fa); box-shadow:0 0 0 1px var(--line); }
.cert-card.vencido { box-shadow:0 0 0 1px #f2b8b2; background:#fff8f7; }
.cert-card .cc-top { display:flex; gap:10px; align-items:center; margin-bottom:8px; }
.cert-card .cc-top > div { flex:1; }
.cert-card .cc-top .svg-ico, .cert-mini .svg-ico { width:28px; height:28px; }
.cert-mini { display:flex; gap:10px; align-items:center; padding:10px 12px; border-radius:14px; background:#f7f8fa; margin:8px 0; }
.chk { display:flex !important; gap:8px; align-items:center; font-weight:500 !important; cursor:pointer; }
.chk input { width:auto !important; }
.firmantes, .firmantes-edit { list-style:none; margin:10px 0 0; padding:0; }
.firmantes li, .firmantes-edit li { display:flex; gap:10px; align-items:center; padding:8px 4px; border-bottom:1px solid var(--line-2); }
.firmantes li .grow, .firmantes-edit li .grow { flex:1; min-width:0; }
.firmantes .n, .firmantes-edit .n { width:26px; height:26px; flex:none; display:grid; place-items:center; border-radius:50%; font-weight:700; font-size:12px; background:#eef0f3; color:var(--ink-3); }
.firmantes li.firmado .n { background:var(--ok); color:#fff; }
.firmantes li.turno { background:linear-gradient(90deg,rgba(255,196,0,.12),transparent); border-radius:10px; }
.firmantes li.turno .n { background:var(--ink); color:#fff; }
.firmantes-edit input { max-width:240px; }
.fl-prog { height:6px; border-radius:6px; background:#eef0f3; margin:8px 0; overflow:hidden; }
.fl-prog i { display:block; height:100%; background:linear-gradient(90deg,#34373f,#16171b); border-radius:6px; }
.fl-msg { font-style:italic; color:var(--ink-3); margin:6px 0; }
.fl-acts { margin-top:10px; flex-wrap:wrap; }
.fl-time .ev { display:flex; gap:10px; padding:8px 0; border-bottom:1px dashed var(--line-2); font-size:12.5px; }
.fl-time .ev .grow { flex:1; }
.fl-time .ei { width:26px; height:26px; flex:none; display:grid; place-items:center; border-radius:8px; background:#f2f3f5; }
.fl-time .ei .svg-ico { width:14px; height:14px; }
.fl-time .ev.firma .ei, .fl-time .ev.completado .ei { background:#e8f6ee; color:var(--ok); }
.fl-time .ev.observacion .ei, .fl-time .ev.devolucion .ei { background:#fff4e0; color:#a8660a; }
.fl-time .ev-txt { margin:3px 0; padding:6px 9px; background:#f7f8fa; border-radius:10px; white-space:pre-wrap; }
.firmantes-edit input { height:34px; padding:0 10px; border-radius:10px; border:1px solid var(--line); background:#fff; font:inherit; font-size:12.5px; width:240px; }
.firmantes-edit input:focus { outline:none; box-shadow:0 0 0 3px rgba(17,18,22,.08); border-color:var(--ink-3); }
/* ---- Verificación pública ---- */
body.pub { min-height:100vh; }
.pub-wrap { max-width:760px; margin:0 auto; padding:28px 18px 40px; }
.pub-head { display:flex; gap:14px; align-items:center; margin-bottom:18px; }
.pub-head img { height:46px; }
.pub-head b { display:block; font-size:16px; }
.pub-head span { color:var(--muted); font-size:12.5px; }
.pub-card h1 { margin:0 0 4px; font-size:24px; letter-spacing:-.02em; }
.pub-form { display:flex; gap:10px; margin-top:12px; }
.pub-form input { flex:1; height:44px; font-size:18px; letter-spacing:.12em; font-family:ui-monospace,Menlo,monospace; padding:0 14px; border-radius:14px; border:1px solid var(--line); background:#fff; text-transform:uppercase; }
.pub-foot { margin-top:16px; font-size:11.5px; color:var(--muted); text-align:center; }
/* ---- Trazabilidad 360 ---- */
.chips { display:flex; flex-wrap:wrap; gap:6px; }
.chip { display:inline-flex; align-items:center; gap:6px; height:30px; padding:0 11px; border-radius:999px; border:1px solid var(--line); background:#fff; font:inherit; font-size:12px; cursor:pointer; color:var(--ink-3); }
.chip .svg-ico { width:13px; height:13px; }
.chip.active { background:var(--ink); color:#fff; border-color:var(--ink); }
.tz-dia { margin:14px 0 4px; font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
.tz-ev { display:flex; gap:10px; padding:9px 6px; border-bottom:1px solid var(--line-2); font-size:12.5px; }
.tz-ev .grow { flex:1; min-width:0; }
.tz-ev.mal { background:#fff6f5; border-radius:10px; }
.tz-ic { width:30px; height:30px; flex:none; display:grid; place-items:center; border-radius:9px; background:#f2f3f5; }
.tz-ic .svg-ico { width:15px; height:15px; }
.tz-ev.firma .tz-ic { background:#e8f6ee; color:var(--ok); }
.tz-ev.seguridad .tz-ic, .tz-ev.mal .tz-ic { background:#fdecea; color:var(--bad); }
.tz-ev.tramite .tz-ic, .tz-ev.contratacion .tz-ic { background:#eef0ff; color:#3b4bb8; }
.tz-ev.creacion .tz-ic, .tz-ev.cambio .tz-ic { background:#fff4e0; color:#a8660a; }
.tz-meta { text-align:right; font-size:11.5px; min-width:96px; }
.tz-meta .ok { color:var(--ok); } .tz-meta .bad { color:var(--bad); }
.verif-card { display:flex; gap:16px; align-items:center; margin-top:14px; }
.verif-card img { width:96px; height:96px; border-radius:10px; background:#fff; padding:4px; box-shadow:0 0 0 1px var(--line); }
.verif-card .grow { flex:1; }
.verif-code { font-size:22px; font-weight:700; letter-spacing:.12em; margin:2px 0 4px; }
.ruta { position:relative; padding-left:8px; }
.ruta .paso { display:flex; gap:12px; padding:10px 0; position:relative; }
.ruta .paso:not(:last-child)::before { content:''; position:absolute; left:14px; top:38px; bottom:-6px; width:2px; background:var(--line); }
.ruta .pn { width:30px; height:30px; flex:none; display:grid; place-items:center; border-radius:50%; background:var(--ink); color:#fff; font-weight:700; font-size:12px; }

/* ---- Panel de contratación ---- */
.cp-row { display:flex; gap:14px; align-items:center; padding:10px 4px; border-bottom:1px solid var(--line-2); color:inherit; text-decoration:none; }
.cp-row:hover { background:rgba(255,255,255,.6); border-radius:10px; }
.cp-row .grow { flex:1; min-width:0; }
.cp-row .bar { height:6px; border-radius:6px; background:#eef0f3; margin-top:6px; overflow:hidden; }
.cp-row .bar i { display:block; height:100%; background:linear-gradient(90deg,#34373f,#16171b); }
.cp-meta { text-align:right; min-width:130px; font-size:12.5px; }
.clamp1 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ---- Gestión documental inteligente (IA local) ---- */
.ia-card h3 { font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:var(--faint); margin:14px 0 6px; }
.ia-meta { margin-bottom:8px; }
.ia-res { margin:0; padding-left:18px; font-size:13px; line-height:1.5; }
.ia-res li { margin-bottom:6px; }
.ia-chip { display:inline-block; padding:2px 9px; margin:0 4px 4px 0; border-radius:999px; background:rgba(255,255,255,.75); border:1px solid var(--line); font-size:12px; }
.ia-ent dd { margin-bottom:4px; }
.ia-tipo { display:grid; grid-template-columns:1fr 90px 44px; gap:8px; align-items:center; font-size:12.5px; padding:3px 0; color:var(--ink-3); }
.ia-tipo.top { color:inherit; font-weight:600; }
.ia-tipo .bar { height:6px; border-radius:6px; background:#eef0f3; overflow:hidden; }
.ia-tipo .bar i { display:block; height:100%; background:linear-gradient(90deg,#34373f,#16171b); }
.ia-tipo b { text-align:right; }
.ia-sug { margin-top:10px; padding:10px 12px; border-radius:12px; background:rgba(255,255,255,.7); border:1px dashed var(--line); }
.ia-sug ul { margin:6px 0 8px; padding-left:18px; }
.ia-sim { display:flex !important; gap:8px; align-items:center; font-size:13px; }
.ia-sim .grow { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ia-acc { display:flex; gap:8px; margin-top:12px; flex-wrap:wrap; }
.ia-pre { white-space:pre-wrap; max-height:60vh; overflow:auto; font-size:12px; background:rgba(255,255,255,.7); border:1px solid var(--line); border-radius:12px; padding:12px; }
.ia-auto { display:flex; gap:10px; align-items:flex-start; padding:10px 12px; border-radius:14px; border:1px solid var(--line); background:linear-gradient(135deg,rgba(255,255,255,.9),rgba(240,242,246,.75)); backdrop-filter:blur(12px); font-size:13px; }
.ia-auto .svg-ico { flex:none; margin-top:2px; }
.ia-fill { box-shadow:0 0 0 2px rgba(22,23,27,.18) !important; background:#fbfbfd !important; }
.ia-frag { font-size:12px; color:var(--ink-3); margin-top:4px; line-height:1.45; max-width:640px; }
.ia-frag mark, .ia-pasaje mark { background:#fff1b8; color:inherit; padding:0 2px; border-radius:3px; }
.ia-pf { display:flex; gap:8px; margin-bottom:6px; }
.ia-pf input { flex:1; min-width:0; }
.ia-pasaje { padding:10px 0; border-bottom:1px solid var(--line-2); font-size:13px; line-height:1.5; }
.ia-pasaje.top { background:rgba(255,255,255,.65); border-radius:12px; padding:10px 12px; border:1px solid var(--line); margin-top:8px; }

.ia-frag { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }

/* ---- Asistente paso a paso en formularios ---- */
.form > section.wz { display:none; gap:14px; }
.form > section.wz.on { display:grid; animation: wzIn .28s var(--ease); }
@keyframes wzIn { from { opacity:0; transform: translateX(10px); } to { opacity:1; transform:none; } }
.wz-steps { list-style:none; margin:0 0 12px; padding:6px; display:flex; gap:4px; border-radius:18px; background:rgba(255,255,255,.55); border:1px solid var(--line-2); box-shadow: inset 0 1px 0 rgba(255,255,255,.9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); overflow-x:auto; }
.wz-steps li { flex:1; min-width:0; display:flex; align-items:center; gap:8px; padding:8px 10px; border-radius:13px; font-size:12.5px; color:var(--faint); cursor:pointer; transition: background .2s, color .2s; white-space:nowrap; }
.wz-steps li:hover { background:rgba(255,255,255,.7); }
.wz-steps .wz-n { flex:none; width:22px; height:22px; border-radius:50%; display:grid; place-items:center; font-size:11.5px; font-weight:700; border:1.5px solid currentColor; }
.wz-steps .wz-t { overflow:hidden; text-overflow:ellipsis; }
.wz-steps li.ok { color:var(--ink-3); }
.wz-steps li.ok .wz-n { background:#16171b; border-color:#16171b; color:#fff; font-size:0; }
.wz-steps li.ok .wz-n::after { content:'✓'; font-size:11px; }
.wz-steps li.on { background:#fff; color:var(--ink); font-weight:650; box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 6px 16px rgba(17,18,22,.08); }
.wz-steps li.on .wz-n { background:#16171b; border-color:#16171b; color:#fff; font-size:11.5px; }
.wz-steps li.on .wz-n::after { content:none; }
.wz-ayuda { font-size:12.5px; color:var(--ink-3); margin:0 2px 14px; }
.wz-ayuda b { color:var(--ink); }
.wz-res-g { padding:12px 14px; border-radius:16px; background:rgba(255,255,255,.65); border:1px solid var(--line-2); }
.wz-res-h { display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; }
.wz-res .dl { margin:0; }
.modal .mf .wz-ant { margin-right:auto; }
.modal .mf .wz-sig .svg-ico { width:14px; height:14px; }
@media (max-width: 640px) { .wz-steps .wz-t { display:none; } .wz-steps li.on .wz-t { display:inline; } }

/* ---- Campo de catálogo (CPC / partida) ---- */
.cat-f { position:relative; }
.cat-f input { width:100%; }
.cat-desc { display:flex; gap:8px; align-items:flex-start; font-size:12.5px; line-height:1.4; margin-top:6px; }
.cat-desc:empty { display:none; }
.cat-desc .svg-ico { width:15px; height:15px; margin-top:1px; }
.cat-ok { color:var(--green, #16a34a); } .cat-no { color:#b45309; }
.cat-panel { max-width: min(640px, 94vw); z-index: 320; }
.cat-panel .cat-h { display:flex; align-items:center; gap:6px; font-size:11.5px; color:var(--faint); padding:8px 10px 4px; }
.cat-panel .cat-h .svg-ico { width:13px; height:13px; }
.cat-opt { display:grid !important; grid-template-columns: 96px 1fr; gap:10px; align-items:start; white-space:normal !important; line-height:1.35; }
.cat-opt .mono { font-size:12.5px; }
.cat-card { padding:14px 16px; border-radius:18px; background:rgba(255,255,255,.65); border:1px solid var(--line-2); }
.cat-card h3 { margin:0 0 4px; }
.cat-num { margin:10px 0; font-size:13px; }
.cat-lbl .small { font-weight:400; }

/* ===== Ajustes demo 04/12/2026 ===== */
.ro-banner { margin: 0 24px; padding: 8px 14px; border-radius: 10px; background: #eef4ff; color: #1e3a8a; border: 1px solid #c7d7fe; font-size: 13px; display: flex; align-items: center; gap: 8px; }
.ro-banner .svg-ico { width: 16px; height: 16px; }
.captcha { margin: 4px 0 2px; }
.captcha-box { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid #e3e7ee; border-radius: 10px; background: #fafbfd; }
.captcha-box .grow { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.captcha-box input[name=captcha_respuesta] { width: 100%; }
.captcha-img svg { display: block; }
.ced-hint { font-size: 12px; margin-top: 3px; }
.ced-hint.ok { color: var(--green, #15803d); }
.ced-hint.bad { color: var(--bad, #b91c1c); }
.entregable-row { display: flex; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid #eef1f4; }
.entregable-row .grow { flex: 1; }
.pago-box { border: 1px dashed #c7d2fe; background: #f8faff; border-radius: 10px; padding: 12px; margin-top: 10px; }
