:root {
    --bg: #f4f6fa;
    --panel: #ffffff;
    --texto: #1b2333;
    --muted: #677189;
    --borde: #dfe4ee;
    --primario: #1d4ed8;
    --primario-h: #1e40af;
    --primario-suave: #e8efff;
    --peligro: #c2410c;
    --ok: #15803d;
    --ok-suave: #e7f6ec;
    --error: #b91c1c;
    --error-suave: #fdecec;
    --aviso-suave: #fff6e0;
    --radio: 10px;
    --sombra: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: 14px;
    color: var(--texto);
    background: var(--bg);
}
a { color: var(--primario); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0; }
h3 { font-size: 15px; margin: 14px 0 8px; }
h1:focus { outline: none; }
code { font-family: Consolas, monospace; font-size: 13px; }
.muted { color: var(--muted); }
.chico { font-size: 12px; }

/* ---------- barra superior ---------- */
.topbar {
    display: flex; align-items: center; gap: 24px;
    padding: 0 20px; height: 56px;
    background: #0f1b3d; color: #fff;
    position: sticky; top: 0; z-index: 10;
}
.marca { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; font-size: 16px; }
.marca:hover { text-decoration: none; }
.logo {
    display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 7px;
    background: var(--primario); color: #fff; font-weight: 700; font-size: 13px;
}
.menu { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.menu a { color: #c9d3ea; padding: 8px 12px; border-radius: 6px; white-space: nowrap; }
.menu a:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.menu a.active { background: rgba(255, 255, 255, .14); color: #fff; }
.usuario { display: flex; align-items: center; gap: 12px; }
.usuario a { color: #fff; display: flex; align-items: center; gap: 8px; }
.usuario form { margin: 0; }
.btn-link { background: none; border: 0; color: #c9d3ea; cursor: pointer; font: inherit; padding: 6px; }
.btn-link:hover { color: #fff; text-decoration: underline; }
.rol { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.rol-sis { background: #fde68a; color: #713f12; }
.rol-adm { background: #bfdbfe; color: #1e3a8a; }

.contenido { padding: 22px 24px 40px; max-width: 1500px; margin: 0 auto; }

/* ---------- paneles ---------- */
.panel {
    background: var(--panel); border: 1px solid var(--borde); border-radius: var(--radio);
    padding: 18px; box-shadow: var(--sombra); margin-bottom: 16px;
}
.panel.info { background: var(--primario-suave); border-color: #c7d6fb; line-height: 1.7; }
.panel.angosto, .angosto { max-width: 520px; }
.titulo-fila, .barra { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.acciones { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.acciones.derecha { justify-content: flex-end; margin-top: 16px; }
.acciones-fila { white-space: nowrap; text-align: right; }
.acciones-fila .btn { margin-left: 4px; }

/* ---------- botones e inputs ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 8px 14px; border-radius: 7px; border: 1px solid var(--borde);
    background: #fff; color: var(--texto); font: inherit; font-weight: 500; cursor: pointer;
}
.btn:hover:not(:disabled) { background: #f1f4f9; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primario { background: var(--primario); border-color: var(--primario); color: #fff; }
.btn.primario:hover:not(:disabled) { background: var(--primario-h); }
.btn.peligro { color: var(--peligro); border-color: #f3c7b0; }
.btn.peligro:hover:not(:disabled) { background: #fff3ec; }
.btn.chico { padding: 4px 10px; font-size: 12px; }
.btn.ancho { width: 100%; padding: 10px; margin-top: 8px; }

input, select {
    font: inherit; color: inherit; padding: 7px 10px; border: 1px solid var(--borde); border-radius: 7px; background: #fff;
}
input:focus, select:focus { outline: 2px solid #bcd0fb; border-color: var(--primario); }
label { display: block; font-weight: 500; margin-bottom: 12px; }
label > input:not([type=checkbox]), label > select { display: block; width: 100%; margin-top: 4px; font-weight: 400; }
label.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
label.inline > input { display: inline-block; width: auto; margin: 0; }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.buscar { min-width: 220px; }
.input-num { width: 140px; text-align: right; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }

/* ---------- alertas ---------- */
.alerta { padding: 10px 14px; border-radius: 8px; margin: 10px 0; border: 1px solid transparent; }
.alerta.error { background: var(--error-suave); color: var(--error); border-color: #f6caca; }
.alerta.ok { background: var(--ok-suave); color: var(--ok); border-color: #bfe5cb; }
.alerta.aviso { background: var(--aviso-suave); color: #7c4a03; border-color: #f5dea4; }
.alerta ul { margin: 6px 0 0; padding-left: 20px; }
.validation-message, .validation-errors { color: var(--error); }

/* ---------- inicio: grilla de tótems ---------- */
.grupo { margin-bottom: 22px; }
.grupo h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.grilla-totems { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.totem-btn {
    position: relative; text-align: left; padding: 14px 16px; border-radius: var(--radio);
    border: 1px solid var(--borde); background: #fff; cursor: pointer; font: inherit; box-shadow: var(--sombra);
    display: flex; flex-direction: column; gap: 4px; transition: border-color .12s, transform .12s;
}
.totem-btn:hover:not(:disabled) { border-color: var(--primario); transform: translateY(-1px); }
.totem-btn:disabled { cursor: wait; }
.totem-btn.conectando { border-color: var(--primario); background: var(--primario-suave); }
.totem-nombre { font-weight: 600; font-size: 15px; }
.totem-host { color: var(--muted); font-family: Consolas, monospace; font-size: 12px; }
.totem-btn .spinner { position: absolute; right: 12px; top: 14px; }

/* ---------- tótem: encabezado y pestañas ---------- */
.totem-head { margin-bottom: 12px; }
.volver { font-size: 13px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--borde); margin-bottom: 0; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--texto); text-decoration: none; }
.tabs a.active { color: var(--primario); border-bottom-color: var(--primario); font-weight: 600; }
.tabs + .panel { border-top-left-radius: 0; border-top-right-radius: 0; border-top: 0; }

.menu-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.card {
    display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--borde); border-radius: var(--radio);
    color: var(--texto); background: #fbfcfe;
}
.card:hover { border-color: var(--primario); text-decoration: none; background: var(--primario-suave); }
.card b { font-size: 15px; }
.card span { color: var(--muted); }

/* ---------- tablas ---------- */
.tabla-info { color: var(--muted); font-size: 12px; margin: 6px 0; }
.tabla-scroll { overflow: auto; max-height: 68vh; border: 1px solid var(--borde); border-radius: 8px; }
.tabla { border-collapse: collapse; width: 100%; font-size: 13px; }
.tabla th {
    position: sticky; top: 0; background: #16244d; color: #fff; text-align: left; font-weight: 600;
    padding: 8px 10px; white-space: nowrap;
}
.tabla td { padding: 6px 10px; border-bottom: 1px solid #edf0f6; white-space: nowrap; }
.tabla tbody tr:nth-child(even) { background: #f6f9ff; }
.tabla .num { text-align: right; font-variant-numeric: tabular-nums; }
.tabla.clicable tbody tr { cursor: pointer; }
.tabla.clicable tbody tr:hover, .tabla tbody tr:hover { background: #e3ecff; }
.tabla tr.modificada { background: #fff6dd !important; }
.tabla tr.inactivo td { color: #9aa3b6; }
.panel > .tabla-scroll:only-child, .panel > table.tabla { border: 0; }

.estado { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; cursor: help; }
.estado.ok { background: var(--ok-suave); color: var(--ok); }
.estado.mal { background: var(--error-suave); color: var(--error); }

/* ---------- consolidado ---------- */
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 2px 12px; margin-bottom: 10px; }
.checks .check { margin: 0; padding: 4px 0; }

/* ---------- modal ---------- */
.modal-fondo {
    position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: grid; place-items: center; z-index: 50; padding: 20px;
}
.modal {
    background: #fff; border-radius: 12px; padding: 20px; width: min(1000px, 100%); max-height: 90vh; overflow: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.modal.angosto { width: min(640px, 100%); max-width: none; }
.modal h3 { margin-top: 0; }

/* ---------- spinner ---------- */
.spinner {
    display: inline-block; width: 14px; height: 14px; border: 2px solid #c7d2fe; border-top-color: var(--primario);
    border-radius: 50%; animation: giro .8s linear infinite; vertical-align: -2px;
}
@keyframes giro { to { transform: rotate(360deg); } }

/* ---------- login ---------- */
.login-fondo { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, #0f1b3d, #1d3a8a); padding: 20px; }
.login-caja { background: #fff; padding: 30px; border-radius: 14px; width: min(380px, 100%); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.login-marca { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.login-marca h1 { margin: 0; }

/* ---------- ticket de liquidación ---------- */
.ticket {
    font-family: Consolas, "Courier New", monospace; font-size: 13px; width: 360px; max-width: 100%;
    margin: 10px auto; padding: 20px; background: #fff; border: 1px dashed #b8c0d2;
}
.ticket table { width: 100%; border-collapse: collapse; }
.ticket td { padding: 2px; }
.ticket .r { text-align: right; }
.t-title { text-align: center; font-weight: bold; font-size: 16px; margin-bottom: 10px; }
.t-section { margin-top: 15px; font-weight: bold; }
.t-pie { margin-top: 15px; }

@media print {
    body { background: #fff; }
    /* Con un voucher abierto en ventana, se imprime solo el ticket */
    body:has(.imprimible) * { visibility: hidden; }
    body:has(.imprimible) .imprimible .ticket, body:has(.imprimible) .imprimible .ticket * { visibility: visible; }
    body:has(.imprimible) .imprimible .ticket { position: absolute; left: 0; top: 0; }
    .modal-fondo.imprimible { background: none; position: absolute; }
    .modal-fondo.imprimible .modal { box-shadow: none; max-height: none; overflow: visible; }
    .topbar, .tabs, .totem-head, .no-print, #blazor-error-ui { display: none !important; }
    .contenido { padding: 0; }
    .panel { border: 0; box-shadow: none; padding: 0; }
    .ticket { border: 0; margin: 0; padding: 0; width: 72mm; }
}

@media (max-width: 760px) {
    .topbar { height: auto; flex-wrap: wrap; padding: 10px 16px; gap: 8px; }
    .menu { order: 3; width: 100%; }
    .contenido { padding: 16px; }
    .form-grid { grid-template-columns: 1fr; }
}

/* ---------- error de Blazor ---------- */
#blazor-error-ui {
    background: #fff4d6; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, .2); display: none; left: 0;
    padding: .6rem 1.25rem .7rem 1.25rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }
.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; }
.blazor-error-boundary::after { content: "Ocurrió un error."; }

/* ---------- voucher de operación ---------- */
.ticket.voucher { width: 320px; padding: 18px 20px; line-height: 1.55; }
.voucher .v-centro { text-align: center; }
.voucher .v-totem { font-weight: 700; font-size: 15px; letter-spacing: .04em; }
.voucher .v-sep { border-top: 1px dashed #8a93a8; margin: 8px 0; }
.voucher .v-sep.doble { border-top: 3px double #4b5568; }
.voucher .v-fila { display: flex; justify-content: space-between; gap: 12px; }
.voucher .v-fila span:last-child { text-align: right; white-space: nowrap; }
.voucher .v-grande { font-weight: 700; font-size: 14px; }
.voucher .v-titulo { font-weight: 700; margin-bottom: 2px; }
.voucher .v-aviso { color: #b91c1c; }
.voucher .v-pie { font-size: 11px; color: #555; }
@media print {
    .ticket.voucher { width: 72mm; padding: 0; }
    .voucher .v-pie { color: #000; }
}

/* =====================================================================
   Tema "billete": tinta petróleo, verde billete y guilloché
   ===================================================================== */
:root {
    --tinta: #0f2d3a;
    --tinta-2: #16404f;
    --bg: #eef3f1;
    --texto: #15262e;
    --muted: #5d6f76;
    --borde: #d5e0dc;
    --primario: #1d7a5a;
    --primario-h: #155f46;
    --primario-suave: #e3f2ec;
    --oro: #b8862a;
    --oro-suave: #fbf1dc;
    --sello: #b4382f;
    --azul: #2f5f9e;
    --azul-suave: #e6eefa;
    --guilloche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='96' viewBox='0 0 240 96'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.07' stroke-width='1'%3E%3Cpath d='M0,48.0 L4,54.4 L8,59.4 L12,61.9 L16,61.9 L20,60.1 L24,57.8 L28,56.2 L32,56.2 L36,57.8 L40,60.1 L44,61.9 L48,61.9 L52,59.4 L56,54.4 L60,48.0 L64,41.6 L68,36.6 L72,34.1 L76,34.1 L80,35.9 L84,38.2 L88,39.8 L92,39.8 L96,38.2 L100,35.9 L104,34.1 L108,34.1 L112,36.6 L116,41.6 L120,48.0 L124,54.4 L128,59.4 L132,61.9 L136,61.9 L140,60.1 L144,57.8 L148,56.2 L152,56.2 L156,57.8 L160,60.1 L164,61.9 L168,61.9 L172,59.4 L176,54.4 L180,48.0 L184,41.6 L188,36.6 L192,34.1 L196,34.1 L200,35.9 L204,38.2 L208,39.8 L212,39.8 L216,38.2 L220,35.9 L224,34.1 L228,34.1 L232,36.6 L236,41.6 L240,48.0'/%3E%3Cpath d='M0,65.8 L4,68.8 L8,68.9 L12,66.9 L16,63.8 L20,61.1 L24,59.8 L28,59.9 L32,60.8 L36,61.2 L40,60.1 L44,56.5 L48,50.5 L52,43.2 L56,35.9 L60,30.2 L64,27.2 L68,27.1 L72,29.1 L76,32.2 L80,34.9 L84,36.2 L88,36.1 L92,35.2 L96,34.8 L100,35.9 L104,39.5 L108,45.5 L112,52.8 L116,60.1 L120,65.8 L124,68.8 L128,68.9 L132,66.9 L136,63.8 L140,61.1 L144,59.8 L148,59.9 L152,60.8 L156,61.2 L160,60.1 L164,56.5 L168,50.5 L172,43.2 L176,35.9 L180,30.2 L184,27.2 L188,27.1 L192,29.1 L196,32.2 L200,34.9 L204,36.2 L208,36.1 L212,35.2 L216,34.8 L220,35.9 L224,39.5 L228,45.5 L232,52.8 L236,60.1 L240,65.8'/%3E%3Cpath d='M0,75.8 L4,72.8 L8,68.5 L12,64.2 L16,61.0 L20,59.3 L24,58.4 L28,57.4 L32,55.1 L36,50.6 L40,44.0 L44,36.1 L48,28.5 L52,22.7 L56,19.8 L60,20.2 L64,23.2 L68,27.5 L72,31.8 L76,35.0 L80,36.7 L84,37.6 L88,38.6 L92,40.9 L96,45.4 L100,52.0 L104,59.9 L108,67.5 L112,73.3 L116,76.2 L120,75.8 L124,72.8 L128,68.5 L132,64.2 L136,61.0 L140,59.3 L144,58.4 L148,57.4 L152,55.1 L156,50.6 L160,44.0 L164,36.1 L168,28.5 L172,22.7 L176,19.8 L180,20.2 L184,23.2 L188,27.5 L192,31.8 L196,35.0 L200,36.7 L204,37.6 L208,38.6 L212,40.9 L216,45.4 L220,52.0 L224,59.9 L228,67.5 L232,73.3 L236,76.2 L240,75.8'/%3E%3Cpath d='M0,57.7 L4,53.2 L8,50.3 L12,49.2 L16,49.7 L20,50.4 L24,50.3 L28,48.3 L32,44.2 L36,38.8 L40,33.4 L44,29.5 L48,28.1 L52,29.6 L56,33.4 L60,38.3 L64,42.8 L68,45.7 L72,46.8 L76,46.3 L80,45.6 L84,45.7 L88,47.7 L92,51.8 L96,57.2 L100,62.6 L104,66.5 L108,67.9 L112,66.4 L116,62.6 L120,57.7 L124,53.2 L128,50.3 L132,49.2 L136,49.7 L140,50.4 L144,50.3 L148,48.3 L152,44.2 L156,38.8 L160,33.4 L164,29.5 L168,28.1 L172,29.6 L176,33.4 L180,38.3 L184,42.8 L188,45.7 L192,46.8 L196,46.3 L200,45.6 L204,45.7 L208,47.7 L212,51.8 L216,57.2 L220,62.6 L224,66.5 L228,67.9 L232,66.4 L236,62.6 L240,57.7'/%3E%3Cpath d='M0,48.5 L4,45.9 L8,45.0 L12,44.8 L16,44.1 L20,41.8 L24,37.8 L28,32.6 L32,27.5 L36,24.0 L40,23.3 L44,25.7 L48,30.6 L52,36.9 L56,42.9 L60,47.5 L64,50.1 L68,51.0 L72,51.2 L76,51.9 L80,54.2 L84,58.2 L88,63.4 L92,68.5 L96,72.0 L100,72.7 L104,70.3 L108,65.4 L112,59.1 L116,53.1 L120,48.5 L124,45.9 L128,45.0 L132,44.8 L136,44.1 L140,41.8 L144,37.8 L148,32.6 L152,27.5 L156,24.0 L160,23.3 L164,25.7 L168,30.6 L172,36.9 L176,42.9 L180,47.5 L184,50.1 L188,51.0 L192,51.2 L196,51.9 L200,54.2 L204,58.2 L208,63.4 L212,68.5 L216,72.0 L220,72.7 L224,70.3 L228,65.4 L232,59.1 L236,53.1 L240,48.5'/%3E%3Cpath d='M0,37.7 L4,36.9 L8,36.1 L12,34.1 L16,30.7 L20,26.4 L24,22.4 L28,20.0 L32,20.4 L36,24.1 L40,30.5 L44,38.4 L48,46.1 L52,52.3 L56,56.3 L60,58.3 L64,59.1 L68,59.9 L72,61.9 L76,65.3 L80,69.6 L84,73.6 L88,76.0 L92,75.6 L96,71.9 L100,65.5 L104,57.6 L108,49.9 L112,43.7 L116,39.7 L120,37.7 L124,36.9 L128,36.1 L132,34.1 L136,30.7 L140,26.4 L144,22.4 L148,20.0 L152,20.4 L156,24.1 L160,30.5 L164,38.4 L168,46.1 L172,52.3 L176,56.3 L180,58.3 L184,59.1 L188,59.9 L192,61.9 L196,65.3 L200,69.6 L204,73.6 L208,76.0 L212,75.6 L216,71.9 L220,65.5 L224,57.6 L228,49.9 L232,43.7 L236,39.7 L240,37.7'/%3E%3Cpath d='M0,40.3 L4,40.7 L8,39.3 L12,36.5 L16,33.4 L20,31.4 L24,31.6 L28,34.6 L32,39.9 L36,46.3 L40,52.5 L44,56.9 L48,58.9 L52,58.7 L56,57.2 L60,55.7 L64,55.3 L68,56.7 L72,59.5 L76,62.6 L80,64.6 L84,64.4 L88,61.4 L92,56.1 L96,49.7 L100,43.5 L104,39.1 L108,37.1 L112,37.3 L116,38.8 L120,40.3 L124,40.7 L128,39.3 L132,36.5 L136,33.4 L140,31.4 L144,31.6 L148,34.6 L152,39.9 L156,46.3 L160,52.5 L164,56.9 L168,58.9 L172,58.7 L176,57.2 L180,55.7 L184,55.3 L188,56.7 L192,59.5 L196,62.6 L200,64.6 L204,64.4 L208,61.4 L212,56.1 L216,49.7 L220,43.5 L224,39.1 L228,37.1 L232,37.3 L236,38.8 L240,40.3'/%3E%3Cpath d='M0,34.7 L4,33.2 L8,31.4 L12,30.6 L16,32.0 L20,36.1 L24,42.5 L28,50.2 L32,57.4 L36,62.8 L40,65.6 L44,65.8 L48,64.2 L52,62.3 L56,61.1 L60,61.3 L64,62.8 L68,64.6 L72,65.4 L76,64.0 L80,59.9 L84,53.5 L88,45.8 L92,38.6 L96,33.2 L100,30.4 L104,30.2 L108,31.8 L112,33.7 L116,34.9 L120,34.7 L124,33.2 L128,31.4 L132,30.6 L136,32.0 L140,36.1 L144,42.5 L148,50.2 L152,57.4 L156,62.8 L160,65.6 L164,65.8 L168,64.2 L172,62.3 L176,61.1 L180,61.3 L184,62.8 L188,64.6 L192,65.4 L196,64.0 L200,59.9 L204,53.5 L208,45.8 L212,38.6 L216,33.2 L220,30.4 L224,30.2 L228,31.8 L232,33.7 L236,34.9 L240,34.7'/%3E%3Cpath d='M0,32.2 L4,32.9 L8,35.6 L12,40.8 L16,48.2 L20,56.6 L24,64.6 L28,70.5 L32,73.5 L36,73.4 L40,71.2 L44,68.1 L48,65.5 L52,64.0 L56,63.7 L60,63.8 L64,63.1 L68,60.4 L72,55.2 L76,47.8 L80,39.4 L84,31.4 L88,25.5 L92,22.5 L96,22.6 L100,24.8 L104,27.9 L108,30.5 L112,32.0 L116,32.3 L120,32.2 L124,32.9 L128,35.6 L132,40.8 L136,48.2 L140,56.6 L144,64.6 L148,70.5 L152,73.5 L156,73.4 L160,71.2 L164,68.1 L168,65.5 L172,64.0 L176,63.7 L180,63.8 L184,63.1 L188,60.4 L192,55.2 L196,47.8 L200,39.4 L204,31.4 L208,25.5 L212,22.5 L216,22.6 L220,24.8 L224,27.9 L228,30.5 L232,32.0 L236,32.3 L240,32.2'/%3E%3C/g%3E%3C/svg%3E");
    --sombra: 0 1px 2px rgba(15, 45, 58, .06), 0 2px 6px rgba(15, 45, 58, .06);
}
body { font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; }
.tabla, .totem-host, .ticket, .input-num, .estado-op { font-variant-numeric: tabular-nums; }

/* barra superior con guilloché */
.topbar {
    background: var(--guilloche) repeat-x center / 240px 96px, linear-gradient(180deg, var(--tinta-2), var(--tinta));
    border-bottom: 3px solid var(--primario);
    height: 60px;
}
.logo { background: var(--primario); box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); border-radius: 8px; }
.menu a.active { background: rgba(255,255,255,.12); box-shadow: inset 0 -2px 0 var(--primario); }
.rol-sis { background: var(--oro-suave); color: #6b4a0c; }
.rol-adm { background: var(--primario-suave); color: var(--primario-h); }

/* login */
.login-fondo { background: var(--guilloche) repeat 0 0 / 240px 96px, var(--guilloche) repeat 120px 48px / 240px 96px, radial-gradient(120% 90% at 20% 0%, var(--tinta-2), var(--tinta) 60%, #0a1f28); }
.login-caja { border-top: 4px solid var(--primario); }

/* títulos de grupo y talones de tótem */
.grupo h2 {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; text-transform: none; letter-spacing: 0; color: var(--texto); font-weight: 650;
}
.grupo h2::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--g); }
.grupo h2 .cuenta { font-weight: 500; color: var(--muted); font-size: 12px; }
.grupo.g0 { --g: #1d7a5a; } .grupo.g1 { --g: #2f5f9e; } .grupo.g2 { --g: #b8862a; }
.grupo.g3 { --g: #0f7c86; } .grupo.g4 { --g: #7a4fa0; }

.grilla-totems { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.totem-btn {
    display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px;
    align-items: center; padding: 14px 16px 14px 18px; border-radius: 10px;
    border: 1px solid var(--borde); background: #fff; box-shadow: var(--sombra);
    /* talón: franja de color del grupo + borde perforado */
    background-image:
        linear-gradient(var(--g), var(--g)),
        radial-gradient(circle at 6px 50%, var(--bg) 4px, transparent 4.5px);
    background-size: 5px 100%, 12px 14px;
    background-position: left top, 2px 0;
    background-repeat: no-repeat, repeat-y;
    transition: border-color .15s, box-shadow .15s;
}
.totem-btn:hover:not(:disabled) { border-color: var(--g); transform: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--g) 18%, transparent), var(--sombra); }
.totem-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--g) 45%, transparent); outline-offset: 2px; }
.totem-btn.conectando { background-color: color-mix(in srgb, var(--g) 7%, #fff); border-color: var(--g); }
.talon-icono {
    grid-row: 1 / span 2; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
    background: color-mix(in srgb, var(--g) 12%, #fff); color: var(--g);
}
.talon-icono svg { width: 18px; height: 18px; }
.totem-nombre { font-size: 15px; font-weight: 650; color: var(--texto); line-height: 1.2; }
.totem-host { font-family: inherit; font-size: 12px; color: var(--muted); }
.totem-btn .spinner { right: 12px; top: 12px; border-top-color: var(--g); }

/* encabezado de cada tótem */
.totem-banda {
    position: relative; overflow: hidden; color: #fff; border-radius: 12px 12px 0 0;
    padding: 16px 22px 18px;
    background: var(--guilloche) repeat-x center / 240px 96px, linear-gradient(120deg, var(--tinta), var(--tinta-2));
}
.totem-banda .volver { color: #b9d3cc; }
.totem-banda h1 { color: #fff; font-size: 26px; margin: 4px 0 8px; font-weight: 650; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: rgba(255,255,255,.12); color: #e5f0ec; }
.chip.fuerte { background: var(--primario); color: #fff; }
.totem-banda + .tabs { background: #fff; border: 1px solid var(--borde); border-top: 0; padding: 0 10px; }
.tabs a { padding: 12px 14px; }
.tabs a.active { color: var(--primario-h); border-bottom-color: var(--primario); }
.totem-banda + .tabs + .panel { border-top: 0; border-radius: 0 0 12px 12px; }

/* tablas */
.tabla th { background: var(--tinta); }
.tabla tbody tr:nth-child(even) { background: #f5f9f7; }
.tabla.clicable tbody tr:hover, .tabla tbody tr:hover { background: var(--primario-suave); }
.tabla-scroll { border-color: var(--borde); border-radius: 10px; }

/* estado de la operación como sello */
.estado-op { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.estado-op.compra { background: var(--primario-suave); color: var(--primario-h); }
.estado-op.venta { background: var(--azul-suave); color: var(--azul); }
.estado-op.dev { background: var(--oro-suave); color: #7a5410; }
.estado-op.mal { background: #fbe7e5; color: var(--sello); }

/* botones y avisos */
.btn.primario { box-shadow: 0 1px 0 rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.12); }
.panel { border-radius: 12px; }
.card:hover { border-color: var(--primario); background: var(--primario-suave); }
.estado.ok { background: var(--primario-suave); color: var(--primario-h); }
input:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--primario) 35%, transparent); border-color: var(--primario); }
.spinner { border-color: #cfe5dc; border-top-color: var(--primario); }

@media print {
    .totem-banda { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
.estado-op.parcial { background: #fde8d4; color: #9a3f0b; }
.voucher .v-tenue { color: var(--muted); font-size: 12px; }

/* ---------- estadística de no entregados ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border: 1px solid var(--borde); border-radius: 12px; padding: 14px 16px; box-shadow: var(--sombra); display: flex; flex-direction: column; gap: 2px; border-left: 4px solid var(--primario); }
.kpi:first-child { border-left-color: var(--sello); }
.kpi-valor { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi-etq { color: var(--muted); font-size: 12.5px; }
.barra-col { width: 220px; }
.mini-barra { display: flex; height: 10px; border-radius: 99px; background: #edf2f0; overflow: hidden; }
.mini-barra .seg.parcial { background: var(--primario); }
.mini-barra .seg.fallida { background: var(--sello); }
.tabla tr.tenue td { color: #9aa7ad; }
.inline-check { display: inline-flex; margin: 0; }
details.selector { margin: 6px 0 4px; }
details.selector summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }

/* ---------- utilidad / facturación ---------- */
.tabs-solas { margin-bottom: 14px; }
.tabla.compacta td, .tabla.compacta th { padding: 5px 8px; font-size: 12.5px; }
.tabla tfoot td { background: #f2f6f4; font-weight: 600; border-top: 2px solid var(--borde); }
.clicable-fila { cursor: pointer; }
.flecha { width: 22px; color: var(--muted); }
.fila-detalle > td { background: #f8fbfa !important; padding: 12px 14px; }
.det-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; }
.det-util h4 { margin: 4px 0 6px; }
.ajustes { margin-top: 12px; }
.ajustes summary { cursor: pointer; font-weight: 600; color: var(--primario-h); }
.ajustes-fila { margin: 10px 0; }
.ajustes-tabla { max-width: 560px; margin-bottom: 10px; }
.factura .fact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 10px 0 16px; }
.fact-item { border: 1px solid var(--borde); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; background: #fbfdfc; }
.fact-item span { color: var(--muted); font-size: 12.5px; }
.fact-item b { font-size: 19px; font-variant-numeric: tabular-nums; }
.fact-item.destacado { border-color: var(--primario); background: var(--primario-suave); }
.fact-item .input-num { width: 100%; font-size: 16px; }
.kpi.kpi-ok { border-left-color: var(--primario); }
.total-totem { font-size: 16px; font-variant-numeric: tabular-nums; }
.angosto-2 { max-width: 820px; }

/* Tótems permitidos por usuario */
.totems-permitidos { border: 1px solid var(--borde, #d9e2e0); border-radius: 10px; padding: .6rem .9rem .8rem; margin: .9rem 0 .4rem; }
.totems-permitidos legend { font-weight: 600; padding: 0 .3rem; }
.totems-check { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .25rem .9rem; max-height: 260px; overflow: auto; }
.totems-check .check { display: flex; align-items: center; gap: .4rem; font-weight: 400; }
.opciones-check .check { align-items: flex-start; line-height: 1.25; }
.opciones-check .check input { margin-top: .2rem; }
pre.version { background: var(--bg); border: 1px solid var(--borde); border-radius: 8px; padding: .6rem .8rem; white-space: pre-wrap; font-size: .85rem; margin: .4rem 0; }
.tabla-scroll.alto { max-height: 520px; overflow: auto; }
tr.fila-fallida td { background: var(--error-suave); }

/* =====================================================================
   Menú lateral
   ===================================================================== */
:root { --sb-ancho: 252px; --sb-compacto: 72px; }

.shell { display: flex; min-height: 100vh; }
.principal { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.contenido { width: 100%; max-width: 1560px; padding: 26px 32px 48px; margin: 0 auto; }
.barra-movil { display: none; }

.sidebar {
    position: sticky; top: 0; height: 100vh; flex: 0 0 var(--sb-ancho); width: var(--sb-ancho);
    display: flex; flex-direction: column; color: #cfe0dc; z-index: 30;
    background:
        var(--guilloche) repeat-y 0 0 / 240px 96px,
        linear-gradient(180deg, var(--tinta-2) 0%, var(--tinta) 55%, #0a222c 100%);
    border-right: 1px solid rgba(255,255,255,.06);
    box-shadow: 1px 0 0 rgba(0,0,0,.08), 6px 0 24px -12px rgba(0,0,0,.35);
    transition: width .18s ease, flex-basis .18s ease;
}
.sb-marca { display: flex; align-items: center; gap: 8px; padding: 18px 14px 14px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.sb-marca .marca { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; }
.sb-marca .logo { flex: 0 0 34px; width: 34px; height: 34px; font-size: 13px; letter-spacing: .02em; }
.marca-texto { display: flex; flex-direction: column; font-weight: 650; font-size: 15px; line-height: 1.15; white-space: nowrap; overflow: hidden; }
.marca-texto small { font-weight: 400; font-size: 11px; color: #9fbab4; letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }

.sb-colapsar, .hamburguesa {
    flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; padding: 0;
    border: 1px solid rgba(255,255,255,.12); border-radius: 7px; background: rgba(255,255,255,.04); color: #cfe0dc; cursor: pointer;
}
.sb-colapsar:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar svg, .barra-movil svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 18px; }

.sb-nav { flex: 1; overflow-y: auto; padding: 8px 12px 16px; }
.sb-seccion { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: #7f9e98; padding: 16px 10px 6px; white-space: nowrap; }
.sb-nav a {
    position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 10px; margin: 2px 0;
    border-radius: 8px; color: #cfe0dc; font-size: 13.5px; white-space: nowrap; text-decoration: none;
    transition: background .12s, color .12s;
}
.sb-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sb-nav a.active { background: rgba(255,255,255,.11); color: #fff; font-weight: 600; }
.sb-nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primario); box-shadow: 0 0 10px var(--primario); }
.sb-nav a.active svg { color: #7fdcb6; }
.sb-nav a span { overflow: hidden; text-overflow: ellipsis; }

.sb-usuario { display: flex; align-items: center; gap: 10px; padding: 14px 14px 16px 16px; border-top: 1px solid rgba(255,255,255,.07); background: rgba(0,0,0,.12); }
.avatar { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 12px; color: var(--tinta); background: linear-gradient(135deg, #bfe9d6, #8fd0b4); }
.sb-usuario-datos { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sb-usuario-datos .nombre { color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-usuario-datos .rol { align-self: flex-start; }
.sb-usuario-acciones { display: flex; gap: 4px; }
.sb-usuario-acciones form { margin: 0; }
.sb-usuario-acciones a, .sb-usuario-acciones button {
    display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; border: 0; padding: 0;
    background: transparent; color: #a9c4be; cursor: pointer;
}
.sb-usuario-acciones a:hover, .sb-usuario-acciones button:hover { background: rgba(255,255,255,.1); color: #fff; }

/* contraído: solo íconos */
.shell.compacto .sidebar { width: var(--sb-compacto); flex-basis: var(--sb-compacto); }
.shell.compacto .marca-texto, .shell.compacto .sb-nav a span, .shell.compacto .sb-usuario-datos { display: none; }
.shell.compacto .sb-marca { flex-direction: column; padding: 16px 0 12px; }
.shell.compacto .sb-seccion { font-size: 0; padding: 10px 0 4px; }
.shell.compacto .sb-seccion::after { content: ""; display: block; height: 1px; margin: 0 12px; background: rgba(255,255,255,.1); }
.shell.compacto .sb-nav a { justify-content: center; padding: 10px 0; }
.shell.compacto .sb-usuario { flex-direction: column; padding: 12px 0; }
.shell.compacto .sb-usuario-acciones { flex-direction: column; }

/* móvil: menú que se desliza */
.sb-velo { display: none; }
@media (max-width: 900px) {
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-102%); transition: transform .2s ease; width: var(--sb-ancho) !important; }
    .shell.movil-abierto .sidebar { transform: none; }
    .shell.movil-abierto .sb-velo { display: block; position: fixed; inset: 0; background: rgba(8,20,26,.45); z-index: 25; }
    .shell.compacto .marca-texto, .shell.compacto .sb-nav a span, .shell.compacto .sb-usuario-datos { display: initial; }
    .sb-colapsar { display: none; }
    .barra-movil {
        display: flex; align-items: center; gap: 10px; padding: 10px 16px; position: sticky; top: 0; z-index: 20; color: #fff;
        background: linear-gradient(180deg, var(--tinta-2), var(--tinta)); border-bottom: 3px solid var(--primario);
    }
    .barra-movil .logo { width: 28px; height: 28px; font-size: 12px; }
    .contenido { padding: 18px 16px 40px; }
}

@media print {
    .sidebar, .barra-movil, .sb-velo { display: none !important; }
    .shell { display: block; }
}

/* =====================================================================
   Marca More Exchange: índigo del logo (#2c2d83) y blanco
   ===================================================================== */
:root {
    --tinta: #1d1e62;
    --tinta-2: #2c2d83;
    --bg: #f1f2f8;
    --texto: #171936;
    --muted: #5f6280;
    --borde: #dcdeec;
    --primario: #2c2d83;
    --primario-h: #1f2066;
    --primario-suave: #ecebfa;
    --acento: #a9abff;
    --azul: #3f6fd1;
    --azul-suave: #e8eefc;
    --sombra: 0 1px 2px rgba(29, 30, 98, .06), 0 2px 8px rgba(29, 30, 98, .07);
}
.panel.info { border-color: #d3d4f1; }
input:focus, select:focus { outline: 2px solid #c9caf3; }
.tabla tbody tr:nth-child(even) { background: #f7f7fc; }
.tabla.clicable tbody tr:hover, .tabla tbody tr:hover { background: var(--primario-suave); }
.tabla tfoot td { background: #f1f1f9; }
.fila-detalle > td { background: #f8f8fd !important; }
.fact-item { background: #fbfbfe; }
.spinner { border-color: #d5d6f0; border-top-color: var(--primario); }
.mini-barra { background: #ececf6; }
.totem-banda .volver { color: #c9caef; }
.chip { color: #ececfb; }
.tabla tr.tenue td { color: #9a9cb5; }
.grupo.g0 { --g: #2c2d83; } .grupo.g1 { --g: #3f6fd1; } .grupo.g2 { --g: #b8862a; }
.grupo.g3 { --g: #0f7c86; } .grupo.g4 { --g: #7a4fa0; }

/* menú lateral con logo */
.sidebar { color: #d6d7f2; background: var(--guilloche) repeat-y 0 0 / 240px 96px, linear-gradient(180deg, #2c2d83 0%, #222370 45%, #16174d 100%); }
.sb-marca { position: relative; flex-direction: column; justify-content: center; padding: 22px 16px 16px; }
.sb-marca .marca { flex-direction: column; justify-content: center; gap: 10px; }
.logo-completo { width: 104px; height: auto; display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
.logo-emblema { display: none; width: 34px; height: auto; }
.marca-texto { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: #c9caef; }
.sb-colapsar { position: absolute; top: 12px; right: 12px; color: #d6d7f2; }
.sb-seccion { color: #8f91c8; }
.sb-nav a { color: #d6d7f2; }
.sb-nav a.active::before { background: var(--acento); box-shadow: 0 0 10px var(--acento); }
.sb-nav a.active svg { color: var(--acento); }
.avatar { color: var(--primario); background: linear-gradient(135deg, #ffffff, #c9caf3); }
.sb-usuario-acciones a, .sb-usuario-acciones button { color: #b9bae6; }
.shell.compacto .logo-completo { display: none; }
.shell.compacto .logo-emblema { display: block; }
.shell.compacto .sb-marca { padding: 14px 0 12px; }
.shell.compacto .sb-colapsar { position: static; margin-top: 8px; }
.barra-movil { background: linear-gradient(180deg, #2c2d83, #1d1e62); border-bottom-color: var(--acento); }
.logo-movil { width: 26px; height: auto; }
.barra-movil small { color: #c9caef; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; margin-left: auto; }
@media (max-width: 900px) {
    .shell.compacto .logo-completo { display: block; }
    .shell.compacto .logo-emblema { display: none; }
}

/* login */
.login-fondo { background: var(--guilloche) repeat 0 0 / 240px 96px, var(--guilloche) repeat 120px 48px / 240px 96px, radial-gradient(120% 90% at 20% 0%, #3a3ba0, #2c2d83 45%, #16174d); }
.login-pila { display: flex; flex-direction: column; align-items: center; gap: 22px; width: min(380px, 100%); }
.login-logo { width: 150px; height: auto; filter: drop-shadow(0 4px 14px rgba(0,0,0,.3)); }
.login-caja { width: 100%; border-top-color: var(--primario); }
.sin-vpn { margin-top: 12px; border-top: 1px dashed var(--borde, #d6d9e4); padding-top: 8px; }
.sin-vpn summary { cursor: pointer; font-weight: 600; }
.sin-vpn ol { margin: 8px 0 8px 18px; line-height: 2; }

/* ---- gráficos (SVG propio) ---- */
.graf { position: relative; }
.graf svg { width: 100%; height: auto; display: block; }
.graf-grid { stroke: #e1e0d9; stroke-width: 1; }
.graf-base { stroke: #c3c2b7; stroke-width: 1; }
.graf-eje { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.graf-hit { fill: transparent; }
.graf-col.hover .graf-hit { fill: rgba(27,35,51,.05); }
.graf-col.tenue rect:not(.graf-hit) { opacity: .45; }
.graf-tip { position: absolute; top: 4px; transform: translateX(-50%); background: #fff; border: 1px solid var(--borde); border-radius: 8px;
    box-shadow: var(--sombra); padding: 8px 10px; font-size: 12.5px; pointer-events: none; min-width: 150px; z-index: 5; }
.graf-tip div { display: flex; align-items: center; gap: 6px; }
.graf-tip div b { margin-left: auto; font-variant-numeric: tabular-nums; }
.graf-pt { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.graf-leyenda { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.grafh { display: flex; flex-direction: column; gap: 6px; }
.grafh-fila { display: grid; grid-template-columns: minmax(120px, 220px) 1fr minmax(140px, auto); gap: 10px; align-items: center; font-size: 13px; }
.grafh-nombre { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grafh-barra { display: flex; gap: 2px; height: 14px; }
.grafh-seg { height: 100%; border-radius: 2px; min-width: 2px; }
.grafh-total { font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi.kpi-ok { border-left-color: #0ca30c; }
.kpi.kpi-parcial { border-left-color: #fab219; }
.kpi.kpi-falla { border-left-color: #d03b3b; }
@media (max-width: 640px) { .grafh-fila { grid-template-columns: 1fr; gap: 2px; } }

/* ---- log de una operación ---- */
.log-op { margin: 10px 0; }
.log-op-lista { max-height: 340px; overflow: auto; border: 1px solid var(--borde); border-radius: 8px; font-family: Consolas, monospace; font-size: 11.5px; }
.log-op-lista > div { display: grid; grid-template-columns: 62px 120px 1fr; gap: 8px; padding: 3px 8px; border-bottom: 1px solid #f0f2f6; }
.log-op-lista .log-h { color: var(--muted); }
.log-op-lista .log-t { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-op-lista .log-m { word-break: break-word; }
.log-op-lista .log-fix { background: #fff7e0; }
.modal.angosto:has(.log-op) { max-width: 860px; }

/* Autorizaciones de tipo de cambio */
.solicitud { border: 1px solid var(--borde); border-left: 4px solid var(--sello); border-radius: 10px; padding: 12px 14px; margin: 10px 0; background: #fff; }
.solicitud-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.solicitud .comentario { min-width: 220px; }
.texto-aviso { color: #9a3f0b; font-weight: 600; }
.sb-nav a .badge { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 99px; background: var(--sello); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.shell.compacto .sb-nav a .badge { position: absolute; top: 4px; right: 10px; margin: 0; padding: 0 5px; font-size: 10px; }
.rol-aut { background: #e6eefa; color: #23467a; }
.rol-lec { background: #eceef3; color: #4a5068; }
.shell.compacto .sb-nav a span.badge { display: inline-block; }

/* Títulos de sección con glosa */
.titulo-seccion { display: flex; flex-direction: column; gap: 2px; font-size: 1.15rem; font-weight: 650; color: var(--texto); }
.titulo-seccion .glosa { font-size: .8rem; font-weight: 400; color: var(--muted); letter-spacing: .01em; }
.barra .titulo-seccion { margin: 0; }
/* Menú lateral: usuario con un solo tótem */
.sb-totem { margin: 4px 4px 6px; padding: 7px 10px; border-radius: 8px; background: rgba(255,255,255,.08); color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shell.compacto .sb-totem { display: none; }
.rol-mas { background: #f3e8fb; color: #5b2a86; }

/* Opciones del tótem: botones grandes */
.opciones-totem { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 16px; }
.opcion {
    position: relative; display: flex; align-items: center; gap: 16px; padding: 22px 20px; min-height: 104px;
    border: 1px solid var(--borde); border-radius: 14px; background: #fff; color: var(--texto); text-decoration: none;
    box-shadow: 0 1px 2px rgba(29,30,98,.05); transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.opcion::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 0 4px 4px 0; background: var(--primario); opacity: 0; transition: opacity .14s; }
.opcion:hover { transform: translateY(-2px); border-color: #c9caf3; box-shadow: 0 10px 24px -12px rgba(29,30,98,.35); text-decoration: none; }
.opcion:hover::before { opacity: 1; }
.opcion-icono { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--primario-suave); color: var(--primario); transition: background .14s, color .14s; }
.opcion:hover .opcion-icono { background: var(--primario); color: #fff; }
.opcion-icono svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.opcion-texto { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.opcion-texto b { font-size: 16.5px; }
.opcion-texto span { font-size: 13px; color: var(--muted); }
.opcion-flecha { font-size: 26px; line-height: 1; color: #b3b5d6; transition: transform .14s, color .14s; }
.opcion:hover .opcion-flecha { transform: translateX(3px); color: var(--primario); }

/* Indicador de carga */
.cargando { margin: 14px 0; border: 1px solid #d9daf3; border-radius: 12px; background: linear-gradient(180deg, #f7f7fe, #fff); overflow: hidden; }
.cargando-barra { height: 3px; background: #e6e7f8; overflow: hidden; }
.cargando-barra span { display: block; width: 35%; height: 100%; background: linear-gradient(90deg, transparent, var(--primario), transparent); animation: cargando-barra 1.1s ease-in-out infinite; }
@keyframes cargando-barra { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }
.cargando-caja { display: flex; align-items: center; gap: 14px; padding: 16px 18px; }
.cargando-caja b { display: block; color: var(--texto); }
.cargando-caja small { color: var(--muted); }
.spinner.grande { width: 28px; height: 28px; border-width: 3px; flex: 0 0 28px; }

/* Verificación en dos pasos */
.codigo-2fa { font-size: 22px; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; max-width: 220px; }
.login-caja .codigo-2fa { max-width: none; width: 100%; }
.qr-2fa { display: flex; align-items: center; gap: 16px; margin: 6px 0 10px; flex-wrap: wrap; }
.qr-2fa img { width: 172px; height: 172px; border: 1px solid var(--borde); border-radius: 10px; padding: 6px; background: #fff; image-rendering: pixelated; }
.qr-2fa code { font-size: 13px; letter-spacing: .06em; }
.pasos-2fa { margin: 6px 0; padding-left: 20px; line-height: 1.55; }
.login-pila.ancha { width: min(460px, 100%); }
.centro { text-align: center; }
.btn-enlace { background: none; border: 0; padding: 6px; color: var(--primario); cursor: pointer; font-size: 13px; text-decoration: underline; }
