﻿/* =========================================================
   MODHS MDF Theme (Bootstrap 5.3.8)
   Primary:   #008755 (Green)
   Secondary: #9B945F (Gold-ish)
========================================================= */

:root {
    --modhs-primary: #008755;
    --modhs-secondary: #9B945F;
    --modhs-bg: #f7faf8;
    --modhs-card: #ffffff;
    --modhs-text: #0f172a;
    --modhs-muted: #64748b;
    --modhs-border: rgba(15,23,42,.10);
    --modhs-radius: 16px;
    --modhs-radius-sm: 14px;
    --modhs-shadow: 0 10px 30px rgba(15,23,42,.08);
    --modhs-sidebar-bg: linear-gradient(180deg, #007a4c 0%, #006a42 100%);
    --modhs-sidebar-hover: rgba(255,255,255,.10);
    --modhs-sidebar-active: rgba(255,255,255,.16);
}

/* Base */
.modhs-body {
    background: var(--modhs-bg);
    color: var(--modhs-text);
}

.modhs-shell {
    min-height: 100vh;
    display: flex;
}

/* Sidebar */
.modhs-sidebar {
    width: 280px;
    background: var(--modhs-sidebar-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 14px 12px;
}

@media (max-width: 991.98px) {
    .modhs-sidebar {
        display: none;
    }
    /* you already use offcanvas for mobile */
}

.modhs-sidebar__brand {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 10px 14px 10px;
}

.modhs-brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    font-weight: 800;
    letter-spacing: .5px;
}

.modhs-brand-title {
    font-weight: 700;
    line-height: 1.1;
}

.modhs-brand-sub {
    font-size: .82rem;
    opacity: .8;
}

.modhs-sidebar__hospital {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px;
    margin: 6px 8px 12px 8px;
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
}

.modhs-hospital-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.12);
}

.modhs-hospital-label {
    font-size: .78rem;
    opacity: .8;
}

.modhs-hospital-name {
    font-weight: 700;
    max-width: 190px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Nav */
.modhs-nav {
    padding: 0 6px;
}

.modhs-nav-section {
    margin: 12px 8px 6px;
    font-size: .72rem;
    letter-spacing: .10em;
    text-transform: uppercase;
    opacity: .75;
}

.modhs-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    margin: 4px 6px;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
}

    .modhs-nav-link:hover {
        background: var(--modhs-sidebar-hover);
        color: #fff;
    }

    .modhs-nav-link.active {
        background: var(--modhs-sidebar-active);
        border: 1px solid rgba(255,255,255,.16);
    }

.modhs-nav-ico {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.10);
}

/* Sidebar footer */
.modhs-sidebar__footer {
    margin-top: auto;
    padding: 10px 10px 6px;
    opacity: .8;
}

/* Main */
.modhs-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.modhs-topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    border-bottom: 1px solid var(--modhs-border);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.modhs-topbar-title {
    font-weight: 700;
    color: var(--modhs-text);
}

.modhs-content {
    padding: 16px;
}

/* ===== Page Components (Facility view) ===== */

.modhs-card {
    background: var(--modhs-card);
    border: 1px solid var(--modhs-border);
    border-radius: var(--modhs-radius);
    box-shadow: var(--modhs-shadow);
}

.modhs-headerbar {
    background: linear-gradient(90deg, rgba(0,135,85,.10), rgba(155,148,95,.10));
    border-bottom: 1px solid var(--modhs-border);
    border-top-left-radius: var(--modhs-radius);
    border-top-right-radius: var(--modhs-radius);
}

.modhs-title-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--modhs-primary);
    box-shadow: 0 0 0 4px rgba(0,135,85,.12);
}

.modhs-section {
    border: 1px solid var(--modhs-border);
    border-radius: var(--modhs-radius-sm);
    background: #fff;
}

.modhs-icon-pill {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(0,135,85,.10);
    color: var(--modhs-primary);
    border: 1px solid rgba(0,135,85,.20);
    flex: 0 0 auto;
}

.modhs-label {
    font-size: .80rem;
    color: var(--modhs-muted);
    margin-bottom: .25rem;
}

.mono-id {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Buttons */
.btn-modhs {
    background: var(--modhs-primary);
    border-color: var(--modhs-primary);
    color: #fff;
}

    .btn-modhs:hover {
        filter: brightness(.95);
        color: #fff;
    }

.badge-modhs {
    background: rgba(0,135,85,.12);
    color: var(--modhs-primary);
    border: 1px solid rgba(0,135,85,.22);
}

.badge-view {
    background: rgba(155,148,95,.12);
    color: #6b5f3a;
    border: 1px solid rgba(155,148,95,.22);
}

/* Focus feel */
.form-control:focus {
    border-color: rgba(0,135,85,.45);
    box-shadow: 0 0 0 .2rem rgba(0,135,85,.15);
}

/* Mobile offcanvas uses white background by default.
   Our nav links are styled for the green sidebar, so wrap offcanvas content with this. */
.modhs-mobile-sidebar {
    background: var(--modhs-sidebar-bg);
    min-height: 100%;
    color: #fff;
}

    .modhs-mobile-sidebar .border-bottom {
        border-color: rgba(255,255,255,.14) !important;
    }

/* ===== Side Nav: smaller + more readable ===== */
.modhs-nav {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Kufi Arabic", "Noto Sans Arabic", Tahoma, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.modhs-nav-section {
    font-size: .72rem; /* smaller section headings */
    letter-spacing: .04em;
    text-transform: uppercase;
    opacity: .85;
    margin: 14px 0 6px;
}

.modhs-nav-link {
    font-size: .86rem; /* smaller links (≈ 13.8px) */
    line-height: 1.25;
    font-weight: 500;
    letter-spacing: .01em;
    /* keep your existing layout if you already have it;
       otherwise these help readability */
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .45rem .65rem;
    border-radius: 10px;
}

.modhs-nav-ico i {
    font-size: 1.02rem; /* keep icons readable even if text is smaller */
    line-height: 1;
}

/* Make the Logout button match nav link typography */
.modhs-nav button.btn.btn-link {
    font-family: inherit;
    font-size: .86rem;
    line-height: 1.25;
    font-weight: 500;
    letter-spacing: .01em;
}
.modhs-grid-wrap {
    background: var(--modhs-card);
    border: 1px solid var(--modhs-border);
    border-radius: var(--modhs-radius);
    box-shadow: var(--modhs-shadow);
    padding: 10px;
}

    /* Light polish for DevExtreme grid inside MODHS theme */
    .modhs-grid-wrap .dx-datagrid-headers {
        border-bottom: 1px solid var(--modhs-border);
    }

    .modhs-grid-wrap .dx-toolbar {
        padding: 6px 6px 10px 6px;
    }
.modhs-table thead th {
    font-weight: 700;
    color: var(--modhs-text);
}

.modhs-row-edit {
    background: rgba(0,135,85,.06);
}

.modhs-table td, .modhs-table th {
    vertical-align: middle;
}

.modhs-table .btn {
    border-radius: 10px;
}
