:root {
    --bg-primary: #f8fafc;
    --bg-sidebar: #0f172a;
    --text-main: #334155;
    --text-muted: #64748b;
    --accent-color: #6366f1;
    --accent-hover: #4f46e5;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR --- */
aside {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    color: var(--white);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    transition: all 0.3s ease;
}

.sidebar-brand {
    padding: 24px;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #1e293b;
}

.sidebar-brand i {
    color: var(--accent-color);
}

.sidebar-menu {
    list-style: none;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-menu a {
    color: #94a3b8;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-menu a:hover, .sidebar-menu li.active a {
    background-color: var(--accent-color);
    color: var(--white);
}

/* --- MAIN CONTENT --- */
main {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 40px;
    max-width: calc(100% - var(--sidebar-width));
}

/* --- TOP NAV --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.search-bar {
    position: relative;
}

.search-bar input {
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 300px;
    outline: none;
    background-color: var(--white);
    transition: border 0.2s;
}

.search-bar input:focus {
    border-color: var(--accent-color);
}

.search-bar i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info span {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
}

.user-info small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* --- DASHBOARD STATS --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: var(--white);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-details h3 {
    font-size: 1.75rem;
    margin-top: 4px;
    font-weight: 700;
}

.stat-details p {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* Stat Variants */
.icon-blue { background-color: #e0e7ff; color: #4f46e5; }
.icon-green { background-color: #dcfce7; color: #16a34a; }
.icon-orange { background-color: #ffedd5; color: #ea580c; }

/* --- DATA SECTION --- */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.card-header {
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

th {
    color: var(--text-muted);
    font-weight: 600;
    background-color: #f8fafc;
}

.status {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status.completed { background-color: #dcfce7; color: #15803d; }
.status.pending { background-color: #fef9c3; color: #a16207; }

/* Recent Activity List */
.activity-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    gap: 12px;
    font-size: 0.875rem;
}

.activity-item i {
    color: var(--accent-color);
    margin-top: 3px;
}

.activity-item p {
    color: var(--text-main);
}

.activity-item small {
    display: block;
    color: var(--text-muted);
    margin-top: 2px;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
}