:root {
    --primary-color: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --secondary-color: #64748b;
    --bg-color: #f1f5f9;
    --text-color: #334155;
    --border: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --radius: 12px;
}

* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    margin: 0;
    background: var(--bg-color);
    color: var(--text-color);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: #0f172a;
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

.sidebar h2 {
    font-size: 1.5rem;
    margin: 0 0 2rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar h2 i {
    color: var(--primary-light);
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.sidebar nav a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar nav a.active {
    border-left: 4px solid var(--primary-light);
}

.sidebar .nav-group-title {
    color: #64748b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1.5rem 0 0.5rem 0;
    padding-left: 1rem;
    font-weight: 700;
}

/* User Info */
.user-info {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2.5rem;
    margin-left: 280px;
    width: calc(100% - 280px);
    transition: margin-left 0.3s ease, width 0.3s ease;
}

body.sidebar-closed .main-content {
    margin-left: 0 !important;
    width: 100% !important;
}

/* Top bar with toggle */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.menu-toggle {
    background: #fff;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    color: #334155;
    transition: all 0.2s;
}

.menu-toggle:hover {
    background: #f1f5f9;
}

.glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    border-radius: var(--radius);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #e2e8f0;
    color: #334155;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.2);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #334155;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8fafc;
    color: #1e293b;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.form-control:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.15);
    outline: none;
}

/* Typography */
h1,
h2,
h3 {
    color: #0f172a;
    margin-top: 0;
}

h1 {
    font-size: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Dashboard & Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: #fff;
    padding: 2rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

.stat-card .value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-card .label {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0.5rem;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border);
}

th {
    padding: 1.25rem 1.5rem;
    background: #f1f5f9;
    color: #334155;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
}

td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    vertical-align: middle;
}

/* Checkboxes and Selects */
select[multiple],
select[size] {
    padding: 0.5rem;
}

select[multiple] option,
select[size] option {
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 2px;
}