/* Validación JSON — Design System */

:root {
    --brand-50: #f0fdfa;
    --brand-100: #ccfbf1;
    --brand-200: #99f6e4;
    --brand-500: #14b8a6;
    --brand-600: #0d9488;
    --brand-700: #0f766e;
    --brand-800: #115e59;
    --brand-900: #134e4a;
    --slate-850: #172033;
    --slate-900: #0f172a;
    --shadow-soft: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
    --shadow-card: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 12px 32px -8px rgba(15, 23, 42, 0.1);
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    background: linear-gradient(160deg, #f8fafc 0%, #f0fdfa 45%, #f8fafc 100%);
    min-height: 100vh;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    text-decoration: none;
    line-height: 1.25;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
    color: white;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.35);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--brand-700), var(--brand-800));
    box-shadow: 0 4px 16px rgba(13, 148, 136, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: #334155;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-soft);
}
.btn-secondary:hover { background: #f8fafc; border-color: #cbd5e1; }

.btn-ghost {
    background: rgba(255, 255, 255, 0.8);
    color: #475569;
    border: 1px solid #e2e8f0;
}
.btn-ghost:hover { background: white; color: var(--brand-700); border-color: var(--brand-200); }

.btn-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.btn-danger:hover { background: #fee2e2; }

.btn-success {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.35);
}
.btn-success:hover { transform: translateY(-1px); }

.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8125rem; border-radius: 0.625rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; }

.card {
    background: white;
    border-radius: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-card);
}
.card-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid #f1f5f9; }
.card-body { padding: 1.5rem; }

.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-soft);
}
.stat-card .stat-icon {
    width: 2.5rem; height: 2.5rem;
    border-radius: 0.75rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; margin-bottom: 0.75rem;
}
.stat-card .stat-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.stat-card .stat-label {
    font-size: 0.6875rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: #94a3b8; margin-top: 0.375rem;
}

.app-header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    position: sticky; top: 0; z-index: 50;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.header-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    background: #f1f5f9;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
}
.header-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    border-radius: 0.625rem;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.header-nav-link:hover {
    color: #334155;
    background: rgba(255, 255, 255, 0.7);
}
.header-nav-link.active {
    background: white;
    color: var(--brand-700);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.header-user {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.375rem 0.875rem 0.375rem 0.375rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 9999px;
    box-shadow: var(--shadow-soft);
    max-width: 100%;
}
.header-user-meta {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}
.header-user-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 9rem;
}
.header-user-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 0.0625rem 0.4375rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b21a8;
    background: #f3e8ff;
    border-radius: 9999px;
}
.user-avatar-lg {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.875rem;
    border-radius: 9999px;
}

.app-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.app-logo--hidden { display: none; }
.app-logo-img {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}
.app-logo--header {
    height: 2.75rem;
    max-width: 10rem;
    padding: 0.375rem 0.625rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--brand-50), white);
    border: 1px solid var(--brand-100);
    box-shadow: var(--shadow-soft);
}
.app-logo--login-hero {
    height: 4.5rem;
    max-width: 14rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.875rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 2rem;
}
.app-logo--login-compact {
    height: 3.5rem;
    max-width: 11rem;
    padding: 0.375rem 0.625rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--brand-50), white);
    border: 1px solid var(--brand-100);
    box-shadow: var(--shadow-soft);
    margin: 0 auto 1rem;
}

.nav-pills { display: flex; gap: 0.25rem; background: #f1f5f9; padding: 0.25rem; border-radius: 0.75rem; }
.nav-pill {
    padding: 0.5rem 1rem; font-size: 0.8125rem; font-weight: 600;
    color: #64748b; border-radius: 0.625rem; text-decoration: none; transition: all 0.15s;
}
.nav-pill:hover { color: #334155; background: rgba(255,255,255,0.6); }
.nav-pill.active { background: white; color: var(--brand-700); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

.form-input, .form-select {
    width: 100%; padding: 0.625rem 1rem; font-size: 0.875rem;
    border: 1px solid #e2e8f0; border-radius: 0.75rem;
    background: #fafbfc; transition: all 0.15s; color: #1e293b;
}
.form-input:focus, .form-select:focus {
    outline: none; border-color: var(--brand-500);
    background: white; box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}
.form-label { display: block; font-size: 0.8125rem; font-weight: 600; color: #475569; margin-bottom: 0.375rem; }

.upload-zone {
    border: 2px dashed #cbd5e1; border-radius: 1rem;
    padding: 2.5rem 1.5rem; text-align: center;
    background: linear-gradient(180deg, #fafbfc 0%, #f8fafc 100%);
    transition: all 0.2s; cursor: pointer; position: relative;
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--brand-500); background: var(--brand-50); }
.upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload-zone-icon {
    width: 3.5rem; height: 3.5rem; margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--brand-100), var(--brand-50));
    border-radius: 1rem; display: flex; align-items: center; justify-content: center;
    color: var(--brand-600); font-size: 1.25rem;
}

.progress-track { height: 0.5rem; background: #e2e8f0; border-radius: 9999px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 9999px; background: linear-gradient(90deg, var(--brand-500), var(--brand-600)); transition: width 0.4s ease; }
.progress-fill.warning { background: linear-gradient(90deg, #f59e0b, #d97706); }
.progress-fill.danger { background: linear-gradient(90deg, #ef4444, #dc2626); }

.data-table { width: 100%; font-size: 0.875rem; border-collapse: separate; border-spacing: 0; }
.data-table thead th {
    padding: 0.875rem 1.25rem; text-align: left;
    font-size: 0.6875rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; color: #64748b; background: #f8fafc; border-bottom: 1px solid #e2e8f0;
}
.data-table tbody td { padding: 1rem 1.25rem; border-bottom: 1px solid #f1f5f9; color: #334155; vertical-align: middle; }
.data-table tbody tr:hover td { background: #fafbfc; }
.data-table tbody tr:last-child td { border-bottom: none; }

.badge {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.25rem 0.625rem; font-size: 0.6875rem; font-weight: 700;
    border-radius: 9999px; letter-spacing: 0.02em;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-purple { background: #f3e8ff; color: #6b21a8; }
.badge-neutral { background: #f1f5f9; color: #475569; }

.alert { display: flex; gap: 0.875rem; padding: 1rem 1.25rem; border-radius: 0.875rem; font-size: 0.875rem; border: 1px solid; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-info { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-900); }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-icon { flex-shrink: 0; width: 1.25rem; text-align: center; margin-top: 0.125rem; }

.info-panel {
    background: linear-gradient(135deg, var(--brand-50) 0%, #ecfdf5 100%);
    border: 1px solid var(--brand-100); border-radius: 1rem; padding: 1.5rem;
}
.code-block {
    background: white; border: 1px solid var(--brand-100); border-radius: 0.75rem;
    padding: 1rem 1.25rem; font-family: 'JetBrains Mono', monospace;
    font-size: 0.8125rem; color: #334155; overflow-x: auto; line-height: 1.6;
}

.login-page { min-height: 100vh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .login-page { grid-template-columns: 1fr 1fr; } }
.login-brand {
    background: linear-gradient(145deg, var(--slate-900) 0%, var(--slate-850) 40%, #0f4c47 100%);
    color: white; padding: 3rem;
    display: flex; flex-direction: column; justify-content: center;
    position: relative; overflow: hidden;
}
.login-brand::before {
    content: ''; position: absolute; width: 500px; height: 500px; border-radius: 50%;
    background: radial-gradient(circle, rgba(20,184,166,0.15) 0%, transparent 70%);
    top: -100px; right: -100px;
}
.login-form-side { display: flex; align-items: center; justify-content: center; padding: 2rem; background: #f8fafc; }

.contact-card {
    background: linear-gradient(135deg, var(--slate-900), var(--slate-850));
    border-radius: 1rem; padding: 1.5rem; color: white; position: relative; overflow: hidden;
}
.contact-card::before {
    content: ''; position: absolute; top: 0; right: 0;
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(20,184,166,0.2), transparent);
}
.contact-card-wide {
    padding: 1.25rem 1.75rem;
}
.contact-card-wide::before {
    width: 280px; height: 280px;
    top: -80px; right: -40px;
}
.contact-card-wide-inner {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
@media (min-width: 768px) {
    .contact-card-wide-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 2rem;
    }
}
.contact-card-text { flex: 1; min-width: 0; }
.contact-card-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-shrink: 0;
}
@media (min-width: 640px) {
    .contact-card-actions { flex-direction: row; }
}
.contact-card:not(.contact-card-wide) .contact-card-actions {
    margin-top: 1rem;
}

.app-footer { border-top: 1px solid #e2e8f0; background: rgba(255,255,255,0.6); backdrop-filter: blur(8px); }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: fadeInUp 0.4s ease forwards; }
.animate-in-delay-1 { animation-delay: 0.05s; opacity: 0; }
.animate-in-delay-2 { animation-delay: 0.1s; opacity: 0; }
.animate-in-delay-3 { animation-delay: 0.15s; opacity: 0; }

.user-avatar {
    width: 2rem; height: 2rem; border-radius: 0.625rem;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    color: white; font-size: 0.75rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; text-transform: uppercase;
}

.section-title { font-size: 1.125rem; font-weight: 700; color: #0f172a; letter-spacing: -0.01em; }
.section-subtitle { font-size: 0.875rem; color: #64748b; margin-top: 0.25rem; }
