:root {
    --primary: #0d6efd;
    --dark: #152238;
    --light: #f5f7fb;
    --card: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--light);
    color: #222;
}

.navbar-custom {
    background: var(--dark);
    color: white;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-custom a {
    color: white;
    text-decoration: none;
    margin-left: 14px;
}

.hero {
    min-height: 520px;
    background: linear-gradient(rgba(10,20,40,.65), rgba(10,20,40,.65)), url('../images/slider1.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    display: flex;
    align-items: center;
    padding: 60px 8%;
}

.hero-content {
    max-width: 700px;
}

.hero h1 {
    font-size: 44px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    line-height: 1.6;
}

.btn-main {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 12px 22px;
    border-radius: 8px;
    text-decoration: none;
    margin-top: 15px;
}

.section {
    padding: 55px 8%;
}

.section-title {
    text-align: center;
    margin-bottom: 35px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.card-box {
    background: white;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
}

.card-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: white;
    width: 100%;
    max-width: 430px;
    padding: 30px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,.09);
}

.form-control {
    width: 100%;
    padding: 12px;
    margin: 8px 0 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.btn {
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

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

.btn-success {
    background: #198754;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #222;
}

.layout {
    display: flex;
}

.sidebar {
    width: 250px;
    background: var(--dark);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 20px 14px;
    transition: .3s;
    z-index: 1000;
}

.sidebar.collapsed {
    left: -250px;
}

.sidebar-title {
    color: white;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 28px;
    padding-left: 8px;
}

.sidebar a {
    color: #dfe7ff;
    display: block;
    text-decoration: none;
    padding: 13px 12px;
    border-radius: 10px;
    margin-bottom: 6px;
}

.sidebar a:hover {
    background: rgba(255,255,255,.12);
}

.sidebar-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    background: var(--primary);
    color: white;
    border: 0;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    font-size: 25px;
    z-index: 1100;
}

.main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    padding: 28px;
}

.topbar {
    background: white;
    border-radius: 16px;
    padding: 18px 22px;
    margin-bottom: 22px;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.kpi {
    background: white;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

.kpi h3 {
    margin: 0;
    font-size: 28px;
}

.table-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-top: 22px;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 13px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.badge {
    padding: 6px 10px;
    border-radius: 30px;
    font-size: 13px;
    display: inline-block;
}

.badge-pending { background: #fff3cd; color: #856404; }
.badge-approved { background: #cff4fc; color: #055160; }
.badge-active { background: #d1e7dd; color: #0f5132; }
.badge-rejected { background: #f8d7da; color: #842029; }
.badge-completed { background: #e2e3e5; color: #41464b; }
.badge-overdue { background: #f5c2c7; color: #842029; }

@media (max-width: 900px) {
    .cards,
    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .sidebar {
        left: -250px;
    }

    .sidebar.show {
        left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 70px 18px 18px;
    }

    .hero h1 {
        font-size: 32px;
    }
}

/* =========================
   MODERN DASHBOARD LAYOUT
========================= */

body {
    background: #f4f7fb;
}

.app-sidebar {
    width: 280px;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: linear-gradient(180deg, #001f4d, #00152f);
    color: #fff;
    padding: 18px 14px;
    z-index: 1000;
    transition: all .3s ease;
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 6px 24px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    margin-bottom: 24px;
}

.brand-icon {
    width: 46px;
    height: 46px;
    background: #0d6efd;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 10px 25px rgba(13,110,253,.35);
}

.brand-box h3 {
    font-size: 18px;
    margin: 0;
    letter-spacing: .5px;
}

.brand-box small {
    color: #b6c8e6;
}

.collapse-btn {
    margin-left: auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.08);
    color: #fff;
    cursor: pointer;
    font-size: 20px;
}

.menu-title {
    font-size: 12px;
    color: #94a9c9;
    padding: 0 10px;
    margin-bottom: 10px;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #eaf2ff;
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: .2s;
    font-size: 15px;
}

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

.side-link:hover,
.side-link.active {
    background: linear-gradient(90deg, #0d6efd, #1d8cff);
    color: #fff;
    box-shadow: 0 8px 22px rgba(13,110,253,.35);
}

.logout-link {
    position: absolute;
    bottom: 20px;
    left: 14px;
    right: 14px;
}

.help-card {
    margin-top: 40px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    padding: 20px;
}

.help-card i {
    font-size: 28px;
    color: #58a6ff;
    margin-bottom: 12px;
}

.help-card h4 {
    margin: 0 0 8px;
}

.help-card p {
    margin: 0;
    font-size: 13px;
    color: #c6d4ea;
    line-height: 1.6;
}

.main-content {
    margin-left: 280px;
    width: calc(100% - 280px);
    padding: 28px;
}

.mobile-sidebar-btn {
    display: none;
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 1200;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: #0d6efd;
    color: #fff;
    font-size: 22px;
    box-shadow: 0 10px 25px rgba(13,110,253,.35);
}

.modern-topbar {
    background: #fff;
    padding: 22px 26px;
    border-radius: 20px;
    box-shadow: 0 8px 28px rgba(16,24,40,.06);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modern-topbar h2 {
    margin: 0 0 5px;
    font-size: 26px;
    color: #101828;
}

.modern-topbar p {
    margin: 0;
    color: #667085;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.stat-card {
    background: #fff;
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 8px 28px rgba(16,24,40,.06);
    display: flex;
    align-items: center;
    gap: 18px;
}

.stat-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
}

.bg-blue { background: #0d6efd; }
.bg-green { background: #12b76a; }
.bg-orange { background: #f79009; }
.bg-red { background: #f04438; }
.bg-dark { background: #344054; }

.stat-card span {
    color: #667085;
    font-size: 14px;
}

.stat-card h3 {
    margin: 4px 0 0;
    font-size: 28px;
    color: #101828;
}

.modern-panel {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 28px rgba(16,24,40,.06);
    margin-top: 24px;
    overflow: hidden;
}

.panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eef0f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    margin: 0;
}

.responsive-table {
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.modern-table th {
    background: #f8fafc;
    padding: 15px;
    text-align: left;
    font-size: 13px;
    color: #475467;
    text-transform: uppercase;
}

.modern-table td {
    padding: 16px;
    border-bottom: 1px solid #eef0f5;
}

@media (max-width: 1100px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .app-sidebar {
        left: -280px;
    }

    .app-sidebar.show {
        left: 0;
    }

    .mobile-sidebar-btn {
        display: block;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 80px 16px 20px;
    }

    .stat-grid {
        grid-template-columns: 1fr;
    }

    .modern-topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}