/* Inter (SIL Open Font License), servida desde el propio sitio para que la app se vea igual
   en cualquier equipo, tenga o no fuentes instaladas. Subconjunto latino, variable 400–800. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/inter-latin.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;
}
:root {
  --red: #a80018; --red-dark: #850013; --blue: #2f6db5; --blue-dark: #245892;
  --ink: #1f2328; --muted: #6b7280; --line: #e3e5e8; --bg: #f1f1f1; --panel: #fff;
  --side: #1c1c1c; --side-2: #2a2a2a; --pos: #1a7f37; --neg: #b42318;
  --radius: 4px; --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 14px rgba(0,0,0,.05);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-feature-settings: "cv11";
  color: var(--ink); font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); min-height: 100vh; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: .2rem 0 1rem; font-weight: 600; }
h2 { font-size: 1.15rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.block { display: block; } .nowrap { white-space: nowrap; } .mono { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
code, kbd, samp { font-family: inherit; }
.pos { color: var(--pos); } .neg { color: var(--neg); } .r { text-align: right; } .big { font-size: 1.6rem; font-weight: 600; }
[hidden] { display: none !important; }
.ico { width: 20px; height: 20px; fill: currentColor; flex: none; }
.ico-lg { width: 34px; height: 34px; fill: none; }

/* logo */
.logo-img { display: block; height: 44px; width: auto; max-width: 100%; }
.mark { display: block; height: 28px; width: auto; }

/* público */
.pub-header { background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px clamp(16px, 2.5vw, 32px); border-bottom: 1px solid var(--line); }
.pub-brand { display: flex; align-items: center; gap: 18px; min-width: 0; text-decoration: none !important; }
.pub-brand .logo-img { height: 46px; flex: none; }
.divider { width: 1px; height: 40px; background: var(--red); opacity: .45; flex: none; }
.divider.light { background: #fff; height: 28px; opacity: .6; }
.pub-sub { color: var(--red); font-size: 1.2rem; white-space: nowrap; }
.pub-links { display: flex; align-items: center; gap: 6px; flex: none; }
.pub-links a { color: var(--ink); display: inline-flex; gap: 8px; align-items: center; font-size: 1rem; padding: 8px 14px; border-radius: 4px; white-space: nowrap; }
.pub-links a:hover { background: #f4f5f7; text-decoration: none; }
.pub-links .ico { fill: none; }
.country { font-weight: 700; color: #444; font-size: .9rem; margin-left: 8px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 20px; }
.fxbar { background: #fff; display: flex; justify-content: center; gap: 4rem; padding: 10px 16px; box-shadow: 0 2px 4px rgba(0,0,0,.06); flex-wrap: wrap; }
.fx-rates { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.fx-rates span { white-space: nowrap; }
.fx-link { color: var(--blue); font-weight: 600; display: inline-flex; gap: .35rem; align-items: center; font-size: 1.05rem; }
.fx-link .ico { fill: none; }
.pub-main { flex: 1; padding: 48px 16px 120px; position: relative;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='160' viewBox='0 0 220 160'%3E%3Cg fill='none' stroke='%23d9d6cf' stroke-width='2'%3E%3Crect x='20' y='60' width='70' height='50' rx='4'/%3E%3Cpath d='M30 72h50M30 84h30'/%3E%3Cpath d='M120 70l30-18 30 18M126 70v36M140 70v36M160 70v36M174 70v36M118 108h66'/%3E%3Ccircle cx='60' cy='135' r='12'/%3E%3Cpath d='M57 131h6M60 128v14'/%3E%3Crect x='150' y='118' width='40' height='26' rx='3'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-x; background-position: bottom 30px center; }
body.public { display: flex; flex-direction: column; }
.pub-footer { background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; gap: 1rem; padding: 16px; flex-wrap: wrap; font-size: .9rem; }
.pub-footer .logo-img { height: 30px; }
.login-wrap { max-width: 520px; margin: 0 auto; }
.login-card { background: #fff; box-shadow: var(--shadow); padding: 40px clamp(20px, 6vw, 72px) 32px; position: relative; }
.login-card.wide { }
.login-wrap:has(.wide) { max-width: 620px; }
.card-shield { position: absolute; top: 24px; right: 24px; color: var(--ink); }
.card-shield .ico { width: 34px; height: 34px; fill: none; }
.card-shield svg[viewBox] path, .card-shield svg circle { stroke: currentColor; }
.welcome { text-align: center; margin: 1rem 0 .2rem; font-size: 1.1rem; }
.login-card h1 { text-align: center; font-size: 2rem; font-weight: 700; margin-bottom: 1.6rem; }
.login-card label { display: block; font-weight: 600; font-size: .92rem; margin: 1rem 0 .4rem; }
.login-card input:not([type=checkbox]) { width: 100%; }
.check { display: flex !important; align-items: center; gap: .6rem; font-weight: 400 !important; color: #444; }
.check input { width: 18px; height: 18px; }
.pw { position: relative; }
.pw-eye { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; color: #333; }
.hint-2fa { display: flex; gap: .5rem; align-items: center; color: var(--muted); font-size: .85rem; margin: 1.2rem 0; }
.hint-2fa .ico { width: 18px; height: 18px; }
.link-center { display: block; text-align: center; margin-top: 1.4rem; }
.login-sub { display: flex; justify-content: center; gap: .5rem; align-items: center; background: #fff; box-shadow: var(--shadow); margin-top: 18px; padding: 22px; font-size: 1.05rem; }
.login-sub .ico { fill: none; }
.demo-users { background: #fff; box-shadow: var(--shadow); margin-top: 18px; }
.du-head { padding: 18px 22px 12px; border-bottom: 1px solid var(--line); }
.du-head h2 { margin: 0 0 .3rem; font-size: 1.05rem; }
.du-head p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.du-head code { background: #eef2f7; color: var(--ink); padding: 1px 6px; border-radius: 3px; white-space: nowrap; }
.du-list { list-style: none; margin: 0; padding: 0; }
.du-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 22px; border: 0; border-bottom: 1px solid #f0f0f0; background: #fff; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.du-item:hover, .du-item:focus-visible { background: #f4f8fd; outline: none; }
.du-item.selected { background: #eaf2fc; box-shadow: inset 3px 0 0 var(--blue); }
.du-avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.du-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.du-main b { font-size: .92rem; }
.du-main small { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.du-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; }
.du-meta small { color: var(--muted); font-size: .75rem; }
.du-badge { font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: #fff1c2; color: #6b4e00; white-space: nowrap; }
.du-badge.on { background: #e7f6ec; color: var(--pos); }
.du-foot { margin: 0; padding: 12px 22px 16px; font-size: .8rem; color: var(--muted); line-height: 1.5; }
/* Usuarios de prueba: ocultos al inicio, se muestran con un enlace discreto bajo las tarjetas. */
.du-toggle { margin-top: 14px; text-align: center; }
.du-toggle > summary { display: inline-block; list-style: none; cursor: pointer; font-size: .85rem; color: var(--muted); padding: 6px 12px; border-radius: 4px; background: var(--bg); position: relative; }
.du-toggle > summary::-webkit-details-marker { display: none; }
.du-toggle > summary:hover, .du-toggle > summary:focus-visible { color: var(--blue); text-decoration: underline; outline: none; }
.du-toggle .du-hide, .du-toggle[open] .du-show { display: none; }
.du-toggle[open] .du-hide { display: inline; }
.du-toggle .demo-users { text-align: left; margin-top: 8px; }
.login-flash { animation: loginFlash 1.2s ease-out; }
@keyframes loginFlash { from { box-shadow: 0 0 0 4px rgba(47,109,181,.45), var(--shadow); } to { box-shadow: var(--shadow); } }
.help-bubble { position: fixed; right: 32px; bottom: 76px; background: #fff; border: 1px solid #b9c7e6; border-radius: 40px; padding: 14px 22px; color: var(--ink); box-shadow: var(--shadow); display: flex; gap: .5rem; align-items: center; }
.help-bubble .ico { fill: none; }
.help-page { max-width: 820px; margin: 0 auto; background: #fff; padding: 32px; box-shadow: var(--shadow); }
.enroll-steps { padding-left: 1.2rem; line-height: 1.5; }
.enroll-steps li { margin: .7rem 0; }
.qr-box { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin: 1rem 0; padding: 16px; border: 1px dashed #cfd5dd; background: #fafbfc; }
.qr-box img { image-rendering: pixelated; background: #fff; padding: 6px; }
.manual { font-size: .9rem; width: 100%; } .manual summary { cursor: pointer; color: var(--blue); text-align: center; }
.secret { display: inline-block; background: #eef2f7; padding: 4px 8px; border-radius: 3px; letter-spacing: .05em; word-break: break-all; }
.soft-token { text-align: center; margin: 1.5rem 0; }
.soft-code { font-size: 2.8rem; letter-spacing: .18em; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.soft-bar { height: 6px; background: #eee; margin: .8rem auto; max-width: 260px; border-radius: 3px; overflow: hidden; }
.soft-bar span { display: block; height: 100%; background: var(--blue); transition: width 1s linear; }

/* formularios */
input, select, textarea { font: inherit; padding: 11px 12px; border: 1px solid #cfd5dd; border-radius: 2px; background: #fff; color: var(--ink); min-width: 0; }
.login-card input:not([type=checkbox]) { background: #e8f0fe; border: 0; border-bottom: 1px solid #9aa4b1; padding: 14px; }
input:focus, select:focus { outline: 2px solid #8fb3e6; outline-offset: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid transparent; padding: 11px 22px; font: inherit; font-weight: 600; cursor: pointer; border-radius: 2px; text-decoration: none !important; }
.btn-primary { background: var(--blue); color: #fff; } .btn-primary:hover { background: var(--blue-dark); }
.btn-outline { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn-ghost { background: transparent; color: var(--ink); border-color: #c9ced6; }
.btn-danger { background: var(--neg); color: #fff; }
.btn-block { width: 100%; padding: 16px; font-size: 1.05rem; margin-top: .5rem; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.link-btn { background: none; border: 0; color: var(--blue); cursor: pointer; font: inherit; padding: 0; }
.link-btn.danger { color: var(--neg); }
.token-input { text-align: center; font-size: 1.6rem; font-weight: 600; letter-spacing: .4em; font-variant-numeric: tabular-nums; width: 100%; max-width: 260px; }
.token-input.big { display: block; margin: 1rem auto; font-size: 2rem; }
.token-box { border: 1px solid #c9d8ee; background: #f4f8fd; padding: 16px; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; justify-content: space-between; margin: .5rem 0; }
.token-head { display: flex; gap: .7rem; align-items: center; color: var(--blue); }
.token-head div { display: flex; flex-direction: column; color: var(--ink); }
.token-head small { color: var(--muted); }
.alert { padding: 12px 16px; margin: 0 0 1rem; border-left: 4px solid; background: #fff; }
.alert-error { border-color: var(--neg); background: #fdf0ef; color: #7a1a12; }
.alert-ok { border-color: var(--pos); background: #edf7ef; color: #14532d; }
.alert-info { border-color: var(--blue); background: #eef4fb; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.4rem; }
.form-grid label { display: flex; flex-direction: column; gap: .35rem; font-weight: 600; font-size: .9rem; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid input:not([type=radio]):not([type=checkbox]), .form-grid select { width: 100%; }
select { max-width: 100%; text-overflow: ellipsis; }
.form-grid > *, .new-dest { min-width: 0; }
.form-grid.inner { margin: 0; }
.actions-row { display: flex; gap: .8rem; justify-content: flex-end; flex-wrap: wrap; margin-top: .5rem; }
.note { background: #fff8e6; border-left: 3px solid #e0a100; padding: 10px 12px; font-size: .88rem; margin: 0; }
fieldset.options { border: 1px solid var(--line); padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 1rem 2rem; }
fieldset.options legend { font-weight: 600; font-size: .9rem; padding: 0 .3rem; }
label.radio { flex-direction: row !important; align-items: center; gap: .5rem !important; font-weight: 400 !important; }
.inline-input { width: 130px; padding: 6px 8px; }

/* portal */
body.portal { display: grid; grid-template-columns: 250px 1fr; padding-top: 24px; }
.demo-ribbon { position: fixed; top: 0; left: 0; right: 0; height: 24px; background: #ffe9a8; color: #5c4400; font-size: .78rem; text-align: center; line-height: 24px; z-index: 50; padding: 0 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar { background: var(--side); color: #eee; min-height: calc(100vh - 24px); position: sticky; top: 24px; height: calc(100vh - 24px); overflow-y: auto; display: flex; flex-direction: column; }
.side-brand { display: flex; align-items: center; min-height: 80px; padding: 18px 22px; background: var(--red); text-decoration: none !important; }
.side-brand .logo-img { height: auto; width: 100%; max-width: 200px; }
.side-nav { display: flex; flex-direction: column; padding: 6px 0; flex: 1; }
.nav-item { display: flex; align-items: center; gap: .8rem; padding: 14px 20px; color: #f2f2f2; font-weight: 600; cursor: pointer; list-style: none; border-bottom: 1px solid #2c2c2c; }
.nav-item::-webkit-details-marker { display: none; }
summary.nav-item::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 2px solid #aaa; border-bottom: 2px solid #aaa; transform: rotate(45deg); transition: transform .15s; }
details[open] > summary.nav-item::after { transform: rotate(-135deg); }
.nav-item:hover { background: var(--side-2); text-decoration: none; }
.nav-item.active { background: var(--red); }
.nav-item .ico { fill: currentColor; }
.nav-item .ico path[fill=none] { fill: none; }
.nav-sub { display: block; padding: 10px 20px 10px 52px; color: #d8d8d8; font-size: .92rem; }
.nav-sub:hover { background: var(--side-2); text-decoration: none; }
.nav-sub.active { background: var(--red); color: #fff; }
.side-fx { padding: 16px 20px; border-top: 1px solid #333; font-size: .82rem; }
.side-fx-title { font-weight: 700; text-align: center; margin-bottom: .5rem; }
.side-fx-row { display: flex; justify-content: space-between; gap: .5rem; color: #ccc; flex-wrap: wrap; }
.main { min-width: 0; display: flex; flex-direction: column; min-height: calc(100vh - 24px); }
.topbar { background: #fff; display: flex; align-items: center; gap: 16px; min-height: 68px; padding: 10px 28px; border-bottom: 1px solid var(--line); position: sticky; top: 24px; z-index: 10; }
.topbar-title { font-size: 1.1rem; color: var(--red); font-weight: 600; white-space: nowrap; flex: none; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; min-width: 0; flex: 0 1 auto; }
.tb-item { display: flex; align-items: center; gap: 10px; padding: 4px 20px; min-width: 0; margin: 0; }
.tb-item + .tb-item { border-left: 1px solid var(--line); }
.tb-item:last-child { padding-right: 0; }
.tb-session, .tb-logout { flex: none; }
.tb-user { flex: 0 1 auto; }
.tb-session { color: var(--muted); font-size: .85rem; white-space: nowrap; gap: 6px; }
.tb-session .ico { width: 18px; height: 18px; }
.tb-session b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; min-width: 2.6em; }
.tb-session.warn, .tb-session.warn b { color: var(--neg); }
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .95rem; letter-spacing: .02em; }
.who { display: flex; flex-direction: column; gap: 2px; line-height: 1.25; min-width: 0; }
.who strong, .who small { display: block; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who strong { font-size: .95rem; }
.who small { color: var(--muted); font-size: .8rem; }
.btn-logout { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--ink); border: 1px solid #c9ced6; border-radius: 4px; padding: 8px 16px; cursor: pointer; font: inherit; font-weight: 600; white-space: nowrap; }
.btn-logout .ico { width: 18px; height: 18px; }
.btn-logout:hover { border-color: var(--red); color: var(--red); }
.menu-btn { display: none; flex: none; background: none; border: 1px solid transparent; border-radius: 4px; padding: 6px; cursor: pointer; color: var(--ink); }
.menu-btn:hover { background: #f4f5f7; }
.menu-btn .ico { width: 24px; height: 24px; }
.sidebar-backdrop { display: none; }
.content { padding: 24px 28px 40px; flex: 1; max-width: 1280px; width: 100%; }
.portal-footer { padding: 14px 28px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); background: #fff; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head h1 { margin-bottom: .2rem; } .page-head p { margin: 0; }
.quick { display: flex; gap: .6rem; flex-wrap: wrap; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: .4rem; }
.panel { background: var(--panel); box-shadow: var(--shadow); padding: 20px 24px; margin-bottom: 20px; }
.panel-title { margin: 0 0 1rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; color: #333; border-bottom: 2px solid var(--line); padding-bottom: .6rem; }
.section-caps { font-size: .95rem; letter-spacing: .05em; margin: 0 0 1rem; border-bottom: 1px solid #333; padding-bottom: .6rem; }
.form-panel { max-width: 860px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: #fff; box-shadow: var(--shadow); padding: 16px 18px; border-top: 3px solid var(--red); display: flex; flex-direction: column; gap: .2rem; }
.kpi small { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.kpi strong { font-size: 1.45rem; } .kpi em { font-style: normal; color: var(--muted); font-size: .8rem; }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-size: .78rem; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #fafafa; }
.tbl th.r { text-align: right; }
.tbl td { padding: 10px; border-bottom: 1px solid #f0f0f0; vertical-align: top; }
.tbl tr:hover td { background: #fafcff; }
.tbl .amount { font-weight: 700; font-size: 1rem; }
.tbl .desc { font-weight: 600; font-size: .88rem; }
.tbl .empty, .empty { text-align: center; color: var(--muted); padding: 28px; }
.prod { display: flex; flex-direction: column; color: var(--ink); } .prod small { color: var(--muted); }
.actions { white-space: nowrap; } .actions a, .actions form { margin-left: .8rem; }
form.inline { display: inline; }
.ua { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ccard { background: linear-gradient(135deg, #2b2b2b, #4a4a4a); color: #fff; padding: 18px; border-radius: 12px; display: flex; flex-direction: column; gap: .7rem; text-decoration: none !important; }
.ccard.mc { background: linear-gradient(135deg, #7a1218, var(--red)); }
.ccard-top { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.ccard-top .mark { height: 26px; }
.ccard-num { font-variant-numeric: tabular-nums; letter-spacing: .14em; font-size: 1.05rem; font-weight: 500; }
.ccard-row { display: flex; justify-content: space-between; } .ccard-row div { display: flex; flex-direction: column; } .ccard small { opacity: .8; font-size: .75rem; }
.usage { height: 6px; background: rgba(255,255,255,.25); border-radius: 3px; overflow: hidden; }
.usage span { display: block; height: 100%; background: #fff; width: 0; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.mov-list { list-style: none; margin: 0 0 .8rem; padding: 0; }
.mov-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.mov-list li div { display: flex; flex-direction: column; min-width: 0; } .mov-list b { font-size: .88rem; } .mov-list small { color: var(--muted); font-size: .78rem; }
.mov-list span { font-weight: 700; white-space: nowrap; }
.filters { display: flex; flex-wrap: wrap; gap: .8rem; align-items: flex-end; margin-bottom: 1rem; }
.filters label { display: flex; flex-direction: column; font-size: .8rem; font-weight: 600; gap: .25rem; }
.filters .grow { flex: 1; min-width: 200px; }
.filters input, .filters select { padding: 8px 10px; }
.filters .btn { padding: 9px 16px; }
.totals { display: flex; gap: 2rem; flex-wrap: wrap; font-size: .9rem; padding: 8px 0 12px; color: var(--muted); }
.pager { display: flex; justify-content: center; gap: 1.5rem; padding-top: 1rem; }
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 10px 18px; color: var(--ink); border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a.active { border-color: var(--red); font-weight: 600; color: var(--red); }
.tabs a:hover { text-decoration: none; background: #fafafa; }
.badge { display: inline-block; background: #fff1c2; color: #6b4e00; font-size: .75rem; padding: 3px 8px; border-radius: 10px; vertical-align: middle; font-weight: 600; }
.ok-badge { display: inline-block; background: #e7f6ec; color: var(--pos); font-weight: 700; padding: 4px 10px; border-radius: 12px; font-size: .85rem; }
.steps { display: flex; list-style: none; padding: 0; margin: 0 0 18px; gap: 0; counter-reset: s; max-width: 860px; }
.steps li { flex: 1; text-align: center; padding: 10px; background: #e6e8eb; color: var(--muted); font-size: .85rem; font-weight: 600; counter-increment: s; }
.steps li::before { content: counter(s) ". "; }
.steps li.done { background: #d7e6f7; color: var(--blue-dark); }
.steps li.current { background: var(--blue); color: #fff; }
dl.summary { display: grid; grid-template-columns: 180px 1fr; gap: .6rem 1rem; margin: 0 0 1.2rem; }
dl.summary dt { color: var(--muted); font-size: .88rem; } dl.summary dd { margin: 0; }
dl.summary .amount { font-size: 1.3rem; font-weight: 700; }
.receipt { max-width: 720px; }
.receipt-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid var(--line); padding-bottom: 1rem; margin-bottom: 1rem; }
.receipt h1 { margin-bottom: .2rem; }
.receipt-head .logo-img { height: 38px; }
.bill { display: flex; gap: 2rem; flex-wrap: wrap; background: #f6f8fb; padding: 14px 18px; border: 1px solid var(--line); }
.bill div { display: flex; flex-direction: column; } .bill small { color: var(--muted); }
.danger-zone { margin-top: 1rem; border: 1px solid #f1c9c5; padding: 10px 14px; }
.danger-zone summary { cursor: pointer; color: var(--neg); font-weight: 600; }
.link { font-size: .9rem; }

/* servicios */
.svc-search { display: flex; align-items: center; gap: .5rem; border-bottom: 1px solid #bbb; max-width: 340px; margin-bottom: 1.4rem; color: var(--muted); }
.svc-search .ico { fill: none; }
.svc-search input { border: 0; flex: 1; padding: 8px 4px; }
.svc-grid:has(.svc-tile[open]) { padding-bottom: 240px; }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0; position: relative; }
.svc-tile { border-top: 1px solid #444; margin: 0 10px 22px; }
.svc-tile summary { list-style: none; display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 18px 6px 6px; cursor: pointer; text-align: center; font-size: .82rem; color: #333; }
.svc-tile summary::-webkit-details-marker { display: none; }
.svc-tile summary svg { color: #222; }
.svc-tile[open] summary { color: var(--red); } .svc-tile[open] { border-top-color: var(--red); }
.svc-pop { position: absolute; left: 0; right: 0; z-index: 5; background: #fff; border: 2px solid #e5a6a9; box-shadow: var(--shadow); padding: 18px 24px; margin-top: 6px; display: flex; flex-direction: column; }
.svc-pop h3 { margin: 0 0 .6rem; }
.svc-pop a { padding: 10px 0; border-bottom: 1px solid #eee; color: #555; font-size: 1.05rem; }

/* La burbuja de ayuda solo flota cuando cabe al lado de la tarjeta de ingreso (520px centrada). */
@media (max-width: 1320px) {
  .help-bubble { position: static; width: fit-content; margin: 18px auto 0; box-shadow: none; }
}
@media (max-width: 1180px) {
  .tb-item { padding-left: 16px; padding-right: 16px; }
  .tb-label { display: none; }
}
@media (max-width: 900px) {
  body.portal { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 24px; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; }
  .sidebar.open + .sidebar-backdrop { display: block; position: fixed; inset: 24px 0 0 0; background: rgba(0,0,0,.35); z-index: 30; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 10px 16px; gap: 10px; min-height: 60px; }
  .tb-item { padding-left: 12px; padding-right: 12px; }
  .tb-label, .who small { display: none; }
  .two-col, .form-grid { grid-template-columns: 1fr; }
  .content { padding: 18px 16px; }
  dl.summary { grid-template-columns: 1fr; }
  .fxbar { gap: 1rem; }
  .pub-sub, .divider:not(.light) { display: none; }
}
@media (max-width: 640px) {
  .ribbon-more { display: none; }
  .card-shield { top: 14px; right: 14px; }
  .card-shield .ico { width: 26px; height: 26px; }
  .login-card { padding-top: 48px; }
  .topbar-title, .who { display: none; }
  .tb-user { padding-left: 10px; padding-right: 10px; }
  .btn-logout { padding: 8px 10px; }
  .btn-logout span { display: none; }
  .pub-brand .logo-img { height: 34px; }
  .pub-links a { padding: 8px; }
  .pub-links a span { display: none; }
  .country { margin-left: 2px; }
}
@media print {
  .sidebar, .topbar, .demo-ribbon, .noprint, .portal-footer, .steps { display: none !important; }
  body.portal { display: block; padding: 0; }
  .panel { box-shadow: none; }
}
