:root {
    --color-primary: #2563eb;
    --color-primary-soft: #eff4ff;
    --color-primary-strong: #1d4ed8;
    --color-bg: #f3f4f6;
    --color-surface: #ffffff;
    --color-text-main: #111827;
    --color-text-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-danger: #dc2626;
    --color-danger-soft: #fee2e2;
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 6px;
    --shadow-soft: 0 12px 32px rgba(15, 23, 42, 0.10);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at top, #e0ecff 0, #f3f4f6 45%, #f9fafb 100%);
    color: var(--color-text-main);
    min-height: 100vh;
}

.page-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 32px;
}

.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    width: 100%;
    max-width: 550px;
    padding: 40px;
    border: 1px solid rgba(148, 163, 184, 0.20);
    position: relative;
    overflow: hidden;
}

/* Línea decorativa superior solicitada originalmente */
.card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1d4ed8, #6366f1, #0ea5e9);
}

.card-title { margin: 0 0 8px; font-size: 1.75rem; font-weight: 700; }
.card-subtitle { margin: 0 0 30px; color: var(--color-text-muted); }

.form-group { margin-bottom: 20px; display: flex; flex-direction: column; gap: 6px; }
label { font-weight: 600; font-size: 0.95rem; }

input, select {
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.2s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.form-help { font-size: 0.85rem; color: var(--color-text-muted); }

.button-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-strong));
    color: white;
    border: none;
    padding: 14px;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.button-primary:disabled { opacity: 0.7; cursor: not-allowed; }

/* Spinner */
.spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Errores */
.error-list {
    background: var(--color-danger-soft);
    color: var(--color-danger);
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 25px;
    list-style: none;
}

/* Comprobante */
.receipt-box {
    border: 2px dashed var(--color-border);
    padding: 25px;
    background: #fafafa;
    border-radius: var(--radius-md);
    margin: 25px 0;
    text-align: left;
}
.receipt-box h2 { margin-top: 0; font-size: 1.2rem; color: var(--color-primary); }

@media print {
    .no-print { display: none !important; }
    body { background: white; }
    .card { box-shadow: none; border: 1px solid #eee; }
}