/* ==========================================================
   HIS - Hospital Information System
   Custom layout stylesheet (dark navy / gold accent admin theme)
   ========================================================== */

:root {
    --his-navy: #1c2438;
    --his-navy-dark: #161c2d;
    --his-gold: #d4af37;
    --his-sidebar-width: 250px;
    --his-topbar-height: 70px;
    --his-text-muted: #8391a2;
    --his-border: #e3e6ed;
    --his-bg: #f4f6fb;
}

body {
    background-color: var(--his-bg);
    font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #2b3142;
}

a { text-decoration: none; }
a:hover { text-decoration: none; }

#wrapper {
    min-height: 100vh;
}

/* ---------------- Sidebar ---------------- */
.left-side-menu {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--his-sidebar-width);
    background: var(--his-navy);
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 2px 0 6px rgba(0,0,0,0.08);
}

.slimscroll-menu { padding-top: var(--his-topbar-height); padding-bottom: 30px; }

#side-menu { list-style: none; margin: 0; padding: 0; }

#side-menu .menu-title {
    padding: 16px 24px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--his-text-muted);
    font-weight: 600;
}

#side-menu li > a {
    display: flex;
    align-items: center;
    padding: 11px 24px;
    color: #c9d1e0;
    font-size: 14.5px;
    transition: background 0.15s, color 0.15s;
    position: relative;
}

#side-menu li > a i {
    margin-right: 12px;
    font-size: 17px;
    width: 18px;
    text-align: center;
    color: var(--his-text-muted);
}

#side-menu li > a:hover,
#side-menu li > a.active-parent {
    background: rgba(255,255,255,0.04);
    color: #fff;
}

#side-menu li > a:hover i { color: var(--his-gold); }

#side-menu .menu-arrow {
    margin-left: auto;
    font-size: 12px;
}
#side-menu .menu-arrow::after { content: '\203A'; }

.nav-second-level {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--his-navy-dark);
    display: none;
}

.nav-second-level li > a {
    display: block;
    padding: 9px 24px 9px 56px;
    color: #aab4c5;
    font-size: 13.5px;
    transition: color 0.15s, background 0.15s;
}

.nav-second-level li > a:hover,
.nav-second-level li > a.active-link {
    color: var(--his-gold);
    background: rgba(255,255,255,0.03);
}

.nav-second-level hr {
    border-color: rgba(255,255,255,0.08);
    margin: 4px 16px;
}

/* ---------------- Topbar ---------------- */
.navbar-custom {
    position: fixed;
    top: 0;
    left: var(--his-sidebar-width);
    right: 0;
    height: var(--his-topbar-height);
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    z-index: 999;
    display: flex;
    align-items: center;
    padding: 0 24px;
}

.topbar-left-menu, .topbar-right-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
}

.topbar-left-menu { margin-right: auto; }

.button-menu-mobile {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--his-navy);
    margin-right: 16px;
    cursor: pointer;
}

.navbar-brand-box strong {
    font-size: 18px;
    color: var(--his-navy);
}

.account-user-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #2b3142;
}
.account-position {
    display: block;
    font-size: 12px;
    color: var(--his-text-muted);
}

.dropdown-toggle::after { display: none; }

.notification-list .nav-link { padding: 0; }

.profile-dropdown { min-width: 180px; }
.profile-dropdown .notify-item { padding: 8px 16px; font-size: 14px; color: #2b3142; }
.profile-dropdown .notify-item i { margin-right: 8px; color: var(--his-text-muted); }
.profile-dropdown .notify-item:hover { background: var(--his-bg); }

/* ---------------- Content area ---------------- */
.content-page {
    margin-left: var(--his-sidebar-width);
    padding-top: var(--his-topbar-height);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content { flex: 1; padding: 24px; }

.page-title-box { padding: 8px 0 16px; }
.page-title { font-size: 22px; font-weight: 600; color: var(--his-navy); margin: 0; }

.footer {
    padding: 16px 24px;
    color: var(--his-text-muted);
    font-size: 13px;
    background: #fff;
    border-top: 1px solid var(--his-border);
}

/* ---------------- Cards / widgets ---------------- */
.card-box {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.header-title { font-size: 16px; font-weight: 600; color: var(--his-navy); }

.widget-rounded-circle .avatar-lg {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bg-soft-primary { background-color: rgba(28,36,56,0.08); }
.border-primary { border-color: var(--his-navy) !important; }
.text-primary { color: var(--his-navy) !important; }
.avatar-title { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }

/* ---------------- Tables ---------------- */
.table thead th {
    border-top: none;
    border-bottom: 2px solid var(--his-border);
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--his-text-muted);
    font-weight: 600;
}
.table td, .table th { vertical-align: middle; padding: 0.65rem 0.75rem; }
.table-hover tbody tr:hover { background-color: var(--his-bg); }

.btn-xs {
    padding: 0.2rem 0.55rem;
    font-size: 12px;
    border-radius: 4px;
}

/* ---------------- Buttons (navy/gold accent) ---------------- */
.btn-primary {
    background-color: var(--his-navy);
    border-color: var(--his-navy);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: #131a2a;
    border-color: #131a2a;
}
.btn-outline-primary {
    color: var(--his-navy);
    border-color: var(--his-navy);
}
.btn-outline-primary:hover {
    background-color: var(--his-navy);
    border-color: var(--his-navy);
}

/* ---------------- Forms ---------------- */
.form-group label { font-weight: 500; font-size: 13.5px; color: #46506b; margin-bottom: 6px; }
.form-control { border-radius: 6px; border-color: var(--his-border); font-size: 14px; }
.form-control:focus { border-color: var(--his-navy); box-shadow: 0 0 0 0.15rem rgba(28,36,56,0.12); }

/* ---------------- Right settings bar ---------------- */
.right-bar {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: #fff;
    box-shadow: -2px 0 8px rgba(0,0,0,0.1);
    z-index: 1100;
    transition: right 0.25s ease;
    overflow-y: auto;
}
body.right-bar-enabled .right-bar { right: 0; }
.rightbar-title { padding: 20px; background: var(--his-navy); color: #fff; }
.rightbar-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 1050;
    display: none;
}
body.right-bar-enabled .rightbar-overlay { display: block; }
.user-box { text-align: center; padding: 20px; }
.user-box img { width: 64px; height: 64px; }
.inbox-widget .inbox-item { display: flex; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--his-border); }
.inbox-item-img { width: 36px; margin-right: 10px; }
.inbox-item-img img { width: 36px; height: 36px; }
.inbox-item-author { width: calc(100% - 46px); font-size: 13.5px; margin-bottom: 2px; }
.inbox-item-text { width: 100%; font-size: 12.5px; color: var(--his-text-muted); margin: 0; }

/* ---------------- Auth pages (login, forgot password) ---------------- */
.auth-body {
    background: linear-gradient(135deg, var(--his-navy) 0%, #2c3a5e 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-wrapper { width: 100%; max-width: 420px; padding: 20px; }
.auth-card {
    background: #fff;
    border-radius: 10px;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}
.auth-card-header { text-align: center; margin-bottom: 24px; }
.auth-card-header h3 { color: var(--his-navy); font-weight: 700; margin-bottom: 4px; }
.auth-card-header p { color: var(--his-text-muted); margin: 0; }
.auth-footer { text-align: center; margin-top: 18px; font-size: 13.5px; }
.auth-footer a { color: var(--his-navy); font-weight: 500; }

/* ---------------- Badges ---------------- */
.badge { font-weight: 500; padding: 0.35em 0.65em; }

/* ---------------- Responsive ---------------- */
@media (max-width: 991px) {
    .left-side-menu {
        left: -var(--his-sidebar-width);
        transition: left 0.25s ease;
    }
    body.sidebar-enable .left-side-menu { left: 0; }
    .navbar-custom, .content-page { left: 0; margin-left: 0; }
}

@media print {
    .left-side-menu, .navbar-custom, .footer, .btn, form { display: none !important; }
    .content-page { margin-left: 0; padding-top: 0; }
}
