/* ============================================================
   SDAMA PROFESSIONAL ADMIN DASHBOARD
   COLOUR PALETTE

   Dark Gray : #CBCBCB
   Light Gray: #F2F2F2
   Dark Green: #174D38
   Maroon    : #4D1717
============================================================ */


* {

    margin: 0;
    padding: 0;

    box-sizing: border-box;

    font-family:
        "Segoe UI",
        Arial,
        sans-serif;

}


html {

    scroll-behavior: smooth;

}


body {

    display: flex;

    min-height: 100vh;

    background: #CBCBCB;

    color: #1d1d1d;

}


/* ============================================================
   SIDEBAR
============================================================ */

.sidebar {

    position: fixed;

    left: 0;
    top: 0;

    width: 255px;

    height: 100vh;

    background: #174D38;

    color: white;

    display: flex;

    flex-direction: column;

    z-index: 1000;

    /* SIDEBAR SCROLLING - added only to allow the full menu and Logout to scroll */
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;

    box-shadow:
        8px 0 25px rgba(0,0,0,0.15);

}

/* Keep the scrollbar subtle while still allowing mouse-wheel scrolling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.45);
}


/* ============================================================
   LOGO
============================================================ */

.logo {

    padding: 28px 20px 22px;

    text-align: center;

    border-bottom:
        1px solid rgba(255,255,255,0.12);

}


.logo-image {

    width: 72px;
    height: 72px;

    margin: auto;

    padding: 4px;

    background: white;

    border-radius: 18px;

    display: flex;

    align-items: center;

    justify-content: center;

    box-shadow:
        0 8px 20px rgba(0,0,0,0.18);

}


.logo-image img {

    width: 100%;
    height: 100%;

    object-fit: contain;

    border-radius: 14px;

}


.logo h2 {

    margin-top: 12px;

    font-size: 23px;

    letter-spacing: 2px;

    color: white;

}


.logo p {

    margin-top: 5px;

    font-size: 10px;

    line-height: 1.5;

    letter-spacing: 1.3px;

    color:
        rgba(255,255,255,0.70);

}


/* ============================================================
   MENU TITLE
============================================================ */

.menu-title {

    padding:

        25px
        25px
        8px;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 1.5px;

    color:
        rgba(255,255,255,0.45);

}


/* ============================================================
   SIDEBAR MENU
============================================================ */

.sidebar ul {

    list-style: none;

    padding: 0 13px;

    margin: 0;

}


.sidebar li {

    margin-bottom: 4px;

}


.sidebar li a {

    display: flex;

    align-items: center;

    gap: 15px;

    padding: 13px 15px;

    border-radius: 10px;

    color:
        rgba(255,255,255,0.78);

    text-decoration: none;

    font-size: 14px;

    font-weight: 500;

    transition:
        all 0.25s ease;

}


.sidebar li a i {

    width: 20px;

    text-align: center;

    font-size: 16px;

    transition:
        transform 0.25s ease;

}


/* ============================================================
   SIDEBAR HOVER
============================================================ */

.sidebar li a:hover {

    background:
        rgba(255,255,255,0.11);

    color: white;

    transform:
        translateY(-3px);

    box-shadow:
        0 5px 12px rgba(0,0,0,0.12);

}


.sidebar li a:hover i {

    transform:
        scale(1.12);

}


/* ============================================================
   ACTIVE MENU
============================================================ */

.sidebar li.active a {

    background: #F2F2F2;

    color: #174D38;

    font-weight: 700;

    box-shadow:
        0 7px 18px rgba(0,0,0,0.16);

}


.sidebar li.active a i {

    color: #4D1717;

}


/* ============================================================
   SIDEBAR LOGOUT
============================================================ */

.sidebar-bottom {

    margin-top: auto;

    padding: 15px;

    border-top:
        1px solid rgba(255,255,255,0.12);

}


.sidebar-bottom a {

    display: flex;

    align-items: center;

    gap: 15px;

    padding: 13px 15px;

    color:
        rgba(255,255,255,0.75);

    text-decoration: none;

    border-radius: 10px;

    font-size: 14px;

    transition:
        all 0.25s ease;

}


.sidebar-bottom a:hover {

    background:
        rgba(255,255,255,0.10);

    color: white;

    transform:
        translateY(-3px);

}


.sidebar-bottom i {

    width: 20px;

    text-align: center;

}


/* ============================================================
   MAIN AREA
============================================================ */

.main {

    margin-left: 255px;

    width:
        calc(100% - 255px);

    min-height: 100vh;

    padding: 30px 35px;

    background: #CBCBCB;

}


/* ============================================================
   HEADER
============================================================ */

.header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 28px;

}


.welcome {

    display: flex;

    align-items: center;

    gap: 15px;

}


.welcome-icon {

    width: 52px;
    height: 52px;

    border-radius: 14px;

    background: #174D38;

    color: white;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 21px;

    box-shadow:
        0 8px 18px rgba(23,77,56,0.25);

}

.welcome-icon i {
    color: white;
    font-size: 32px;
}


.small-heading {

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 1.8px;

    color: #4D1717;

}


.header h1 {

    font-size: 30px;

    margin-top: 3px;

    color: #174D38;

    font-weight: 750;

}


.header p {

    font-size: 13px;

    margin-top: 3px;

    color: #555;

}


/* ============================================================
   HEADER RIGHT
============================================================ */

.header-right {

    display: flex;

    align-items: center;

    gap: 12px;

}


.date-display {

    display: flex;

    align-items: center;

    gap: 8px;

    background: #F2F2F2;

    padding: 12px 15px;

    border-radius: 10px;

    font-size: 12px;

    color: #174D38;

    font-weight: 600;

    box-shadow:
        0 4px 12px rgba(0,0,0,0.08);

}


.search-box {

    width: 220px;

    display: flex;

    align-items: center;

    gap: 9px;

    background: #F2F2F2;

    border: 1px solid
        rgba(23,77,56,0.12);

    padding: 11px 14px;

    border-radius: 10px;

    box-shadow:
        0 4px 12px rgba(0,0,0,0.08);

    transition:
        all 0.25s ease;

}


.search-box:focus-within {

    transform:
        translateY(-2px);

    border-color:
        #174D38;

    box-shadow:
        0 7px 18px rgba(23,77,56,0.16);

}


.search-box i {

    color: #174D38;

    font-size: 13px;

}


.search-box input {

    border: none;

    outline: none;

    background: transparent;

    width: 100%;

    font-size: 12px;

}


.search-box input::placeholder {

    color: #999;

}


/* ============================================================
   STATISTIC CARDS
============================================================ */

.cards {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 18px;

    margin-bottom: 22px;

}


.card {

    position: relative;

    background: #F2F2F2;

    border-radius: 15px;

    padding: 20px;

    min-height: 175px;

    overflow: hidden;

    border:
        1px solid rgba(255,255,255,0.8);

    box-shadow:
        0 8px 20px rgba(0,0,0,0.10);

    transition:
        all 0.28s ease;

}


.card::before {

    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;

    height: 4px;

    background: #174D38;

}


.card:hover {

    transform:
        translateY(-7px);

    box-shadow:
        0 15px 30px rgba(0,0,0,0.17);

}


.card-top {

    display: flex;

    justify-content: space-between;

    align-items: center;

}


.card-icon {

    width: 43px;
    height: 43px;

    border-radius: 12px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #174D38;

    color: white;

    font-size: 17px;

}


.card-label {

    font-size: 10px;

    letter-spacing: 1.3px;

    font-weight: 800;

    color: #777;

}


.card-number {

    margin-top: 16px;

    font-size: 32px;

    font-weight: 800;

    color: #174D38;

}


.payment-number {

    font-size: 26px;

}


.card p {

    margin-top: 3px;

    font-size: 12px;

    color: #777;

}


.card-footer {

    position: absolute;

    bottom: 15px;

    left: 20px;

    font-size: 10px;

    color: #777;

    display: flex;

    align-items: center;

    gap: 6px;

}


.card-footer i {

    color: #4D1717;

}


/* ============================================================
   DIFFERENT CARD ACCENTS
============================================================ */

.caregiver-card::before {

    background: #4D1717;

}


.appointment-card::before {

    background: #174D38;

}


.payment-card::before {

    background: #4D1717;

}


.caregiver-card .card-icon {

    background: #4D1717;

}


.payment-card .card-icon {

    background: #4D1717;

}


/* ============================================================
   CHART GRID
============================================================ */

.dashboard-grid {

    display: grid;

    grid-template-columns:
        0.9fr 1.5fr;

    gap: 20px;

    margin-bottom: 22px;

}


/* ============================================================
   CHART BOX
============================================================ */

.chart-box {

    background: #F2F2F2;

    border-radius: 15px;

    padding: 22px;

    min-height: 360px;

    box-shadow:
        0 8px 20px rgba(0,0,0,0.10);

    transition:
        all 0.28s ease;

}


.chart-box:hover {

    transform:
        translateY(-4px);

    box-shadow:
        0 13px 27px rgba(0,0,0,0.14);

}


/* ============================================================
   CHART HEADER
============================================================ */

.chart-header {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

}


.section-label {

    font-size: 9px;

    letter-spacing: 1.5px;

    font-weight: 800;

    color: #4D1717;

}


.chart-header h2 {

    margin-top: 4px;

    font-size: 20px;

    color: #174D38;

}


.chart-header p {

    margin-top: 4px;

    font-size: 11px;

    color: #888;

}


.chart-header-icon {

    width: 42px;
    height: 42px;

    border-radius: 11px;

    background: #174D38;

    color: white;

    display: flex;

    align-items: center;

    justify-content: center;

}


.maroon-icon {

    background: #4D1717;

}


/* ============================================================
   GENDER CHART
============================================================ */

.gender-chart-container {

    height: 185px;

    margin-top: 15px;

    display: flex;

    justify-content: center;

}


.gender-summary {

    display: flex;

    justify-content: space-around;

    margin-top: 13px;

    padding-top: 15px;

    border-top:
        1px solid #ddd;

}


.gender-item {

    display: flex;

    align-items: center;

    gap: 8px;

}


.gender-dot {

    width: 9px;
    height: 9px;

    border-radius: 50%;

}


.gender-dot.male {

    background: #174D38;

}


.gender-dot.female {

    background: #4D1717;

}


.gender-dot.other {

    background: #CBCBCB;

}


.gender-item strong {

    display: block;

    font-size: 15px;

    color: #222;

}


.gender-item small {

    display: block;

    margin-top: 1px;

    font-size: 9px;

    color: #888;

}


/* ============================================================
   INCOME CHART
============================================================ */

.income-chart-container {

    height: 265px;

    margin-top: 22px;

}


/* ============================================================
   RECENT APPOINTMENTS
============================================================ */

.table-box {

    background: #F2F2F2;

    border-radius: 15px;

    padding: 22px;

    box-shadow:
        0 8px 20px rgba(0,0,0,0.10);

}


.table-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 17px;

}


.table-header h2 {

    margin-top: 4px;

    color: #174D38;

    font-size: 20px;

}


.table-header p {

    margin-top: 4px;

    font-size: 11px;

    color: #888;

}


.view-all {

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 9px 13px;

    border-radius: 8px;

    background: #174D38;

    color: white;

    text-decoration: none;

    font-size: 11px;

    font-weight: 600;

    transition:
        all 0.25s ease;

}


.view-all:hover {

    background: #4D1717;

    transform:
        translateY(-3px);

    box-shadow:
        0 7px 15px rgba(0,0,0,0.16);

}


/* ============================================================
   TABLE
============================================================ */

.table-container {

    overflow-x: auto;

}


table {

    width: 100%;

    border-collapse: separate;

    border-spacing: 0;

}


table thead th {

    padding: 13px 15px;

    background: #174D38;

    color: white;

    font-size: 11px;

    text-align: left;

    letter-spacing: 0.4px;

}


table thead th:first-child {

    border-radius: 8px 0 0 8px;

}


table thead th:last-child {

    border-radius: 0 8px 8px 0;

}


table tbody tr {

    transition:
        all 0.2s ease;

}


table tbody tr:hover {

    background: rgba(23,77,56,0.05);

    transform:
        scale(1.003);

}


table td {

    padding: 14px 15px;

    border-bottom:
        1px solid #ddd;

    font-size: 12px;

    color: #444;

}


/* ============================================================
   APPOINTMENT ID
============================================================ */

.appointment-id {

    display: inline-block;

    padding: 5px 8px;

    background: #CBCBCB;

    color: #174D38;

    border-radius: 6px;

    font-weight: 700;

    font-size: 10px;

}


/* ============================================================
   PATIENT NAME
============================================================ */

.patient-name {

    display: flex;

    align-items: center;

    gap: 10px;

    font-weight: 600;

    color: #333;

}


.patient-avatar {

    width: 31px;
    height: 31px;

    border-radius: 9px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #174D38;

    color: white;

    font-size: 11px;

    font-weight: 700;

}


/* ============================================================
   APPOINTMENT DATE
============================================================ */

.appointment-date {

    display: flex;

    align-items: center;

    gap: 7px;

    color: #666;

}


.appointment-date i {

    color: #4D1717;

}


/* ============================================================
   STATUS
============================================================ */

.status {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    padding: 6px 10px;

    border-radius: 20px;

    font-size: 10px;

    font-weight: 700;

}


.status-dot {

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: currentColor;

}


.status.accept,
.status.accepted {

    background:
        rgba(23,77,56,0.12);

    color: #174D38;

}


.status.pending {

    background:
        rgba(77,23,23,0.10);

    color: #4D1717;

}


.status.reject,
.status.rejected,
.status.cancelled {

    background:
        rgba(77,23,23,0.14);

    color: #4D1717;

}


/* ============================================================
   NO DATA
============================================================ */

.no-data {

    text-align: center;

    padding: 35px;

    color: #888;

}


.no-data i {

    font-size: 28px;

    margin-bottom: 10px;

    color: #174D38;

}


.no-data p {

    font-size: 12px;

}


/* ============================================================
   FOOTER
============================================================ */

.dashboard-footer {

    display: flex;

    justify-content: space-between;

    padding: 20px 5px 5px;

    color: #666;

    font-size: 10px;

}


/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 1200px) {

    .cards {

        grid-template-columns:
            repeat(2, 1fr);

    }


    .dashboard-grid {

        grid-template-columns:
            1fr;

    }

}


@media (max-width: 900px) {

    .sidebar {

        width: 75px;

    }


    .logo h2,
    .logo p,
    .menu-title,
    .sidebar li a span,
    .sidebar-bottom span {

        display: none;

    }


    .logo {

        padding: 20px 10px;

    }


    .logo-image {

        width: 48px;
        height: 48px;

        border-radius: 12px;

    }


    .sidebar ul {

        padding: 0 10px;

    }


    .sidebar li a {

        justify-content: center;

        padding: 14px;

    }


    .sidebar-bottom a {

        justify-content: center;

    }


    .main {

        margin-left: 75px;

        width:
            calc(100% - 75px);

        padding: 25px;

    }


    .header {

        flex-direction: column;

        align-items: flex-start;

        gap: 15px;

    }


    .header-right {

        width: 100%;

    }


    .search-box {

        flex: 1;

    }

}


@media (max-width: 600px) {

    .main {

        padding: 18px;

    }


    .cards {

        grid-template-columns:
            1fr;

    }


    .header h1 {

        font-size: 25px;

    }


    .date-display {

        display: none;

    }


    .table-header {

        align-items: flex-start;

        gap: 12px;

    }


    .dashboard-footer {

        flex-direction: column;

        gap: 5px;

    }

}


/* ============================================================
   PHYSA GLOBAL DARK THEME - DASHBOARD OVERRIDES
   Added only for Dark Theme support.
   Existing dashboard styles above are unchanged.
============================================================ */

body.theme-dark .main {
    background: #171A19;
    color: #ffffff;
}

body.theme-dark .header h1,
body.theme-dark .chart-header h2,
body.theme-dark .table-header h2,
body.theme-dark .card-number {
    color: #8bc9ac;
}

body.theme-dark .header p,
body.theme-dark .card p,
body.theme-dark .card-label,
body.theme-dark .card-footer,
body.theme-dark .chart-header p,
body.theme-dark .table-header p,
body.theme-dark .gender-item small,
body.theme-dark .dashboard-footer {
    color: #b8c0bc;
}

body.theme-dark .card,
body.theme-dark .chart-box,
body.theme-dark .table-box {
    background: #222725;
    color: #ffffff;
    border-color: rgba(255,255,255,0.08);
}

body.theme-dark .gender-summary {
    border-top-color: rgba(255,255,255,0.12);
}

body.theme-dark .gender-item strong {
    color: #ffffff;
}

body.theme-dark table td {
    color: #e6ebe8;
    border-bottom-color: rgba(255,255,255,0.10);
}

body.theme-dark table tbody tr:hover {
    background: rgba(139,201,172,0.08);
}

body.theme-dark .appointment-id {
    background: #303633;
    color: #8bc9ac;
}

body.theme-dark .patient-name {
    color: #ffffff;
}

body.theme-dark .appointment-date {
    color: #c5cbc8;
}

body.theme-dark .date-display,
body.theme-dark .search-box {
    background: #222725;
    color: #ffffff;
    border-color: rgba(255,255,255,0.10);
}

body.theme-dark .search-box input {
    color: #ffffff;
}

body.theme-dark .search-box input::placeholder {
    color: #8f9893;
}

body.theme-dark .sidebar li.active a {
    background: #222725;
    color: #8bc9ac;
}

body.theme-dark .sidebar li.active a i {
    color: #ffffff;
}

