/* ===== Design Tokens ===== */
:root {
    --fv-primary:         #2563EB;
    --fv-primary-dark:    #1D4ED8;
    --fv-primary-subtle:  rgba(37, 99, 235, 0.1);

    --fv-secondary:       #F59E0B;
    --fv-secondary-dark:  #D97706;

    --fv-sidebar-bg:      #0F172A;
    --fv-appbar-bg:       #1E293B;

    --fv-bg:              #F8FAFC;
    --fv-surface:         #FFFFFF;
    --fv-border:          #E2E8F0;
    --fv-border-strong:   #CBD5E1;

    --fv-text:            #0F172A;
    --fv-text-muted:      #64748B;
    --fv-text-subtle:     #94A3B8;
    --fv-text-label:      #374151;
    --fv-text-placeholder: #6B7280;

    --fv-success-text:    #059669;
    --fv-danger-text:     #DC2626;

    --fv-border-subtle:   #F1F5F9;

    --fv-success:         #10B981;
    --fv-danger:          #EF4444;

    --fv-radius-sm:       2px;
    --fv-radius-md:       4px;
    --fv-radius-xl:       8px;

    --fv-shadow-sm:       0 1px 3px 0 rgba(0,0,0,0.06), 0 1px 2px -1px rgba(0,0,0,0.04);
    --fv-shadow-lg:       0 10px 20px -3px rgba(0,0,0,0.08), 0 4px 8px -4px rgba(0,0,0,0.04);

    --fv-font:            'IBM Plex Sans', system-ui, -apple-system, sans-serif;

    /* Escala z-index */
    --fv-z-skip:          900;
}

/* ===== Skip Link ===== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    padding: 0.75rem 1.25rem;
    background: var(--fv-primary);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    z-index: var(--fv-z-skip);
    border-radius: 0 0 var(--fv-radius-md) 0;
}

.skip-link:focus { top: 0; }

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; }

html {
    height: 100%;
    scroll-behavior: smooth;
}

section[id] { scroll-margin-top: 72px; }

html, body {
    font-family: var(--fv-font);
    color: var(--fv-text);
    background: var(--fv-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* ===== Utility: Status Chips ===== */
.fv-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--fv-radius-sm);
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.fv-chip-success { background: rgba(16,185,129,0.1);  color: var(--fv-success-text); }
.fv-chip-warning { background: rgba(245,158,11,0.1);  color: var(--fv-secondary-dark); }
.fv-chip-danger  { background: rgba(239,68,68,0.1);   color: var(--fv-danger-text); }
.fv-chip-info    { background: rgba(14,165,233,0.1);  color: #0284C7; }
.fv-chip-neutral { background: var(--fv-border);      color: var(--fv-text-muted); }

/* ===== Blazor: Form Validation ===== */
.valid.modified:not([type=checkbox]) { outline: 1px solid var(--fv-success); }
.invalid                              { outline: 1px solid var(--fv-danger); }
.validation-message {
    color: var(--fv-danger);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* ===== Stub pages ("en construcción") ===== */
.stub-page {
    max-width: 480px;
    margin: 4rem auto;
    text-align: center;
    padding: 2rem 1.5rem;
}

.stub-icon {
    width: 64px;
    height: 64px;
    background: var(--fv-primary-subtle);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.stub-ico {
    color: var(--fv-primary) !important;
    font-size: 1.75rem !important;
}

.stub-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--fv-text);
    margin: 0 0 0.625rem;
    letter-spacing: -0.02em;
}

.stub-desc {
    color: var(--fv-text-muted);
    font-size: 0.9375rem;
    margin: 0;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar              { width: 5px; height: 5px; }
::-webkit-scrollbar-track        { background: transparent; }
::-webkit-scrollbar-thumb        { background: var(--fv-border-strong); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover  { background: var(--fv-text-subtle); }

/* ===== Utility: Spinner ===== */
@keyframes fv-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ===== Utility: Review sections (.rv-*) ===== */
.rv-section {
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--fv-border-subtle);
}
.rv-section:last-of-type { border-bottom: none; }

.rv-section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--fv-text-muted);
    margin: 0 0 0.875rem;
}

.rv-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin: 0;
}

.rv-row {
    display: flex;
    gap: 1rem;
    align-items: baseline;
}

.rv-row dt {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--fv-text-muted);
    min-width: 120px;
    flex-shrink: 0;
}

.rv-row dd {
    font-size: 0.9375rem;
    color: var(--fv-text);
    margin: 0;
}

.rv-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.75rem;
    flex-wrap: wrap;
}

.rv-btn-confirm { width: auto; padding: 0 1.5rem; }

@media (max-width: 480px) {
    .rv-row     { flex-direction: column; gap: 0.125rem; }
    .rv-row dt  { min-width: unset; }
}
