@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');
:root {
    /* Premium Color Palette - Light Theme */
    --primary-color: #4f46e5;
    /* Indigo 600 */
    --primary-hover: #4338ca;
    /* Indigo 700 */
    --primary-light: #e0e7ff;
    /* Indigo 100 */
    --secondary-color: #0ea5e9;
    /* Sky 500 */
    --accent-color: #f43f5e;
    /* Rose 500 */
    --bg-main: #f8fafc;
    /* Slate 50 */
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-input: #f1f5f9;
    /* Slate 100 */
    --text-primary: #0f172a;
    /* Slate 900 */
    --text-secondary: #64748b;
    /* Slate 500 */
    --text-sidebar: #334155;
    /* Slate 700 */
    --text-sidebar-hover: #4f46e5;
    --border-color: #e2e8f0;
    /* Slate 200 */
    /* Layout Variables */
    --sidebar-width: 260px;
    --header-height: 70px;
    /* Utility Variables */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1.25rem;
    --radius-xl: 2rem;
    /* Premium Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.025);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.05);
    --shadow-hover: 0 20px 25px -5px rgb(79 70 229 / 0.15), 0 8px 10px -6px rgb(79 70 229 / 0.1);
    /* Status Colors */
    --color-success: #10b981;
    --color-success-bg: #d1fae5;
    --color-warning: #f59e0b;
    --color-warning-bg: #fef3c7;
    --color-danger: #ef4444;
    --color-danger-bg: #fee2e2;
    --color-info: #3b82f6;
    --color-info-bg: #dbeafe;
}
[data-theme="dark"] {
    --primary-color: #6366f1;
    /* Indigo 500 */
    --primary-hover: #818cf8;
    /* Indigo 400 */
    --primary-light: rgba(99, 102, 241, 0.15);
    --secondary-color: #38bdf8;
    /* Sky 400 */
    --accent-color: #fb7185;
    /* Rose 400 */
    --bg-main: #0B0E14;
    /* Deep dark blue/black */
    --bg-card: #151A23;
    /* Slightly lighter card bg */
    --bg-sidebar: #151A23;
    --bg-input: #1F2532;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-sidebar: #cbd5e1;
    --text-sidebar-hover: #6366f1;
    --border-color: #2D3748;
    /* Subtle border */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.4);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.4);
    --color-success-bg: rgba(16, 185, 129, 0.15);
    --color-warning-bg: rgba(245, 158, 11, 0.15);
    --color-danger-bg: rgba(239, 68, 68, 0.15);
    --color-info-bg: rgba(59, 130, 246, 0.15);
}
/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
    -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
/* App Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}
/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    color: var(--text-sidebar);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    z-index: 20;
}
.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
}
.sidebar-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}
.sidebar-nav ul {
    list-style: none;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    color: var(--text-sidebar);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-md);
    font-weight: 500;
}
.sidebar-nav li a i {
    width: 24px;
    margin-right: 12px;
    font-size: 1.2rem;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    display: flex;
    justify-content: center;
}
.sidebar-nav li a:hover {
    background: var(--primary-light);
    color: var(--text-sidebar-hover);
    transform: translateX(4px);
}
.sidebar-nav li a.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}
.sidebar-nav li a:hover i,
.sidebar-nav li a.active i {
    color: inherit;
}
/* Main Content Wrapper */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
/* Top Navigation */
.top-nav {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 10;
}
[data-theme="dark"] .top-nav {
    background: rgba(21, 26, 35, 0.8);
}
.nav-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.nav-left h2 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--text-primary);
}
#sidebar-toggle {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}
#sidebar-toggle:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: var(--bg-card);
}
.user-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.welcome-text {
    font-weight: 500;
    color: var(--text-secondary);
}
.btn-logout {
    color: var(--color-danger);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--color-danger-bg);
    transition: all 0.3s ease;
}
.btn-logout:hover {
    background: var(--color-danger);
    color: white;
}
/* Content Area */
.content-wrapper {
    padding: 2.5rem;
    flex-grow: 1;
    overflow-y: auto;
}
/* Cards & Widgets */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease;
}
.card:hover {
    box-shadow: var(--shadow-lg);
}
.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.widget-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.widget-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--widget-color, var(--primary-color));
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.widget-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-light);
}
.widget-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-xl);
    background: var(--widget-bg, var(--primary-light));
    color: var(--widget-color, var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-right: 1.5rem;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.5);
}
[data-theme="dark"] .widget-icon {
    box-shadow: none;
}
.widget-info {
    flex-grow: 1;
}
.widget-info h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.widget-value {
    font-size: 2rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}
/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}
.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.25rem;
}
.text-blue {
    color: var(--primary-color);
}
.text-red {
    color: var(--color-danger);
}
/* Forms */
.form-group {
    margin-bottom: 1rem;
}
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
}
/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}
.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #F87171;
}
.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #34D399;
}
/* Hide DataTables wrapper bg in dark mode */
[data-theme="dark"] .dataTables_wrapper,
[data-theme="dark"] table.dataTable tbody tr {
    background-color: var(--bg-card);
    color: var(--text-primary);
}
[data-theme="dark"] table.dataTable tbody tr:hover {
    background-color: var(--bg-main);
}
[data-theme="dark"] .dataTables_wrapper .dataTables_length,
[data-theme="dark"] .dataTables_wrapper .dataTables_filter,
[data-theme="dark"] .dataTables_wrapper .dataTables_info,
[data-theme="dark"] .dataTables_wrapper .dataTables_processing,
[data-theme="dark"] .dataTables_wrapper .dataTables_paginate {
    color: var(--text-secondary);
}