/* RealDataTraining Design System - Professional/Corporate */

:root {
    /* Professional Palette */
    --color-primary: #0f172a; /* Slate 900 (Navy) */
    --color-primary-light: #334155; /* Slate 700 */
    --color-accent: #2563eb; /* Blue 600 */
    --color-accent-hover: #1d4ed8; /* Blue 700 */
    
    --color-bg-body: #f8fafc; /* Slate 50 */
    --color-bg-card: #ffffff;
    --color-border: #e2e8f0; /* Slate 200 */
    
    --color-text-main: #1e293b; /* Slate 800 */
    --color-text-muted: #64748b; /* Slate 500 */
    --color-text-light: #f1f5f9; /* Slate 100 */

    --color-success: #16a34a;
    --color-danger: #dc2626;
    --color-warning: #ca8a04;

    /* Typography */
    --font-heading: 'Outfit', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 70px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Effects */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --transition: all 0.2s ease-in-out;
}

html[data-theme="dark"] {
    --color-bg-body: #0f172a; /* Slate 900 */
    --color-bg-card: #1e293b; /* Slate 800 */
    --color-border: #334155; /* Slate 700 */
    
    --color-text-main: #f1f5f9; /* Slate 100 */
    --color-text-muted: #94a3b8; /* Slate 400 */
    --color-text-light: #f8fafc; /* Slate 50 */
    
    --color-primary: #1e293b; /* Darker header */
}

/* Dark Mode Helper Overrides */
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6 {
    color: var(--color-text-light);
}

html[data-theme="dark"] .btn-outline {
    color: var(--color-text-light);
    border-color: var(--color-text-muted);
}

html[data-theme="dark"] .btn-outline:hover {
    color: var(--color-primary); /* Dark text on white bg */
    background-color: var(--color-text-light);
    border-color: var(--color-text-light);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-body);
    color: var(--color-text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}

h1 { font-size: 2.5rem; letter-spacing: -0.025em; }
h2 { font-size: 1.875rem; letter-spacing: -0.025em; }
h3 { font-size: 1.5rem; }

a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section { padding: 4rem 0; }

.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.flex { display: flex; gap: 1rem; }
.flex-column { flex-direction: column; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }

/* Components */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.btn-primary {
    background-color: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
}

.btn-outline {
    background: transparent;
    border-color: var(--color-border);
    color: var(--color-primary);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    background-color: white;
}

/* Cards */
.card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

/* Navbar */
.navbar {
    height: var(--header-height);
    background-color: var(--color-primary);
    color: white;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.35rem;
    color: white;
    letter-spacing: -0.02em;
}

.nav-links { display: flex; align-items: center; gap: 0.5rem; }

.nav-links a {
    font-weight: 500;
    color: #cbd5e1; /* Slate 300 */
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.nav-links a:hover, .nav-links a.active {
    color: white;
    background-color: rgba(255,255,255,0.1);
}

.nav-separator {
    width: 1px;
    height: 24px;
    background-color: rgba(255,255,255,0.2);
    margin: 0 0.5rem;
}

/* Footer */
footer {
    background-color: white;
    border-top: 1px solid var(--color-border);
    padding: 3rem 0;
    margin-top: auto;
}

/* Form Elements */
.form-group { margin-bottom: 1.25rem; }

label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text-main);
}

input, textarea, select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--color-bg-card);
    color: var(--color-text-main);
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Helpers */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.text-muted { color: var(--color-text-muted); }
.text-danger { color: var(--color-danger); }
.text-sm { font-size: 0.875rem; }

.text-sm { font-size: 0.875rem; }

.stat-number {
    font-size: 3rem;
    color: var(--color-primary);
    margin: 0;
    line-height: 1;
}

.text-accent { color: var(--color-accent); }
.text-success { color: var(--color-success); }

html[data-theme="dark"] .stat-number {
    color: var(--color-text-light); /* Force all stats white in dark mode */
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge-active { background: #dcfce7; color: var(--color-success); border: 1px solid #bbf7d0; }
.badge-inactive { background: #f1f5f9; color: var(--color-text-muted); border: 1px solid #e2e8f0; }

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    border-left: 4px solid transparent;
    font-size: 0.95rem;
}
.alert-error { background: #fef2f2; border-left-color: var(--color-danger); color: #991b1b; }
.alert-success { background: #f0fdf4; border-left-color: var(--color-success); color: #166534; }

/* Responsive */
/* Responsive */
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: white;
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    
    .mobile-toggle { display: block; }
    
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--color-primary);
        padding: 1rem;
        box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 0.75rem;
    }
    
    .nav-separator { display: none; }
    
    .grid, .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    
    /* Table Responsive Wrapper */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px; /* Force scroll */
    }
}

/* Centered Form Utility */
.center-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.form-card {
    width: 100%;
    max-width: 450px;
}
