/* ============================================================
   SDAMA PATIENT MANAGEMENT
   PROFESSIONAL ADMIN INTERFACE

   COLOUR PALETTE

   Dark Gray : #CBCBCB
   Light Gray: #F2F2F2
   Dark Green: #174D38
   Maroon    : #4D1717
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');


* {

    margin: 0;
    padding: 0;

    box-sizing: border-box;

    font-family:
        'Poppins',
        Arial,
        Helvetica,
        sans-serif;

}


html {

    scroll-behavior: smooth;

}


body {

    min-height: 100vh;

    background: #CBCBCB;

    color: #222;

}


/* ============================================================
   SIDEBAR
============================================================ */

.sidebar {

    position: fixed;

    left: 0;
    top: 0;

    width: 255px;

    height: 100vh;

    background: #174D38;

    color: white;

    display: flex;

    flex-direction: column;

    z-index: 1000;

    overflow-y: auto;
    overflow-x: hidden;

    scrollbar-width: thin;

    box-shadow:
        8px 0 25px rgba(0,0,0,0.15);

}


/* SIDEBAR SCROLLBAR */

.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 ANIMATION
============================================================ */

.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 USERS BUTTON
============================================================ */

.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;

}


/* ============================================================
   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
============================================================ */

.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: 25px;

}


.page-title {

    display: flex;

    align-items: center;

    gap: 15px;

}


.title-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);

}


.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 ACTIONS
============================================================ */

.header-actions {

    display: flex;

    align-items: center;

    gap: 10px;

}


.document-select {

    appearance: none;

    -webkit-appearance: none;

    padding: 12px 38px 12px 15px;

    border: none;

    outline: none;

    border-radius: 10px;

    background-color: #F2F2F2;

    color: #174D38;

    font-size: 12px;

    font-weight: 600;

    cursor: pointer;

    box-shadow:
        0 5px 15px rgba(0,0,0,0.09);

    background-image:
        linear-gradient(45deg, transparent 50%, #174D38 50%),
        linear-gradient(135deg, #174D38 50%, transparent 50%);

    background-position:
        calc(100% - 18px) 50%,
        calc(100% - 13px) 50%;

    background-size:
        5px 5px,
        5px 5px;

    background-repeat: no-repeat;

    transition:
        all 0.25s ease;

}


.document-select:hover {

    transform:
        translateY(-3px);

    box-shadow:
        0 8px 18px rgba(0,0,0,0.14);

}


.home-btn {

    display: flex;

    align-items: center;

    gap: 8px;

    padding: 12px 17px;

    background: #4D1717;

    color: white;

    text-decoration: none;

    border-radius: 10px;

    font-size: 12px;

    font-weight: 600;

    box-shadow:
        0 5px 15px rgba(77,23,23,0.18);

    transition:
        all 0.25s ease;

}


.home-btn:hover {

    background: #174D38;

    transform:
        translateY(-3px);

    box-shadow:
        0 8px 20px rgba(23,77,56,0.20);

}


/* ============================================================
   PAGE INFORMATION CARD
============================================================ */

.page-info {

    display: flex;

    align-items: center;

    justify-content: space-between;

    background: #F2F2F2;

    padding: 18px 22px;

    border-radius: 14px;

    margin-bottom: 20px;

    box-shadow:
        0 7px 18px rgba(0,0,0,0.08);

}


.info-left {

    display: flex;

    align-items: center;

    gap: 13px;

}


.info-icon {

    width: 42px;
    height: 42px;

    border-radius: 11px;

    background:
        rgba(23,77,56,0.10);

    color: #174D38;

    display: flex;

    align-items: center;

    justify-content: center;

}


.info-label {

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.5px;

    color: #4D1717;

}


.info-left h2 {

    margin-top: 2px;

    color: #174D38;

    font-size: 18px;

}


.info-left p {

    margin-top: 2px;

    color: #888;

    font-size: 11px;

}


.patient-count {

    display: flex;

    align-items: center;

    gap: 12px;

    padding-left: 20px;

    border-left:
        1px solid #ddd;

}


.patient-count span {

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1px;

    color: #888;

}


.patient-count strong {

    font-size: 24px;

    color: #174D38;

}


/* ============================================================
   TABLE CARD
============================================================ */

.table-card {

    background: #F2F2F2;

    border-radius: 15px;

    padding: 22px;

    box-shadow:
        0 8px 20px rgba(0,0,0,0.10);

    transition:
        all 0.28s ease;

}


.table-card:hover {

    box-shadow:
        0 13px 27px rgba(0,0,0,0.14);

}


/* ============================================================
   TABLE HEADER
============================================================ */

.table-card-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 17px;

}


.section-label {

    font-size: 9px;

    letter-spacing: 1.5px;

    font-weight: 800;

    color: #4D1717;

}


.table-card-header h2 {

    margin-top: 4px;

    font-size: 20px;

    color: #174D38;

}


.record-status {

    display: flex;

    align-items: center;

    gap: 7px;

    font-size: 10px;

    color: #777;

    padding: 8px 12px;

    background: #CBCBCB;

    border-radius: 20px;

}


.online-dot {

    width: 7px;
    height: 7px;

    background: #174D38;

    border-radius: 50%;

    box-shadow:
        0 0 0 4px
        rgba(23,77,56,0.10);

}


/* ============================================================
   PATIENT SEARCH BOX
============================================================ */

.patient-search-container {

    width: 100%;

    margin-bottom: 18px;

    position: relative;

}


/* SEARCH BOX */

.patient-search-box {

    width: 100%;

    max-width: 520px;

    height: 46px;

    display: flex;

    align-items: center;

    position: relative;

    background: #FFFFFF;

    border: 1px solid #D8D8D8;

    border-radius: 11px;

    box-shadow:
        0 5px 15px rgba(0,0,0,0.07);

    transition:
        all 0.25s ease;

}


/* SEARCH BOX HOVER */

.patient-search-box:hover {

    border-color: #174D38;

    box-shadow:
        0 7px 18px rgba(23,77,56,0.11);

}


/* SEARCH BOX FOCUS */

.patient-search-box:focus-within {

    border-color: #174D38;

    box-shadow:
        0 0 0 3px rgba(23,77,56,0.10),
        0 8px 20px rgba(0,0,0,0.08);

}


/* SEARCH ICON */

.patient-search-box > i {

    width: 45px;

    display: flex;

    align-items: center;

    justify-content: center;

    color: #174D38;

    font-size: 14px;

    pointer-events: none;

}


/* SEARCH INPUT */

.patient-search-box input {

    flex: 1;

    min-width: 0;

    height: 100%;

    padding: 0 8px;

    border: none;

    outline: none;

    background: transparent;

    color: #333;

    font-size: 12px;

    font-weight: 500;

}


.patient-search-box input::placeholder {

    color: #999;

    font-weight: 400;

}


.patient-search-box input:focus::placeholder {

    color: #B5B5B5;

}


/* CLEAR BUTTON */

.patient-search-box button {

    width: 40px;
    height: 40px;

    margin-right: 3px;

    border: none;

    background: transparent;

    color: #999;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 8px;

    cursor: pointer;

    transition:
        all 0.22s ease;

}


/* CLEAR BUTTON HOVER */

.patient-search-box button:hover {

    background: rgba(77,23,23,0.09);

    color: #4D1717;

    transform: scale(1.05);

}


/* CLEAR ICON */

.patient-search-box button i {

    font-size: 13px;

}


/* ============================================================
   NO SEARCH RESULT
============================================================ */

.no-search-result {

    display: none;

    width: 100%;

    margin-top: -5px;

    margin-bottom: 15px;

    padding: 13px 16px;

    background:
        rgba(77,23,23,0.07);

    border:
        1px solid rgba(77,23,23,0.15);

    border-radius: 9px;

    color: #4D1717;

    font-size: 11px;

    font-weight: 600;

    align-items: center;

    gap: 9px;

}


.no-search-result i {

    font-size: 13px;

}


/* ============================================================
   TABLE WRAPPER
============================================================ */

.table-wrapper {

    width: 100%;

    overflow-x: auto;

    border-radius: 10px;

}


/* ============================================================
   TABLE
============================================================ */

table {

    width: 100%;

    min-width: 1550px;

    border-collapse: separate;

    border-spacing: 0;

}


/* ============================================================
   TABLE HEADER
============================================================ */

thead th {

    padding: 14px 13px;

    background: #174D38;

    color: white;

    text-align: left;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 0.4px;

    white-space: nowrap;

}


thead th:first-child {

    border-radius: 8px 0 0 8px;

}


thead th:last-child {

    border-radius: 0 8px 8px 0;

}


/* ============================================================
   TABLE BODY
============================================================ */

tbody tr {

    background: #F2F2F2;

    transition:
        all 0.22s ease;

}


tbody tr:hover {

    background:
        rgba(23,77,56,0.045);

    transform:
        scale(1.002);

}


tbody td {

    padding: 13px;

    border-bottom:
        1px solid #ddd;

    font-size: 11px;

    color: #444;

    vertical-align: middle;

}


/* ============================================================
   USER ID
============================================================ */

.user-id {

    display: inline-flex;

    align-items: center;

    gap: 3px;

    padding: 6px 9px;

    border-radius: 7px;

    background:
        rgba(23,77,56,0.09);

    color: #174D38;

    font-weight: 700;

    font-size: 10px;

}


.user-id i {

    font-size: 8px;

}


/* ============================================================
   PATIENT CELL
============================================================ */

.patient-cell {

    display: flex;

    align-items: center;

    gap: 9px;

    min-width: 150px;

}


.patient-avatar {

    width: 34px;
    height: 34px;

    flex-shrink: 0;

    border-radius: 10px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #174D38;

    color: white;

    font-size: 12px;

    font-weight: 800;

    box-shadow:
        0 4px 10px
        rgba(23,77,56,0.18);

}


.patient-details strong {

    display: block;

    color: #333;

    font-size: 11px;

    white-space: nowrap;

}


.patient-details span {

    display: block;

    margin-top: 2px;

    color: #999;

    font-size: 9px;

}


/* ============================================================
   NORMAL TEXT
============================================================ */

.normal-text {

    white-space: nowrap;

    color: #555;

}


/* ============================================================
   EMAIL
============================================================ */

.email-cell {

    display: flex;

    align-items: center;

    gap: 7px;

    max-width: 190px;

}


.email-cell i {

    color: #4D1717;

    font-size: 11px;

}


.email-cell span {

    white-space: nowrap;

}


/* ============================================================
   PHONE
============================================================ */

.phone-cell {

    display: flex;

    align-items: center;

    gap: 7px;

    white-space: nowrap;

}


.phone-cell i {

    color: #174D38;

    font-size: 10px;

}


/* ============================================================
   GENDER BADGE
============================================================ */

.gender-badge {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    padding: 6px 9px;

    border-radius: 20px;

    font-size: 9px;

    font-weight: 700;

}


.gender-badge.male {

    background:
        rgba(23,77,56,0.11);

    color: #174D38;

}


.gender-badge.female {

    background:
        rgba(77,23,23,0.10);

    color: #4D1717;

}


/* ============================================================
   DISABILITY BADGE
============================================================ */

.disability-badge {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    padding: 6px 9px;

    border-radius: 7px;

    background:
        rgba(23,77,56,0.08);

    color: #174D38;

    font-size: 9px;

    font-weight: 600;

    white-space: nowrap;

}


.disability-badge i {

    font-size: 10px;

}


/* ============================================================
   ADDRESS
============================================================ */

.address-cell {

    display: flex;

    align-items: flex-start;

    gap: 7px;

    max-width: 180px;

    line-height: 1.4;

}


.address-cell i {

    margin-top: 2px;

    color: #4D1717;

    font-size: 10px;

}


.address-cell span {

    color: #666;

}


/* ============================================================
   EMERGENCY CONTACT
============================================================ */

.emergency-cell {

    display: flex;

    align-items: center;

    gap: 7px;

    white-space: nowrap;

}


.emergency-cell i {

    color: #4D1717;

    font-size: 11px;

}


/* ============================================================
   ACTION BUTTONS
============================================================ */

.action-buttons {

    display: flex;

    flex-direction: column;

    gap: 5px;

    width: 110px;

}


.action-btn {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 6px;

    width: 110px;

    padding: 7px 8px;

    border-radius: 7px;

    text-decoration: none;

    color: white;

    font-size: 9px;

    font-weight: 700;

    transition:
        all 0.22s ease;

}


.action-btn:hover {

    transform:
        translateY(-3px);

    box-shadow:
        0 5px 12px rgba(0,0,0,0.16);

}


.delete-btn {

    background: #4D1717;

}


.delete-btn:hover {

    background: #641f1f;

}


.update-btn {

    background: #174D38;

}


.update-btn:hover {

    background: #206448;

}


.caregiver-btn {

    background: #CBCBCB;

    color: #174D38;

}


.caregiver-btn:hover {

    background: #174D38;

    color: white;

}


/* ============================================================
   FOOTER
============================================================ */

.page-footer {

    display: flex;

    justify-content: space-between;

    padding: 20px 5px 5px;

    color: #666;

    font-size: 10px;

}


/* ============================================================
   TABLE SCROLLBAR
============================================================ */

.table-wrapper::-webkit-scrollbar {

    height: 8px;

}


.table-wrapper::-webkit-scrollbar-track {

    background: #CBCBCB;

    border-radius: 10px;

}


.table-wrapper::-webkit-scrollbar-thumb {

    background: #174D38;

    border-radius: 10px;

}


.table-wrapper::-webkit-scrollbar-thumb:hover {

    background: #4D1717;

}


/* ============================================================
   RESPONSIVE - 1200px
============================================================ */

@media (max-width: 1200px) {

    .main {

        padding: 25px;

    }


    .header {

        flex-direction: column;

        align-items: flex-start;

        gap: 18px;

    }


    .header-actions {

        width: 100%;

    }


    .document-select {

        flex: 1;

    }


    .patient-search-box {

        max-width: 100%;

    }

}


/* ============================================================
   RESPONSIVE - 900px
============================================================ */

@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;

    }


    .page-info {

        align-items: flex-start;

    }


    .patient-search-container {

        width: 100%;

    }


    .patient-search-box {

        width: 100%;

        max-width: 100%;

    }

}


/* ============================================================
   RESPONSIVE - 600px
============================================================ */

@media (max-width: 600px) {

    .main {

        padding: 18px;

    }


    .header h1 {

        font-size: 24px;

    }


    .header p {

        font-size: 11px;

    }


    .header-actions {

        flex-direction: column;

        align-items: stretch;

        width: 100%;

    }


    .document-select {

        width: 100%;

        flex: none;

    }


    .home-btn {

        justify-content: center;

    }


    .page-info {

        flex-direction: column;

        gap: 15px;

        padding: 16px;

    }


    .patient-count {

        width: 100%;

        padding-left: 0;

        padding-top: 12px;

        border-left: none;

        border-top: 1px solid #ddd;

        justify-content: space-between;

    }


    /* MOBILE SEARCH BOX */

    .patient-search-container {

        margin-bottom: 15px;

    }


    .patient-search-box {

        width: 100%;

        max-width: none;

        height: 44px;

    }


    .patient-search-box > i {

        width: 42px;

        font-size: 13px;

    }


    .patient-search-box input {

        font-size: 11px;

    }


    .patient-search-box button {

        width: 38px;

        height: 38px;

    }


    .no-search-result {

        font-size: 10px;

        padding: 11px 13px;

    }


    .table-card {

        padding: 16px;

    }


    .table-card-header {

        flex-direction: column;

        align-items: flex-start;

        gap: 12px;

    }


    .record-status {

        align-self: flex-start;

    }

}


/* ============================================================
   PHYSA GLOBAL DARK THEME - USERS/PATIENTS PAGE
   Theme support added only.
   Existing Users/Patients CSS above is unchanged.
============================================================ */

body.theme-dark .main {
    background: #171A19;
    color: #ffffff;
}

body.theme-dark .header h1,
body.theme-dark .info-left h2,
body.theme-dark .table-card-header h2 {
    color: #8bc9ac;
}

body.theme-dark .header p,
body.theme-dark .info-left p,
body.theme-dark .patient-count span,
body.theme-dark .record-status,
body.theme-dark .page-footer {
    color: #b8c0bc;
}

body.theme-dark .page-info,
body.theme-dark .table-card {
    background: #222725;
    color: #ffffff;
    border-color: rgba(255,255,255,0.08);
}

body.theme-dark .patient-count {
    border-left-color: rgba(255,255,255,0.12);
}

body.theme-dark .patient-search-box {
    background: #222725;
    border-color: rgba(255,255,255,0.12);
}

body.theme-dark .patient-search-box input {
    color: #ffffff;
}

body.theme-dark .patient-search-box input::placeholder {
    color: #8f9893;
}

body.theme-dark .patient-search-box button {
    color: #aab2ae;
}

body.theme-dark .record-status {
    background: #303633;
}

body.theme-dark tbody tr {
    background: #222725;
}

body.theme-dark tbody tr:hover {
    background: rgba(139,201,172,0.08);
}

body.theme-dark tbody td {
    color: #e6ebe8;
    border-bottom-color: rgba(255,255,255,0.10);
}

body.theme-dark .patient-details strong {
    color: #ffffff;
}

body.theme-dark .patient-details span {
    color: #9ca6a1;
}

body.theme-dark .normal-text,
body.theme-dark .address-cell span {
    color: #c5cbc8;
}

body.theme-dark .password-cell {
    background: #303633;
    color: #d5dbd8;
}

body.theme-dark .user-id {
    background: rgba(139,201,172,0.12);
    color: #8bc9ac;
}

body.theme-dark .patient-search-box:focus-within {
    border-color: #8bc9ac;
    box-shadow:
        0 0 0 3px rgba(139,201,172,0.10),
        0 8px 20px rgba(0,0,0,0.20);
}

/* Active sidebar item in dark mode. */
body.theme-dark .sidebar li.active a {
    background: #222725;
    color: #8bc9ac;
}

body.theme-dark .sidebar li.active a i {
    color: #ffffff;
}

/* Mobile border for patient count. */
@media (max-width: 600px) {
    body.theme-dark .patient-count {
        border-top-color: rgba(255,255,255,0.12);
    }
}

