/* ============================================================
   Agosto — sistema de gestión
   Diseño: fondo negro, texto blanco, acento amarillo, geométrico minimalista
   ============================================================ */

:root {
    --bg:        #000000;
    --surface:   #0e0e0e;
    --surface-2: #161616;
    --border:    #262626;
    --text:      #ffffff;
    --muted:     #8a8a8a;
    --accent:    #F1C40F;
    --accent-ink:#000000;
    --danger:    #ff4d4d;
    --ok:        #35d07f;
    --zebra:     rgba(255,255,255,.025);
    --radius:    4px;
    --sidebar-w: 232px;
    --topbar-h:  72px;   /* alto de la barra de título; el logo se alinea con él */
    --font: "Helvetica Neue", Arial, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Tema claro (fondo gris muy claro, texto negro, mismo amarillo de acento) */
:root[data-theme="light"] {
    --bg:        #f5f5f6;
    --surface:   #ffffff;
    --surface-2: #ececee;
    --border:    #e0e0e3;
    --text:      #141414;
    --muted:     #6b6b70;
    --accent:    #F1C40F;
    --accent-ink:#141414;
    --danger:    #d92d20;
    --ok:        #0f8a4f;
    --zebra:     rgba(0,0,0,.02);
}

/* Overrides de tema claro */
:root[data-theme="light"] .auth { background: radial-gradient(600px 300px at 50% 0%, #ffffff, #ececee); }
:root[data-theme="light"] .topbar { background: rgba(255,255,255,.85); }
:root[data-theme="light"] .brand-logo,
:root[data-theme="light"] .auth-logo { filter: invert(1); }

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.45;
}

a { color: inherit; text-decoration: none; }

/* ---------- Login ---------- */
.auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(600px 300px at 50% 0%, #141414, #000);
}
.auth-card {
    width: 100%;
    max-width: 360px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    text-align: center;
}
.auth-logo { width: 148px; margin: 0 auto 2rem; display: block; }
.auth-card h1 { font-size: 1.1rem; font-weight: 600; letter-spacing: .04em; margin-bottom: 1.5rem; text-transform: uppercase; }

/* ---------- Layout app ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 0 1rem 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}
/* Mismo alto que la barra de título: el logo queda a la altura del h1 */
.sidebar-head {
    display: flex; align-items: center; justify-content: space-between;
    min-height: var(--topbar-h); flex-shrink: 0; margin-bottom: 1rem;
}
.brand { display: flex; align-items: center; padding: 0 .5rem; }
.brand-logo { width: 58px; height: auto; display: block; }

/* Botón hamburguesa (solo visible en mobile) */
.nav-toggle {
    display: none;
    flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; padding: 0 10px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius); cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); transition: transform .2s, opacity .2s; }
.sidebar.open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sidebar.open .nav-toggle span:nth-child(2) { opacity: 0; }
.sidebar.open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.sidebar-menu { display: flex; flex-direction: column; flex: 1; min-height: 0; }
/* Logo arriba y datos del usuario abajo quedan fijos; si el menú no entra
   (ventana baja o zoom), scrollea solo el listado de secciones. Así "Salir"
   nunca se sale del panel. */
.nav { display: flex; flex-direction: column; gap: .15rem; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.nav-link {
    padding: .6rem .75rem;
    border-radius: var(--radius);
    color: var(--muted);
    font-size: .92rem;
    letter-spacing: .01em;
    border-left: 2px solid transparent;
    transition: color .15s, background .15s, border-color .15s;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.active {
    color: var(--text);
    background: var(--surface-2);
    border-left-color: var(--accent);
}

.sidebar-foot { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: .75rem; flex-shrink: 0; }
.theme-toggle {
    display: flex; align-items: center; gap: .5rem;
    width: 100%; margin-bottom: .6rem;
    padding: .5rem .6rem; border: 1px solid var(--border);
    background: var(--surface-2); color: var(--text);
    border-radius: var(--radius); cursor: pointer;
    font-family: inherit; font-size: .82rem; text-align: left;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-ico { font-size: 1rem; line-height: 1; }
.user-mini { display: flex; flex-direction: column; margin-bottom: .6rem; }
.user-name { font-size: .9rem; }
.user-role { font-size: .72rem; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.logout { font-size: .82rem; color: var(--muted); }
.logout:hover { color: var(--danger); }

.content { flex: 1; min-width: 0; }
.topbar {
    padding: .75rem 2rem;
    min-height: var(--topbar-h);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0;
    background: rgba(0,0,0,.85);
    backdrop-filter: blur(6px);
    z-index: 5;
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar h1 { font-size: 1.15rem; font-weight: 600; letter-spacing: .02em; }

/* Campana de notificaciones */
.bell { position: relative; display: inline-flex; align-items: center; padding: .35rem; border-radius: var(--radius); }
.bell:hover { background: var(--surface-2); }
.bell-icon { font-size: 1.1rem; filter: grayscale(.2); }
.bell-count {
    position: absolute; top: -2px; right: -4px;
    min-width: 18px; height: 18px; padding: 0 4px;
    background: var(--accent); color: var(--accent-ink);
    border-radius: 999px; font-size: .68rem; font-weight: 700;
    display: grid; place-items: center;
}
.container { padding: 2rem; max-width: 1100px; }

/* ---------- Componentes ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.grid { display: grid; gap: 1rem; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Listado + panel lateral (ABM). Colapsa a una columna en mobile. */
.split { display: grid; gap: 1.25rem; align-items: start; grid-template-columns: 1fr 340px; }

.stat { display: flex; flex-direction: column; gap: .35rem; }
.stat .label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
/* Se achica sola en pantallas angostas: los montos en pesos son largos y en las
   tarjetas de KPI que comparten fila con otra cosa no entran a 1.8rem. */
.stat .value { font-size: clamp(1.2rem, 1.5vw + .35rem, 1.8rem); font-weight: 700; }

/* Botones */
.btn {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .55rem 1.1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
    font-size: .9rem;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: #1f1f1f; }
.btn:active { transform: translateY(1px); }
.btn:disabled { cursor: not-allowed; }

/* Spinner: se aplica al enviar un formulario, evita doble click */
.btn.is-loading { pointer-events: none; opacity: .7; }
.btn.is-loading::before {
    content: '';
    display: inline-block;
    width: 13px; height: 13px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: btn-spin .6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .btn.is-loading::before { animation: none; } }
.btn-primary {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: var(--accent);
    font-weight: 600;
}
.btn-primary:hover { background: #ffd21f; }
.btn-danger { color: var(--danger); border-color: #3a1f1f; background: transparent; }
.btn-danger:hover { background: #1f1010; }
.btn-sm { padding: .35rem .7rem; font-size: .82rem; }

/* Formularios */
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: .4rem; text-align: left; }
.field label { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.check-inline {
    display: flex; align-items: center; gap: .5rem;
    font-size: .9rem; text-transform: none; letter-spacing: normal; color: var(--text);
    cursor: pointer;
}
.check-inline input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
.input, .select, textarea {
    width: 100%;
    padding: .65rem .8rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: .95rem;
    font-family: inherit;
}
.input:focus, .select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.form-actions { display: flex; gap: .75rem; align-items: center; margin-top: .5rem; }

/* Radios en fila (ej: cliente sin/existente/nuevo) */
.radio-row { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.radio-row label { display: flex; align-items: center; gap: .4rem; font-size: .9rem; color: var(--text); cursor: pointer; }
.radio-row input[type=radio] { accent-color: var(--accent); }
#cliNuevo, #provNuevo { display: grid; gap: .85rem; }
.item-row .i-sub { font-weight: 600; }

/* Checkboxes (ej: sucursales de un proveedor) */
.checks { display: flex; flex-direction: column; gap: .5rem; }
.checks label { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--text); cursor: pointer; }
.checks input[type=checkbox] { accent-color: var(--accent); }

/* Tablas */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
table.data th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; background: var(--surface); }
table.data tbody tr:nth-child(even) { background: var(--zebra); }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--surface); }
table.data tfoot td { border-top: 1px solid var(--border); border-bottom: none; background: var(--surface); }

/* Listados largos: la tabla scrollea dentro de su propio marco y el
   encabezado queda fijo arriba (evita que se pierda al bajar la lista). */
.table-wrap.scroll { max-height: 64vh; overflow-y: auto; }
.table-wrap.scroll table.data thead th { position: sticky; top: 0; z-index: 1; }

/* Paginación */
.pagination { display: flex; align-items: center; justify-content: center; gap: 1.25rem; margin-top: 1.25rem; }
.pagination .btn[aria-disabled="true"] { opacity: .35; pointer-events: none; }

/* Gráficos (barras HTML/CSS, una serie) */
.vbars {
    display: flex; align-items: flex-end; gap: 3px;
    height: 190px; padding-top: .5rem;
    border-bottom: 1px solid var(--border);
}
.vbar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .4rem; min-width: 0; height: 100%; }
.vbar { width: 68%; max-width: 26px; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 2px; transition: opacity .15s; }
.vbar-col:hover .vbar { opacity: .75; }
.vbar-x { font-size: .6rem; color: var(--muted); white-space: nowrap; }

.hbar-chart { display: flex; flex-direction: column; gap: .7rem; }
.hbar-row { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; align-items: center; gap: .75rem; }
.hbar-label { font-size: .86rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: var(--accent); border-radius: 999px; min-width: 3px; }
.hbar-val { font-size: .84rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.chart-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 1rem; }
.stat .value, table.data td { font-variant-numeric: tabular-nums; }

/* Filtros y ranking de ventas */
.filtros { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }

/* Barra de filtros horizontal */
.filter-bar {
    display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1.5rem;
}
.filter-bar .fb { display: flex; flex-direction: column; gap: .3rem; }
.filter-bar .fb label { font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.filter-bar .input, .filter-bar .select { min-width: 128px; }
.filter-bar .fb-actions { display: flex; gap: .5rem; align-items: end; margin-left: auto; }
@media (max-width: 620px) {
    .filter-bar .fb { flex: 1 1 45%; }
    .filter-bar .input, .filter-bar .select { min-width: 0; width: 100%; }
    .filter-bar .fb-actions { margin-left: 0; flex: 1 1 100%; }
}

/* Filtros colapsables: en pantallas chicas la barra ocupa media pantalla antes de
   llegar a los datos, así que se esconde detrás de un botón (lo agrega main.js). */
.filtros-toggle { display: none; }
@media (max-width: 760px) {
    .filtros-toggle {
        display: flex; width: 100%; justify-content: space-between;
        align-items: center; margin-bottom: 1rem;
    }
    .filtros-toggle .chev { transition: transform .15s ease; }
    .filtros-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
    .filter-bar.plegable { display: none; }
    .filter-bar.plegable.open { display: flex; }
}
.ranking { display: flex; flex-direction: column; gap: .5rem; }
.rank-item { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.rank-pos { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .74rem; display: grid; place-items: center; flex-shrink: 0; }
.rank-name { flex: 1; font-size: .9rem; }
.rank-total { font-weight: 600; font-size: .86rem; text-align: right; }

/* Badges */
.badge {
    display: inline-block; padding: .18rem .55rem; border-radius: 999px;
    font-size: .72rem; letter-spacing: .03em; text-transform: uppercase;
    border: 1px solid var(--border); color: var(--muted);
}
.badge.on  { color: var(--ok); border-color: #1c3a2a; }
.badge.off { color: var(--muted); }
.badge.accent { color: var(--accent); border-color: #3a3413; }

/* Flash */
.flash {
    padding: .8rem 1rem; border-radius: var(--radius); margin-bottom: 1rem;
    border: 1px solid var(--border); font-size: .9rem;
}
.flash-ok    { border-color: #1c3a2a; color: var(--ok); }
.flash-error { border-color: #3a1f1f; color: var(--danger); }
.flash-info  { border-color: #3a3413; color: var(--accent); }

/* Notificaciones */
.notif {
    display: flex; gap: .8rem; align-items: flex-start;
    padding: .9rem 1rem; border: 1px solid var(--border);
    border-radius: var(--radius); background: var(--surface);
}
.notif:hover { background: var(--surface-2); }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; margin-top: .45rem; flex-shrink: 0; }
.notif.unread { border-color: #3a3413; }
.notif.unread .notif-dot { background: var(--accent); }
.notif-body { display: flex; flex-direction: column; gap: .2rem; }
.notif-msg { font-size: .93rem; }
.notif-time { font-size: .76rem; }

/* Utilidades */
.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap; }
.muted { color: var(--muted); }
.mt { margin-top: 1.5rem; }
.empty { color: var(--muted); padding: 2rem; text-align: center; }

/* Modales */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.66); backdrop-filter: blur(2px); }
.modal-card {
    position: relative; z-index: 1;
    width: min(480px, calc(100% - 2rem));
    margin: 6vh auto; max-height: 88vh; overflow-y: auto;
    max-height: 88dvh; /* dvh: correcto en navegadores móviles con barra dinámica; vh de arriba queda como fallback */
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 8px; padding: 1.5rem 1.5rem 1.75rem;
    box-shadow: 0 30px 80px rgba(0,0,0,.6);
    animation: modal-in .16s ease;
}
.modal-card.wide { width: min(880px, calc(100% - 2rem)); }

/* Botones del formulario: quedan pegados abajo del modal y siempre visibles,
   sin importar cuán largo sea el formulario (evita tener que scrollear a ciegas). */
.modal-card .form-actions {
    position: sticky; bottom: 0;
    margin: 1.25rem -1.5rem -1.75rem;
    padding: 1rem 1.5rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-radius: 0 0 8px 8px;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .modal-card { animation: none; } }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; }

/* Contexto: datos del "padre" al que pertenece lo que se está cargando */
.modal-context {
    display: flex; flex-wrap: wrap; gap: 1.25rem;
    background: var(--surface-2); border: 1px solid var(--border);
    border-left: 2px solid var(--accent);
    border-radius: var(--radius); padding: .7rem .9rem; margin-bottom: 1.25rem;
}
.mc-item { display: flex; flex-direction: column; gap: .15rem; }
.mc-label { font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mc-value { font-size: .9rem; color: var(--text); font-weight: 600; }
.modal-head h3 { font-size: 1.05rem; font-weight: 600; }
.modal-x { background: none; border: none; color: var(--muted); font-size: 1.25rem; line-height: 1; cursor: pointer; padding: .2rem .35rem; border-radius: var(--radius); }
.modal-x:hover { color: var(--text); background: var(--surface-2); }

/* Responsive */

/* El .split (contenido + panel de 340px) se apila temprano: al ancho de la
   ventana hay que restarle la barra lateral de 280px, así que abajo de ~1100px
   la columna principal queda demasiado angosta (tablas y totales apretados). */
@media (max-width: 1100px) {
    .split { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
    .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
    .app { flex-direction: column; }

    /* Sidebar -> barra superior con hamburguesa */
    .sidebar {
        width: 100%; height: auto; max-height: 100dvh;
        position: sticky; top: 0; z-index: 20;
        flex-direction: column;
        padding: .75rem 1rem;
        border-right: none; border-bottom: 1px solid var(--border);
    }
    .sidebar-head { min-height: 0; margin-bottom: 0; }
    .brand { padding: 0; }
    .brand-logo { width: 50px; }
    .nav-toggle { display: flex; }

    /* Menú colapsable */
    .sidebar-menu { display: none; padding-top: .85rem; }
    .sidebar.open .sidebar-menu { display: flex; }
    .nav { gap: .25rem; }
    .nav-link { padding: .8rem .9rem; font-size: 1rem; }
    .sidebar-foot { margin-top: .85rem; }

    .topbar { padding: 1.1rem 1.25rem; }
    .container { padding: 1.25rem; }
    .grid.cols-3, .grid.cols-2, .grid.cols-4 { grid-template-columns: 1fr; }

    /* Acciones de tabla apiladas y cómodas al tacto */
    table.data td:last-child { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-start; }
    table.data td:last-child .btn { flex: 0 0 auto; }

    /* Modales: aprovechan casi toda la pantalla, con menos margen desperdiciado
       arriba/abajo, para que los formularios largos entren con menos scroll. */
    .modal-card {
        width: calc(100% - 1.25rem);
        margin: 2.5vh auto;
        max-height: 95vh;
        max-height: 95dvh;
        padding: 1.25rem 1.25rem 1.5rem;
    }
    .modal-card .form-actions {
        margin: 1.25rem -1.25rem -1.5rem;
        padding: .85rem 1.25rem;
    }
}

@media (max-width: 420px) {
    .grid.cols-3 { grid-template-columns: 1fr; }
}

/* Formularios en fila (producto, selector de ítem en ventas): colapsan a 1 columna en mobile.
   Sin "form." adelante: esta clase se usa tanto en <form> como en <div>. */
@media (max-width: 760px) {
    .form-row { grid-template-columns: 1fr !important; }
}

/* Tablas apiladas en pantallas chicas: cada fila se convierte en una tarjeta con la
   etiqueta de cada columna al costado (viene de data-label). Evita el scroll horizontal
   en tablas con muchas columnas y campos para completar (ventas, visita a un punto de
   venta). Corta en 900px porque a la ventana hay que restarle la barra lateral. */
@media (max-width: 900px) {
    .table-wrap:has(> .table-stack) { border: none; }
    .table-wrap.scroll:has(> .table-stack) { max-height: none; overflow-y: visible; }
    table.table-stack thead { display: none; }
    table.table-stack, table.table-stack tbody, table.table-stack tfoot,
    table.table-stack tr, table.table-stack td { display: block; width: 100%; }
    table.table-stack tr {
        border: 1px solid var(--border); border-radius: var(--radius);
        background: var(--surface); margin-bottom: .75rem; padding: .35rem 0;
    }
    table.table-stack tbody tr:nth-child(even) { background: var(--surface); }
    table.table-stack td {
        display: flex; align-items: center; justify-content: space-between;
        gap: 1rem; border-bottom: none; padding: .45rem .9rem;
    }
    table.table-stack td::before {
        content: attr(data-label);
        color: var(--muted); font-size: .72rem; font-weight: 600;
        text-transform: uppercase; letter-spacing: .04em; flex: 0 0 auto;
    }
    /* etiqueta a la izquierda, valor a la derecha (gana sobre la regla de acciones
       apiladas de la última columna) */
    table.table-stack td[data-label]:not([data-label=""]) { justify-content: space-between; flex-wrap: nowrap; }
    /* data-label vacío = celda sin etiqueta: el título de la tarjeta o los botones */
    table.table-stack td[data-label=""]::before { content: none; }
    table.table-stack td[data-label=""] {
        font-weight: 700; padding-bottom: .2rem;
        justify-content: flex-start; flex-wrap: wrap; gap: .4rem; text-align: left !important;
    }
    table.table-stack td .input { width: 7.5rem !important; text-align: right; }
    table.table-stack tfoot tr { background: none; border-color: var(--accent); }
}
