:root {
    /* Refined Color Palette - Professional Slate & Emerald */
    --primary: #0f172a;
    --primary-light: #1e293b;
    --secondary: #10b981;
    --secondary-dark: #059669;
    --accent: #6366f1;
    --background: #f1f5f9;
    --surface: rgba(255, 255, 255, 0.8);
    --surface-solid: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    /* Spacing & Sizing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--background);
    background-image: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0px, transparent 50%),
                      radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.05) 0px, transparent 50%);
    color: var(--text-main);
    margin: 0;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}

/* Compact Layout */
.app-container {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

aside {
    background-color: var(--primary);
    background-image: linear-gradient(180deg, var(--primary) 0%, #020617 100%);
    color: white;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

aside h1 {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0.5rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

aside h1 span {
    background: var(--secondary);
    color: var(--primary);
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 0.7rem;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

nav a {
    color: #94a3b8;
    text-decoration: none;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.875rem;
}

nav a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.nav-section {
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    font-size: 0.65rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 700;
    padding: 0 0.75rem;
    letter-spacing: 0.05em;
}


main {
    padding: 1.5rem 2rem;
    max-width: 1400px;
}

/* Modern Components */
.card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Compact Stats */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--primary);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Compact Table */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

th {
    text-align: left;
    padding: 0.75rem 0.5rem;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
}

td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border);
}

tr:last-child td {
    border-bottom: none;
}

/* Buttons */
.btn {
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

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

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

.btn-secondary:hover {
    background: var(--secondary-dark);
}

.btn-outline {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-main);
}

/* Alert Compact */
.alert-warning {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* Form Controls Compact */
.form-control {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 100%;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Badges */
.badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Progress Bars */
.progress-container {
    height: 6px;
    background: #e2e8f0;
    border-radius: 100px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 100px;
}
