/* Salmo-Source · Frontero Advisors */
:root {
  --navy: #001b2a; --navy-2: #0f3a52; --navy-3: #1d5273;
  --gold: #f2b21a; --gold-dark: #d69a0e; --gold-soft: #fdf3d6;
  --steel: #8c9199; --steel-light: #dde0e3;
  --bg: #f2f4f5; --panel: #ffffff; --border: #dde0e3; --text: #10202a; --muted: #6b747c;
  --ok: #1c7a45; --ok-soft: #dcf2e5; --warn: #9a6200; --warn-soft: #fdf0d0; --bad: #b3261e; --bad-soft: #fbe3e1; --info: #0f5d8c; --info-soft: #e0eef7;
  --radius: 6px; --shadow: 0 1px 3px rgba(0, 27, 42, .08), 0 4px 14px rgba(0, 27, 42, .06);
  --font-display: "Archivo", "Segoe UI", sans-serif; --font-body: "Public Sans", "Segoe UI", system-ui, sans-serif; --font-mono: "Space Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 14.5px; background: var(--bg); color: var(--text); line-height: 1.45; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -.01em; margin: 0 0 .4em; color: var(--navy); }
h1 { font-size: 1.7rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; } h4 { font-size: .95rem; }
a { color: var(--navy-3); }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: .82rem; } .mono { font-family: var(--font-mono); }
.right { margin-left: auto; } .nowrap { white-space: nowrap; } .center { text-align: center; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .col { display: flex; flex-direction: column; gap: 8px; }
.spacer { height: 14px; }
.grid { display: grid; gap: 14px; } .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)); }

/* ---------- cabecera ---------- */
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50; border-bottom: 3px solid var(--gold); }
.topbar-in { max-width: 1280px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 18px; height: 58px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; letter-spacing: .01em; } .logo img { height: 26px; width: 26px; object-fit: contain; } .logo i { font-style: normal; color: var(--steel-light); } .logo em { font-style: normal; color: var(--gold); }
.brand b { font-family: var(--font-mono); font-size: .8rem; letter-spacing: .04em; border-left: 1px solid rgba(255, 255, 255, .3); padding-left: 12px; }
.brand b span { color: var(--gold); }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; } .nav::-webkit-scrollbar { display: none; }
.nav a { color: rgba(255, 255, 255, .78); text-decoration: none; padding: 8px 12px; border-radius: 4px; font-weight: 600; font-size: .86rem; white-space: nowrap; }
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a.active { background: var(--gold); color: var(--navy); }
.top-right { display: flex; align-items: center; gap: 10px; }
.token-chip { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); color: #fff; border-radius: 99px; padding: 5px 12px; font-family: var(--font-mono); font-size: .8rem; cursor: pointer; text-decoration: none; white-space: nowrap; }
.token-chip b { color: var(--gold); }
.token-chip.low { border-color: var(--gold); background: rgba(242, 178, 26, .2); }
.icon-btn { background: transparent; border: 0; color: #fff; cursor: pointer; position: relative; padding: 6px; border-radius: 50%; display: grid; place-items: center; }
.icon-btn:hover { background: rgba(255, 255, 255, .1); }
.icon-btn svg { width: 20px; height: 20px; }
.dot { position: absolute; top: 1px; right: 0; background: var(--gold); color: var(--navy); border-radius: 99px; font-size: .62rem; font-weight: 800; min-width: 16px; height: 16px; display: grid; place-items: center; padding: 0 4px; }
.menu { position: absolute; right: 0; top: 44px; background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 230px; z-index: 60; overflow: hidden; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 9px 14px; background: none; border: 0; color: var(--text); text-decoration: none; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--bg); }
.menu .menu-head { padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg); }
.rel { position: relative; }
.notif-list { max-height: 380px; overflow-y: auto; width: 340px; }
.notif { padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; display: block; text-decoration: none; color: inherit; }
.notif.unread { background: var(--gold-soft); }
.notif b { display: block; font-size: .86rem; } .notif span { font-size: .8rem; color: var(--muted); }

main { max-width: 1280px; margin: 0 auto; padding: 22px 16px 70px; }
.page-head { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head p { margin: 0; color: var(--muted); }
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 8px; } .crumbs a { color: var(--muted); }

/* ---------- componentes ---------- */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.card.flat { box-shadow: none; } .card h3 { margin-bottom: 10px; }
.card.pad0 { padding: 0; overflow: hidden; }
.card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; } .card-title h3 { margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--navy); background: #fff; color: var(--navy); border-radius: 4px; padding: 8px 15px; font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.2; transition: background .12s; white-space: nowrap; }
.btn:hover { background: var(--bg); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--navy); } .btn.primary:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn.dark { background: var(--navy); color: #fff; } .btn.dark:hover { background: var(--navy-2); }
.btn.danger { border-color: var(--bad); color: var(--bad); } .btn.danger:hover { background: var(--bad-soft); }
.btn.ghost { border-color: transparent; } .btn.sm { padding: 5px 10px; font-size: .82rem; } .btn.lg { padding: 11px 22px; font-size: 1rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: .74rem; font-weight: 700; background: var(--bg); color: var(--navy); border: 1px solid var(--border); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; } .badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; } .badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge.gold { background: var(--gold); color: var(--navy); border-color: transparent; } .badge.navy { background: var(--navy); color: #fff; border-color: transparent; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 3px; background: var(--info-soft); color: var(--navy-2); font-size: .76rem; margin: 0 4px 4px 0; }
.chip.seg { background: var(--steel-light); }
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 16px; cursor: pointer; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs button.active { color: var(--navy); border-bottom-color: var(--gold); } .tabs button .badge { margin-left: 6px; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 700; color: var(--navy-2); }
label.f > span small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=datetime-local], input[type=date], select, textarea { border: 1px solid #c4c9ce; border-radius: 4px; padding: 8px 10px; background: #fff; width: 100%; font-weight: 400; color: var(--text); }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; border-color: var(--gold-dark); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; } .form-grid .full { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: .88rem; } .check input { margin-top: 3px; }
table.t { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.t th { text-align: left; background: var(--bg); color: var(--navy-2); font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; } table.t tr:last-child td { border-bottom: 0; }
table.t.hover tbody tr:hover { background: #fafbfb; cursor: pointer; } table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.empty { text-align: center; padding: 36px 20px; color: var(--muted); } .empty h3 { color: var(--navy-2); }
.alert { border-radius: var(--radius); padding: 11px 14px; margin-bottom: 12px; border: 1px solid; font-size: .9rem; }
.alert.info { background: var(--info-soft); border-color: #b5d3e6; color: #0b3f61; } .alert.warn { background: var(--warn-soft); border-color: #ecd391; color: #6b4300; }
.alert.bad { background: var(--bad-soft); border-color: #f1b8b3; color: #7a1a15; } .alert.ok { background: var(--ok-soft); border-color: #b5dcc6; color: #14522e; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--gold); border-radius: var(--radius); padding: 12px 14px; cursor: default; text-decoration: none; color: inherit; display: block; }
a.kpi { cursor: pointer; } a.kpi:hover { box-shadow: var(--shadow); }
.kpi b { font-family: var(--font-mono); font-size: 1.6rem; display: block; color: var(--navy); } .kpi span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.kpi.warn { border-top-color: var(--bad); }
.progress { height: 8px; background: var(--steel-light); border-radius: 99px; overflow: hidden; } .progress > i { display: block; height: 100%; background: var(--gold); }
.stars { display: inline-flex; gap: 1px; vertical-align: middle; } .stars svg { width: 15px; height: 15px; }
.score { font-family: var(--font-mono); font-weight: 700; }
.bar-row { display: grid; grid-template-columns: 170px 1fr 34px; gap: 10px; align-items: center; font-size: .82rem; margin: 5px 0; } .bar-row .progress { height: 7px; }

/* ---------- login ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: #fff; padding: 56px 48px; display: flex; flex-direction: column; justify-content: center; }
.hero-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; font-size: 1.5rem; } .hero-logo .logo { font-size: 1.6rem; } .hero-logo .logo img { height: 36px; width: 36px; } .hero-logo > span { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; color: rgba(255,255,255,.7); border-left: 1px solid rgba(255,255,255,.3); padding-left: 14px; } .auth-hero h1 { color: #fff; font-size: 2.3rem; line-height: 1.1; margin-bottom: 14px; }
.auth-hero h1 span { color: var(--gold); } .auth-hero p { color: rgba(255, 255, 255, .8); max-width: 480px; }
.auth-hero ul { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; } .auth-hero li { display: flex; gap: 10px; color: rgba(255, 255, 255, .88); } .auth-hero li i { color: var(--gold); font-style: normal; font-weight: 800; }
.auth-form { display: grid; place-items: center; padding: 30px; } .auth-card { width: 100%; max-width: 380px; }

/* ---------- búsqueda ---------- */
.search-layout { display: grid; grid-template-columns: 270px 1fr; gap: 18px; align-items: start; }
.filters { position: sticky; top: 74px; } .filters .col > * { margin: 0; }
.stage-list { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px; max-height: 330px; overflow-y: auto; }
.stage-list button { text-align: left; background: none; border: 0; padding: 6px 8px; border-radius: 4px; cursor: pointer; font-size: .85rem; display: flex; justify-content: space-between; gap: 8px; }
.stage-list button:hover { background: var(--bg); } .stage-list button.on { background: var(--gold-soft); font-weight: 700; } .stage-list .sub { padding-left: 22px; font-size: .82rem; color: var(--muted); }
.result { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 14px 16px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; transition: box-shadow .12s; }
.result:hover { box-shadow: var(--shadow); } .result h4 { margin: 0 0 3px; font-size: 1.02rem; } .result h4 a { text-decoration: none; color: var(--navy); } .result h4 a:hover { text-decoration: underline; }
.result .desc { color: var(--muted); font-size: .85rem; margin: 4px 0 6px; } .result .side { text-align: right; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; min-width: 150px; }
.result.sel { outline: 2px solid var(--gold); }
.locked-box { border: 2px dashed var(--gold-dark); background: var(--gold-soft); border-radius: var(--radius); padding: 18px; text-align: center; margin: 14px 0; }
.locked-ghost { height: 58px; border-radius: var(--radius); background: repeating-linear-gradient(135deg, #eef0f1, #eef0f1 10px, #f6f7f8 10px, #f6f7f8 20px); margin-bottom: 8px; border: 1px solid var(--border); }
.tray { position: fixed; bottom: 0; left: 0; right: 0; background: var(--navy); color: #fff; padding: 10px 18px; z-index: 40; display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; box-shadow: 0 -4px 14px rgba(0, 0, 0, .2); }
.contact { padding: 10px 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; } .contact:last-child { border: 0; }

/* ---------- licitaciones ---------- */
.stepper { display: flex; gap: 4px; margin-bottom: 18px; flex-wrap: wrap; }
.stepper button { flex: 1; min-width: 120px; background: #fff; border: 1px solid var(--border); border-bottom: 3px solid var(--steel-light); padding: 9px 10px; text-align: left; cursor: pointer; font-weight: 700; font-size: .82rem; color: var(--muted); border-radius: 4px; }
.stepper button.active { border-bottom-color: var(--gold); color: var(--navy); background: var(--gold-soft); } .stepper button.done { border-bottom-color: var(--ok); color: var(--ok); }
.stepper button small { display: block; font-weight: 400; color: var(--muted); font-size: .72rem; }
.edit-table input, .edit-table select { padding: 6px 8px; } .edit-table td { padding: 6px 6px; vertical-align: middle; }
.sealed { text-align: center; padding: 40px 20px; background: repeating-linear-gradient(135deg, #f7f8f9, #f7f8f9 14px, #fff 14px, #fff 28px); border: 1px dashed var(--steel); border-radius: var(--radius); }
.sealed .lock { font-size: 2.2rem; }
.matrix th.supplier { min-width: 170px; background: var(--navy); color: #fff; font-size: .82rem; text-transform: none; letter-spacing: 0; }
.matrix td.best { background: var(--ok-soft); font-weight: 700; } .matrix td.worst { color: var(--bad); }
.matrix tr.section td { background: var(--bg); font-weight: 800; color: var(--navy-2); font-size: .76rem; text-transform: uppercase; }
.rankbadge { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--steel-light); font-weight: 800; font-size: .8rem; } .rankbadge.r1 { background: var(--gold); color: var(--navy); }
.timeline { list-style: none; padding: 0; margin: 0; } .timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--border); position: relative; font-size: .86rem; } .timeline li::before { content: ""; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.timeline time { color: var(--muted); font-size: .76rem; display: block; }
.countdown { font-family: var(--font-mono); font-weight: 700; }
.countdown.soon { color: var(--bad); }
.qa { border-left: 3px solid var(--steel-light); padding: 6px 12px; margin: 8px 0; } .qa.answered { border-left-color: var(--ok); } .qa .a { color: var(--ok); }
.file { display: flex; gap: 10px; align-items: center; padding: 7px 10px; border: 1px solid var(--border); border-radius: 4px; margin-bottom: 6px; background: #fff; font-size: .86rem; }
.portal-wrap { max-width: 980px; margin: 0 auto; padding: 24px 16px 80px; }
.portal-head { background: var(--navy); color: #fff; padding: 12px 18px; border-bottom: 3px solid var(--gold); } .portal-head .in { max-width: 980px; margin: 0 auto; display: flex; align-items: center; gap: 14px; } 
.status-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.price-input { text-align: right; font-variant-numeric: tabular-nums; max-width: 150px; }
.sticky-actions { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--border); padding: 12px 0; margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; z-index: 5; }

/* ---------- modal, toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0, 20, 32, .55); z-index: 100; display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 8px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.modal.wide { max-width: 860px; } .modal-head { padding: 16px 20px 6px; display: flex; align-items: center; gap: 10px; } .modal-head h3 { margin: 0; flex: 1; }
.modal-body { padding: 8px 20px 16px; overflow-y: auto; } .modal-foot { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; background: var(--bg); border-radius: 0 0 8px 8px; }
.x { background: none; border: 0; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--muted); }
#toasts { position: fixed; bottom: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--navy); color: #fff; padding: 11px 16px; border-left: 4px solid var(--gold); border-radius: 4px; box-shadow: var(--shadow); max-width: 380px; font-size: .9rem; animation: pop .2s ease; } .toast.err { border-left-color: #ff6b61; } .toast.ok { border-left-color: #54c98a; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.spinner { width: 22px; height: 22px; border: 3px solid var(--steel-light); border-top-color: var(--gold-dark); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: middle; } @keyframes spin { to { transform: rotate(360deg); } }
.loading { text-align: center; padding: 50px; color: var(--muted); }
.plan-card { border: 2px solid var(--border); border-radius: 8px; padding: 18px; background: #fff; display: flex; flex-direction: column; gap: 6px; } .plan-card.current { border-color: var(--gold); background: var(--gold-soft); } .plan-card .price { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 700; color: var(--navy); }
.plan-card ul { padding-left: 18px; margin: 6px 0; font-size: .86rem; }
.demo-banner { background: var(--info-soft); color: var(--info); text-align: center; font-size: .78rem; font-weight: 700; padding: 4px; }
@media (max-width: 900px) { .search-layout { grid-template-columns: 1fr; } .filters { position: static; } .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .auth { grid-template-columns: 1fr; } .auth-hero { padding: 30px 22px; } }
@media (max-width: 640px) { .g2, .g3, .g4, .form-grid { grid-template-columns: 1fr; } .result { grid-template-columns: 1fr; } .result .side { align-items: flex-start; text-align: left; } .brand b { display: none; } .bar-row { grid-template-columns: 110px 1fr 30px; } .notif-list { width: 290px; } }

/* ---------- calificación con estrellas ---------- */
.rate { display: inline-flex; gap: 2px; } .rate button { background: none; border: 0; font-size: 1.55rem; line-height: 1; color: var(--steel-light); cursor: pointer; padding: 0 1px; } .rate button.on { color: var(--gold); } .rate button:hover { color: var(--gold-dark); }
.pad0 { padding: 0 !important; } .page-head > div:first-child { min-width: 0; }
.menu .menu-head.row { display: flex; }
@media (max-width: 1180px) { .topbar-in { height: auto; flex-wrap: wrap; padding: 8px 16px; row-gap: 4px; } .nav { order: 3; flex-basis: 100%; overflow-x: auto; padding-bottom: 2px; } .top-right { margin-left: auto; } }
@media (max-width: 900px) { .grid[style*="grid-template-columns"], .grid.g2[style] { grid-template-columns: 1fr !important; } main { padding: 16px 12px 70px; } .page-head { align-items: flex-start; } .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.grid > *, .col > *, .search-layout > * { min-width: 0; }
body { overflow-x: hidden; }

/* ---------- selector de vista del administrador y modo de prueba ---------- */
.viewswitch { display: flex; align-items: center; gap: 2px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); border-radius: 6px; padding: 2px; }
.viewswitch span { font-size: .66rem; color: rgba(255, 255, 255, .6); padding: 0 8px; text-transform: uppercase; letter-spacing: .06em; font-family: var(--font-mono); }
.viewswitch button { background: none; border: 0; color: rgba(255, 255, 255, .85); padding: 5px 10px; border-radius: 4px; cursor: pointer; font-weight: 700; font-size: .78rem; }
.viewswitch button:hover { background: rgba(255, 255, 255, .12); } .viewswitch button.on { background: var(--gold); color: var(--navy); }
.act-banner { background: var(--gold-soft); border-bottom: 2px solid var(--gold); color: var(--navy); font-size: .82rem; padding: 7px 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: center; text-align: center; }
.act-banner .btn { padding: 3px 10px; }
@media (max-width: 1180px) { .viewswitch span { display: none; } }
@media (max-width: 640px) { .viewswitch button { padding: 5px 7px; font-size: .72rem; } }

/* ---------- visualización de datos (gráficos, fichas de indicadores, lecturas) ---------- */
.viz-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 14px; align-items: start; }
.viz-grid .wide { grid-column: 1 / -1; }
.viz-card { margin: 0; }
.viz-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px; } .viz-head h3 { margin: 0; } .viz-head .btn { margin-left: auto; white-space: nowrap; }
.viz-svg { width: 100%; height: auto; display: block; font-family: var(--font-body); overflow: visible; }
.viz-empty { color: var(--muted); font-size: .9rem; padding: 26px 8px; text-align: center; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 8px; font-size: .8rem; color: #52514e; }
.viz-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.viz-mark { cursor: default; outline: none; } .viz-mark:hover path, .viz-mark:hover circle:last-child, .viz-mark:focus path { filter: brightness(1.12); }
.viz-mark:focus-visible { outline: 2px solid var(--navy-3); outline-offset: 2px; }
.viz-slot { outline: none; } .viz-slot .viz-cross { opacity: 0; } .viz-slot:hover .viz-cross, .viz-slot:focus .viz-cross { opacity: 1; }
.viz-slot:hover .viz-dot, .viz-slot:focus .viz-dot { r: 5; }
.viz-tip { position: fixed; z-index: 400; background: #0b0b0b; color: #f0efec; border-radius: 6px; padding: 7px 10px; font-size: .78rem; line-height: 1.35; max-width: 260px; pointer-events: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.viz-tip b { display: block; font-size: .92rem; color: #fff; margin-bottom: 1px; } .viz-tip div { color: #c3c2b7; }
.viz-table .t { font-size: .82rem; }
.heat .heat-cell { display: inline-block; min-width: 46px; padding: 3px 8px; border-radius: 4px; font-weight: 700; text-align: center; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; position: relative; min-height: 96px; }
.stat-label { font-size: .78rem; color: var(--muted); font-weight: 600; } .stat-value { font-size: 1.55rem; font-weight: 700; color: var(--navy); line-height: 1.2; margin: 2px 0; font-family: var(--font-display); }
.stat.hero .stat-value { font-size: 3rem; } .stat-sub { font-size: .78rem; color: var(--muted); }
.stat-delta { font-size: .78rem; font-weight: 600; color: var(--muted); margin-top: 2px; } .stat-delta.up-good { color: #006300; } .stat-delta.up-bad { color: var(--bad); }
.stat .spark { display: block; width: 90px; height: 26px; margin-top: 8px; }
.insights { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ins { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; line-height: 1.4; }
.ins-ic { flex: none; width: 20px; height: 20px; border-radius: 50%; display: inline-grid; place-items: center; font-size: .72rem; font-weight: 800; margin-top: 1px; }
.ins.good .ins-ic { background: var(--ok-soft); color: var(--ok); } .ins.info .ins-ic { background: var(--info-soft); color: var(--info); }
.ins.warn .ins-ic { background: var(--warn-soft); color: var(--warn); } .ins.risk .ins-ic { background: var(--bad-soft); color: var(--bad); }
.ai-card { border-left: 4px solid var(--navy-3); } .ai-card h4 { margin: 12px 0 4px; } .ai-card ul { margin: 0 0 0 18px; padding: 0; } .ai-card li { margin-bottom: 3px; }
.ai-tag { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; background: var(--info-soft); color: var(--info); padding: 2px 8px; border-radius: 99px; }
.filters { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; } .filters .seg { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: #fff; }
.filters .seg button { background: none; border: 0; padding: 7px 14px; cursor: pointer; font-weight: 600; color: var(--muted); } .filters .seg button.on { background: var(--navy); color: #fff; }
.mini-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.urgent-tag { background: var(--bad); color: #fff; }
.fb-box { margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 8px; font-size: .85rem; }
@media (max-width: 900px) { .viz-grid { grid-template-columns: 1fr; } .stat.hero .stat-value { font-size: 2.3rem; } }

/* ---------- certificado imprimible y cajas de retroalimentación ---------- */
.cert { max-width: 880px; margin: 0 auto; } .cert h4 { margin: 14px 0 4px; } .cert-seal { margin-top: 18px; padding-top: 10px; border-top: 2px solid var(--navy); }
@media print { .topbar, .no-print, .demo-banner, .act-banner, .sticky-actions, #toasts { display: none !important; } body { background: #fff; } .card { box-shadow: none; border: 0; } main { padding: 0 !important; } }

/* menú de administración agrupado en desplegables */
.nav.nav-grouped { overflow: visible; }
.nav-drop { background: none; border: 0; color: rgba(255, 255, 255, .78); font: inherit; font-weight: 600; font-size: .86rem; padding: 8px 12px; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.nav-drop:hover { background: rgba(255, 255, 255, .08); color: #fff; } .nav-drop.active { background: var(--gold); color: var(--navy); }
.nav-menu { left: 0; right: auto; top: 40px; min-width: 190px; }
.nav-menu a { color: var(--text); font-size: .9rem; font-weight: 500; } .nav-menu a:hover { background: var(--bg); color: var(--text); } .nav-menu a.active { background: var(--gold); color: var(--navy); }
