* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0e3b42;
    --primary-light: #15525c;
    --primary-dark: #082327;
    --primary-gradient: linear-gradient(135deg, #0e3b42 0%, #15525c 100%);
    --accent: #c99a4c;
    --accent-light: #ddb877;
    --secondary: #10b981;
    --secondary-light: #34d399;
    --danger: #dc4c3f;
    --danger-light: #e8776c;
    --warning: #d99a35;
    --warning-light: #e4b463;
    --dark: #1c2528;
    --light: #f4f3ef;
    --white: #ffffff;
    --border: #e6e3da;
    --text: #3a4245;
    --text-light: #6b7476;
    --text-muted: #99a09f;
    --card-bg: #ffffff;
    --sidebar-bg: #ffffff;
    --header-bg: #ffffff;
    --body-bg: #f7f6f2;
    --shadow-sm: 0 1px 2px rgba(20, 30, 30, 0.04);
    --shadow-md: 0 4px 10px -2px rgba(20, 30, 30, 0.08);
    --shadow-lg: 0 10px 24px -6px rgba(20, 30, 30, 0.12);
    --shadow-xl: 0 20px 40px -10px rgba(20, 30, 30, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.14s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --primary: #1c5e68;
    --primary-light: #257683;
    --primary-dark: #0e3b42;
    --primary-gradient: linear-gradient(135deg, #1c5e68 0%, #257683 100%);
    --accent: #ddb877;
    --accent-light: #e9cd9c;
    --secondary: #10b981;
    --danger: #e8776c;
    --warning: #e4b463;
    --dark: #eceae4;
    --light: #172224;
    --white: #101a1c;
    --border: #253335;
    --text: #e4e2da;
    --text-light: #9aa4a3;
    --text-muted: #6d7a79;
    --card-bg: #131e20;
    --sidebar-bg: #101a1c;
    --header-bg: #101a1c;
    --body-bg: #0b1416;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 10px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 24px -6px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.6);
}

/* ========== BODY ========== */
body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--body-bg);
    color: var(--text);
    line-height: 1.55;
    transition: background 0.18s ease, color 0.18s ease;
    min-height: 100vh;
    font-size: 14.5px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
    transition: background 0.2s ease;
}

    ::-webkit-scrollbar-thumb:hover {
        background: var(--accent);
    }

/* ========== CONTAINER ========== */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: hidden;
}

/* ========== THEME TOGGLE ========== */
.theme-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: var(--transition);
    border: none;
    font-size: 20px;
}

    .theme-toggle:hover {
        transform: scale(1.1) rotate(15deg);
        box-shadow: var(--shadow-xl);
    }

/* ========== LOGIN PAGE ========== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #004658 0%, #002c3a 50%, #001a24 100%);
    padding: 20px;
}

.login-box {
    background: var(--white);
    padding: 48px 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box h2 {
    text-align: center;
    margin-bottom: 32px;
    color: var(--primary);
    font-size: 28px;
    font-weight: 700;
}

    .login-box h2 i {
        margin-right: 10px;
    }

.login-box .form-group {
    margin-bottom: 20px;
}

    .login-box .form-group label {
        font-weight: 600;
        font-size: 14px;
        color: var(--text);
        margin-bottom: 6px;
        display: block;
    }

    .login-box .form-group input,
    .login-box .form-group select {
        width: 100%;
        padding: 12px 16px;
        border: 2px solid var(--border);
        border-radius: var(--radius-sm);
        font-size: 14px;
        transition: var(--transition);
        background: var(--white);
        color: var(--text);
    }

        .login-box .form-group input:focus,
        .login-box .form-group select:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(0, 70, 88, 0.15);
        }

.login-box .btn {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 16px;
}

.login-box .btn-primary {
    background: var(--primary-gradient);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

    .login-box .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

/* ========== FORM ROW ========== */
.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

    .form-row .form-group.half {
        flex: 1;
        min-width: 200px;
    }

.form-group {
    margin-bottom: 12px;
}

    .form-group label {
        display: block;
        margin-bottom: 4px;
        font-weight: 500;
        font-size: 13px;
        color: var(--text);
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 9px 12px;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        font-size: 13.5px;
        font-family: inherit;
        transition: var(--transition);
        background: var(--white);
        color: var(--text);
    }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(201, 154, 76, 0.18);
            background: var(--card-bg);
        }

    .form-group textarea {
        resize: vertical;
        min-height: 80px;
        font-family: inherit;
    }

    .form-group input:read-only {
        background: var(--light);
        cursor: not-allowed;
        opacity: 0.7;
    }

/* ========== BUTTONS ========== */
.btn {
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

    .btn:active {
        transform: scale(0.97);
    }

    .btn:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
}

    .btn-primary::after {
        content: "";
        position: absolute;
        top: 0;
        left: -60%;
        width: 40%;
        height: 100%;
        background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.22), transparent);
        transform: skewX(-20deg);
        transition: left 0.5s ease;
    }

    .btn-primary:hover::after {
        left: 130%;
    }

    .btn-primary:hover {
        background: var(--primary-light);
        box-shadow: var(--shadow-sm);
    }

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
}

    .btn-secondary:hover {
        background: var(--secondary-light);
        box-shadow: var(--shadow-sm);
    }

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

    .btn-danger:hover {
        background: var(--danger-light);
        box-shadow: var(--shadow-sm);
    }

.btn-warning {
    background: var(--warning);
    color: var(--white);
}

    .btn-warning:hover {
        background: var(--warning-light);
        box-shadow: var(--shadow-sm);
    }

.btn-sm {
    padding: 6px 12px;
    font-size: 12.5px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

    .btn-outline:hover {
        border-color: var(--accent);
        color: var(--primary);
        background: var(--light);
    }

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ========== TEXT UTILITIES ========== */
.text-danger {
    color: var(--danger);
    font-size: 13px;
    display: block;
    margin-top: 4px;
}

.text-success {
    color: var(--secondary);
}

.text-muted {
    color: var(--text-muted);
}

.mb-0 {
    margin-bottom: 0 !important;
}

.hidden {
    display: none !important;
}

/* ========== CHECKBOX ========== */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 10px;
    font-weight: 500;
}

    .checkbox-label input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: var(--accent);
        cursor: pointer;
        transition: transform 0.15s ease;
    }

        .checkbox-label input[type="checkbox"]:checked {
            transform: scale(1.1);
        }

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

    .empty-state i {
        font-size: 56px;
        margin-bottom: 16px;
        color: var(--border);
        opacity: 0.7;
        animation: tf-float 3.2s ease-in-out infinite;
        display: inline-block;
    }

    @keyframes tf-float {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-6px); }
    }

    .empty-state h3 {
        margin-bottom: 8px;
        color: var(--text);
        font-size: 20px;
    }

    .empty-state p {
        margin-bottom: 20px;
        color: var(--text-light);
    }

/* ========== HEADER ========== */
.header {
    background: var(--header-bg);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    height: 56px;
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 9px;
    letter-spacing: 0.01em;
}

    .logo i {
        font-size: 13px;
        width: 30px;
        height: 30px;
        border-radius: 8px;
        background: var(--primary);
        color: var(--accent-light);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        transition: var(--transition);
    }

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .user-info #userName {
        font-weight: 500;
        font-size: 13.5px;
        color: var(--text);
    }

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

    .user-avatar:hover {
        box-shadow: 0 0 0 3px rgba(201, 154, 76, 0.25);
    }

.topbar-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

    .topbar-icon-btn:hover {
        color: var(--accent);
        border-color: var(--accent-light);
        transform: rotate(-12deg);
    }

/* ========== SIDEBAR ========== */
.main-layout {
    display: flex;
    min-height: calc(100vh - 56px);
}

.sidebar {
    width: 208px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    padding: 14px 0;
    overflow-y: auto;
    height: calc(100vh - 56px);
    position: sticky;
    top: 56px;
    flex-shrink: 0;
}

    .sidebar nav {
        display: flex;
        flex-direction: column;
        gap: 1px;
        padding: 0 10px;
    }

.nav-item {
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--text-light);
    font-weight: 500;
    font-size: 13.5px;
    position: relative;
    overflow: hidden;
}

    .nav-item::before {
        content: "";
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 0;
        background: var(--accent);
        border-radius: 0 3px 3px 0;
        transition: height 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-item i {
        width: 16px;
        font-size: 14px;
        text-align: center;
        transition: var(--transition-fast);
    }

    .nav-item:hover {
        background: var(--light);
        color: var(--primary);
    }

        .nav-item:hover i {
            transform: translateX(1px) scale(1.05);
        }

    .nav-item.active {
        background: var(--light);
        color: var(--primary);
        font-weight: 600;
    }

        .nav-item.active::before {
            height: 60%;
        }

        .nav-item.active i {
            color: var(--accent);
        }

/* ========== MAIN CONTENT ========== */
.main-content {
    flex: 1;
    padding: 20px 22px;
    overflow-y: auto;
    height: calc(100vh - 56px);
    min-width: 0;
    animation: tf-content-in 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes tf-content-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== PAGE HEADER ========== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

    .page-header h1 {
        font-size: 21px;
        font-weight: 700;
        color: var(--dark);
        letter-spacing: -0.01em;
    }

    .page-header p {
        color: var(--text-light);
        font-size: 13px;
        margin-top: 2px;
    }

    .page-header .actions {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

/* ========== STATS CARDS ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    background: var(--card-bg);
    padding: 16px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

    .stat-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--accent), var(--primary-light));
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .stat-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-md);
        border-color: var(--accent-light);
    }

        .stat-card:hover::before {
            transform: scaleX(1);
        }

        .stat-card:hover .stat-icon {
            transform: scale(1.08);
        }

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-value {
    font-size: 25px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
}

.stat-label {
    color: var(--text-light);
    font-size: 13px;
    font-weight: 500;
}

.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    transition: var(--transition);
}

    .stat-icon.blue {
        background: #dbeafe;
        color: #3b82f6;
    }

    .stat-icon.green {
        background: #d1fae5;
        color: #10b981;
    }

    .stat-icon.yellow {
        background: #fef3c7;
        color: #f59e0b;
    }

    .stat-icon.red {
        background: #fee2e2;
        color: #ef4444;
    }

    .stat-icon.purple {
        background: #ede9fe;
        color: #8b5cf6;
    }

/* ========== CONTENT CARD ========== */
.content-card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 18px 20px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

    .content-card:hover {
        box-shadow: var(--shadow-md);
        border-color: #ded9c9;
    }

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 15.5px;
    font-weight: 600;
    color: var(--dark);
    position: relative;
}

/* ========== TABLE ========== */
.table-container {
    overflow-x: auto;
    width: 100%;
    border-radius: var(--radius-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

thead {
    background: var(--light);
}

    thead th {
        padding: 9px 14px;
        text-align: left;
        font-weight: 600;
        color: var(--text-light);
        font-size: 11.5px;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        border-bottom: 1px solid var(--border);
    }

tbody td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    transition: var(--transition-fast);
}

tbody tr {
    transition: var(--transition-fast);
    box-shadow: inset 0 0 0 0 transparent;
}

    tbody tr:hover {
        background: var(--light);
        box-shadow: inset 3px 0 0 0 var(--accent);
    }

/* ========== BADGES ========== */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    letter-spacing: 0.3px;
    transition: var(--transition-fast);
}

.badge-high {
    background: #fee2e2;
    color: #dc2626;
}

.badge-medium {
    background: #fef3c7;
    color: #d97706;
}

.badge-low {
    background: #dbeafe;
    color: #2563eb;
}

.badge-pending {
    background: #fef3c7;
    color: #d97706;
}

.badge-progress {
    background: #dbeafe;
    color: #2563eb;
}

.badge-completed {
    background: #d1fae5;
    color: #059669;
}

.badge-blocked {
    background: #fee2e2;
    color: #dc2626;
}

.badge-onhold {
    background: #e5e7eb;
    color: #6b7280;
}

.badge-success {
    background: #d1fae5;
    color: #059669;
}

.badge-warning {
    background: #fef3c7;
    color: #d97706;
}

.badge-info {
    background: #dbeafe;
    color: #2563eb;
}

/* ========== PROGRESS BAR ========== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--light);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    transition: width 0.6s ease;
    border-radius: 4px;
}

/* ========== FILTERS ========== */
.filters {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 180px;
}

    .filter-group label {
        display: block;
        margin-bottom: 4px;
        font-weight: 600;
        font-size: 13px;
        color: var(--text);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .filter-group input,
    .filter-group select {
        width: 100%;
        padding: 8px 12px;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        font-size: 13.5px;
        background: var(--white);
        color: var(--text);
        transition: var(--transition);
    }

        .filter-group input:focus,
        .filter-group select:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(201, 154, 76, 0.18);
        }

/* ========== TASK LIST ========== */
.task-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 13px 16px;
    margin-bottom: 10px;
    transition: var(--transition);
}

    .task-item:hover {
        border-color: var(--accent-light);
        box-shadow: var(--shadow-sm);
    }

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.task-title {
    font-weight: 600;
    font-size: 14.5px;
    color: var(--dark);
}

.task-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-light);
    margin-top: 6px;
    flex-wrap: wrap;
}

    .task-meta i {
        width: 16px;
    }

.task-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* ========== LOADING ========== */
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--light);
    border-radius: 50%;
    border-top: 3px solid var(--primary);
    border-right: 3px solid var(--accent);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1050;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    margin: 20px auto;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.28s cubic-bezier(0.34, 1.25, 0.64, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 1;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
}

.close-modal {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

    .close-modal:hover {
        background: var(--light);
        color: var(--dark);
    }

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    position: sticky;
    bottom: 0;
    background: var(--white);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ========== PROJECT DETAILS MODAL ========== */
.project-details-modal {
    display: none;
    position: fixed;
    z-index: 1060;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.project-details-modal-content {
    background: var(--white);
    width: 600px;
    max-width: 95%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
    max-height: 90vh;
}

.project-details-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--light);
    border-bottom: 2px solid var(--border);
}

.project-details-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
}

.project-details-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

    .project-details-close:hover {
        background: var(--light);
        color: var(--danger);
    }

.project-details-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.project-details-table {
    width: 100%;
    border-collapse: collapse;
}

    .project-details-table td {
        padding: 10px 12px;
        border-bottom: 1px solid var(--border);
        vertical-align: top;
    }

        .project-details-table td:first-child {
            font-weight: 600;
            color: var(--text-light);
            width: 140px;
        }

        .project-details-table td:last-child {
            color: var(--text);
        }

.project-details-modal-footer {
    padding: 12px 20px;
    background: var(--light);
    border-top: 2px solid var(--border);
    text-align: right;
}

.project-details-close-btn {
    padding: 8px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

    .project-details-close-btn:hover {
        background: var(--primary-light);
        box-shadow: var(--shadow-md);
    }

/* ========== ALERTS ========== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-left: 4px solid;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-left-color: #22c55e;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-left-color: #ef4444;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-left-color: #f59e0b;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border-left-color: #3b82f6;
}

.alert .btn-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    padding: 0 4px;
    opacity: 0.6;
    transition: var(--transition);
    margin-left: auto;
    flex-shrink: 0;
}

    .alert .btn-close:hover {
        opacity: 1;
    }

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

    .pagination button {
        padding: 8px 16px;
        background: var(--primary);
        color: white;
        border: none;
        border-radius: var(--radius-sm);
        cursor: pointer;
        font-size: 14px;
        font-weight: 500;
        transition: var(--transition);
    }

        .pagination button:hover:not(:disabled) {
            background: var(--primary-light);
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .pagination button:disabled {
            background: var(--border);
            cursor: not-allowed;
            transform: none !important;
        }

    .pagination #pageInfo {
        color: var(--text);
        font-weight: 500;
    }

/* ========== CHART ========== */
.chart-container {
    height: 300px;
    margin-top: 16px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .sidebar {
        width: 220px;
    }

    .main-content {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        background: var(--white);
        border-top: 2px solid var(--border);
        padding: 8px 0;
        z-index: 1000;
        overflow-x: auto;
        top: auto;
        box-shadow: var(--shadow-lg);
    }

        .sidebar nav {
            flex-direction: row;
            gap: 2px;
            padding: 0 8px;
            justify-content: space-around;
        }

        .sidebar .nav-item {
            flex: 0 0 auto;
            padding: 6px 12px;
            font-size: 11px;
            text-align: center;
            flex-direction: column;
            gap: 2px;
            border-radius: var(--radius-sm);
        }

            .sidebar .nav-item i {
                font-size: 18px;
                width: auto;
            }

            .sidebar .nav-item span {
                font-size: 10px;
            }

            .sidebar .nav-item.active {
                background: var(--primary);
                color: white;
            }

    .main-content {
        margin-bottom: 80px;
        padding: 12px;
        height: auto;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .page-title {
        font-size: 22px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-value {
        font-size: 24px;
    }

    .filters {
        flex-direction: column;
        gap: 10px;
    }

    .filter-group {
        width: 100%;
        min-width: unset;
    }

    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        font-size: 13px;
        min-width: 600px;
    }

        table th,
        table td {
            padding: 8px 10px;
        }

    .modal-content {
        width: 95%;
        margin: 10px auto;
        top: 5%;
        transform: none;
        max-height: 95vh;
    }

    @keyframes modalSlideIn {
        from {
            opacity: 0;
            transform: translateY(-20px) scale(0.95);
        }

        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    .project-details-modal-content {
        width: 95%;
        margin: 10px auto;
        max-height: 95vh;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }

        .form-row .form-group.half {
            width: 100%;
        }

    .task-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .task-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .task-meta {
        flex-wrap: wrap;
        gap: 6px;
    }

        .task-meta span {
            font-size: 12px;
        }

    .header-content {
        padding: 10px 0;
    }

    .logo {
        font-size: 18px;
    }

    .user-info #userName {
        font-size: 13px;
    }

    .theme-toggle {
        bottom: 90px;
        right: 16px;
        width: 44px;
        height: 44px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .header-content {
        flex-direction: column;
        gap: 6px;
        padding: 8px 0;
    }

    .user-info {
        width: 100%;
        justify-content: space-between;
    }

    .login-box {
        padding: 32px 20px;
    }

    .btn {
        padding: 8px 16px;
        font-size: 13px;
        width: 100%;
        justify-content: center;
    }

    .btn-sm {
        padding: 4px 10px;
        font-size: 12px;
        width: auto;
    }

    .badge {
        font-size: 10px;
        padding: 2px 8px;
    }

    .pagination {
        gap: 8px;
    }

        .pagination button {
            padding: 6px 12px;
            font-size: 13px;
        }

    .modal-header {
        padding: 14px 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        padding: 12px 16px;
    }

    .content-card {
        padding: 16px;
    }

    .page-title {
        font-size: 20px;
    }

    .stat-value {
        font-size: 20px;
    }
}

/* ========== ACCESSIBILITY ========== */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========== PRINT ========== */
@media print {
    .sidebar,
    .header,
    .theme-toggle,
    .btn,
    .no-print,
    .filters {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 20px !important;
        height: auto !important;
    }

    .content-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }

    .page-header {
        border-bottom: 2px solid #000 !important;
    }

    .stat-card {
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }

    table {
        border-collapse: collapse !important;
    }

        table th {
            background: #f5f5f5 !important;
        }

        table th,
        table td {
            border: 1px solid #ddd !important;
            padding: 6px !important;
        }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
