/* Fuentes del sistema - Sin Google Fonts para CSP compliance */
/* Las fuentes Outfit e Inter se mapean a fuentes del sistema modernas */

:root {
    /* Escala Armoniosa STIA - Basada 100% en #0067B2 */
    --primary: #0067B2;          /* Azul corporativo STIA (100% saturación) */
    --primary-dark: #004d85;     /* Hover oscuro (120% oscuridad) */
    --primary-80: #1A7FC4;       /* 80% - Azul vibrante */
    --primary-60: #4DA3D9;       /* 60% - Azul medio */
    --primary-40: #80BBE6;       /* 40% - Azul suave */
    --primary-20: #B3D4F0;       /* 20% - Azul muy claro */
    --primary-10: #D9E9F7;       /* 10% - Azul pálido */
    --primary-glow: rgba(0, 103, 178, 0.2);

    /* Alias para facilitar uso */
    --brand-stia: #0067B2;       /* Azul corporativo principal */
    --brand-stia-medium: #1A7FC4; /* Azul medio armónico (reemplaza turquesa) */
    --brand-stia-light: #4DA3D9;  /* Azul claro armónico */

    /* Colores funcionales */
    --whatsapp: #25d366;         /* Verde WhatsApp */
    --secondary: #10b981;        /* Verde éxito */
    --secondary-glow: rgba(16, 185, 129, 0.2);
    --warning: #f59e0b;          /* Naranja advertencia */
    --danger: #ef4444;           /* Rojo peligro */

    /* Fondos y textos */
    --bg-dark: #ffffff;          /* Blanco puro */
    --bg-darker: #f8fafc;        /* Gris muy claro */
    --text-white: #0f172a;       /* Texto oscuro principal */
    --text-slate: #475569;       /* Texto secundario */
    --glass-bg: rgba(255, 255, 255, 0.95);     /* Vidrio casi blanco */
    --glass-border: rgba(226, 232, 240, 1);    /* Borde sólido gris claro */
    --glass-hover: rgba(248, 250, 252, 1);     /* Hover gris muy claro */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    /* Fondo armónico STIA - Gradiente suave basado en escala corporativa */
    background: linear-gradient(135deg, var(--primary-10) 0%, var(--primary-20) 50%, var(--primary-40) 100%);
    background-image:
        radial-gradient(at 0% 0%, rgba(0, 103, 178, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(26, 127, 196, 0.06) 0px, transparent 50%),
        linear-gradient(135deg, var(--primary-10) 0%, var(--primary-20) 50%, var(--primary-40) 100%);
    background-attachment: fixed;
    color: var(--text-white);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   SISTEMA TIPOGRÁFICO NORMALIZADO
   ============================================ */

/* Jerarquía de Headings - Escala armónica */
h1 {
    font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 2rem;           /* 32px */
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-white);
    margin-bottom: 1rem;
}

h2 {
    font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.5rem;         /* 24px */
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--text-white);
    margin-bottom: 0.875rem;
}

h3 {
    font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.25rem;        /* 20px */
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: var(--text-white);
    margin-bottom: 0.75rem;
}

h4 {
    font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1.125rem;       /* 18px */
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-white);
    margin-bottom: 0.625rem;
}

h5 {
    font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;           /* 16px */
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-white);
    margin-bottom: 0.5rem;
}

/* Body text - Escala base */
body {
    font-size: 1rem;           /* 16px - base */
    font-weight: 400;
    line-height: 1.6;
}

/* Tamaños de texto utilitarios */
.text-xs {
    font-size: 0.75rem;        /* 12px */
    line-height: 1.4;
}

.text-sm {
    font-size: 0.875rem;       /* 14px */
    line-height: 1.5;
}

.text-base {
    font-size: 1rem;           /* 16px */
    line-height: 1.6;
}

.text-lg {
    font-size: 1.125rem;       /* 18px */
    line-height: 1.5;
}

.text-xl {
    font-size: 1.25rem;        /* 20px */
    line-height: 1.4;
}

.text-2xl {
    font-size: 1.5rem;         /* 24px */
    line-height: 1.3;
}

.text-3xl {
    font-size: 2rem;           /* 32px */
    line-height: 1.2;
}

/* Font weights normalizados */
.font-light {
    font-weight: 300;
}

.font-normal {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

/* Glassmorphism Containers */
.glass-panel {
    background: #ffffff;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
    border-color: #cbd5e1;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-4px);
}

/* Premium Buttons - Tipografía normalizada */
.btn-premium,
button.btn-premium {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.875rem;       /* 14px - consistente */
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
    background: var(--primary-dark);
}

.btn-premium:active {
    transform: scale(0.98);
}

/* Status Badges - Tipografía normalizada */
.badge-premium {
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.75rem;        /* 12px - consistente */
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-slate);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) var(--bg-dark);
}

/* Utility Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Forms Premium - Tipografía normalizada */
input,
select,
textarea {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-white);
    font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.875rem;       /* 14px - consistente */
    font-weight: 400;
    line-height: 1.5;
    transition: all 0.2s;
}

/* Labels de formularios */
label {
    font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.875rem;       /* 14px */
    font-weight: 500;
    color: var(--text-slate);
    display: block;
    margin-bottom: 0.5rem;
}

/* Párrafos */
p {
    font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;           /* 16px */
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-slate);
    margin-bottom: 1rem;
}

/* Small text / descripciones */
small, .small-text {
    font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.75rem;        /* 12px */
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-slate);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Quick Actions Grid - Premium Design */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.action-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    text-decoration: none;
    color: var(--text-white);
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.03), transparent);
    transition: width 0.5s ease;
    z-index: 1;
}

.action-card:hover::before {
    width: 100%;
}

.action-card:hover {
    transform: translateY(-5px);
    border-color: #cbd5e1;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    background: #ffffff;
}

.action-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--brand-stia);
    transition: all 0.4s ease;
    border: 1px solid rgba(0, 103, 178, 0.1);
    position: relative;
    z-index: 2;
}

.action-card:hover .action-icon-wrapper {
    background: var(--primary);
    color: white;
    transform: scale(1.1) rotate(5deg);
    border-color: transparent;
    box-shadow: 0 8px 20px -5px var(--primary-glow);
}

.action-content {
    flex: 1;
    position: relative;
    z-index: 2;
}

.action-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: var(--text-white);
    letter-spacing: -0.01em;
}

.action-content p {
    font-size: 0.85rem;
    color: var(--text-slate);
    line-height: 1.4;
    font-weight: 400;
}

.action-arrow {
    margin-left: auto;
    opacity: 0.3;
    transition: all 0.3s ease;
    transform: translateX(0);
}

.action-card:hover .action-arrow {
    opacity: 1;
    transform: translateX(5px);
    color: var(--primary);
}