* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f5f7fb;
    color: #1f2937;
    font-family: Arial, "Noto Sans Devanagari", sans-serif;
}


/* =========================
   SIDEBAR
========================= */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 255px;
    height: 100vh;
    background: #111827;
    color: white;
    z-index: 1000;
}

.sidebar-logo {
    height: 76px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #273244;
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.sidebar-logo strong {
    display: block;
    font-size: 17px;
}

.sidebar-logo small {
    display: block;
    color: #9ca3af;
    font-size: 11px;
    margin-top: 3px;
}

.sidebar-menu {
    padding: 18px 12px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    margin-bottom: 5px;
    border-radius: 8px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    transition: .2s;
}

.sidebar-menu a:hover {
    background: #1f2937;
    color: white;
}

.sidebar-menu a.active {
    background: #2563eb;
    color: white;
}

.sidebar-menu a span {
    width: 20px;
    text-align: center;
}

.menu-title {
    color: #6b7280;
    font-size: 10px;
    font-weight: bold;
    margin: 25px 14px 10px;
    letter-spacing: 1px;
}


/* =========================
   MAIN
========================= */

.main-wrapper {
    margin-left: 255px;
    min-height: 100vh;
}


/* =========================
   TOPBAR
========================= */

.topbar {
    height: 76px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topbar h5 {
    margin: 0;
    font-size: 18px;
}

.topbar small {
    color: #6b7280;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.today-date {
    color: #4b5563;
    font-size: 13px;
}

.user-box {
    display: flex;
    align-items: center;
    gap: 9px;
}

.user-box strong {
    display: block;
    font-size: 13px;
}

.user-box small {
    font-size: 11px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: #dbeafe;
    color: #2563eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.mobile-menu {
    display: none;
}


/* =========================
   CONTENT
========================= */

.content {
    padding: 28px;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.page-heading h1 {
    font-size: 24px;
    margin: 0;
}

.page-heading p {
    color: #6b7280;
    margin: 5px 0 0;
    font-size: 13px;
}


/* =========================
   STAT CARDS
========================= */

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.stat-card .icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #2563eb;
    font-size: 20px;
    margin-bottom: 15px;
}

.stat-card h6 {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

.stat-card h2 {
    margin: 5px 0 0;
    font-size: 28px;
}


/* =========================
   DASHBOARD SECTIONS
========================= */

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.dashboard-grid.equal {
    grid-template-columns: 1fr 1fr;
}

.panel {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
}

.panel-header {
    padding: 17px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-header h3 {
    font-size: 16px;
    margin: 0;
}

.panel-header a {
    font-size: 12px;
    text-decoration: none;
    color: #2563eb;
}

.panel-body {
    padding: 0;
}


/* =========================
   CASE ROW
========================= */

.case-row {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.case-row:last-child {
    border-bottom: 0;
}

.case-client {
    display: flex;
    align-items: center;
    gap: 12px;
}

.case-avatar {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.case-client strong {
    display: block;
    font-size: 13px;
}

.case-client small {
    display: block;
    color: #6b7280;
    margin-top: 3px;
}

.case-date {
    text-align: right;
}

.case-date strong {
    display: block;
    font-size: 13px;
}

.case-date small {
    color: #6b7280;
}


/* =========================
   BUTTONS
========================= */

.btn-primary-custom {
    background: #2563eb;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    border: none;
    display: inline-block;
}

.btn-primary-custom:hover {
    background: #1d4ed8;
    color: white;
}


/* =========================
   EMPTY
========================= */

.empty-state {
    padding: 35px 20px;
    text-align: center;
    color: #9ca3af;
}

.empty-state .empty-icon {
    font-size: 30px;
    margin-bottom: 8px;
}


/* =========================
   FOOTER
========================= */

.footer {
    padding: 20px 28px;
    color: #9ca3af;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
}


/* =========================
   RESPONSIVE
========================= */

@media(max-width: 1100px) {

    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

}

@media(max-width: 768px) {

    .sidebar {
        display: block !important;

        position: fixed !important;

        top: 0;
        left: 0;

        width: 280px;
        height: 100vh;

        z-index: 9999;

        transform: translateX(-100%);

        transition: transform 0.3s ease;

        overflow-y: auto;

    
    }

    .sidebar.sidebar-open {
        display: block !important;

        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .topbar {
        padding: 0 15px;
    }

    .mobile-menu {
        display: block;
        font-size: 20px;
        margin-right: 12px;
    }

    .topbar > div:first-child {
        display: flex;
        align-items: center;
    }

    .today-date {
        display: none;
    }

    .content {
        padding: 18px 15px;
    }

    .page-heading {
        align-items: flex-start;
        gap: 15px;
    }

}

@media(max-width: 500px) {

    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .dashboard-grid.equal {
        grid-template-columns: 1fr;
    }

    .page-heading {
        flex-direction: column;
    }

    .user-box div:last-child {
        display: none;
    }

}

/* =========================================================
   ADMIN LOGIN
========================================================= */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f6f9;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: #fff;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, .08);
}

.login-logo {
    width: 65px;
    height: 65px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d6efd;
    color: #fff;
    font-size: 28px;
}

.login-card h1 {
    text-align: center;
    margin-bottom: 5px;
}

.login-subtitle {
    text-align: center;
    color: #6c757d;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.login-button {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 12px;
}
.login-page input {
    padding: 10px;
    width: 100%;
}

/* =====================================================
   MOBILE SIDEBAR
===================================================== */

.mobile-menu {
    display: none;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    user-select: none;
}


/* Mobile */

@media (max-width: 768px) {

    .mobile-menu {
        display: block;
        cursor: pointer;
        position: relative;
        z-index: 2001;
    }


    .sidebar {

        position: fixed !important;

        top: 0;
        left: 0;

        width: 280px;
        height: 100vh;

        z-index: 2000;

        transform: translateX(-100%);

        transition: transform 0.3s ease;

        overflow-y: auto;

    }


    .sidebar.sidebar-open {

        transform: translateX(0);

    }


    .main-wrapper {

        margin-left: 0 !important;

        width: 100%;

    }

}


/* Small Mobile */

@media (max-width: 480px) {

    .sidebar {
        width: 85vw;
    }

}

/* =====================================================
   FORCE MOBILE SIDEBAR
===================================================== */

@media (max-width: 768px) {

    .sidebar {
        position: fixed !important;
        display: block !important;

        top: 0 !important;
        left: 0 !important;

        width: 280px !important;
        height: 100vh !important;

        z-index: 99999 !important;


        transform: translateX(-100%) !important;

        transition: transform 0.3s ease !important;

        overflow-y: auto !important;

        visibility: visible !important;
        opacity: 1 !important;
    }


    .sidebar.sidebar-open {
        transform: translateX(0) !important;
    }


    .mobile-menu {
        display: block !important;

        position: relative !important;

        z-index: 100000 !important;

        cursor: pointer !important;

        font-size: 28px !important;
    }


    .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }

}