/* =====================================
   GLOBAL
===================================== */
body {
    font-family: 'Poppins', sans-serif;
}

/* =====================================
   LOGIN PAGE
===================================== */
body.erp-login {
    background: linear-gradient(135deg, #0d6efd, #28c76f);
    min-height: 100vh;
}

.login-bg {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: #fff;
    max-width: 420px;
    width: 100%;
    padding: 35px 30px;
    border-radius: 14px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    animation: fadeInUp 0.6s ease;
}

.login-logo {
    max-width: 190px;
    margin-bottom: 10px;
}

.login-card h4 {
    color: #0d6efd;
}

.form-label {
    font-weight: 500;
    font-size: 14px;
}

.form-control-lg {
    font-size: 15px;
    border-radius: 8px;
}

.form-control-lg:focus {
    border-color: #28c76f;
    box-shadow: 0 0 0 0.15rem rgba(40,199,111,0.25);
}

.btn-primary {
    background: linear-gradient(135deg, #28c76f, #0d6efd);
    border: none;
    border-radius: 8px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1f9d55, #084298);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =====================================
   LAYOUT
===================================== */
.erp-wrapper {
    min-height: 100vh;
}

/* =====================================
   TOPBAR
===================================== */
.erp-topbar {
    position: fixed;
    top: 0;
    left: 240px;
    right: 0;
    height: 60px;
    background: linear-gradient(135deg, #0d6efd, #28c76f);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
}


/* =====================================
   CONTENT
===================================== */
.erp-content {
    margin-left: 240px;
    padding: 90px 25px 25px;
    min-height: calc(100vh - 110px);
    width: calc(100% - 240px);
}
/* ===== STAT CARDS ===== */
.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    position: relative;
}

.stat-card .icon {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 22px;
    opacity: 0.3;
}

.stat-card.green { border-left: 5px solid #28c76f; }
.stat-card.blue { border-left: 5px solid #0d6efd; }
.stat-card.dark { border-left: 5px solid #2c3e50; }
.stat-card.gradient {
    border-left: 5px solid transparent;
    background: linear-gradient(135deg, #0d6efd, #28c76f);
    color: #fff;
}
/* =====================================
   FOOTER
===================================== */
.erp-footer {
    margin-left: 240px;
    width: calc(100% - 240px);
    padding: 12px 0;
    background: #f8f9fa;
    border-top: 1px solid #eaeaea;
    text-align: center;
    font-size: 13px;
    color: #666;
}

/* =====================================
   MOBILE SIDEBAR
===================================== */
.sidebar-toggle {
    background: none;
    border: none;
    font-size: 24px;
    color: #fff;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 1000;
}

@media (max-width: 768px) {

    .erp-topbar {
        left: 0;
    }

    .erp-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .erp-sidebar.show {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .erp-content,
    .erp-footer {
        margin-left: 0;
        width: 100%;
    }
}




/* ===== ALERT FIX ===== */
.erp-alert-container {
    position: fixed;
    top: 70px;               /* below topbar */
    left: 260px;             /* after sidebar */
    right: 20px;
    z-index: 1055;           /* above everything */
}

/* Mobile fix */
@media (max-width: 768px) {
    .erp-alert-container {
        left: 15px;
        right: 15px;
        top: 70px;
    }
}


.page-title {
    font-weight: 600;
}

.audit-table thead th {
    background: #f8f9fa;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    position: sticky;
    top: 0;
    z-index: 2;
}

.audit-table tbody td {
    font-size: 14px;
    vertical-align: middle;
}

.audit-table .badge {
    font-size: 11px;
    padding: 6px 10px;
}


/* Dashboard Header */
.dashboard-header h3 {
    font-size: 22px;
}
.dashboard-header p {
    font-size: 14px;
}

/* Main Cards */
.dashboard-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 14px;
    color: #fff;
    min-height: 110px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}

.dashboard-card .card-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.dashboard-card .card-info span {
    font-size: 13px;
    opacity: 0.9;
}
.dashboard-card .card-info h3 {
    margin: 0;
    font-weight: 700;
}

/* Card Colors */
.card-green { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.card-blue  { background: linear-gradient(135deg, #3498db, #2980b9); }
.card-dark  { background: linear-gradient(135deg, #34495e, #2c3e50); }
.card-gradient { background: linear-gradient(135deg, #16a085, #1abc9c); }

/* Small Cards */
.dashboard-small-card {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}
.dashboard-small-card h6 {
    font-size: 13px;
    color: #777;
    margin-bottom: 8px;
}
.dashboard-small-card h2 {
    font-weight: 700;
}


.chart-card {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
}

.chart-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 15px;
}

.chart-wrapper {
    height: 300px;
    position: relative;
}

/* ===============================
   SIDEBAR – FINAL WORKING VERSION
================================ */

.erp-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background: linear-gradient(180deg, #ffffff, #f4f6fb);
    border-right: 1px solid #e5e7eb;
    box-shadow: 6px 0 22px rgba(0,0,0,0.06);
    z-index: 1001;
    overflow-y: auto;
}

/* LOGO */
.sidebar-logo {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #eef2f7;
    background: #fff;
}

.sidebar-logo img {
    max-width: 170px;
    max-height: 46px;
}

/* MENU LIST */
.sidebar-menu {
    list-style: none;
    padding: 18px 12px;
    margin: 0;
}

/* MENU ITEM */
.sidebar-menu > li {
    margin-bottom: 6px;
}

/* MAIN LINK */
.sidebar-menu > li > a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    color: #344767;
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
}

/* ICON */
.sidebar-menu > li > a i {
    font-size: 16px;
    min-width: 20px;
    text-align: center;
}

/* HOVER */
.sidebar-menu > li > a:hover {
    background: rgba(13,110,253,0.12);
    color: #0d6efd;
    transform: translateX(6px);
}

/* ACTIVE */
.sidebar-menu > li > a.active {
    background: linear-gradient(135deg, #0d6efd, #28c76f);
    color: #fff;
    box-shadow: 0 10px 22px rgba(13,110,253,0.35);
}

/* ACTIVE ICON */
.sidebar-menu > li > a.active i {
    color: #fff;
}

/* ARROW */
.sidebar-menu .arrow {
    margin-left: auto;
    font-size: 11px;
    opacity: 0.7;
    transition: transform 0.3s ease;
}

/* SUBMENU */
.submenu {
    list-style: none;
    padding-left: 36px;
    margin-top: 6px;
    display: none;
    animation: submenuFade 0.3s ease;
}

/* OPEN STATE */
.has-submenu.open > .submenu {
    display: block;
}

.has-submenu.open > a .arrow {
    transform: rotate(180deg);
}

/* SUBMENU LINKS */
.submenu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* SUBMENU ICON */
.submenu li a i {
    font-size: 13px;
}

/* SUBMENU HOVER */
.submenu li a:hover {
    background: rgba(40,199,111,0.18);
    color: #28c76f;
}

/* SUBMENU ACTIVE */
.submenu li a.active {
    background: rgba(13,110,253,0.15);
    color: #0d6efd;
    font-weight: 500;
}

/* ANIMATION */
@keyframes submenuFade {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===============================
   MOBILE
================================ */

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 1000;
}


@media (max-width: 768px) {

    .erp-topbar {
        left: 0;
    }

    .erp-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .erp-sidebar.show {
        transform: translateX(0);
    }

    .sidebar-overlay.show {
        display: block;
    }

    .erp-content,
    .erp-footer {
        margin-left: 0;
        width: 100%;
    }
}


 /* ==============================
   PAGINATION – ERP STYLE
============================== */

.pagination {
    display: flex;
    justify-content: flex-end; /* right aligned like ERP */
    gap: 6px;
    margin-top: 20px;
    padding: 0;
}

.pagination li {
    list-style: none;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 500;
    color: #344767;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Hover */
.pagination li a:hover {
    background: rgba(13,110,253,0.08);
    color: #0d6efd;
    border-color: #0d6efd;
}

/* Active Page */
.pagination li.active span {
    background: linear-gradient(135deg, #0d6efd, #28c76f);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 14px rgba(13,110,253,0.35);
}

/* Disabled */
.pagination li.disabled span {
    background: #f1f5f9;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

/* Mobile Friendly */
@media (max-width: 576px) {
    .pagination {
        justify-content: center;
    }

    .pagination li a,
    .pagination li span {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }
}
 

.login-bg {
    background: linear-gradient(135deg, #0d6efd, #20c997);
}

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
}

