/* style.css - Modern Professional Design */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0d6efd;     /* Professional Blue */
    --primary-dark: #0a58ca;
    --secondary-color: #64748b;   /* Slate Gray */
    --success-color: #10b981;     /* Emerald Green */
    --danger-color: #ef4444;      /* Red */
    --warning-color: #f59e0b;     /* Amber */
    --dark-color: #1e293b;        /* Dark Slate */
    
    --bg-body: #f1f5f9;           /* Light Gray Background */
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    
    --border-color: #e2e8f0;
    --text-main: #334155;
    --text-muted: #94a3b8;
    
    --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);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100%;
    z-index: 50;
    transition: all 0.3s;
}

.logo-area {
    height: 64px;
    display: flex;
    align-items: center;
    padding-left: 24px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 20px;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.user-profile-section {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(to bottom, #ffffff, #f8fafc);
}

.user-avatar {
    width: 64px;
    height: 64px;
    background-color: #eff6ff;
    color: var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    border: 1px solid #dbeafe;
}

.user-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--dark-color);
}

.user-role {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 4px;
    font-weight: 600;
}

/* Navigation */
.nav-menu {
    list-style: none;
    padding: 15px;
    margin: 0;
    flex: 1;
}

.nav-item { margin-bottom: 4px; }

.nav-item a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--secondary-color);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 14px;
}

.nav-item a i {
    width: 24px;
    font-size: 16px;
    opacity: 0.8;
}

.nav-item a:hover {
    background-color: #f8fafc;
    color: var(--primary-color);
}

.nav-item a.active {
    background-color: #eff6ff;
    color: var(--primary-color);
    font-weight: 600;
}

.badge-counter {
    margin-left: auto;
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 6px;
}

/* --- MAIN CONTENT --- */
.main-content {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Top Header */
.top-header {
    height: 64px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
}

/* Content Area */
.content-wrapper {
    padding: 30px;
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--dark-color);
}

/* Stats Rows */
.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 14px;
}
.stat-row:last-child { border-bottom: none; }
.stat-label { color: var(--secondary-color); }
.stat-value { font-weight: 600; color: var(--dark-color); }

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    text-align: left;
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-main);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    gap: 8px;
}

.btn-primary { background: var(--primary-color); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success-color); color: white; }
.btn-danger { background: var(--danger-color); color: white; }

/* Status Badges */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-new { background: #fee2e2; color: #b91c1c; }
.badge-assigned { background: #e0f2fe; color: #0369a1; }
.badge-completed { background: #dcfce7; color: #15803d; }
.badge-paid { background: #dcfce7; color: #15803d; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { width: 0; overflow: hidden; }
    .main-content { margin-left: 0; }
}