:root {
    --sidebar: #1b2559;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --active: #4454d8;
    --bg: #f3f5fb;
    --card: #ffffff;
    --text: #1c2340;
    --muted: #6e7690;
    --label: #3c4466;
    --line: #e6eaf3;
    --accent: #4f46e5;
    --accent-dark: #3f37c9;
    --info-bg: #e7f3ff;
    --info-text: #1d4e89;
    --danger-bg: #fff1f1;
    --danger-text: #b42318;
    --shadow: 0 10px 28px rgba(27, 37, 89, 0.05);
    --radius: 18px;
    --sidebar-width: 272px;
    --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { margin: 0; min-height: 100%; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
}

button, input, select { font: inherit; }

svg { display: block; }

h1, h2, p { margin: 0; }

a { color: inherit; }

.app {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 22px 0 16px;
    background: linear-gradient(180deg, #202b66 0%, var(--sidebar) 38%);
    color: #fff;
}

.marca {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 22px 22px;
}

.marca strong,
.marca small {
    display: block;
}

.marca strong {
    font-size: 15px;
    letter-spacing: -0.01em;
}

.marca small {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
}

.marca-icono {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.marca-icono svg { width: 22px; height: 22px; }

.marca-icono-clara {
    background: var(--accent-soft, #eef0ff);
    color: var(--accent);
}

.sidebar-nav { padding-top: 8px; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 14px;
    padding: 12px 14px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
    font-weight: 600;
    font-size: 14.5px;
}

.nav-link svg { width: 20px; height: 20px; }

.nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.nav-link.activo {
    background: var(--active);
    color: #fff;
    box-shadow: 0 8px 18px rgba(16, 24, 72, 0.28);
}

.sidebar-user {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid var(--sidebar-border);
}

.user-row,
.user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-row { margin-bottom: 14px; }

.user-row strong,
.user-row span {
    display: block;
}

.user-row strong { font-size: 14px; }

.user-row span {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
}

.avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    font-size: 14px;
    font-weight: 700;
}

.avatar-clara {
    background: #eceefe;
    color: var(--accent);
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    background: transparent;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.btn-logout svg { width: 18px; height: 18px; }

.btn-logout:hover { background: rgba(255, 255, 255, 0.08); }

.contenido { min-width: 0; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    padding: 0 32px;
    background: rgba(243, 245, 251, 0.92);
    backdrop-filter: blur(12px);
}

.topbar-izq,
.migas {
    display: flex;
    align-items: center;
    gap: 10px;
}

.migas {
    color: var(--muted);
    font-size: 14px;
}

.migas a { color: var(--muted); text-decoration: none; }
.migas a:hover { color: var(--text); }
.migas strong { color: var(--text); font-weight: 600; }

.user-chip {
    padding: 6px 12px 6px 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
}

.menu-btn,
.sidebar-overlay { display: none; }

.pagina {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 8px 32px 40px;
}

.encabezado {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 16px;
    row-gap: 6px;
    align-items: center;
}

.encabezado .eyebrow {
    grid-column: 1;
    grid-row: 1;
    margin-bottom: 0;
}

.encabezado h1 {
    grid-column: 1;
    grid-row: 2;
}

.encabezado .subtitulo,
.encabezado-aviso {
    grid-column: 1;
    grid-row: 3;
    margin-top: 0;
}

.encabezado-volver { grid-column: 2; grid-row: 1; }

.encabezado-deca {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    height: 42px;
    margin-top: 14px;
}

.eyebrow {
    margin-bottom: 6px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    font-size: 30px;
    letter-spacing: -0.03em;
}

.subtitulo {
    margin-top: 6px;
    color: var(--muted);
    font-size: 15px;
}

.pill {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: #efeaff;
    color: #5b3cc4;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.pill-suave {
    height: 26px;
    background: #eef2ff;
    color: #3340b0;
}

.aviso {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.45;
}

.aviso svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-top: 1px;
}

.aviso p { margin: 0; }

.aviso-info {
    background: var(--info-bg);
    color: var(--info-text);
}

.aviso-error {
    margin: 0 22px 8px;
    background: var(--danger-bg);
    color: var(--danger-text);
}

.aviso-pagina { margin: 0; }

.aviso-ok {
    background: #e8f8ef;
    color: #0f7a3d;
}

.aviso-ventana {
    width: min(440px, calc(100vw - 32px));
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: transparent;
}

.aviso-ventana::backdrop {
    background: rgba(27, 37, 89, 0.48);
}

.aviso-ventana-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 22px;
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.aviso-ventana-card h2 {
    font-size: 18px;
    letter-spacing: -0.02em;
}

.aviso-ventana-card form {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.aviso-ventana-card .btn { height: 42px; }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 0;
}

.card-head h2 {
    font-size: 18px;
    letter-spacing: -0.02em;
}

.card-head p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13.5px;
}

.deca-ultimo .card-head { padding-bottom: 20px; }

.deca-qr {
    display: block;
    flex: 0 0 auto;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    line-height: 0;
}

.deca-qr img {
    width: 132px;
    height: 132px;
    object-fit: contain;
}

.deca-qr-mini {
    padding: 4px;
    border-radius: 10px;
}

.deca-qr-mini img {
    width: 72px;
    height: 72px;
}

.contador {
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 14px;
    background: #eef0ff;
    color: var(--accent);
    font-weight: 700;
}

.filtros {
    display: grid;
    grid-template-columns: minmax(180px, 240px) auto;
    gap: 16px;
    align-items: end;
    justify-content: start;
    padding: 18px 22px 22px;
}

.filtros-deca {
    grid-template-columns: minmax(180px, 240px) minmax(220px, 320px) auto;
}

.campo label {
    display: block;
    margin-bottom: 8px;
    color: var(--label);
    font-size: 13px;
    font-weight: 700;
}

.control { position: relative; }

.control-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    width: 18px;
    height: 18px;
    color: #8b93ab;
    transform: translateY(-50%);
    pointer-events: none;
}

.control-icon svg { width: 18px; height: 18px; }

.control input,
.login-card input {
    width: 100%;
    height: 48px;
    padding: 0 14px 0 42px;
    border: 1px solid #e1e6f2;
    border-radius: 12px;
    background: #fbfcff;
    color: var(--text);
    outline: none;
}

.control input:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.control input[readonly] {
    color: var(--muted);
    background: #f4f6fb;
}

input[type="date"] { color-scheme: light; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
}

.btn svg { width: 18px; height: 18px; }

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.24);
}

.btn-primary:hover { background: var(--accent-dark); }

.btn-primary:disabled {
    opacity: 0.7;
    cursor: progress;
}

.btn-danger {
    background: var(--danger-text);
    color: #fff;
}

.btn-danger:hover { background: #912018; }

.btn-danger:disabled {
    opacity: 0.7;
    cursor: progress;
}

.btn-ghost {
    height: 42px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    text-decoration: none;
    box-shadow: none;
}

.btn-ghost:hover { background: #f8f9fd; }

.btn-block { width: 100%; }

.btn-sm {
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
}

.encabezado-accion {
    justify-self: end;
    align-self: center;
    height: 42px;
}

.tabla-card.is-loading { opacity: 0.62; }

.tabla-scroll {
    padding: 8px 10px 18px;
    overflow-x: auto;
}

.tabla-card table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0;
}

.tabla-card table.dataTable thead th {
    padding: 14px 16px !important;
    border-bottom: 1px solid var(--line) !important;
    background: transparent !important;
    color: #7b849c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tabla-card table.dataTable tbody td {
    padding: 15px 16px !important;
    border-bottom: 1px solid #f0f2f8 !important;
    color: var(--text);
    font-size: 14px;
    vertical-align: middle;
}

.tabla-card table.dataTable tbody tr.fila-hoja { cursor: pointer; }

.tabla-card table.dataTable tbody tr.fila-hoja:hover td,
.tabla-card table.dataTable tbody tr.fila-hoja:focus-visible td { background: #f8f9fd !important; }

.tabla-card table.dataTable tbody tr.fila-hoja:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.tabla-card table.dataTable tbody tr:last-child td { border-bottom: 0 !important; }

.tabla-card table.dataTable th.col-codigo,
.tabla-card table.dataTable td.col-codigo {
    text-align: left;
}

.tabla-card table.dataTable th.col-fecha,
.tabla-card table.dataTable td.col-fecha {
    text-align: center;
}

.celda-codigo,
.celda-nombre { font-weight: 700; }

.celda-codigo { font-variant-numeric: tabular-nums; }

.celda-matricula {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

.tabla-card table.dataTable th.col-observaciones,
.tabla-card table.dataTable td.col-observaciones {
    min-width: 180px;
    max-width: 320px;
    white-space: normal;
    line-height: 1.4;
}

.dt-container { color: var(--text); }

.dt-layout-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 12px 12px;
}

.dt-layout-row:last-child { margin-top: 8px; margin-bottom: 0; }

.dt-search,
.dt-length {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.dt-search input,
.dt-length select {
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e1e6f2;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    outline: none;
}

.dt-search input { min-width: 220px; }

.dt-search input:focus,
.dt-length select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.dt-info {
    color: var(--muted);
    font-size: 13px;
}

.dt-paging { display: flex; gap: 6px; }

.dt-paging-button {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--text) !important;
    cursor: pointer;
}

.dt-paging-button:hover:not(.disabled) { background: #f4f6fd !important; }

.dt-paging-button.current {
    border-color: var(--accent) !important;
    background: var(--accent) !important;
    color: #fff !important;
}

.dt-paging-button.disabled { opacity: 0.45; cursor: default; }

.ficha-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px 24px;
    margin: 0;
    padding: 18px 22px 22px;
}

.ficha-item dt {
    color: #7b849c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ficha-item dd {
    margin: 6px 0 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.ficha-item input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #e1e6f2;
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 700;
    outline: none;
}

.ficha-item input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.ficha-ancho { grid-column: 1 / -1; }

.ficha-ancho dd { font-weight: 600; }

.vacio {
    margin: 0;
    padding: 8px 22px 22px;
    color: var(--muted);
}

.destinos {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding: 18px 22px 22px;
    list-style: none;
}

.destino {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fbfcff;
}

.destino.is-dragging {
    opacity: 0.55;
    border-color: var(--accent);
}

.agarre,
.btn-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: #6e7690;
    cursor: pointer;
}

.agarre {
    width: 36px;
    height: 36px;
    cursor: grab;
}

.agarre:active { cursor: grabbing; }

.agarre svg,
.btn-icono svg { width: 18px; height: 18px; }

.destino-orden {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #eef0ff;
    color: var(--accent);
    font-weight: 700;
}

.destino-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.destino-top strong {
    font-size: 15px;
    letter-spacing: -0.01em;
}

.destino-dir {
    margin-top: 6px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.4;
}

.destino-acciones {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.btn-icono {
    width: 34px;
    height: 34px;
}

.btn-icono:hover:not(:disabled) { background: #f4f6fd; color: var(--text); }

.btn-icono:disabled {
    opacity: 0.35;
    cursor: default;
}

.campo-naturaleza { margin-top: 12px; }

.campo-naturaleza input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #e1e6f2;
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    outline: none;
}

.campo-naturaleza input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.pagina-login {
    min-height: 100vh;
    background: var(--bg);
}

.login-shell {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    min-height: 100vh;
}

.login-hero {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 36px 48px;
    background:
        radial-gradient(circle at 20% 20%, rgba(94, 108, 230, 0.45), transparent 32%),
        linear-gradient(165deg, #24306e 0%, #1b2559 58%, #161d48 100%);
    color: #fff;
}

.marca-hero .marca-icono { background: rgba(255, 255, 255, 0.14); }

.hero-copy { max-width: 460px; padding-bottom: 12vh; }

.hero-copy h1 {
    font-size: 42px;
    line-height: 1.15;
    letter-spacing: -0.035em;
}

.hero-copy p {
    margin-top: 16px;
    max-width: 420px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 17px;
    line-height: 1.5;
}

.login-panel {
    display: grid;
    place-items: center;
    padding: 32px 24px;
}

.logo-login {
    margin-bottom: 20px;
    border-bottom: 1px solid #EEE;
}

.logo-login img {
    display: block;
    width: min(240px, 78%);
    height: auto;
    margin: 0 auto;
}

.login-card {
    width: min(420px, 100%);
    padding: 32px 28px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow);
}

.login-card-head { margin-bottom: 22px; }

.login-card-head h2 {
    font-size: 28px;
    letter-spacing: -0.03em;
}

.login-card-head p {
    margin-top: 6px;
    color: var(--muted);
}

.login-card .campo + .campo { margin-top: 16px; }

.login-card .aviso { margin: 0 0 18px; }

.login-card .btn { margin-top: 22px; }

.formulario {
    display: grid;
    gap: 16px;
    max-width: 560px;
    padding: 18px 22px 22px;
}

.form-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 4px;
}

.campo-mensaje {
    margin: 6px 0 0;
    color: var(--danger-text);
    font-size: 13px;
}

.control-invalido input,
.control-invalido select,
.campo.control-invalido > select {
    border-color: #e7b4b0;
    background: #fff8f8;
}

.formulario select {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #e1e6f2;
    border-radius: 12px;
    background: #fbfcff;
    color: var(--text);
    outline: none;
}

.formulario select:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.formulario .control-invalido input,
.formulario .control-invalido select {
    border-color: #e7b4b0;
    background: #fff8f8;
}

.tabla-simple {
    width: 100%;
    border-collapse: collapse;
}

.tabla-simple th {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    color: #7b849c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
}

.tabla-simple td {
    padding: 15px 16px;
    border-bottom: 1px solid #f0f2f8;
    color: var(--text);
    font-size: 14px;
    vertical-align: middle;
}

.tabla-simple tbody tr:last-child td { border-bottom: 0; }

.tabla-simple tbody tr:hover td { background: #f8f9fd; }

.col-acciones { width: 1%; white-space: nowrap; }

.acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill-transporte {
    background: #e7f3ff;
    color: #1d4e89;
}

.vista-decas .app { grid-template-columns: 1fr; }

.vista-decas .sidebar {
    position: fixed;
    z-index: 30;
    width: min(84vw, var(--sidebar-width));
    transform: translateX(-105%);
    transition: transform 0.2s ease;
}

body.vista-decas.sidebar-open .sidebar { transform: none; }

.vista-decas .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 20;
    border: 0;
    background: rgba(18, 24, 52, 0.4);
    opacity: 0;
    pointer-events: none;
}

body.vista-decas.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
}

.vista-decas .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
}

.vista-decas .menu-btn svg { width: 20px; height: 20px; }

.vista-decas .topbar {
    height: 60px;
    padding: 0 12px;
}

.vista-decas .pagina {
    width: min(100%, 480px);
    margin-inline: auto;
    gap: 14px;
    padding: 4px 16px calc(28px + env(safe-area-inset-bottom, 0px));
}

.vista-decas .encabezado { grid-template-columns: 1fr; }

.vista-decas .encabezado h1 { font-size: 26px; }

.vista-decas .filtros-deca {
    grid-template-columns: 1fr;
    padding: 16px;
}

.vista-decas .control input { font-size: 16px; }

.vista-decas .user-chip { min-width: 0; }

.deca-lista {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.deca-tarjeta {
    display: flex;
    flex-direction: column;
    padding: 18px 16px 16px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.deca-tarjeta-datos {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
}

.deca-etiqueta {
    margin-top: 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.deca-etiqueta:first-child { margin-top: 0; }

.deca-hoja,
.deca-zona,
.deca-matricula {
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.deca-hoja { font-size: 34px; }

.deca-zona {
    font-size: 24px;
    color: #3340b0;
}

.deca-matricula {
    font-size: 24px;
    letter-spacing: 0.04em;
}

.deca-qr-grande {
    align-self: center;
    width: min(100%, 300px);
    margin-top: 18px;
    padding: 10px;
}

.deca-qr-grande img {
    width: 100%;
    height: auto;
}

.deca-qr-ayuda {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.deca-vacio {
    margin: 0;
    padding: 28px 16px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--muted);
    text-align: center;
}

@media (max-width: 420px) {
    .vista-decas .user-chip-nombre { display: none; }

    .vista-decas .user-chip { padding-right: 6px; }
}

@media (max-width: 960px) {
    .app { grid-template-columns: 1fr; }

    .sidebar {
        position: fixed;
        z-index: 30;
        width: min(84vw, var(--sidebar-width));
        transform: translateX(-105%);
        transition: transform 0.2s ease;
    }

    body.sidebar-open .sidebar { transform: none; }

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 20;
        border: 0;
        background: rgba(18, 24, 52, 0.4);
        opacity: 0;
        pointer-events: none;
    }

    body.sidebar-open .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: #fff;
        color: var(--text);
        cursor: pointer;
    }

    .menu-btn svg { width: 20px; height: 20px; }

    .topbar,
    .pagina { padding-left: 16px; padding-right: 16px; }

    .topbar { height: 64px; }

    .filtros,
    .filtros-deca,
    .login-shell { grid-template-columns: 1fr; }

    .login-hero { display: none; }

    .encabezado { grid-template-columns: 1fr; }

    .encabezado h1,
    .encabezado .eyebrow,
    .encabezado .subtitulo,
    .encabezado-aviso,
    .encabezado-volver,
    .encabezado-deca,
    .encabezado-accion {
        grid-column: 1;
        grid-row: auto;
    }

    .encabezado-deca { justify-self: end; }

    .ficha-grid { grid-template-columns: 1fr; }

    .ficha-ancho { grid-column: auto; }

    .destino { grid-template-columns: auto auto minmax(0, 1fr); }

    .destino-acciones {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-end;
    }

    .dt-layout-row { flex-wrap: wrap; }

    .dt-search input { min-width: 0; width: 100%; }

    h1 { font-size: 26px; }
}
