/* ============================================================
   Alpha LinK · Kamin
   Paleta de marca: navy #0E1E3C + dorado #BC9B72
   Responsive · modo claro/oscuro automático
   ============================================================ */

:root {
    /* Marca */
    --navy: #0e1e3c;
    --navy-2: #1d3766;
    --gold: #a5855d;          /* dorado legible sobre blanco */
    --gold-bright: #bc9b72;   /* dorado de marca, para fondos oscuros */
    --gold-soft: #f5eee3;

    --green: #12854e;
    --green-soft: #e4f4eb;
    --amber: #a06a12;
    --amber-soft: #fbf1de;
    --red: #c23b3b;
    --red-soft: #fbe9e9;

    --bg: #f6f5f2;
    --card: #ffffff;
    --card-2: #f3f1ec;
    --line: #e6e2da;
    --ink: #0e1e3c;
    --ink-2: #5a6478;
    --ink-3: #939aa8;

    --r-sm: 12px;
    --r-md: 18px;
    --r-lg: 24px;

    --shadow: 0 1px 2px rgba(14, 30, 60, .05), 0 8px 24px rgba(14, 30, 60, .07);
    --shadow-lift: 0 2px 6px rgba(14, 30, 60, .1), 0 16px 40px rgba(14, 30, 60, .14);
}

@media (prefers-color-scheme: dark) {
    :root {
        --navy: #0e1e3c;
        --navy-2: #22406f;
        --gold: #c9ac87;
        --gold-bright: #d9bf9c;
        --gold-soft: #2a2216;

        --green: #4fcb8b;
        --green-soft: #10301f;
        --amber: #ddaa5b;
        --amber-soft: #2f2411;
        --red: #ee7c7c;
        --red-soft: #331a1a;

        --bg: #090e18;
        --card: #101827;
        --card-2: #16202f;
        --line: #232e42;
        --ink: #edf0f5;
        --ink-2: #9aa4b8;
        --ink-3: #6b7488;

        --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .4);
        --shadow-lift: 0 2px 6px rgba(0, 0, 0, .45), 0 16px 40px rgba(0, 0, 0, .55);
    }
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

button, input, select { font-family: inherit; }

a { color: inherit; }

.app {
    max-width: 760px;
    margin: 0 auto;
    padding: 16px 16px 48px;
}

/* ---------- Topbar ---------- */

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }

.brand-mark {
    width: 42px; height: 42px;
    flex: 0 0 42px;
}
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }

.brand-name {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--ink);
}
.brand-name .lk { color: var(--gold); font-weight: 400; }
.brand-sub { margin: 0; font-size: 12px; color: var(--ink-2); }

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 550;
    color: var(--amber);
    background: var(--amber-soft);
    padding: 6px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.status-chip .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* ---------- Hero ---------- */

.hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
    border-radius: var(--r-lg);
    padding: 26px 24px 22px;
    color: #fff;
    box-shadow: var(--shadow-lift);
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
}

/* Marca de agua del logo, en dorado tenue */
.hero-watermark {
    position: absolute;
    right: -24px; top: -28px;
    width: 180px; height: 180px;
    opacity: .12;
    pointer-events: none;
}
.hero-watermark img { width: 100%; height: 100%; object-fit: contain; }

.hero-label {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gold-bright);
    letter-spacing: .02em;
}

.hero-amount {
    margin: 0;
    font-size: clamp(30px, 8vw, 40px);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.1;
    position: relative;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    font-size: 12.5px;
    opacity: .8;
    flex-wrap: wrap;
    position: relative;
}

.hero-sep {
    width: 3px; height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: .6;
}

/* ---------- Acciones ---------- */

.actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    min-height: 68px;
    border: none;
    border-radius: var(--r-md);
    background: var(--card);
    box-shadow: var(--shadow);
    cursor: pointer;
    text-align: left;
    transition: transform .12s ease, box-shadow .12s ease;
}

.action:hover { box-shadow: var(--shadow-lift); }
.action:active { transform: scale(.98); }

.action-icon {
    width: 40px; height: 40px;
    flex: 0 0 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
}

.action-icon svg { width: 20px; height: 20px; }

.action-in .action-icon { background: var(--green-soft); color: var(--green); }
.action-out .action-icon { background: var(--gold-soft); color: var(--gold); }

.action-text { display: flex; flex-direction: column; min-width: 0; }
.action-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.action-sub { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Stats ---------- */

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.stat {
    background: var(--card);
    border-radius: var(--r-md);
    padding: 14px 16px;
    box-shadow: var(--shadow);
}

.stat-label { margin: 0 0 4px; font-size: 12.5px; color: var(--ink-2); }
.stat-value { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.02em; }
.stat-value.is-warn { color: var(--amber); }

/* ---------- Lista ---------- */

.list-head { margin-bottom: 10px; }
.list-title { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }

.filters {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.filters::-webkit-scrollbar { display: none; }

.filter {
    flex: 0 0 auto;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--card);
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 550;
    text-decoration: none;
    border: 1px solid var(--line);
    transition: background .12s ease, color .12s ease;
}

.filter:hover { color: var(--ink); }

.filter.is-active {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}
@media (prefers-color-scheme: dark) {
    .filter.is-active { background: var(--gold); border-color: var(--gold); color: #0e1421; }
}

.list {
    background: var(--card);
    border-radius: var(--r-md);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
    transition: background .12s ease;
}
.item:last-child { border-bottom: none; }
.item:hover { background: var(--card-2); }

.item-icon {
    width: 38px; height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
}
.item-icon svg { width: 17px; height: 17px; }
.item-icon.in { background: var(--green-soft); color: var(--green); }
.item-icon.out { background: var(--gold-soft); color: var(--gold); }

.item-body { flex: 1; min-width: 0; }
.item-title { margin: 0; font-size: 14.5px; font-weight: 600; }
.item-sub {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--ink-2);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.item-ref {
    display: block;
    font-size: 10.5px;
    color: var(--ink-3);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    letter-spacing: .02em;
    margin-top: 1px;
}

.item-right { text-align: right; flex: 0 0 auto; }
.item-amount { margin: 0; font-size: 14.5px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap; }
.item-amount.in { color: var(--green); }
.item-amount.out { color: var(--ink); }

.item-meta {
    margin: 3px 0 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.item-time { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }

.badge {
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}
.badge-completed { background: var(--green-soft); color: var(--green); }
.badge-pending, .badge-prepared, .badge-committed { background: var(--card-2); color: var(--ink-2); }
.badge-rejected, .badge-aborted { background: var(--red-soft); color: var(--red); }

.item-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.item-actions form { margin: 0; }

.mini {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--card-2);
    color: var(--ink-2);
    font-size: 13px;
    cursor: pointer;
    display: grid;
    place-items: center;
    text-decoration: none;
    transition: background .12s ease, color .12s ease;
}
.mini-ok:hover { background: var(--green-soft); color: var(--green); border-color: transparent; }
.mini-no:hover { background: var(--red-soft); color: var(--red); border-color: transparent; }
.mini-doc:hover { background: var(--gold-soft); color: var(--gold); border-color: transparent; }
.mini svg { width: 15px; height: 15px; }

/* ---------- Vacío ---------- */

.empty { padding: 44px 24px; text-align: center; }
.empty-emoji { margin: 0 0 10px; font-size: 34px; }
.empty-title { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.empty-sub { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.empty-sub strong { color: var(--ink); font-weight: 600; }

.footnote {
    margin: 20px 4px 0;
    font-size: 12px;
    color: var(--ink-3);
    text-align: center;
}

/* ---------- Modal ---------- */

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 12, 24, .55);
    backdrop-filter: blur(3px);
    display: grid;
    place-items: center;
    padding: 16px;
    z-index: 50;
    animation: fade .16s ease;
}
.overlay[hidden] { display: none; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(18px); opacity: 0; } }

.sheet {
    width: 100%;
    max-width: 420px;
    background: var(--card);
    border-radius: var(--r-lg);
    padding: 20px 22px 24px;
    box-shadow: var(--shadow-lift);
    animation: rise .2s cubic-bezier(.2, .8, .3, 1);
    max-height: 92vh;
    overflow-y: auto;
}

.sheet-grip { display: none; }

.sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.sheet-title { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em; }

.sheet-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--card-2);
    color: var(--ink-2);
    font-size: 14px;
    cursor: pointer;
}
.sheet-close:hover { color: var(--ink); }

.field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-size: 13px; font-weight: 550; color: var(--ink-2); margin-bottom: 7px; }
.field-hint { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 5px; }

.input {
    width: 100%;
    padding: 13px 14px;
    border-radius: var(--r-sm);
    border: 1.5px solid var(--line);
    background: var(--card-2);
    color: var(--ink);
    font-size: 15px;
    transition: border-color .12s ease;
}
.input::placeholder { color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--gold); }

.amount-field { position: relative; display: flex; align-items: center; }
.amount-prefix, .amount-suffix {
    position: absolute;
    font-size: 15px;
    color: var(--ink-2);
    font-weight: 550;
    pointer-events: none;
}
.amount-prefix { left: 14px; }
.amount-suffix { right: 14px; font-size: 12.5px; color: var(--ink-3); }
.input-amount { padding-left: 30px; padding-right: 48px; font-weight: 600; }

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

.chip { position: relative; }
.chip[hidden] { display: none; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }

.chip span {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    background: var(--card-2);
    font-size: 13.5px;
    font-weight: 550;
    color: var(--ink-2);
    cursor: pointer;
    transition: all .12s ease;
}

.chip input:checked + span {
    background: var(--gold-soft);
    border-color: var(--gold);
    color: var(--gold);
}

.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.submit {
    width: 100%;
    margin-top: 6px;
    padding: 15px;
    border: none;
    border-radius: var(--r-sm);
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .12s ease, opacity .12s ease;
}
.submit:hover { opacity: .93; }
.submit:active { transform: scale(.985); }

/* En modo oscuro el navy se confunde con el fondo: el botón principal
   pasa a dorado, que contrasta y sigue siendo de marca. */
@media (prefers-color-scheme: dark) {
    .submit {
        background: linear-gradient(135deg, var(--gold), var(--gold-bright));
        color: #14203a;
    }
}

/* ============================================================
   Comprobante
   ============================================================ */

.receipt-page { max-width: 460px; margin: 0 auto; padding: 20px 16px 48px; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    color: var(--ink-2);
    text-decoration: none;
    margin-bottom: 16px;
}
.back-link:hover { color: var(--ink); }

.receipt {
    background: var(--card);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lift);
    overflow: hidden;
}

.receipt-head {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
    padding: 20px 24px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 11px;
    position: relative;
    overflow: hidden;
}
.receipt-head .brand-name { color: #fff; }
.receipt-head .brand-name .lk { color: var(--gold-bright); }
.receipt-head .brand-sub { color: rgba(255, 255, 255, .7); }

.receipt-body { padding: 26px 24px 24px; text-align: center; }

.receipt-caption { margin: 0 0 6px; font-size: 13px; color: var(--ink-2); }

.receipt-amount {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -.03em;
}
.receipt-amount.in { color: var(--green); }

.receipt-status {
    display: inline-block;
    margin-top: 12px;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
}

.receipt-details {
    margin: 22px 0 0;
    border-top: 1px solid var(--line);
    text-align: left;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13.5px;
}
.receipt-row:last-child { border-bottom: none; }

.receipt-key { color: var(--ink-2); flex: 0 0 auto; }
.receipt-val { font-weight: 600; text-align: right; word-break: break-all; }
.receipt-val.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.receipt-val.id { color: var(--gold); letter-spacing: .04em; }

.receipt-actions { display: flex; gap: 10px; margin-top: 20px; }

.btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 13px;
    border-radius: var(--r-sm);
    border: 1.5px solid var(--line);
    background: var(--card);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .12s ease;
}
.btn:hover { background: var(--card-2); }
.btn svg { width: 16px; height: 16px; }

.btn-primary {
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
    border-color: transparent;
    color: #fff;
}
.btn-primary:hover { opacity: .93; background: linear-gradient(135deg, var(--navy), var(--navy-2)); }

@media (prefers-color-scheme: dark) {
    .btn-primary,
    .btn-primary:hover {
        background: linear-gradient(135deg, var(--gold), var(--gold-bright));
        color: #14203a;
    }
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%) translateY(12px);
    background: var(--navy);
    color: #fff;
    font-size: 13px;
    font-weight: 550;
    padding: 10px 18px;
    border-radius: 999px;
    box-shadow: var(--shadow-lift);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 60;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   Login
   ============================================================ */

.login-body { min-height: 100vh; }

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

/* ---------- Panel de marca (izquierda) ---------- */

.login-aside {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 56px 52px;
    background: linear-gradient(150deg, #0b1830 0%, var(--navy) 45%, var(--navy-2) 100%);
    color: #fff;
}

/* Halo dorado difuso */
.login-aside-glow {
    position: absolute;
    top: -18%; right: -22%;
    width: 62%; aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(188, 155, 114, .38) 0%, transparent 68%);
    pointer-events: none;
}

/* Isotipo grande como textura de fondo */
.login-aside-mark {
    position: absolute;
    bottom: -16%; left: -14%;
    width: 62%;
    opacity: .07;
    pointer-events: none;
}
.login-aside-mark img { width: 100%; height: auto; display: block; }

.login-aside-content { position: relative; max-width: 400px; }

.login-aside-brand {
    margin: 0 0 28px;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -.01em;
}
.login-aside-brand .lk { color: var(--gold-bright); font-weight: 400; }

.login-aside-title {
    margin: 0 0 16px;
    font-size: clamp(30px, 3vw, 40px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.03em;
}

/* Rotador de rieles: los tres nombres se turnan en el mismo espacio.
   Se apilan en absoluto y solo el primero ocupa flujo, para que el
   título no cambie de alto al rotar. */
.rotator {
    display: block;
    position: relative;
    color: var(--gold-bright);
    white-space: nowrap;
}

.rotator span {
    position: absolute;
    left: 0; top: 0;
    opacity: 0;
    animation: rotar 9s infinite;
}
.rotator span:first-child { position: static; }
.rotator span:nth-child(2) { animation-delay: 3s; }
.rotator span:nth-child(3) { animation-delay: 6s; }

/* Cada palabra dura 1/3 del ciclo (delay 3s sobre 9s = 33.3%). La salida
   se extiende hasta 36% para que se cruce con la entrada de la siguiente
   y nunca quede el hueco sin ninguna palabra visible. */
@keyframes rotar {
      0%   { opacity: 0; transform: translateY(12px); }
      3%   { opacity: 1; transform: translateY(0); }
     30%   { opacity: 1; transform: translateY(0); }
     36%   { opacity: 0; transform: translateY(-12px); }
    100%   { opacity: 0; transform: translateY(-12px); }
}

/* Sin animación: se muestra solo el primero, ya visible por defecto. */
@media (prefers-reduced-motion: reduce) {
    .rotator span:not(:first-child) { display: none; }
    .rotator span:first-child { opacity: 1; }
}

.login-aside-text {
    margin: 0 0 32px;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .72);
}

.login-aside-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-aside-list li {
    position: relative;
    padding-left: 26px;
    font-size: 14px;
    color: rgba(255, 255, 255, .82);
}

/* Palomita dorada dibujada en CSS */
.login-aside-list li::before {
    content: "";
    position: absolute;
    left: 2px; top: 5px;
    width: 6px; height: 10px;
    border: solid var(--gold-bright);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ---------- Formulario (derecha) ---------- */

.login-main {
    display: grid;
    place-items: center;
    padding: 40px 24px;
    background: var(--bg);
}

.login-box { width: 100%; max-width: 380px; }

.login-mark-mobile { display: none; }

.login-head { margin-bottom: 28px; }

.login-title {
    margin: 0 0 6px;
    font-size: 27px;
    font-weight: 650;
    letter-spacing: -.025em;
}

.login-subtitle { margin: 0; font-size: 14.5px; color: var(--ink-2); }

.login-error {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 20px;
    padding: 12px 14px;
    border-radius: var(--r-sm);
    background: var(--red-soft);
    color: var(--red);
    font-size: 13.5px;
    font-weight: 550;
}
.login-error svg { width: 17px; height: 17px; flex: 0 0 17px; }

/* Campos con ícono */
.input-wrap { position: relative; display: block; }

.input-icon {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    color: var(--ink-3);
    pointer-events: none;
    transition: color .12s ease;
}

.input.has-icon { padding-left: 42px; }

.input-wrap:focus-within .input-icon { color: var(--gold); }

.input-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 17px;
    letter-spacing: .34em;
}

.login-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
}
.login-submit svg { width: 17px; height: 17px; }

.login-box .submit:disabled,
.login-box .input:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.login-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 26px 0 0;
    font-size: 12px;
    color: var(--ink-3);
}
.login-foot svg { width: 13px; height: 13px; }

/* ---------- Salir ---------- */

.logout-btn {
    border: none;
    background: none;
    padding: 0;
    color: var(--ink-3);
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
}
.logout-btn:hover { color: var(--ink-2); }

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
    .app { padding: 14px 12px 40px; }

    .hero { padding: 22px 20px 18px; border-radius: 20px; }

    .actions { gap: 10px; }
    .action { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
    .action-sub { font-size: 11.5px; }

    .item { padding: 13px 14px; gap: 10px; }
    .item-icon { width: 34px; height: 34px; flex-basis: 34px; }
    .item-sub { max-width: 130px; }
    .item-actions { flex-direction: column; gap: 4px; }
    .mini { width: 28px; height: 28px; font-size: 11px; }

    /* El modal se comporta como bottom-sheet en móvil */
    .overlay { align-items: end; padding: 0; }
    .sheet {
        max-width: none;
        border-radius: 24px 24px 0 0;
        padding: 12px 18px calc(24px + env(safe-area-inset-bottom));
        animation: sheet-up .24s cubic-bezier(.2, .8, .3, 1);
    }
    .sheet-grip {
        display: block;
        width: 38px; height: 4px;
        border-radius: 2px;
        background: var(--line);
        margin: 0 auto 14px;
    }
    .submit { padding: 16px; }

    .receipt-page { padding: 16px 12px 40px; }
    .receipt-amount { font-size: 28px; }
}

/* En pantallas angostas el panel de marca estorba: se oculta y el logo
   pasa a encabezar el formulario. */
@media (max-width: 900px) {
    .login-shell { grid-template-columns: 1fr; }
    .login-aside { display: none; }

    .login-main { padding: 32px 20px; }

    .login-mark-mobile {
        display: block;
        width: 62px; height: 62px;
        margin: 0 auto 20px;
    }
    .login-mark-mobile img { width: 100%; height: 100%; object-fit: contain; }

    .login-head { text-align: center; }
    .login-title { font-size: 24px; }
}

@keyframes sheet-up { from { transform: translateY(100%); } }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ---------- Impresión del comprobante ---------- */

@media print {
    body { background: #fff; }
    .back-link, .receipt-actions, .toast { display: none !important; }
    .receipt { box-shadow: none; border: 1px solid #ddd; }
    .receipt-page { padding: 0; }
}
