/* ============================================
   SportEvo — Design Tokens & Base Styles
   Brand Kit: Metaverso Fundación Federico
   ============================================ */

/* Google Fonts — loaded via <link> in layouts */

:root {
    /* Brand & Structure */
    --primary: #0f172a; /* Slate 900 for dark elegance, or we can use the original primary */
    --primary-alt: #4edea3; /* Emerald from mockup for accents */
    --primary-light: rgba(15, 23, 42, 0.05);
    --primary-hover: #1e293b;
    
    /* Liquid Glass Light Theme */
    --bg: #f8fafc;
    --bg-light: #f1f5f9;
    --surface-container: #ffffff;
    --surface-container-low: #f8fafc;
    --surface-container-high: #f1f5f9;
    --surface-border: #e2e8f0;
    
    /* Text Colors */
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --white: #ffffff;

    /* Slate Scale */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    /* Semantic Colors */
    --success: #10b981;
    --success-bg: #dcfce7;
    --success-text: #15803d;
    --warning: #fbbf24;
    --warning-bg: #fef3c7;
    --warning-text: #92400e;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --danger-text: #991b1b;
    --info: #2563eb;
    --info-bg: #dbeafe;
    --info-text: #1e40af;

    /* Typography */
    --font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-family: var(--font);
    --font-size-xs: 0.625rem;   /* 10px */
    --font-size-sm: 0.75rem;    /* 12px */
    --font-size-base: 0.875rem; /* 14px */
    --font-size-md: 1rem;       /* 16px */
    --font-size-lg: 1.25rem;    /* 20px */
    --font-size-xl: 1.5rem;     /* 24px */
    --font-size-2xl: 2rem;      /* 32px */

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Radius */
    --radius: 12px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Shadows (Liquid Glass) */
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-elevated: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);

    /* Transitions */
    --transition: all 0.2s ease;

    /* Sidebar */
    --sidebar-width: 260px;
}

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

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--slate-900);
    background-color: var(--bg-light);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--info);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { opacity: 0.8; }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility: Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge--active { background: var(--success-bg); color: var(--success-text); }
.badge--warning { background: var(--warning-bg); color: var(--warning-text); }
.badge--danger { background: var(--danger-bg); color: var(--danger-text); }
.badge--info { background: var(--info-bg); color: var(--info-text); }

/* Utility: Buttons (Liquid Glass Premium 2026) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-full);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.98);
}

.btn--primary, .btn-primary { 
    background: linear-gradient(135deg, var(--primary) 0%, #1e293b 100%);
    color: var(--white); 
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.2), 0 2px 4px -1px rgba(15, 23, 42, 0.1);
}
.btn--primary:hover, .btn-primary:hover { 
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.3), 0 4px 6px -2px rgba(15, 23, 42, 0.15);
}

.btn--success, .btn-success { 
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: var(--white); 
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
}
.btn--success:hover, .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
}

.btn--danger, .btn-danger { 
    background: linear-gradient(135deg, var(--danger) 0%, #be123c 100%);
    color: var(--white);
    box-shadow: 0 4px 6px -1px rgba(225, 29, 72, 0.2);
}
.btn--danger:hover, .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(225, 29, 72, 0.3);
}

.btn--outline, .btn-outline {
    background: #ffffff;
    border: 1px solid var(--slate-200);
    color: var(--slate-800);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.btn--outline:hover, .btn-outline:hover {
    background: var(--slate-50);
    border-color: var(--slate-300);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Utility: Premium Forms */
.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    background: #ffffff;
    border: 1px solid var(--slate-300); /* Made border darker for better visibility */
    color: var(--text); /* Fixed non-existent --text-primary */
    font-size: 1rem;
    font-family: var(--font-family);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.04); /* Slightly deeper inset shadow */
    -webkit-appearance: none;
    appearance: none;
}
.form-control:hover {
    border-color: var(--slate-400);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1), inset 0 1px 3px rgba(0,0,0,0.04);
    background: #ffffff;
}

[data-theme="dark"] .form-control {
    background: var(--surface-container-highest);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}
[data-theme="dark"] .form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

/* Utility: Cards */
.card {
    background: var(--surface-container);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: var(--space-lg);
}

/* Utility: Form Inputs */
.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    color: var(--slate-900);
    transition: var(--transition);
}
.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.form-input::placeholder { color: var(--slate-400); }

.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--slate-500);
    margin-bottom: var(--space-xs);
}

/* Utility: Tables */
.table-wrap { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    text-align: left;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--slate-500);
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--slate-200);
}
.data-table td {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--slate-100);
    font-size: var(--font-size-base);
}
.data-table tr:hover td { background: var(--slate-50); }

/* Material Symbols */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}
