/* ==================================================================
   QR-GDM — Hoja de estilos principal
   Colores corporativos:
        Azul/turquesa  #006B8F
        Verde          #009640
        Blanco         #FFFFFF
   Diseño responsive: PC, laptop, tablet y celular.
   ================================================================== */

/* ------------------------------------------------------------------
   1. VARIABLES
   ------------------------------------------------------------------ */
:root {
    --azul:          #006B8F;
    --azul-oscuro:   #005273;
    --azul-claro:    #E6F1F5;
    --verde:         #009640;
    --verde-oscuro:  #007A34;
    --verde-claro:   #E6F5EC;

    --blanco:        #FFFFFF;
    --gris-50:       #F7F9FA;
    --gris-100:      #EFF2F4;
    --gris-200:      #E1E6EA;
    --gris-300:      #CBD3D9;
    --gris-500:      #7A8892;
    --gris-700:      #46535C;
    --gris-900:      #1F2A31;

    --rojo:          #C0392B;
    --rojo-claro:    #FBEAE8;
    --ambar:         #B7791F;
    --ambar-claro:   #FDF6E7;

    --radio:         12px;
    --radio-sm:      8px;
    --sombra:        0 1px 2px rgba(31, 42, 49, .06), 0 4px 16px rgba(31, 42, 49, .06);
    --sombra-alta:   0 8px 30px rgba(31, 42, 49, .12);
    --transicion:    .18s ease;

    --fuente: "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
    --mono:   "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
}

/* ------------------------------------------------------------------
   2. BASE
   ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--fuente);
    font-size: 16px;
    line-height: 1.55;
    color: var(--gris-900);
    background: var(--gris-50);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.25; font-weight: 650; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p  { margin: 0 0 1rem; }

a { color: var(--azul); text-decoration: none; }
a:hover { color: var(--azul-oscuro); text-decoration: underline; }

code, pre {
    font-family: var(--mono);
    font-size: .88em;
}

code {
    background: var(--gris-100);
    border: 1px solid var(--gris-200);
    border-radius: 5px;
    padding: .1em .38em;
    word-break: break-all;
}

img { max-width: 100%; height: auto; }

.muted  { color: var(--gris-500); }
.mt     { margin-top: 1rem; }
.empty  { color: var(--gris-500); text-align: center; padding: 2rem 1rem; margin: 0; }
.link   { font-weight: 600; font-size: .92rem; }

/* ------------------------------------------------------------------
   3. BARRA SUPERIOR
   ------------------------------------------------------------------ */
.topbar {
    background: linear-gradient(100deg, var(--azul) 0%, var(--azul-oscuro) 100%);
    color: var(--blanco);
    box-shadow: var(--sombra);
    position: sticky;
    top: 0;
    z-index: 40;
}

.topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: .65rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: var(--blanco);
    text-decoration: none;
    margin-right: auto;
}
.brand:hover { text-decoration: none; color: var(--blanco); }

.brand img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--blanco);
    padding: 2px;
    flex: none;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.02rem; letter-spacing: .2px; }
.brand-text small  { font-size: .74rem; opacity: .82; }

.nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; }

.nav-link {
    color: rgba(255, 255, 255, .88);
    padding: .45rem .8rem;
    border-radius: var(--radio-sm);
    font-size: .93rem;
    font-weight: 550;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: background var(--transicion), color var(--transicion);
}
.nav-link:hover { background: rgba(255, 255, 255, .14); color: var(--blanco); text-decoration: none; }
.nav-link.is-active { background: var(--blanco); color: var(--azul); }
.nav-logout { color: rgba(255, 255, 255, .8); }
.nav-icon { font-size: .95em; opacity: .9; }

.nav-user {
    font-size: .85rem;
    color: rgba(255, 255, 255, .75);
    padding: .45rem .7rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border-left: 1px solid rgba(255, 255, 255, .22);
    margin-left: .4rem;
}

.nav-toggle {
    display: none;
    background: rgba(255, 255, 255, .12);
    border: 0;
    width: 42px;
    height: 38px;
    border-radius: var(--radio-sm);
    cursor: pointer;
    padding: 10px 10px;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--blanco);
    border-radius: 2px;
    margin: 3px 0;
}

/* ------------------------------------------------------------------
   4. LAYOUT
   ------------------------------------------------------------------ */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.6rem 1.2rem 3rem;
}

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.4rem;
}
.page-sub { color: var(--gris-500); font-size: .92rem; margin: 0; }
.page-head-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}

.grid-2-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.1rem;
}

/* ------------------------------------------------------------------
   5. TARJETAS
   ------------------------------------------------------------------ */
.card {
    background: var(--blanco);
    border: 1px solid var(--gris-200);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    padding: 1.35rem;
    margin-bottom: 1.2rem;
}

.card-title {
    font-size: 1.05rem;
    margin: 0 0 1rem;
    padding-bottom: .7rem;
    border-bottom: 2px solid var(--gris-100);
    position: relative;
}
.card-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 52px;
    height: 2px;
    background: var(--verde);
}

.card-subtitle { font-size: .95rem; margin: 1.4rem 0 .6rem; color: var(--gris-700); }

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .6rem;
}
.card-head .card-title { margin-bottom: 0; border: 0; padding-bottom: 0; }
.card-head .card-title::after { display: none; }

/* ------------------------------------------------------------------
   6. ESTADÍSTICAS
   ------------------------------------------------------------------ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.2rem;
}
.stats-grid-4 { grid-template-columns: repeat(4, 1fr); }

.stat-card {
    background: var(--blanco);
    border: 1px solid var(--gris-200);
    border-left: 4px solid var(--azul);
    border-radius: var(--radio);
    box-shadow: var(--sombra);
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.stat-card:nth-child(2) { border-left-color: var(--verde); }
.stat-card:nth-child(3) { border-left-color: var(--azul); }
.stat-card:nth-child(4) { border-left-color: var(--verde); }

.stat-card-wide { grid-column: 1 / -1; border-left-color: var(--gris-300); }

.stat-label {
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--gris-500);
    font-weight: 650;
}
.stat-value { font-size: 1.9rem; font-weight: 700; color: var(--gris-900); line-height: 1.15; }
.stat-value-sm { font-size: 1.15rem; }
.stat-foot { font-size: .8rem; color: var(--gris-500); }

/* ------------------------------------------------------------------
   7. FORMULARIOS
   ------------------------------------------------------------------ */
.form { margin: 0; }

.field { margin-bottom: 1.05rem; }

.field label {
    display: block;
    font-size: .86rem;
    font-weight: 650;
    color: var(--gris-700);
    margin-bottom: .35rem;
}

.field input[type="text"],
.field input[type="url"],
.field input[type="password"],
.field input[type="number"],
.field select {
    width: 100%;
    padding: .62rem .8rem;
    font-size: .95rem;
    font-family: inherit;
    color: var(--gris-900);
    background: var(--blanco);
    border: 1.5px solid var(--gris-300);
    border-radius: var(--radio-sm);
    transition: border-color var(--transicion), box-shadow var(--transicion);
}

.field input:focus,
.field select:focus {
    outline: 0;
    border-color: var(--azul);
    box-shadow: 0 0 0 3px rgba(0, 107, 143, .14);
}

.field input:disabled { background: var(--gris-100); color: var(--gris-500); }

.field-help { display: block; font-size: .79rem; color: var(--gris-500); margin-top: .3rem; }

.input-group { display: flex; gap: .4rem; }
.input-group input { flex: 1 1 auto; }

.inline-form { display: inline-block; margin: 0; }

/* ------------------------------------------------------------------
   8. BOTONES
   ------------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: .62rem 1.15rem;
    font-family: inherit;
    font-size: .93rem;
    font-weight: 650;
    line-height: 1.2;
    border: 1.5px solid transparent;
    border-radius: var(--radio-sm);
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transicion), border-color var(--transicion), transform var(--transicion);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--azul); color: var(--blanco); }
.btn-primary:hover { background: var(--azul-oscuro); color: var(--blanco); }

.btn-secondary { background: var(--verde); color: var(--blanco); }
.btn-secondary:hover { background: var(--verde-oscuro); color: var(--blanco); }

.btn-danger { background: var(--rojo); color: var(--blanco); }
.btn-danger:hover { background: #A5301F; color: var(--blanco); }

.btn-ghost-line { background: transparent; color: var(--azul); border-color: var(--gris-300); }
.btn-ghost-line:hover { background: var(--azul-claro); color: var(--azul-oscuro); }

.btn-ghost {
    background: var(--gris-100);
    border: 1.5px solid var(--gris-300);
    color: var(--gris-700);
    border-radius: var(--radio-sm);
    padding: 0 .75rem;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 650;
    cursor: pointer;
    transition: background var(--transicion);
}
.btn-ghost:hover { background: var(--gris-200); }

.btn-block { width: 100%; }

.btn-row { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }
.btn-row-center { justify-content: center; }

/* ------------------------------------------------------------------
   9. AVISOS
   ------------------------------------------------------------------ */
.alert {
    padding: .85rem 1.05rem;
    border-radius: var(--radio-sm);
    border-left: 4px solid;
    margin-bottom: 1.1rem;
    font-size: .92rem;
}
.alert code { background: rgba(255, 255, 255, .6); }

.alert-success { background: var(--verde-claro); border-color: var(--verde);  color: #0B5C2B; }
.alert-error   { background: var(--rojo-claro);  border-color: var(--rojo);   color: #8C2318; }
.alert-warning { background: var(--ambar-claro); border-color: var(--ambar);  color: #7A5310; }

/* ------------------------------------------------------------------
   10. ETIQUETAS
   ------------------------------------------------------------------ */
.badge {
    display: inline-block;
    padding: .28rem .7rem;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 750;
    letter-spacing: .5px;
}
.badge-on  { background: var(--verde-claro); color: var(--verde-oscuro); border: 1px solid #A9DDBF; }
.badge-off { background: var(--gris-100);    color: var(--gris-500);     border: 1px solid var(--gris-300); }

.pill {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 750;
}
.pill-ok    { background: var(--verde-claro); color: var(--verde-oscuro); }
.pill-aviso { background: var(--ambar-claro); color: var(--ambar); }
.pill-error { background: var(--rojo-claro);  color: var(--rojo); }

.swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1px solid var(--gris-300);
    vertical-align: -2px;
}

/* ------------------------------------------------------------------
   11. TABLAS
   ------------------------------------------------------------------ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

.table th, .table td {
    padding: .65rem .8rem;
    text-align: left;
    border-bottom: 1px solid var(--gris-200);
    vertical-align: top;
}

.table thead th {
    background: var(--gris-50);
    color: var(--gris-700);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 700;
    white-space: nowrap;
    border-bottom: 2px solid var(--gris-200);
}

.table tbody tr:hover { background: var(--azul-claro); }
.table tbody tr:last-child td { border-bottom: 0; }

.col-ua { max-width: 260px; word-break: break-word; color: var(--gris-500); font-size: .84rem; }

.table-kv th {
    width: 38%;
    background: var(--gris-50);
    font-weight: 650;
    color: var(--gris-700);
    white-space: nowrap;
}
.table-kv tbody tr:hover { background: transparent; }

/* ------------------------------------------------------------------
   12. PAGINACIÓN
   ------------------------------------------------------------------ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.2rem;
    flex-wrap: wrap;
}
.page-link {
    padding: .45rem .9rem;
    border: 1.5px solid var(--gris-300);
    border-radius: var(--radio-sm);
    font-size: .88rem;
    font-weight: 600;
}
.page-link:hover { background: var(--azul-claro); text-decoration: none; }
.page-info { font-size: .86rem; color: var(--gris-500); }

/* ------------------------------------------------------------------
   13. URL ACTUAL / QR
   ------------------------------------------------------------------ */
.url-current {
    background: var(--azul-claro);
    border: 1px solid #C4DEE8;
    border-radius: var(--radio-sm);
    padding: .9rem 1rem;
    margin-bottom: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}
.url-label {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 700;
    color: var(--azul);
}
.url-value { font-size: 1rem; font-weight: 600; word-break: break-all; }
.url-updated { font-size: .78rem; color: var(--gris-500); }

.note {
    background: var(--gris-50);
    border: 1px dashed var(--gris-300);
    border-radius: var(--radio-sm);
    padding: .8rem .95rem;
    font-size: .85rem;
    color: var(--gris-700);
    margin: 1.1rem 0 0;
}

.card-qr { display: flex; flex-direction: column; }

.qr-preview {
    display: flex;
    justify-content: center;
    padding: 1rem;
    background: var(--blanco);
    border: 1px solid var(--gris-200);
    border-radius: var(--radio);
}
.qr-preview img { width: 100%; max-width: 320px; height: auto; display: block; }
.qr-preview-lg img { max-width: 420px; }

.qr-target {
    text-align: center;
    font-size: .84rem;
    color: var(--gris-500);
    margin: .9rem 0 0;
}
.qr-target code { font-size: .82rem; }

.download-list { list-style: none; margin: 0; padding: 0; }
.download-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem 0;
    border-bottom: 1px solid var(--gris-200);
}
.download-list li:last-child { border-bottom: 0; }
.download-list small { display: block; color: var(--gris-500); font-size: .8rem; }

.steps { margin: 0; padding-left: 1.3rem; font-size: .93rem; }
.steps li { margin-bottom: .5rem; }

.chart-wrap { position: relative; width: 100%; overflow-x: auto; }
#scansChart { width: 100%; display: block; }

/* ------------------------------------------------------------------
   14. LOGIN
   ------------------------------------------------------------------ */
.page-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--azul) 0%, var(--azul-oscuro) 55%, #00405A 100%);
    padding: 1.5rem;
}

.login-wrap { width: 100%; max-width: 410px; }

.login-card {
    background: var(--blanco);
    border-radius: 16px;
    box-shadow: var(--sombra-alta);
    padding: 2.2rem 1.9rem;
    text-align: center;
}

.login-logo { width: 86px; height: 86px; border-radius: 50%; margin-bottom: .9rem; }
.login-title { font-size: 1.35rem; margin-bottom: .15rem; color: var(--azul); }
.login-subtitle { font-size: .87rem; color: var(--gris-500); margin-bottom: 1.5rem; }
.login-card .field { text-align: left; }
.login-card .btn { margin-top: .4rem; }
.login-help { font-size: .82rem; color: var(--rojo); margin: .8rem 0 0; }

.login-foot {
    text-align: center;
    color: rgba(255, 255, 255, .78);
    font-size: .8rem;
    margin-top: 1.1rem;
}

/* ------------------------------------------------------------------
   15. PORTADA
   ------------------------------------------------------------------ */
.page-home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gris-50) 0%, var(--azul-claro) 100%);
    padding: 1.5rem;
}
.home-wrap { width: 100%; max-width: 520px; }
.home-card {
    background: var(--blanco);
    border: 1px solid var(--gris-200);
    border-radius: 16px;
    box-shadow: var(--sombra-alta);
    padding: 2.2rem 1.9rem;
    text-align: center;
}
.home-logo { width: 92px; height: 92px; border-radius: 50%; margin-bottom: 1rem; }
.home-sub { color: var(--gris-500); margin-bottom: 1.6rem; }
.home-info {
    text-align: left;
    background: var(--gris-50);
    border: 1px solid var(--gris-200);
    border-radius: var(--radio-sm);
    padding: .9rem 1rem;
    margin-bottom: 1.4rem;
}
.home-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .35rem 0;
    font-size: .86rem;
    border-bottom: 1px dashed var(--gris-200);
}
.home-row:last-child { border-bottom: 0; }
.home-row span:first-child { color: var(--gris-500); white-space: nowrap; }

/* ------------------------------------------------------------------
   16. INSTALADOR
   ------------------------------------------------------------------ */
.page-install { background: var(--gris-50); padding: 1.5rem; }

.install-wrap { max-width: 860px; margin: 0 auto; }

.install-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.4rem 0 1.1rem;
}
.install-head img { width: 62px; height: 62px; border-radius: 50%; }
.install-head h1 { margin: 0; font-size: 1.4rem; color: var(--azul); }
.install-head p  { margin: 0; color: var(--gris-500); font-size: .87rem; }

.wizard {
    display: flex;
    list-style: none;
    margin: 0 0 1.4rem;
    padding: 0;
    gap: .5rem;
    flex-wrap: wrap;
}
.wizard li {
    flex: 1 1 130px;
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--blanco);
    border: 1px solid var(--gris-200);
    border-radius: var(--radio-sm);
    padding: .55rem .8rem;
    font-size: .85rem;
    color: var(--gris-500);
}
.wizard li span {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gris-200);
    color: var(--gris-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 750;
    flex: none;
}
.wizard li.current { border-color: var(--azul); color: var(--azul); font-weight: 650; }
.wizard li.current span { background: var(--azul); color: var(--blanco); }
.wizard li.done { color: var(--verde-oscuro); border-color: #A9DDBF; }
.wizard li.done span { background: var(--verde); color: var(--blanco); }

.code-block {
    background: var(--gris-900);
    color: #E8F1F5;
    padding: .9rem 1rem;
    border-radius: var(--radio-sm);
    overflow-x: auto;
    font-size: .8rem;
    line-height: 1.5;
    margin: .7rem 0 0;
}

.install-foot { text-align: center; color: var(--gris-500); font-size: .8rem; padding: 1rem 0 2rem; }

/* ------------------------------------------------------------------
   17. PÁGINA DE AVISO DEL REDIRECTOR
   ------------------------------------------------------------------ */
.page-message {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gris-50);
    padding: 1.5rem;
    margin: 0;
}
.message-card {
    background: var(--blanco);
    border: 1px solid var(--gris-200);
    border-radius: 16px;
    box-shadow: var(--sombra);
    padding: 2.2rem 1.8rem;
    text-align: center;
    max-width: 440px;
}
.message-logo { width: 78px; height: 78px; border-radius: 50%; margin-bottom: 1rem; }
.message-card h1 { font-size: 1.25rem; color: var(--azul); }
.message-card p  { color: var(--gris-700); font-size: .95rem; }
.message-code { color: var(--gris-300) !important; font-size: .8rem !important; margin: 0; }

/* ------------------------------------------------------------------
   18. PIE
   ------------------------------------------------------------------ */
.footer {
    border-top: 1px solid var(--gris-200);
    background: var(--blanco);
    padding: 1rem 1.2rem;
    margin-top: auto;
}
.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: .8rem;
    color: var(--gris-500);
}

.app { display: flex; flex-direction: column; min-height: 100vh; }
.app .container { flex: 1 0 auto; }

/* ==================================================================
   19. RESPONSIVE
   ================================================================== */

/* --- Tablet --- */
@media (max-width: 980px) {
    .stats-grid, .stats-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
}

/* --- Celular --- */
@media (max-width: 720px) {
    body { font-size: 15px; }

    .nav-toggle { display: block; }

    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: .15rem;
        padding-top: .6rem;
    }
    .nav.is-open { display: flex; }
    .nav-link { padding: .6rem .8rem; }
    .nav-user { border-left: 0; margin-left: 0; padding-left: .8rem; }

    .container { padding: 1.1rem .9rem 2.4rem; }

    .grid-2-form { grid-template-columns: 1fr; }

    .page-head { flex-direction: column; align-items: stretch; }

    .card { padding: 1.05rem; }

    .stat-value { font-size: 1.55rem; }

    /* Tablas convertidas en fichas */
    .table, .table thead, .table tbody, .table tr, .table th, .table td { display: block; }
    .table thead { position: absolute; left: -9999px; }
    .table tr {
        border: 1px solid var(--gris-200);
        border-radius: var(--radio-sm);
        margin-bottom: .7rem;
        padding: .3rem .1rem;
        background: var(--blanco);
    }
    .table td {
        border: 0;
        border-bottom: 1px dashed var(--gris-100);
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        padding: .5rem .8rem;
        text-align: right;
    }
    .table td:last-child { border-bottom: 0; }
    .table td::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: .74rem;
        text-transform: uppercase;
        letter-spacing: .4px;
        color: var(--gris-500);
        text-align: left;
        flex: none;
    }
    .col-ua { max-width: none; }

    .table-kv th { width: auto; }
    .table-kv td::before { content: ""; }

    .download-list li { flex-direction: column; align-items: stretch; gap: .5rem; }
    .download-list .btn { width: 100%; }

    .qr-preview img, .qr-preview-lg img { max-width: 100%; }

    .footer-inner { flex-direction: column; gap: .2rem; }
}

/* --- Impresión --- */
@media print {
    .topbar, .footer, .btn, .btn-row, .nav, .alert { display: none !important; }
    body { background: var(--blanco); }
    .card { box-shadow: none; border: 0; }
}
