:root {
  --hospital: #087f8c;
  --hospital-deep: #075f68;
  --ink: #163238;
  --muted: #6d7e82;
  --line: #dce8e7;
}
html, body { min-height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(135deg, #eefaf7 0%, #f8fcfb 42%, #e7f3f5 100%);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 270px;
  background: linear-gradient(180deg, var(--hospital-deep), #0b7477);
  color: #fff;
  padding: 22px 18px;
  box-shadow: 12px 0 32px rgba(8, 95, 104, .16);
}
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 28px; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 8px; background: #fff; color: var(--hospital-deep); font-weight: 800; }
.brand small { display: block; opacity: .78; }
.menu { display: grid; gap: 6px; }
.menu a { color: #eafffb; text-decoration: none; padding: 11px 12px; border-radius: 8px; }
.menu a:hover { background: rgba(255,255,255,.13); }
.app-main { margin-left: 270px; min-height: 100vh; }
.login-main { margin-left: 0; display: grid; place-items: center; }
.topbar { min-height: 92px; background: rgba(255,255,255,.86); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 18px 28px; backdrop-filter: blur(12px); }
.topbar h1 { margin: 0; font-size: 24px; font-weight: 750; }
.topbar p { margin: 4px 0 0; color: var(--muted); }
.content-shell { padding: 24px 28px; }
.panel { background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 8px; padding: 18px; box-shadow: 0 18px 45px rgba(19, 87, 93, .08); }
.metric-grid { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 14px; }
.metric { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.metric span { color: var(--muted); font-size: 13px; }
.metric strong { display: block; font-size: 30px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 16px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.table { margin-bottom: 0; }
.btn-primary { background: var(--hospital); border-color: var(--hospital); }
.btn-primary:hover { background: var(--hospital-deep); border-color: var(--hospital-deep); }
.login-card { width: min(440px, calc(100vw - 28px)); background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 28px; box-shadow: 0 24px 70px rgba(8, 95, 104, .15); }
.toast-host { position: fixed; right: 18px; bottom: 18px; z-index: 2000; display: grid; gap: 8px; }
.app-toast { background: #0f3237; color: #fff; padding: 12px 14px; border-radius: 8px; min-width: 240px; }
.select2-container { min-width: 220px; }
@media (max-width: 900px) {
  .app-sidebar { position: static; width: auto; }
  .app-main { margin-left: 0; }
  .topbar { align-items: flex-start; gap: 12px; flex-direction: column; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}
