/* ============================================
   HỆ THỐNG QUẢN LÝ TIẾN ĐỘ THIẾT KẾ XÂY DỰNG
   Design System - Dark Mode + Glassmorphism
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== CSS Variables ===== */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-glass: rgba(255, 255, 255, 0.03);
    --bg-glass-hover: rgba(255, 255, 255, 0.06);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glass-hover: rgba(255, 255, 255, 0.15);
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-heading: #e2e8f0;
    
    --accent-blue: #3b82f6;
    --accent-blue-hover: #60a5fa;
    --accent-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
    --accent-orange: #f97316;
    --accent-red: #ef4444;
    --accent-pink: #ec4899;
    
    --gradient-primary: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --gradient-success: linear-gradient(135deg, #10b981, #06b6d4);
    --gradient-warning: linear-gradient(135deg, #f59e0b, #f97316);
    --gradient-danger: linear-gradient(135deg, #ef4444, #ec4899);
    --gradient-info: linear-gradient(135deg, #06b6d4, #3b82f6);
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-glow-blue: 0 0 20px rgba(59, 130, 246, 0.15);
    --shadow-glow-purple: 0 0 20px rgba(139, 92, 246, 0.15);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    --sidebar-width: 260px;
    --header-height: 70px;
    
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.04) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== Layout ===== */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ===== Sidebar ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-glass);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-normal);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-glass);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-icon {
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-glow-blue);
}

.sidebar-logo-text h1 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.sidebar-logo-text span {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 8px 12px 8px;
    margin-top: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 2px;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-blue);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: 0 4px 4px 0;
}

.nav-item i {
    font-size: 17px;
    width: 22px;
    text-align: center;
}

.nav-badge {
    margin-left: auto;
    background: var(--accent-red);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    min-width: 20px;
    text-align: center;
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

/* ===== Header ===== */
.top-header {
    height: var(--header-height);
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 22px;
    cursor: pointer;
    padding: 4px;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-heading);
    letter-spacing: -0.3px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-search {
    position: relative;
}

.header-search input {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-full);
    padding: 8px 16px 8px 38px;
    color: var(--text-primary);
    font-size: 13px;
    width: 240px;
    outline: none;
    transition: all var(--transition-fast);
    font-family: 'Inter', sans-serif;
}

.header-search input:focus {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-glow-blue);
    width: 300px;
}

.header-search input::placeholder {
    color: var(--text-muted);
}

.header-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

.header-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 16px;
    position: relative;
}

.header-btn:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
    border-color: var(--border-glass-hover);
}

.header-btn .badge-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 8px;
    height: 8px;
    background: var(--accent-red);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
}

.header-date {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    padding: 6px 12px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
}

/* ===== Page Content ===== */
.page-content {
    padding: 28px 32px;
}

/* ===== Stat Cards ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--border-glass-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card.blue::before { background: var(--gradient-primary); }
.stat-card.green::before { background: var(--gradient-success); }
.stat-card.yellow::before { background: var(--gradient-warning); }
.stat-card.red::before { background: var(--gradient-danger); }

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-card.blue .stat-card-icon {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-blue);
}

.stat-card.green .stat-card-icon {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
}

.stat-card.yellow .stat-card-icon {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-yellow);
}

.stat-card.red .stat-card-icon {
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
}

.stat-card-trend {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.stat-card-trend.up {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
}

.stat-card-trend.down {
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
}

.stat-card-value {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 4px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.green .stat-card-value {
    background: var(--gradient-success);
    -webkit-background-clip: text;
    background-clip: text;
}

.stat-card.yellow .stat-card-value {
    background: var(--gradient-warning);
    -webkit-background-clip: text;
    background-clip: text;
}

.stat-card.red .stat-card-value {
    background: var(--gradient-danger);
    -webkit-background-clip: text;
    background-clip: text;
}

.stat-card-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== Content Grid ===== */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.content-grid.full {
    grid-template-columns: 1fr;
}

/* ===== Card ===== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: var(--border-glass-hover);
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-heading);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    font-size: 18px;
    color: var(--accent-blue);
}

.card-body {
    padding: 20px 24px;
}

.card-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ===== Data Table ===== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead th {
    background: rgba(59, 130, 246, 0.06);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border-glass);
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-glass);
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--bg-glass-hover);
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

.data-table tbody td {
    padding: 14px 16px;
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table .customer-name {
    font-weight: 600;
    color: var(--text-heading);
}

.data-table .customer-code {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ===== Progress Bar ===== */
.progress-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
    min-width: 80px;
}

.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-bar-fill.low { background: var(--gradient-danger); }
.progress-bar-fill.medium { background: var(--gradient-warning); }
.progress-bar-fill.high { background: var(--gradient-info); }
.progress-bar-fill.complete { background: var(--gradient-success); }

.progress-text {
    font-size: 12px;
    font-weight: 700;
    min-width: 38px;
    text-align: right;
}

.progress-text.low { color: var(--accent-red); }
.progress-text.medium { color: var(--accent-yellow); }
.progress-text.high { color: var(--accent-blue); }
.progress-text.complete { color: var(--accent-green); }

/* ===== Task Steps / Hạng mục ===== */
.task-steps {
    display: flex;
    gap: 6px;
    align-items: center;
}

.task-step {
    width: 32px;
    height: 26px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    transition: all var(--transition-fast);
    cursor: default;
    position: relative;
}

.task-step.done {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.task-step.pending {
    background: rgba(100, 116, 139, 0.08);
    color: var(--text-muted);
    border: 1px solid rgba(100, 116, 139, 0.15);
}

.task-step.active {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.2); }
    50% { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.05); }
}

/* ===== Status Badge ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-badge.hoan-thanh {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
}
.status-badge.hoan-thanh::before { background: var(--accent-green); }

.status-badge.dang-xu-ly {
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent-blue);
}
.status-badge.dang-xu-ly::before { background: var(--accent-blue); }

.status-badge.chua-lam {
    background: rgba(100, 116, 139, 0.12);
    color: var(--text-muted);
}
.status-badge.chua-lam::before { background: var(--text-muted); }

.status-badge.tam-dung {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-yellow);
}
.status-badge.tam-dung::before { background: var(--accent-yellow); }

.status-badge.tre-han {
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
}
.status-badge.tre-han::before { 
    background: var(--accent-red);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow-blue);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.25);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-secondary);
    border-color: var(--border-glass);
}

.btn-secondary:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
    border-color: var(--border-glass-hover);
}

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

.btn-danger {
    background: transparent;
    color: var(--accent-red);
    border-color: rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.btn-group {
    display: flex;
    gap: 6px;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13.5px;
    outline: none;
    transition: all var(--transition-fast);
    font-family: 'Inter', sans-serif;
}

.form-control:focus {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-glow-blue);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

select.form-control option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-row.three {
    grid-template-columns: repeat(3, 1fr);
}

.checkbox-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkbox-item .check-box {
    width: 36px;
    height: 28px;
    border-radius: 6px;
    background: rgba(100, 116, 139, 0.08);
    border: 1px solid rgba(100, 116, 139, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.checkbox-item input[type="checkbox"]:checked + .check-box {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
    border-color: rgba(16, 185, 129, 0.3);
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-xl);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    padding: 20px 28px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-heading);
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 14px;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border-color: rgba(239, 68, 68, 0.3);
}

.modal-body {
    padding: 24px 28px;
}

.modal-footer {
    padding: 16px 28px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ===== Charts ===== */
.chart-container {
    position: relative;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.donut-chart {
    position: relative;
    width: 180px;
    height: 180px;
}

.donut-chart canvas {
    width: 100% !important;
    height: 100% !important;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.donut-center-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-heading);
}

.donut-center-label {
    font-size: 11px;
    color: var(--text-muted);
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-left: 32px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-label {
    font-size: 13px;
    color: var(--text-secondary);
    flex: 1;
}

.legend-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-heading);
}

/* ===== Deadline Warning ===== */
.deadline-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.deadline-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
    transition: all var(--transition-fast);
}

.deadline-item:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-glass-hover);
}

.deadline-item.urgent {
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.04);
}

.deadline-item.warning {
    border-color: rgba(245, 158, 11, 0.2);
    background: rgba(245, 158, 11, 0.04);
}

.deadline-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.deadline-item.urgent .deadline-icon {
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
}

.deadline-item.warning .deadline-icon {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-yellow);
}

.deadline-info {
    flex: 1;
    min-width: 0;
}

.deadline-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-heading);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deadline-date {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.deadline-days {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.deadline-item.urgent .deadline-days {
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-red);
}

.deadline-item.warning .deadline-days {
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-yellow);
}

/* ===== Employee Cards ===== */
.employee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.employee-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition-normal);
}

.employee-card:hover {
    border-color: var(--border-glass-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.employee-card.active-card {
    border-color: var(--accent-cyan) !important;
    background: rgba(6, 182, 212, 0.04) !important;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.15) !important;
}

.employee-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.employee-avatar {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.employee-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-heading);
}

.employee-role {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.employee-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.employee-stat {
    text-align: center;
    padding: 10px 8px;
    background: var(--bg-glass);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-glass);
}

.employee-stat-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-heading);
}

.employee-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* ===== Filters ===== */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar .form-control {
    width: auto;
    min-width: 160px;
}

.filter-bar .header-search {
    flex: 1;
    min-width: 200px;
}

.filter-bar .header-search input {
    width: 100%;
}

/* ===== Report Tabs ===== */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: -1px;
}

.tab-item {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.tab-item:hover {
    color: var(--text-secondary);
}

.tab-item.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 24px;
}

.empty-state i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== Toast / Notification ===== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    box-shadow: var(--shadow-xl);
    animation: slideInRight 0.3s ease;
    backdrop-filter: blur(20px);
}

.toast.success { border-left: 3px solid var(--accent-green); }
.toast.error { border-left: 3px solid var(--accent-red); }
.toast.info { border-left: 3px solid var(--accent-blue); }

.toast i {
    font-size: 18px;
}

.toast.success i { color: var(--accent-green); }
.toast.error i { color: var(--accent-red); }
.toast.info i { color: var(--accent-blue); }

.toast-message {
    font-size: 13px;
    font-weight: 500;
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    font-size: 14px;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--transition-fast);
    font-family: 'Inter', sans-serif;
}

.pagination-btn:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
    border-color: var(--border-glass-hover);
}

.pagination-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.pagination-info {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== Toolbar ===== */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .menu-toggle {
        display: block;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .top-header {
        padding: 0 16px;
    }
    .page-content {
        padding: 20px 16px;
    }
    .header-search {
        display: none;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .form-row.three {
        grid-template-columns: 1fr;
    }
    .employee-grid {
        grid-template-columns: 1fr;
    }
    .filter-bar {
        flex-direction: column;
    }
    .filter-bar .form-control {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 16px;
    }
    .header-date {
        display: none;
    }
    .toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .toolbar-right {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ===== Loading Spinner ===== */
.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-glass);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 26, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: inherit;
}

/* ===== Confirmation Dialog ===== */
.confirm-dialog {
    text-align: center;
    padding: 20px;
}

.confirm-dialog i {
    font-size: 48px;
    color: var(--accent-yellow);
    margin-bottom: 16px;
}

.confirm-dialog h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-heading);
}

.confirm-dialog p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.confirm-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* ===== Utility ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--accent-green); }
.text-danger { color: var(--accent-red); }
.text-warning { color: var(--accent-yellow); }
.text-info { color: var(--accent-blue); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; }
.gap-2 { gap: 16px; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1; }
.hidden { display: none !important; }

/* ===== Task Assignment Grid (Form) ===== */
.task-assignment-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 14px;
}

.task-assign-row {
    display: grid;
    grid-template-columns: auto 100px 1fr;
    gap: 12px;
    align-items: center;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.task-assign-row:hover {
    background: var(--bg-glass-hover);
}

.task-assign-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.task-assign-person {
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-assign-person .form-control {
    flex: 1;
    min-width: 0;
}

/* ===== Task Cell in Table (with person) ===== */
.task-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.task-person {
    font-size: 9px;
    font-weight: 600;
    color: var(--accent-cyan);
    max-width: 60px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0.85;
}

/* ===== Report Date Filter ===== */
.report-filters {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.report-filters .form-control {
    width: auto;
}

.report-filters .filter-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .task-assignment-grid {
        gap: 6px;
    }
    .task-assign-row {
        grid-template-columns: auto 1fr;
    }
    .task-assign-label {
        display: none;
    }
    .task-person {
        font-size: 8px;
    }
}
