:root{--rhu:#0f7a53;--rhu-2:#16966a;--rhu-dark:#0a4934;--rhu-deep:#082f24;--rhu-soft:#eaf7f1;--ink:#15221c;--muted:#6e7d75;--line:#e2eae6;--bg:#f4f7f5;--surface:#fff;--danger:#d64550;--warning:#e99a13;--info:#2777c7;--shadow:0 8px 30px rgba(20,55,38,.07);--radius:16px}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,"Segoe UI",system-ui,-apple-system,sans-serif;font-size:14px;-webkit-font-smoothing:antialiased}a{transition:.2s ease}h1,h2,h3,h4,h5,h6{letter-spacing:-.02em}.text-muted{color:var(--muted)!important}
.card,.dashboard-card,.content-card{background:var(--surface);border:1px solid var(--line)!important;border-radius:var(--radius)!important;box-shadow:var(--shadow)!important}.content-card{overflow:hidden}.btn{border-radius:10px;font-weight:650;padding:.55rem .9rem;box-shadow:none!important}.btn-sm{border-radius:9px;padding:.4rem .7rem}.btn-success{background:var(--rhu);border-color:var(--rhu)}.btn-success:hover,.btn-success:focus{background:var(--rhu-dark);border-color:var(--rhu-dark)}.btn-outline-success{color:var(--rhu);border-color:#9acdb7}.btn-outline-success:hover{background:var(--rhu);border-color:var(--rhu)}.btn-light{background:#f7faf8;border-color:var(--line);color:#415047}
.form-label{font-size:.82rem;font-weight:700;color:#45534b;margin-bottom:.45rem}.form-control,.form-select,.input-group-text{min-height:42px;border-color:#d9e3de;border-radius:10px;background-color:#fff}.input-group>.form-control,.input-group>.form-select{border-radius:0 10px 10px 0}.input-group>.input-group-text{border-radius:10px 0 0 10px}.form-control:focus,.form-select:focus{border-color:#79bfa1;box-shadow:0 0 0 .2rem rgba(15,122,83,.11)}.modal-content{border:0!important;border-radius:18px!important;box-shadow:0 24px 70px rgba(9,41,28,.2)}.modal-header,.modal-footer{border-color:var(--line)}
.table{vertical-align:middle;margin-bottom:0}.table>:not(caption)>*>*{padding:.9rem .85rem;border-color:#edf1ef}.table thead th{background:#f7faf8;color:#68776f;border-bottom:1px solid var(--line);font-size:.72rem;text-transform:uppercase;letter-spacing:.055em;font-weight:800;white-space:nowrap}.table tbody tr{transition:.15s}.table tbody tr:hover{background:#fbfdfc}.badge{font-weight:700;border-radius:999px;padding:.45em .72em}.alert{border-radius:12px;border-width:1px}
.page-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;margin-bottom:22px}.page-heading h2{font-size:1.55rem;font-weight:800;margin-top:4px}.page-heading p{color:var(--muted);margin:5px 0 0}.section-label{font-size:.69rem;text-transform:uppercase;letter-spacing:.1em;color:#87958d;font-weight:800}.metric-card{position:relative;padding:19px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);height:100%;overflow:hidden}.metric-card:after{content:"";position:absolute;width:72px;height:72px;border-radius:50%;background:var(--rhu-soft);right:-25px;top:-25px;opacity:.8}.metric-icon{width:43px;height:43px;border-radius:12px;display:grid;place-items:center;background:var(--rhu-soft);color:var(--rhu);font-size:19px}.metric-value{font-size:1.72rem;font-weight:850;margin-top:13px;line-height:1}.metric-label{color:var(--muted);font-size:.82rem;margin-top:6px}.quick-action{display:flex;align-items:center;gap:12px;padding:13px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;text-decoration:none;color:var(--ink)}.quick-action:hover{border-color:#acd5c2;background:#f8fcfa;transform:translateY(-1px);color:var(--ink)}.quick-action>i{width:38px;height:38px;border-radius:10px;background:var(--rhu-soft);display:grid;place-items:center}.avatar-sm{flex:0 0 auto;width:38px;height:38px;border-radius:11px;background:var(--rhu-soft);color:var(--rhu);display:grid;place-items:center;font-weight:800}.empty-state{text-align:center;padding:45px 20px;color:var(--muted)}.empty-state i{font-size:40px;color:#b7c5bd}.profile-hero{background:linear-gradient(135deg,var(--rhu),var(--rhu-dark));color:#fff;border-radius:18px;padding:25px}.profile-avatar{width:72px;height:72px;border-radius:20px;background:rgba(255,255,255,.15);display:grid;place-items:center;font-size:28px;font-weight:800}.info-row{display:flex;justify-content:space-between;gap:20px;padding:11px 0;border-bottom:1px solid var(--line)}.info-row:last-child{border-bottom:0}.info-row span:first-child{color:var(--muted)}
.sidebar{position:fixed;inset:0 auto 0 0;width:260px;z-index:1040;overflow-y:auto;background:linear-gradient(180deg,#0c2f23 0%,#102b21 100%)!important;color:#fff;box-shadow:8px 0 30px rgba(8,40,29,.08);transition:transform .25s ease}.sidebar-brand{height:82px;padding:18px 19px;display:flex;align-items:center;gap:12px;border-bottom:1px solid rgba(255,255,255,.07)}.sidebar-brand .brand-icon{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;font-weight:850;background:linear-gradient(135deg,#1aa873,var(--rhu))!important;color:#fff;box-shadow:0 8px 18px rgba(15,122,83,.25)}.brand-text h5{margin:0;font-size:16px;font-weight:800}.brand-text small{color:#91aa9e;font-size:11px}.sidebar-menu{padding:12px 13px 90px}.menu-label{font-size:9.5px;letter-spacing:.12em;text-transform:uppercase;color:#6f8e80;font-weight:850;padding:14px 12px 6px}.sidebar-menu .nav-link{position:relative;color:#afc2b9;padding:10px 12px;border-radius:10px;display:flex;align-items:center;gap:11px;margin:3px 0;font-size:13.5px;font-weight:600}.sidebar-menu .nav-link:hover{background:rgba(255,255,255,.055);color:#fff}.sidebar-menu .nav-link.active{background:linear-gradient(90deg,var(--rhu),#168b61)!important;color:#fff;box-shadow:0 6px 16px rgba(5,62,41,.24)}.sidebar-menu .nav-link i{width:21px;text-align:center;font-size:16px}.sidebar-menu .badge{margin-left:auto;background:#dc6c58;color:#fff;font-size:10px}.sidebar-footer{position:fixed;bottom:0;left:0;width:260px;padding:12px 14px;background:#0c2b20;border-top:1px solid rgba(255,255,255,.07)}.sidebar-footer a{color:#afc2b9;text-decoration:none;border-radius:10px}.sidebar-footer a:hover{background:rgba(255,255,255,.05);color:#fff}.main-content{margin-left:260px;min-height:100vh;padding:22px 28px 38px;transition:margin .25s ease}.topbar{min-height:66px;background:#fff;border:1px solid var(--line)!important;border-radius:14px;padding:12px 16px;display:flex;justify-content:space-between;align-items:center;margin-bottom:24px;box-shadow:0 3px 15px rgba(18,48,34,.035)}.topbar h4{margin:0;font-size:1.08rem;font-weight:800}.topbar small{color:#7b8982}.user-info{display:flex;align-items:center;gap:10px}.user-avatar{width:39px;height:39px;border-radius:11px;background:var(--rhu-soft);color:var(--rhu);display:grid;place-items:center;font-weight:850}.user-name{font-size:13px;font-weight:750}.user-role{font-size:10.5px;color:#839089}.mobile-menu-btn{display:none;width:40px;height:40px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink)}.sidebar-overlay{display:none}
.status-badge{display:inline-flex;align-items:center;gap:4px;padding:.42em .72em;font-size:.72rem;font-weight:750;border-radius:999px;line-height:1.2;white-space:nowrap}.status-confirmed{background:#dff4e9;color:#0b6846}.status-pending{background:#fff1cf;color:#8a6100}.status-cancelled{background:#fde3e5;color:#9a2831}.status-completed{background:#dcecff;color:#175d9e}.status-active{background:#dff4e9;color:#0b6846}.status-inactive{background:#ecefed;color:#66736c}.form-row{display:flex;align-items:center;gap:16px;padding:11px 0;border-bottom:1px solid var(--line)}.form-row>span:first-child,.form-row>label:first-child{color:var(--muted);flex:0 0 40%;font-size:.9rem}.form-row>*:last-child{flex:1}.form-row:last-child{border-bottom:0}[id]{scroll-margin-top:90px}
.hero-login{min-height:100vh;background:linear-gradient(135deg,#082f24 0%,#0e5f43 48%,#12825a 100%);display:flex;align-items:center;padding:28px 0;position:relative;overflow:hidden}.hero-login:before,.hero-login:after{content:"";position:absolute;border-radius:50%;background:rgba(255,255,255,.045)}.hero-login:before{width:420px;height:420px;right:-130px;top:-160px}.hero-login:after{width:300px;height:300px;left:-100px;bottom:-120px}.login-shell{max-width:1000px;position:relative;z-index:1}.login-panel{background:rgba(255,255,255,.99);border-radius:22px;overflow:hidden;box-shadow:0 30px 90px rgba(0,0,0,.25)}.login-brand{padding:52px;background:linear-gradient(145deg,#0f7651,#093d2c);color:#fff;min-height:570px}.login-form{padding:48px}.login-logo{width:125px;height:125px;object-fit:contain;background:#fff;border-radius:18px;padding:7px;box-shadow:0 10px 25px rgba(0,0,0,.12)}.feature-pill{display:flex;gap:10px;align-items:center;margin-top:20px;color:rgba(255,255,255,.88)}.feature-pill i{width:31px;height:31px;border-radius:9px;background:rgba(255,255,255,.12);display:grid;place-items:center}.login-form .input-group-text{color:#789087}.login-form .btn-success{min-height:44px}
@media(max-width:991.98px){.sidebar{transform:translateX(-100%);width:260px}.sidebar.show{transform:translateX(0)}.sidebar-footer{width:260px}.main-content{margin-left:0;padding:15px}.mobile-menu-btn{display:grid;place-items:center;flex:0 0 auto}.sidebar-overlay.show{display:block;position:fixed;inset:0;background:rgba(5,25,18,.45);z-index:1035}.topbar{border-radius:12px;margin-bottom:18px}.topbar-title{display:flex;align-items:center;gap:10px}.page-heading{align-items:flex-start;flex-direction:column}.page-heading>.d-flex{width:100%;flex-wrap:wrap}}
@media(max-width:767.98px){body{font-size:13.5px}.login-brand{display:none}.login-form{padding:30px 24px}.login-panel{border-radius:18px}.metric-value{font-size:1.5rem}.main-content{padding:12px}.topbar .user-name,.topbar .user-role{display:none}.page-heading h2{font-size:1.35rem}.content-card>.p-4{padding:1rem!important}.table>:not(caption)>*>*{padding:.75rem .65rem}.form-row{align-items:flex-start;flex-direction:column;gap:5px}.form-row>span:first-child,.form-row>label:first-child{flex:auto}}
/* Professional authentication refinements */
.registration-logo{width:88px;height:88px;object-fit:contain;background:#fff;border:1px solid var(--line);border-radius:20px;padding:6px;box-shadow:var(--shadow)}
.signup-card{max-width:720px!important;border:1px solid rgba(255,255,255,.2)!important;box-shadow:0 30px 90px rgba(0,0,0,.22)!important}
.signup-card .card-body{padding:2.4rem!important}.required-field:after{content:" *";color:var(--danger)}.password-guide{font-size:.78rem;color:#607069;background:#f4faf7;border:1px solid #dcebe4;padding:9px 11px;border-radius:10px}.login-form .input-group .btn-light{border-color:#d9e3de!important;border-radius:0 10px 10px 0}.login-form .input-group .form-control:has(+.btn){border-radius:0}
.danger-zone{border:1px solid #f2c9cd;background:#fffafa;border-radius:12px;padding:12px}.user-actions{display:flex;gap:6px;flex-wrap:wrap}

/* Doctor availability calendar */
.doctor-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.calendar-weekday{text-align:center;font-weight:700;padding:10px}.calendar-day{min-height:135px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;padding:10px;overflow:hidden}.calendar-day.muted{background:#f7f9f8}.calendar-day.today{outline:2px solid var(--primary,#0f7a53);outline-offset:-2px}.availability-event{display:block;width:100%;border:0;border-left:3px solid #16a36a;background:#eaf8f1;border-radius:7px;text-align:left;padding:6px 7px;margin-top:7px;font-size:.76rem;color:#175c43}.availability-event small,.my-appointment small{display:block;margin-top:2px}.my-appointment{border-left:3px solid #f59e0b;background:#fff5e8;border-radius:7px;padding:6px 7px;margin-top:6px;font-size:.76rem}@media(max-width:900px){.doctor-calendar{grid-template-columns:repeat(7,150px);width:max-content}.calendar-card{overflow-x:auto}.calendar-day{min-height:125px}.weekdays{display:none}}

/* ===== Health Track RHU Blue Theme ===== */
:root{--rhu-primary:#0b5ea8;--rhu-primary-dark:#073b6b;--rhu-primary-soft:#eaf4ff;--rhu-accent:#1d8cf8;--rhu-bg:#f4f8fc;}
body{background-color:var(--rhu-bg)!important;}
.hero-login{background:linear-gradient(135deg,#073b6b 0%,#0b5ea8 55%,#1d8cf8 100%)!important;}
.login-brand{background:linear-gradient(160deg,#073b6b,#0b5ea8)!important;}
.btn-success,.bg-success{background-color:var(--rhu-primary)!important;border-color:var(--rhu-primary)!important;}
.btn-outline-success{color:var(--rhu-primary)!important;border-color:var(--rhu-primary)!important;}
.btn-outline-success:hover{background:var(--rhu-primary)!important;color:#fff!important;}
.text-success{color:var(--rhu-primary)!important;}
.sidebar,.admin-sidebar{background:#062b4b!important;}
.sidebar .active,.admin-sidebar .active{background:#0b5ea8!important;}
.metric-icon,.section-label{color:var(--rhu-primary)!important;}
.doctor-top,.navbar.doctor-top{background:linear-gradient(90deg,#073b6b,#0b5ea8)!important;}

/* 2026 registration approval + responsive improvements */
.notification-bell{position:relative;width:40px;height:40px;border:1px solid #d8e4ef;border-radius:11px;display:grid;place-items:center;text-decoration:none;color:#0b5ea8;background:#fff}.notification-bell span{position:absolute;right:-5px;top:-6px;min-width:19px;height:19px;padding:0 4px;border-radius:10px;background:#dc3545;color:#fff;font-size:10px;display:grid;place-items:center;font-weight:800}.notification-unread{background:#eef7ff}.notification-icon{width:38px;height:38px;flex:0 0 38px;border-radius:10px;background:#e8f3ff;color:#0b5ea8;display:grid;place-items:center}.approval-page,.notification-page{max-width:1100px}.table{min-width:680px}.user-actions{display:flex;gap:6px;flex-wrap:wrap}.btn-primary{background:#0b5ea8;border-color:#0b5ea8}.btn-outline-primary{color:#0b5ea8;border-color:#0b5ea8}
@media(max-width:575.98px){.container{padding-left:12px;padding-right:12px}.signup-card{border-radius:14px}.signup-card .card-body{padding:22px 16px!important}.login-shell{padding:10px}.login-form{padding:24px 18px}.topbar{padding:10px 12px}.topbar h4{font-size:1rem}.metric-card{padding:16px}.content-card{border-radius:12px}.btn{white-space:normal}.d-flex.gap-2>form{max-width:100%}.registration-logo{max-width:84px}.approval-page .table,.notification-page .table{min-width:620px}}
.notification-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--rhu-soft);
    color: var(--rhu);
    display: grid;
    place-items: center;
    font-size: 18px;
    flex-shrink: 0;
}
.notification-unread {
    background: #f0f9f4;
    border-left: 3px solid var(--rhu);
}
/* ===== Topbar notification bell ===== */
.notification-bell{
    position:relative;
    width:40px;
    height:40px;
    border:1px solid #d8e4ef;
    border-radius:11px;
    display:grid;
    place-items:center;
    text-decoration:none;
    color:#66736c;
    background:#fff;
    transition:all .2s ease;
}
.notification-bell:hover{
    background:#f4f8fc;
    color:#0b5ea8;
    border-color:#b6d4fe;
}

/* UNREAD — blue bell + badge */
.notification-bell.has-unread{
    background:#eaf4ff;
    color:#0b5ea8;
    border-color:#b6d4fe;
    animation:bellPulse 2s ease-in-out infinite;
}
.notification-bell.has-unread:hover{
    background:#d6e9ff;
    color:#073b6b;
    border-color:#9ec5fe;
}

/* ACTIVE — when on notifications.php, solid blue */
.notification-bell.active{
    background:#0b5ea8 !important;
    color:#fff !important;
    border-color:#0b5ea8 !important;
    animation:none;
}
.notification-bell.active:hover{
    background:#073b6b !important;
    border-color:#073b6b !important;
}
.notification-bell.active > span{
    background:#fff !important;
    color:#0b5ea8 !important;
    box-shadow:0 0 0 2px #0b5ea8;
}

/* Badge */
.notification-bell > span{
    position:absolute;
    right:-5px;
    top:-6px;
    min-width:19px;
    height:19px;
    padding:0 5px;
    border-radius:10px;
    background:#dc3545;
    color:#fff;
    font-size:10px;
    font-weight:800;
    display:grid;
    place-items:center;
    line-height:1;
    box-shadow:0 0 0 2px #fff;
}

@keyframes bellPulse{
    0%,100%{ transform:scale(1); }
    50%    { transform:scale(1.06); }
}
/* =========================================================
   RESPONSIVE DESIGN ONLY
   Health Track RHU
   Add this at the VERY BOTTOM of assets/style.css
   ========================================================= */

/* Prevent accidental horizontal overflow */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
}

/* Make long content safer on smaller screens */
.main-content,
.content,
.container,
.container-fluid,
.dashboard-content,
.page-content {
    min-width: 0;
}

/* Responsive tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    max-width: 100%;
}

/* Prevent long text from breaking the layout */
td,
th,
.card,
.alert,
.modal-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Forms */
input,
select,
textarea,
button {
    max-width: 100%;
}

textarea {
    resize: vertical;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991.98px) {

    /* Main content */
    .main-content,
    .content,
    .page-content,
    .dashboard-content {
        width: 100%;
        max-width: 100%;
    }

    /* Dashboard cards */
    .dashboard-grid,
    .stats-grid,
    .cards-grid,
    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Forms */
    .form-row,
    .row-form {
        flex-wrap: wrap;
    }

    /* Modal */
    .modal-dialog {
        width: auto;
        max-width: calc(100% - 30px);
        margin-left: auto;
        margin-right: auto;
    }

    /* Calendar */
    .calendar-container,
    .calendar-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Tables */
    .table-container,
    .table-wrapper {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}


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

@media (max-width: 767.98px) {

    body {
        width: 100%;
        min-width: 0;
    }

    /* -----------------------------------------
       PAGE CONTENT
       ----------------------------------------- */

    .main-content,
    .content,
    .page-content,
    .dashboard-content {
        width: 100%;
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }

    .container,
    .container-fluid {
        width: 100%;
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }

    /* -----------------------------------------
       SIDEBAR / NAVIGATION
       ----------------------------------------- */

    .sidebar {
        max-width: 100%;
    }

    .sidebar a,
    .sidebar .nav-link {
        white-space: normal;
    }

    /* -----------------------------------------
       HEADERS
       ----------------------------------------- */

    .page-header,
    .dashboard-header,
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .page-header h1,
    .page-header h2,
    .dashboard-header h1,
    .dashboard-header h2,
    .content-header h1,
    .content-header h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    /* -----------------------------------------
       DASHBOARD CARDS
       ----------------------------------------- */

    .dashboard-grid,
    .stats-grid,
    .cards-grid,
    .card-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .card,
    .stat-card,
    .dashboard-card {
        width: 100%;
        min-width: 0;
    }

    /* -----------------------------------------
       FORMS
       ----------------------------------------- */

    .form-row,
    .row-form {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .form-group {
        width: 100%;
    }

    input,
    select,
    textarea {
        width: 100%;
        max-width: 100%;
    }

    /* -----------------------------------------
       BUTTONS
       ----------------------------------------- */

    .btn-group-responsive {
        display: flex;
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .btn-group-responsive .btn {
        width: 100%;
    }

    /* Don't force every tiny action button full width */
    td .btn,
    th .btn,
    .table .btn {
        width: auto;
        white-space: nowrap;
    }

    /* -----------------------------------------
       TABLES
       ----------------------------------------- */

    .table-responsive,
    .table-container,
    .table-wrapper {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        width: 100%;
    }

    .table {
        margin-bottom: 0;
    }

    th,
    td {
        white-space: nowrap;
        vertical-align: middle;
    }

    /* Allow selected text-heavy columns to wrap */
    td.text-wrap,
    th.text-wrap {
        white-space: normal;
        min-width: 180px;
    }

    /* -----------------------------------------
       MODALS
       ----------------------------------------- */

    .modal-dialog {
        width: auto;
        max-width: calc(100% - 20px);
        margin: 10px auto;
    }

    .modal-content {
        width: 100%;
    }

    .modal-body {
        max-height: 75vh;
        overflow-y: auto;
    }

    /* -----------------------------------------
       CALENDAR
       ----------------------------------------- */

    .calendar-container,
    .calendar-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .calendar-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .calendar-header h2,
    .calendar-header h3 {
        width: 100%;
        text-align: center;
    }

    /* Keep calendar readable instead of crushing cells */
    .calendar-grid {
        min-width: 650px;
    }

    /* -----------------------------------------
       LOGIN / REGISTER
       ----------------------------------------- */

    .login-container,
    .register-container,
    .auth-container,
    .login-card,
    .register-card,
    .auth-card {
        width: 100%;
        max-width: 100%;
    }

    .login-card,
    .register-card,
    .auth-card {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* -----------------------------------------
       NOTIFICATIONS / ALERTS
       ----------------------------------------- */

    .notification-item,
    .alert {
        width: 100%;
        max-width: 100%;
    }

    /* -----------------------------------------
       FLEX LAYOUTS
       ----------------------------------------- */

    .d-flex.mobile-stack,
    .mobile-stack {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px;
    }
}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 575.98px) {

    .main-content,
    .content,
    .page-content,
    .dashboard-content,
    .container,
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

    .card,
    .stat-card,
    .dashboard-card {
        border-radius: 10px;
    }

    .card-body {
        padding: 15px;
    }

    .page-header h1,
    .dashboard-header h1,
    .content-header h1 {
        font-size: 1.35rem;
    }

    .page-header h2,
    .dashboard-header h2,
    .content-header h2 {
        font-size: 1.25rem;
    }

    input,
    select,
    textarea,
    .form-control,
    .form-select {
        font-size: 16px;
    }

    .modal-dialog {
        max-width: calc(100% - 12px);
        margin: 6px auto;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 15px;
        padding-right: 15px;
    }

    .calendar-grid {
        min-width: 600px;
    }
}


/* =========================================================
   EXTRA SMALL PHONE
   ========================================================= */

@media (max-width: 400px) {

    .main-content,
    .content,
    .page-content,
    .dashboard-content,
    .container,
    .container-fluid {
        padding-left: 8px;
        padding-right: 8px;
    }

    .card-body {
        padding: 12px;
    }

    .btn {
        max-width: 100%;
    }

    .page-header h1,
    .dashboard-header h1,
    .content-header h1 {
        font-size: 1.2rem;
    }
}

/* Doctor sidebar notification badge */
.sidebar .nav-link {
    position: relative;
    min-width: 0;
}

.sidebar .nav-link .badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 8px;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

@media (max-width: 767.98px) {
    .sidebar .nav-link {
        gap: 10px;
    }

    .sidebar .nav-link .badge {
        flex-shrink: 0;
    }
}

/* Add/Edit Medicine Popup */
#medicineModal {
    z-index: 1060;
}

#medicineModal .modal-dialog {
    max-width: 690px;
    width: calc(100% - 24px);
    margin-left: auto;
    margin-right: auto;
}

#medicineModal .modal-content {
    border-radius: 15px !important;
    overflow: hidden;
}

#medicineModal .modal-header {
    background: #fff;
    border-bottom: 1px solid #e5ece8;
}

#medicineModal .modal-footer {
    background: #fff;
    border-top: 1px solid #e5ece8;
}

#medicineModal .form-label {
    font-size: 13px;
    font-weight: 600;
    color: #34463d;
}

#medicineModal .form-control,
#medicineModal .form-select {
    border-radius: 9px;
    min-height: 42px;
}

#medicineModal .form-control:focus,
#medicineModal .form-select:focus {
    border-color: #147a52;
    box-shadow: 0 0 0 3px rgba(20, 122, 82, .12);
}

@media (max-width: 575.98px) {
    #medicineModal .modal-dialog {
        width: calc(100% - 16px);
    }

    #medicineModal .modal-body {
        padding: 16px !important;
    }

    #medicineModal .modal-header,
    #medicineModal .modal-footer {
        padding: 16px !important;
    }
}

/* =========================================
   PRESCRIPTION POPUP - MEDICINE MODAL DESIGN
   ========================================= */

#prescriptionDialog {
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(630px, calc(100vw - 24px));
    max-width: 630px;
    max-height: 90vh;
    padding: 0;
    border: none;
    border-radius: 15px;
    background: #ffffff;
    color: #173529;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

#prescriptionDialog[open] {
    display: flex;
    flex-direction: column;
}

#prescriptionDialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

#prescriptionDialog .rx-dialog-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    max-height: 90vh;
}

#prescriptionDialog .rx-dialog-header {
    padding: 20px 22px;
    border-bottom: 1px solid #e5ece8;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    flex-shrink: 0;
    background: white;
}

#prescriptionDialog .rx-dialog-header h5 {
    font-size: 18px;
    font-weight: 750;
    color: #18382c;
    margin: 0 0 5px;
}

#prescriptionDialog .rx-dialog-header small {
    font-size: 12px;
    color: #778780;
}

#prescriptionDialog .rx-close {
    border: none;
    background: transparent;
    font-size: 26px;
    color: #66756f;
    cursor: pointer;
    line-height: 1;
    padding: 0 5px;
}

#prescriptionDialog .rx-close:hover {
    color: #dc3545;
}

#prescriptionDialog .rx-dialog-body {
    padding: 22px;
    overflow-y: auto;
    min-height: 0;
    flex: 1;
}

#prescriptionDialog .form-label {
    display: block;
    font-size: 13px;
    font-weight: 650;
    color: #354a40;
    margin-bottom: 7px;
}

#prescriptionDialog .form-control,
#prescriptionDialog .form-select {
    min-height: 42px;
    border: 1px solid #d9e3df;
    border-radius: 9px;
    font-size: 14px;
    padding: 9px 12px;
    background: white;
}

#prescriptionDialog .form-control:focus,
#prescriptionDialog .form-select:focus {
    border-color: #16865c;
    box-shadow: 0 0 0 3px rgba(22, 134, 92, 0.12);
    outline: none;
}

#prescriptionDialog .rx-dialog-footer {
    padding: 18px 22px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    border-top: 1px solid #e5ece8;
    background: white;
    flex-shrink: 0;
}

#prescriptionDialog .rx-dialog-footer .btn {
    min-height: 40px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 18px;
}

#prescriptionDialog #savePrescriptionBtn {
    background: #0d61ae;
    border-color: #0d61ae;
    color: white;
}

#prescriptionDialog #savePrescriptionBtn:hover {
    background: #084d90;
    border-color: #084d90;
}

#prescriptionDialog .rx-dialog-footer .btn-light {
    background: #f8faf9;
    color: #354a40;
}

/* Mobile Responsive */
@media (max-width: 767.98px) {
    .rx-heading {
        align-items: stretch;
    }

    .rx-heading .btn {
        width: 100%;
    }

    .rx-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .rx-stats .metric-card:last-child {
        grid-column: 1 / -1;
    }

    .rx-panel-header {
        padding: 15px;
    }

    #prescriptionDialog {
        width: calc(100vw - 16px);
        max-height: 94vh;
    }

    #prescriptionDialog .rx-dialog-form {
        max-height: 94vh;
    }

    #prescriptionDialog .rx-dialog-header,
    #prescriptionDialog .rx-dialog-body,
    #prescriptionDialog .rx-dialog-footer {
        padding: 16px;
    }

    #prescriptionDialog .form-control,
    #prescriptionDialog .form-select {
        font-size: 16px;
    }
}

/* FIX PRESCRIPTION POPUP */
#prescriptionDialog {
    position: fixed !important;
    inset: 0 !important;
    margin: auto !important;
    width: min(650px, calc(100vw - 24px)) !important;
    max-width: 650px !important;
    max-height: 90vh !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    color: #173529;
    box-shadow: 0 20px 70px rgba(0,0,0,.3);
    overflow: hidden;
}

#prescriptionDialog:not([open]) {
    display: none !important;
}

#prescriptionDialog[open] {
    display: flex !important;
    flex-direction: column;
}

#prescriptionDialog::backdrop {
    background: rgba(0,0,0,.6);
}

#prescriptionDialog .rx-dialog-form {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    min-height: 0;
    width: 100%;
}

#prescriptionDialog .rx-dialog-body {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

@media (max-width: 575.98px) {
    #prescriptionDialog {
        width: calc(100vw - 16px) !important;
        max-height: 94vh !important;
    }

    #prescriptionDialog .rx-dialog-form {
        max-height: 94vh;
    }
}

/* ======================================
   ADMIN NOTIFICATION DROPDOWN
   ====================================== */

.rhu-notification-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.rhu-notification-wrapper .notification-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #dce5e2;
    border-radius: 11px;
    background: #fff;
    color: #526d63;
    cursor: pointer;
}

.rhu-notification-wrapper .notification-bell:hover {
    background: #edf7f2;
    color: #10845c;
}

.rhu-notification-count {
    position: absolute;
    top: -6px;
    right: -6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 4px;
    border-radius: 12px;
    background: #e45c50;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.rhu-notification-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 370px;
    max-width: calc(100vw - 28px);
    max-height: 470px;
    overflow-y: auto;
    background: #fff;
    color: #173529;
    border: 1px solid #e0e8e4;
    border-radius: 14px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
    z-index: 99999;
}

.rhu-notification-dropdown[hidden] {
    display: none !important;
}

.rhu-notification-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 17px;
    border-bottom: 1px solid #edf1ef;
}

.rhu-notification-heading strong {
    display: block;
    font-size: 15px;
    font-weight: 750;
}

.rhu-notification-heading small {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: #82928a;
}

.rhu-view-all {
    font-size: 12px;
    font-weight: 700;
    color: #0d61ae;
    text-decoration: none;
    white-space: nowrap;
}

.rhu-notification-list {
    max-height: 340px;
    overflow-y: auto;
}

.rhu-notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f3f1;
    color: #263c32;
    text-decoration: none;
}

.rhu-notification-item:hover {
    background: #f5faf7;
    color: #263c32;
}

.rhu-notification-item.unread {
    background: #eff9f3;
}

.rhu-notification-icon {
    flex: 0 0 33px;
    width: 33px;
    height: 33px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5f5ed;
    border-radius: 9px;
    color: #0f8156;
}

.rhu-notification-info {
    flex: 1;
    min-width: 0;
}

.rhu-notification-info strong {
    display: block;
    font-size: 12px;
    font-weight: 750;
}

.rhu-notification-info p {
    font-size: 12px;
    color: #64766b;
    margin: 4px 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.rhu-notification-info small {
    font-size: 10px;
    color: #93a098;
}

.rhu-unread-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0d61ae;
    flex-shrink: 0;
    margin-top: 5px;
}

.rhu-notification-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px;
    background: #f8faf9;
    color: #0d61ae;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none;
}

.rhu-notification-footer:hover {
    background: #edf7f2;
}

.rhu-notification-empty {
    padding: 30px 15px;
    text-align: center;
    color: #94a39b;
}

.rhu-notification-empty i {
    display: block;
    font-size: 27px;
    margin-bottom: 10px;
}

.rhu-notification-empty p {
    margin: 0;
    font-size: 12px;
}

@media (max-width: 575.98px) {
    .rhu-notification-dropdown {
        position: fixed;
        top: 76px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
        max-height: 70vh;
    }
}

