/**
 * FinanzasPR - main.css
 * Reset, variables base, tipografía y utilidades fundamentales
 */

/* ─── Reset Moderno ────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, video, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
a { text-decoration: none; color: inherit; }

/* ─── Variables CSS: Design Tokens ────────────────────────────────────────── */
:root {
    /* Colores primarios */
    --color-primary:       #6366f1;
    --color-primary-dark:  #4f46e5;
    --color-primary-light: #818cf8;
    --color-primary-glow:  rgba(99, 102, 241, 0.25);

    /* Colores de acento */
    --color-success:       #10b981;
    --color-success-light: rgba(16, 185, 129, 0.15);
    --color-danger:        #ef4444;
    --color-danger-light:  rgba(239, 68, 68, 0.15);
    --color-warning:       #f59e0b;
    --color-warning-light: rgba(245, 158, 11, 0.15);
    --color-info:          #06b6d4;
    --color-info-light:    rgba(6, 182, 212, 0.15);

    /* Tipografía */
    --font-xs:   0.75rem;
    --font-sm:   0.8125rem;
    --font-base: 0.9375rem;
    --font-md:   1rem;
    --font-lg:   1.125rem;
    --font-xl:   1.25rem;
    --font-2xl:  1.5rem;
    --font-3xl:  1.875rem;
    --font-4xl:  2.25rem;

    /* Pesos */
    --fw-light:   300;
    --fw-regular: 400;
    --fw-medium:  500;
    --fw-semi:    600;
    --fw-bold:    700;
    --fw-black:   800;

    /* Espaciado */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.25rem;
    --space-6:  1.5rem;
    --space-8:  2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Bordes */
    --radius-sm:   0.375rem;
    --radius-md:   0.625rem;
    --radius-lg:   1rem;
    --radius-xl:   1.25rem;
    --radius-2xl:  1.5rem;
    --radius-full: 9999px;

    /* Sombras */
    --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow-md:  0 4px 6px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.10);
    --shadow-lg:  0 10px 25px rgba(0, 0, 0, 0.20), 0 4px 10px rgba(0, 0, 0, 0.12);
    --shadow-xl:  0 20px 40px rgba(0, 0, 0, 0.25), 0 8px 20px rgba(0, 0, 0, 0.15);
    --shadow-glow:0 0 20px var(--color-primary-glow);

    /* Transiciones */
    --transition-fast:   0.15s ease;
    --transition-base:   0.25s ease;
    --transition-slow:   0.4s ease;

    /* Sidebar */
    --sidebar-width:          260px;
    --sidebar-collapsed-width: 72px;

    /* Topnav */
    --topnav-height: 64px;
}

/* ─── Clases de Utilidad ───────────────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-left    { text-align: left; }

.text-success { color: var(--color-success) !important; }
.text-danger  { color: var(--color-danger) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-muted   { color: var(--color-text-muted) !important; }
.text-primary { color: var(--color-primary) !important; }

.fw-bold    { font-weight: var(--fw-bold); }
.fw-semi    { font-weight: var(--fw-semi); }
.fw-medium  { font-weight: var(--fw-medium); }

.d-flex     { display: flex; }
.d-grid     { display: grid; }
.d-none     { display: none !important; }
.d-block    { display: block; }

.gap-2      { gap: var(--space-2); }
.gap-3      { gap: var(--space-3); }
.gap-4      { gap: var(--space-4); }

.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap  { flex-wrap: wrap; }

.w-full     { width: 100%; }
.mb-4       { margin-bottom: var(--space-4); }
.mb-6       { margin-bottom: var(--space-6); }
.mt-4       { margin-top: var(--space-4); }
.mt-auto    { margin-top: auto; }

/* Scrollbar estilizado */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }
