:root {
  --brand: #0d7a6f;
  --brand-dark: #095b53;
  --brand-soft: #e6f4f2;
  --side-bg: #0f2a2e;
  --side-fg: #b9cdd0;
  --bg: #f4f6f8;
  --bs-primary: #0d7a6f;
  --bs-primary-rgb: 13, 122, 111;
  --bs-link-color: #0d7a6f;
  --bs-link-hover-color: #095b53;
}
body { background: var(--bg); font-size: .9rem; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark); --bs-btn-active-bg: var(--brand-dark); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-active-bg: var(--brand); }
.text-primary { color: var(--brand) !important; }
.bg-primary { background-color: var(--brand) !important; }
.nav-pills .nav-link.active { background: var(--brand); }
.nav-tabs .nav-link { color: #475569; }
.nav-tabs .nav-link.active { color: var(--brand); font-weight: 600; }

.app { display: flex; min-height: 100vh; }
.sidebar { width: 240px; flex: 0 0 240px; background: var(--side-bg); color: var(--side-fg); position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 1030; }
.sidebar .brand { display: flex; gap: .6rem; align-items: center; padding: 1rem 1.1rem; color: #fff; font-weight: 700; font-size: 1.1rem; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .brand i { color: #4fd1c5; font-size: 1.4rem; }
.sidebar .nav-section { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #6f8c90; padding: .9rem 1.1rem .3rem; }
.sidebar .nav-link { color: var(--side-fg); display: flex; gap: .65rem; align-items: center; padding: .42rem 1.1rem; font-size: .86rem; border-left: 3px solid transparent; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.05); }
.sidebar .nav-link.active { color: #fff; background: rgba(79,209,197,.12); border-left-color: #4fd1c5; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: .75rem; background: #fff; border-bottom: 1px solid #e5e7eb; padding: .5rem 1.25rem; position: sticky; top: 0; z-index: 1020; }
.topbar .search { align-items: center; gap: .4rem; background: var(--bg); border-radius: .5rem; padding: 0 .6rem; width: 360px; }
.topbar .search input { border: 0; background: transparent; box-shadow: none; }
.content { padding: 1.25rem; }
@media (max-width: 991px) {
  .sidebar { position: fixed; left: -260px; transition: left .2s; }
  .sidebar.open { left: 0; }
  .content { padding: .75rem; }
}

.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.3rem; margin: 0; font-weight: 600; }
.page-head .sub { color: #64748b; font-size: .82rem; }
.card { border: 1px solid #e5e7eb; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.card-header { background: #fff; font-weight: 600; }
.table { font-size: .84rem; }
.table thead th { background: #f8fafc; color: #475569; font-weight: 600; white-space: nowrap; font-size: .78rem; text-transform: none; }
.table-sm td, .table-sm th { padding: .35rem .5rem; }
.stat { border-radius: .75rem; background: #fff; border: 1px solid #e5e7eb; padding: 1rem; display: flex; gap: .9rem; align-items: center; height: 100%; }
.stat .ic { width: 44px; height: 44px; border-radius: .6rem; display: grid; place-items: center; font-size: 1.3rem; background: var(--brand-soft); color: var(--brand); }
.stat .v { font-size: 1.35rem; font-weight: 700; line-height: 1.1; }
.stat .l { color: #64748b; font-size: .78rem; }
.cat-card { display: block; text-decoration: none; color: inherit; height: 100%; border-radius: .75rem; background: #fff; border: 1px solid #e5e7eb; padding: 1rem; transition: .15s; }
.cat-card:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(13,122,111,.12); }
.cat-card i { font-size: 1.5rem; color: var(--brand); }
.feat-link { display: flex; gap: .5rem; align-items: center; padding: .55rem .75rem; border: 1px solid #e5e7eb; border-radius: .5rem; background: #fff; color: #1f2937; text-decoration: none; height: 100%; }
.feat-link:hover { border-color: var(--brand); color: var(--brand); }
.feat-link .badge { font-weight: 500; }
.patient-bar { background: #fff; border: 1px solid #e5e7eb; border-radius: .75rem; padding: .8rem 1rem; margin-bottom: 1rem; }
.patient-bar .nm { font-weight: 700; font-size: 1.05rem; }
.kv { color: #64748b; font-size: .78rem; }
.form-label { font-size: .78rem; color: #475569; margin-bottom: .2rem; font-weight: 500; }
.form-control, .form-select { font-size: .86rem; }
.bed { border-radius: .6rem; padding: .6rem; border: 1px solid #e5e7eb; background: #fff; font-size: .8rem; height: 100%; }
.bed.ISI { background: #fef2f2; border-color: #fecaca; }
.bed.KOSONG { background: #f0fdf4; border-color: #bbf7d0; }
.bed.DIBERSIHKAN, .bed.DIBOOKING, .bed.PERBAIKAN { background: #fffbeb; border-color: #fde68a; }
.empty { text-align: center; color: #94a3b8; padding: 2rem 1rem; }
.ts-wrapper.form-control, .ts-wrapper.form-select { padding: 0; }
.chart-box { position: relative; height: 260px; }
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media print {
  .sidebar, .topbar, .no-print, .alert { display: none !important; }
  .content { padding: 0; }
  body { background: #fff; }
}
