.app-loading {
    min-height: 100vh;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 16px;
    color: #31526a;
    background: #f4f8fb;
    font: 600 15px/1.4 Arial, sans-serif;
}

.app-loading img { width: 96px; height: 96px; object-fit: contain; }
.app-loading p { margin: 0; }
.app-view-loading { padding: 48px; text-align: center; color: #687887; }
.link-button { border: 0; background: none; font: inherit; cursor: pointer; }
.nav-link.link-button { width: 100%; text-align: left; }
.logout-link.link-button { padding: 0; }
.field-error { color: #b51f2e; font-size: 12px; }
.photo-preview img, .person-photo img { width: 100%; height: 100%; object-fit: cover; }
.choice-card input:disabled + label, fieldset:disabled { opacity: .82; }
.form-card fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.record-count { white-space: nowrap; }
.local-data-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: -5px 0 22px;
    padding: 13px 16px;
    color: #16415c;
    border: 1px solid #cfe4ef;
    border-radius: 13px;
    background: #f2f9fc;
}
.local-data-card strong, .local-data-card span { display: block; }
.local-data-card strong { font-size: 11px; }
.local-data-card span { margin-top: 2px; color: #617887; font-size: 9px; }
.local-data-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.receipt-void::after {
    content: "ANULADO";
    position: absolute;
    inset: 42% auto auto 29%;
    color: rgba(185, 28, 28, .23);
    font-size: 72px;
    font-weight: 900;
    transform: rotate(-18deg);
    pointer-events: none;
}
.receipt-sheet { position: relative; }
.receipt-page {
    position: relative;
    width: 8.5in;
    height: 11in;
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 15px 45px rgba(24,31,36,.2);
}
.receipt-page .receipt-sheet {
    width: 8.5in;
    height: 5.5in;
    max-width: none;
    margin: 0;
    box-shadow: none;
}
.receipt-page::after {
    content: "✂  LÍNEA DE CORTE";
    position: absolute;
    z-index: 4;
    top: 5.5in;
    left: 0;
    width: 100%;
    border-top: 1px dashed #777;
    color: #666;
    font: 9px/1 Arial, sans-serif;
    letter-spacing: 1px;
    text-align: center;
    transform: translateY(-50%);
}
.receipt-copy-label {
    position: absolute;
    z-index: 2;
    top: .32in;
    right: .42in;
    color: #555;
    font: 700 8px/1 Arial, sans-serif;
    letter-spacing: .6px;
}
.fatal-panel { max-width: 620px; margin: 12vh auto; padding: 32px; }
.fatal-panel pre { white-space: pre-wrap; color: #8b1a24; }

@media (max-width: 680px) {
    .receipt-toolbar { align-items: flex-start; gap: 10px; }
    .receipt-actions { flex-wrap: wrap; }
    .local-data-card { align-items: stretch; flex-direction: column; }
    .local-data-actions { flex-wrap: wrap; }
}

@media print {
    @page { size: letter portrait; margin: 0; }
    .receipt-body { width: 8.5in; height: 11in; padding: 0; background: #fff; }
    .receipt-toolbar, .receipt-body > .alert { display: none !important; }
    .receipt-page { width: 8.5in; height: 11in; margin: 0; max-width: none; box-shadow: none; break-inside: avoid; }
    .receipt-page .receipt-sheet { width: 8.5in; height: 5.5in; margin: 0; padding: .2in; max-width: none; box-shadow: none; break-inside: avoid; }
}
