@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #2563eb;
  --primary-light: #eff6ff;
  --primary-dark: #1d4ed8;
  --accent: #f59e0b;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;

  /* Status Colors — new scheme:
     Hijau  = Kosong        Merah  = Sedang Tindakan
     Amber  = Siap Tindakan Jingga = Waiting
     Biru   = Reservasi     Putih  = Rusak
  */
  --status-green: #22c55e;
  /* kosong */
  --status-green-bg: #f0fdf4;
  --status-green-border: #86efac;

  --status-red: #ef4444;
  /* sedang_tindakan */
  --status-red-bg: #fee2e2;
  --status-red-border: #fca5a5;

  --status-amber: #f59e0b;
  /* siap_tindakan */
  --status-amber-bg: #fef3c7;
  --status-amber-border: #fde68a;

  --status-orange: #f97316;
  /* waiting */
  --status-orange-bg: #ffedd5;
  --status-orange-border: #fdba74;

  --status-blue: #3b82f6;
  /* reservasi */
  --status-blue-bg: #dbeafe;
  --status-blue-border: #93c5fd;

  --status-white: #ffffff;
  /* rusak */
  --status-white-bg: #f8fafc;
  --status-white-border: #cbd5e1;

  --status-gray: #64748b;
  --status-gray-bg: #f1f5f9;
  --status-gray-border: #cbd5e1;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.02);
  --shadow-hover: 0 20px 40px rgba(15, 23, 42, 0.08), 0 4px 6px rgba(15, 23, 42, 0.03);
  --shadow-modal: 0 25px 60px -15px rgba(15, 23, 42, 0.25);

  --sidebar-width: 260px;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* App Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling (Matches Reference Image) */
.sidebar {
  width: var(--sidebar-width);
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 32px 20px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px 32px;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.brand-info h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-main);
  line-height: 1.2;
}

.brand-info span {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--primary);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  padding: 16px 14px 6px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
  transition: var(--transition);
}

.nav-link:hover {
  background-color: #f1f5f9;
  color: var(--text-main);
}

.nav-link.active {
  background-color: var(--primary-light);
  color: var(--primary);
}

.nav-link svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  transition: var(--transition);
}

.nav-link.active svg {
  stroke: var(--primary);
}

/* Sidebar Footer Clinic Card */
.sidebar-clinic-card {
  background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: center;
  margin-top: auto;
  position: relative;
  overflow: hidden;
}

.sidebar-clinic-card .card-icon {
  width: 48px;
  height: 48px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.sidebar-clinic-card h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.sidebar-clinic-card p {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.btn-sidebar-action {
  display: inline-block;
  width: 100%;
  padding: 8px 12px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
  transition: var(--transition);
}

.btn-sidebar-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(245, 158, 11, 0.4);
}

/* Main Content Area */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 32px 40px;
  max-width: 1600px;
}

/* Topbar Header */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.page-title-group h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.page-title-group p {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.live-sync-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #10b981;
  border-radius: 50%;
  animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    opacity: 0.8;
  }

  50% {
    transform: scale(2.2);
    opacity: 0;
  }

  100% {
    transform: scale(0.95);
    opacity: 0;
  }
}

/* User Profile Badge */
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 6px 16px 6px 8px;
  border-radius: 40px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.user-profile-badge:hover {
  box-shadow: var(--shadow-card);
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.user-meta .name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.user-meta .role {
  font-size: 11px;
  color: var(--text-light);
  text-transform: capitalize;
}

.btn-logout {
  background: #f1f5f9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

.btn-logout:hover {
  background: #fee2e2;
  color: #ef4444;
}

/* KPI Summary Cards Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.kpi-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-card.total .kpi-icon-wrap {
  background: #eff6ff;
  color: #2563eb;
}

.kpi-card.kosong .kpi-icon-wrap {
  background: #dcfce7;
  color: #16a34a;
}

/* hijau */
.kpi-card.sedang .kpi-icon-wrap {
  background: #fee2e2;
  color: #ef4444;
}

/* merah */
.kpi-card.siap .kpi-icon-wrap {
  background: #fef3c7;
  color: #d97706;
}

/* amber */
.kpi-card.reservasi .kpi-icon-wrap {
  background: #dbeafe;
  color: #3b82f6;
}

/* biru */
.kpi-card.waiting .kpi-icon-wrap {
  background: #ffedd5;
  color: #f97316;
}

/* jingga */
.kpi-card.rusak .kpi-icon-wrap {
  background: #f8fafc;
  color: #94a3b8;
  border: 1px solid #cbd5e1;
}

/* putih */

.kpi-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
}

.kpi-subtext {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Legend Pills */
.legend-bar {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.legend-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  user-select: none;
}

.legend-chip:hover {
  transform: translateY(-1px);
}

.legend-chip .chip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Color Legend Badges — new scheme */

/* Hijau = Kosong */
.badge-green,
.legend-chip.chip-green {
  background: var(--status-green-bg);
  color: #15803d;
  border-color: var(--status-green-border);
}

.legend-chip.chip-green .chip-dot {
  background: var(--status-green);
}

/* Merah = Sedang Tindakan */
.badge-red,
.legend-chip.chip-red {
  background: var(--status-red-bg);
  color: #b91c1c;
  border-color: var(--status-red-border);
}

.legend-chip.chip-red .chip-dot {
  background: var(--status-red);
}

/* Amber/Kuning = Siap Tindakan */
.badge-amber,
.legend-chip.chip-amber {
  background: var(--status-amber-bg);
  color: #b45309;
  border-color: var(--status-amber-border);
}

.legend-chip.chip-amber .chip-dot {
  background: var(--status-amber);
}

/* Jingga = Waiting */
.badge-orange,
.legend-chip.chip-orange {
  background: var(--status-orange-bg);
  color: #c2410c;
  border-color: var(--status-orange-border);
}

.legend-chip.chip-orange .chip-dot {
  background: var(--status-orange);
}

/* Biru = Reservasi */
.badge-blue,
.legend-chip.chip-blue {
  background: var(--status-blue-bg);
  color: #1d4ed8;
  border-color: var(--status-blue-border);
}

.legend-chip.chip-blue .chip-dot {
  background: var(--status-blue);
}

/* Putih = Rusak/Out of Service */
.badge-white,
.legend-chip.chip-white {
  background: #ffffff;
  color: #64748b;
  border-color: var(--status-white-border);
}

.legend-chip.chip-white .chip-dot {
  background: #cbd5e1;
  border: 1.5px solid #94a3b8;
}

/* Gray kept for any legacy usage */
.badge-gray,
.legend-chip.chip-gray {
  background: var(--status-gray-bg);
  color: #475569;
  border-color: var(--status-gray-border);
}

.legend-chip.chip-gray .chip-dot {
  background: var(--status-gray);
}

.legend-chip.active-filter {
  box-shadow: 0 0 0 2px var(--primary);
  font-weight: 700;
}

/* Modal Styling — Unified Clinical Design System */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.modal-backdrop.open {
  display: flex;
  opacity: 1;
}

.modal-box,
.modal-dialog {
  background: #ffffff;
  width: 100%;
  max-width: 560px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-box,
.modal-backdrop.open .modal-dialog {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 16px 22px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.modal-header h3,
.modal-header h4 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.btn-close-modal,
.modal-header .btn-close {
  background: #f1f5f9;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 15px;
  line-height: 1;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.btn-close-modal:hover,
.modal-header .btn-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.modal-body {
  padding: 20px 22px;
  max-height: 76vh;
  overflow-y: auto;
  background: #ffffff;
}

.modal-footer {
  padding: 14px 22px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

/* Forms */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-control,
.form-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-main);
  background-color: #ffffff;
  transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.btn-outline {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.btn-danger-outline {
  background: #fff;
  border: 1px solid #fca5a5;
  color: #dc2626;
}

.btn-danger-outline:hover {
  background: #fee2e2;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  box-shadow: var(--shadow-modal);
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  font-size: 13px;
  font-weight: 600;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success {
  border-left-color: #10b981;
}

.toast.error {
  border-left-color: #ef4444;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* =========================================================
   MOBILE RESPONSIVE NAVIGATION & SYSTEM STYLING
   ========================================================= */

/* Mobile Topbar (hidden on desktop) */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  z-index: 50;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.btn-mobile-menu {
  display: none !important;
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-brand-icon {
  width: 32px;
  height: 32px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.mobile-brand-title {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.3px;
  color: var(--text-main);
}

.btn-mobile-logout {
  width: 38px;
  height: 38px;
  background: #fee2e2;
  color: #ef4444;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

/* Sidebar Backdrop Overlay */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.sidebar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.btn-sidebar-close {
  display: none;
  background: #f1f5f9;
  border: none;
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-left: auto;
}

/* Mobile Bottom Navigation (hidden on desktop, static at bottom of page flow on mobile) */
.mobile-bottom-nav {
  display: none;
  position: static;
  width: 100%;
  height: auto;
  min-height: 60px;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  align-items: center;
  justify-content: space-around;
  padding: 8px 6px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
  margin-top: auto;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 2px;
  border-radius: 8px;
  transition: all 0.2s;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-align: center;
}

.bottom-nav-item span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  font-size: 10.5px;
}

.bottom-nav-item svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}

.bottom-nav-item.active {
  color: var(--primary);
  background: #eff6ff;
}

/* Medium Screens (1024px to 901px) */
@media (max-width: 1150px) and (min-width: 901px) {
  .sidebar {
    width: 80px;
    padding: 24px 10px;
  }

  .brand-info,
  .nav-link span,
  .nav-category,
  .sidebar-clinic-card {
    display: none;
  }

  .brand-wrapper {
    padding: 0 0 24px 0;
    justify-content: center;
  }

  .nav-link {
    justify-content: center;
    padding: 14px;
  }

  .main-content {
    margin-left: 80px;
    padding: 24px 20px;
  }
}

/* Mobile Screens (<= 900px) */
@media (max-width: 900px) {
  .app-container {
    flex-direction: column !important;
    min-height: 100vh !important;
  }

  .mobile-topbar {
    display: flex;
  }

  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: 60px !important;
    min-height: 60px !important;
    margin-top: 0 !important;
    border-top: 1px solid var(--border-color) !important;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08) !important;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px)) !important;
    background: #ffffff !important;
    z-index: 95 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .checkin-primary-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .sidebar-backdrop {
    display: block;
  }

  .btn-sidebar-close {
    display: flex;
  }

  /* Off-canvas Mobile Sidebar */
  .sidebar {
    width: 280px !important;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .brand-info,
  .nav-link span,
  .nav-category,
  .sidebar-clinic-card {
    display: flex !important;
  }

  .brand-wrapper {
    display: flex !important;
    justify-content: flex-start !important;
  }

  .nav-link {
    justify-content: flex-start !important;
    padding: 12px 16px !important;
  }

  /* Main Content Area */
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    padding: 76px 14px calc(85px + env(safe-area-inset-bottom, 15px)) !important;
    flex: 1 0 auto !important;
  }

  /* Topbar on mobile */
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 16px;
  }

  .topbar .user-profile-badge {
    display: none;
    /* Handled in mobile-topbar */
  }

  .page-title-group h1 {
    font-size: 20px;
  }

  .page-title-group p {
    font-size: 12px;
  }

  .topbar-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }

  .digital-clock-pill {
    width: 100%;
    justify-content: space-between;
    padding: 6px 12px;
    font-size: 11px;
  }

  .live-sync-pill {
    align-self: flex-start;
  }

  /* KPI Grid on Mobile: 2 Columns Grid, Total spans 2 */
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    margin-bottom: 18px !important;
  }

  .kpi-card.total {
    grid-column: span 2;
  }

  .kpi-card {
    padding: 12px 14px !important;
    border-radius: 16px !important;
  }

  .kpi-value {
    font-size: 22px !important;
  }

  .kpi-subtext {
    font-size: 10px !important;
  }

  /* Legend bar horizontal scroll */
  .legend-bar {
    padding: 12px 14px;
    border-radius: 16px;
    margin-bottom: 18px;
  }

  .legend-title {
    font-size: 11.5px;
    margin-bottom: 8px;
  }

  .legend-items {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .legend-chip {
    flex-shrink: 0;
    font-size: 11px;
    padding: 6px 12px;
    white-space: nowrap;
  }

  /* Modal Mobile Bottom Sheet */
  .modal-box {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 24px 24px 0 0 !important;
    margin-top: auto !important;
    max-height: 88vh !important;
    overflow-y: auto !important;
    padding: 20px 18px !important;
  }

  .modal-backdrop.open {
    align-items: flex-end !important;
  }

  .form-row {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
}

/* ============================================================
   BED ALERT POPUP - Status Change Notifications
   ============================================================ */
#bedAlertContainer {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 360px;
  width: calc(100vw - 40px);
}

.bed-alert-popup {
  pointer-events: auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.2), 0 4px 16px rgba(15, 23, 42, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: alertSlideIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  border: 1px solid var(--border-color);
}

.bed-alert-popup.alert-exit {
  animation: alertSlideOut 0.35s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes alertSlideIn {
  from {
    opacity: 0;
    transform: translateX(120%) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes alertSlideOut {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateX(120%) scale(0.92);
  }
}

.bed-alert-inner {
  display: flex;
  gap: 0;
}

.bed-alert-accent {
  width: 5px;
  flex-shrink: 0;
  border-radius: 0;
}

.bed-alert-accent.accent-kosong {
  background: linear-gradient(180deg, #94a3b8, #64748b);
}

.bed-alert-accent.accent-siap,
.bed-alert-accent.accent-waiting {
  background: linear-gradient(180deg, #fb923c, #ea580c);
}

.bed-alert-accent.accent-sedang {
  background: linear-gradient(180deg, #34d399, #10b981);
}

.bed-alert-body {
  flex: 1;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.bed-alert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bed-alert-title {
  font-weight: 700;
  font-size: 13px;
  color: #0f172a;
  flex: 1;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 6px;
}

.bed-alert-close {
  background: #f1f5f9;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 12px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s ease;
  font-family: inherit;
}

.bed-alert-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.bed-alert-desc {
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
  padding-left: 0;
}

.bed-alert-actions {
  display: flex;
  gap: 8px;
  padding-left: 0;
  margin-top: 4px;
}

.bed-alert-btn {
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  font-family: inherit;
}

.bed-alert-btn.btn-primary-sm {
  background: var(--primary);
  color: #ffffff;
}

.bed-alert-btn.btn-primary-sm:hover {
  background: var(--primary-dark);
}

.bed-alert-btn.btn-ghost-sm {
  background: #f1f5f9;
  color: var(--text-muted);
}

.bed-alert-btn.btn-ghost-sm:hover {
  background: #e2e8f0;
}

.bed-alert-progress {
  height: 3px;
  background: var(--border-color);
  overflow: hidden;
}

.bed-alert-progress-bar {
  height: 100%;
  animation: alertProgressDrain linear forwards;
  width: 100%;
}

.bed-alert-progress-bar.bar-kosong {
  background: #94a3b8;
  animation-duration: 7s;
}

.bed-alert-progress-bar.bar-siap,
.bed-alert-progress-bar.bar-waiting {
  background: #f97316;
  animation-duration: 8s;
}

.bed-alert-progress-bar.bar-sedang {
  background: #10b981;
  animation-duration: 8s;
}

@keyframes alertProgressDrain {
  from {
    width: 100%;
  }

  to {
    width: 0%;
  }
}

/* ============================================================
   DOCTOR CHECKLIST MODAL
   ============================================================ */
.checklist-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 8000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.checklist-modal-backdrop.open {
  display: flex;
}

.checklist-modal-box {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 40px 80px rgba(15, 23, 42, 0.22);
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  animation: modalPop 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.checklist-modal-header {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
}

.checklist-modal-header-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.checklist-modal-header-text h3 {
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
}

.checklist-modal-header-text p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  margin-top: 2px;
}

.checklist-modal-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  cursor: pointer;
  font-size: 15px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  font-family: inherit;
}

.checklist-modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.checklist-modal-body {
  padding: 20px 24px;
}

.checklist-bed-info {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.checklist-bed-info-badge {
  width: 40px;
  height: 40px;
  background: #ef4444;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.checklist-bed-info-text .bed-code-text {
  font-weight: 800;
  font-size: 14px;
  color: var(--text-main);
}

.checklist-bed-info-text .bed-meta-text {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

.checklist-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: #f8fafc;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.checklist-item:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.checklist-item.checked {
  background: #f0fdf4;
  border-color: #86efac;
}

.checklist-item input[type="checkbox"] {
  display: none;
}

.checklist-custom-check {
  width: 22px;
  height: 22px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  background: #ffffff;
  position: relative;
}

.checklist-item.checked .checklist-custom-check {
  background: #22c55e;
  border-color: #22c55e;
}

.checklist-custom-check::after {
  content: '';
  display: none;
  width: 5px;
  height: 9px;
  border: 2px solid #ffffff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

.checklist-item.checked .checklist-custom-check::after {
  display: block;
}

.checklist-item-text {
  flex: 1;
}

.checklist-item-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.3;
  transition: all 0.2s;
}

.checklist-item.checked .checklist-item-label {
  color: #166534;
  text-decoration: line-through;
}

.checklist-item-sublabel {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.checklist-progress-wrap {
  margin-bottom: 18px;
}

.checklist-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.checklist-progress-bar {
  height: 8px;
  background: #f1f5f9;
  border-radius: 100px;
  overflow: hidden;
}

.checklist-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  border-radius: 100px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.checklist-modal-footer {
  padding: 0 24px 20px;
  display: flex;
  gap: 10px;
}

.checklist-modal-footer .btn-full {
  flex: 1;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.btn-full.btn-confirm {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
}

.btn-full.btn-confirm:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-full.btn-confirm:disabled {
  background: #cbd5e1;
  color: #94a3b8;
  cursor: not-allowed;
  transform: none;
}

.btn-full.btn-cancel-check {
  background: #f1f5f9;
  color: var(--text-muted);
}

.btn-full.btn-cancel-check:hover {
  background: #e2e8f0;
}

@media (max-width: 900px) {
  #bedAlertContainer {
    top: 76px;
    right: 12px;
    left: 12px;
    max-width: 100%;
    width: auto;
  }

  .checklist-modal-box {
    border-radius: 24px 24px 0 0;
    max-height: 88vh;
    overflow-y: auto;
  }

  .checklist-modal-backdrop.open {
    align-items: flex-end;
    padding: 0;
  }
}

/* ========================================================
   BED MANAGEMENT TOOLBAR (RESPONSIVE & CLEAN)
   ======================================================== */
.bed-manage-toolbar {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 18px 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.bed-toolbar-filters {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  flex: 1 1 auto;
}

.bed-filter-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bed-filter-label {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  margin: 0;
}

.bed-filter-select {
  width: 200px;
  min-width: 170px;
}

.bed-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bed-search-wrapper {
  position: relative;
}

.bed-search-control {
  width: 260px;
}

.btn-add-room-action {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 13px;
  white-space: nowrap;
}

@media (max-width: 992px) {
  .bed-manage-toolbar {
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .bed-toolbar-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
  }

  .bed-filter-field {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
  }

  .bed-filter-label {
    font-size: 12.5px;
  }

  .bed-filter-select {
    width: 100% !important;
    min-width: 0 !important;
  }

  .bed-toolbar-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
  }

  .bed-search-wrapper {
    width: 100%;
  }

  .bed-search-control {
    width: 100% !important;
  }

  .btn-add-room-action {
    width: 100% !important;
    justify-content: center;
    padding: 11px 16px;
    font-size: 13.5px;
  }
}

@media (max-width: 580px) {
  .bed-toolbar-filters {
    grid-template-columns: 1fr;
  }
}

/* ========================================================
   USER MANAGEMENT PAGE STYLES
   ======================================================== */
.user-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.user-kpi-grid .kpi-card {
  min-width: 0;
  box-sizing: border-box;
}

.users-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.users-toolbar {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.users-toolbar-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 3px;
}

.users-toolbar-subtitle {
  font-size: 12.5px;
  color: var(--text-muted);
}

.users-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.users-search-wrapper {
  position: relative;
}

.users-search-control {
  width: 250px;
}

.btn-add-user-action {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 13px;
  white-space: nowrap;
}

.users-table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  box-sizing: border-box;
}

.users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  min-width: 620px;
}

@media (max-width: 992px) {
  .user-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .user-kpi-grid .kpi-card.total {
    grid-column: span 1 !important;
  }

  .users-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .users-toolbar-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 10px;
  }

  .users-search-wrapper,
  .users-search-control {
    width: 100% !important;
  }

  .btn-add-user-action {
    width: 100% !important;
    justify-content: center;
    padding: 11px 16px;
    font-size: 13.5px;
  }
}

@media (max-width: 600px) {
  .users-card {
    padding: 16px 14px;
  }

  .user-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .user-kpi-grid .kpi-card {
    padding: 12px 10px !important;
  }

  .user-kpi-grid .kpi-header {
    gap: 4px !important;
    margin-bottom: 8px !important;
  }

  .user-kpi-grid .kpi-icon-wrap {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }

  .user-kpi-grid .kpi-icon-wrap svg {
    width: 16px !important;
    height: 16px !important;
  }

  .user-kpi-grid .kpi-value {
    font-size: 19px !important;
    line-height: 1.1 !important;
  }

  .user-kpi-grid .kpi-label {
    font-size: 10.5px !important;
    line-height: 1.2 !important;
    word-break: break-word !important;
  }

  .user-kpi-grid .kpi-subtext {
    font-size: 9.5px !important;
    line-height: 1.2 !important;
    margin-top: 4px !important;
    word-break: break-word !important;
  }
}

/* ========================================================
   ROOM-GROUPED BED MANAGEMENT PAGE STYLES
   ======================================================== */
.rooms-manage-container {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 24px;
}

.room-manage-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: var(--transition);
}

.room-manage-card:hover {
  box-shadow: var(--shadow-hover);
}

.room-manage-header {
  padding: 18px 24px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.room-header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.room-avatar-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.room-header-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.room-header-title .room-code-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
  background: #f1f5f9;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.room-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.room-header-right .bed-status-pill {
  width: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  margin-bottom: 0 !important;
  padding: 4px 10px !important;
}

.room-manage-table .bed-status-pill {
  width: auto !important;
  display: inline-block !important;
  margin-bottom: 0 !important;
}

.room-bed-summary-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.room-manage-table-wrap {
  overflow-x: auto;
  width: 100%;
}

.room-manage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.room-manage-table thead tr {
  background: #f8fafc;
  border-bottom: 1.5px solid var(--border-color);
  text-align: left;
}

.room-manage-table th {
  padding: 12px 18px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.room-manage-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.room-manage-table tbody tr:hover {
  background-color: #fafbfc;
}

.room-empty-state {
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
  background: #fbfcfe;
}

.room-empty-state svg {
  margin-bottom: 8px;
  color: var(--text-light);
}

.room-manage-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px dashed var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-add-bed-to-room {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: #f0f7ff;
  border: 1.5px dashed #3b82f6;
  border-radius: 12px;
  color: #1d4ed8;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.btn-add-bed-to-room:hover {
  background: #dbeafe;
  border-color: #2563eb;
  color: #1e40af;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.15);
}

.btn-add-bed-to-room:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .room-manage-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .room-header-right {
    width: 100%;
    justify-content: space-between;
  }

  .room-manage-footer {
    padding: 12px 16px;
  }

  .btn-add-bed-to-room {
    font-size: 13px;
    padding: 10px 16px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   DOCTOR CHECK-IN/OUT PANEL — Sidebar
   ═══════════════════════════════════════════════════════════════ */
.doctor-checkin-panel {
  margin: 0 12px 12px;
  padding: 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.checkin-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.checkin-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.checkin-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.3); }
}

.waiting-notif-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  cursor: pointer;
  animation: notif-bounce 1.5s ease-in-out infinite;
  box-shadow: 0 2px 8px rgba(249,115,22,0.5);
}

@keyframes notif-bounce {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-3px); }
  60% { transform: translateY(0); }
}

.checkin-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-checkin {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  border: none;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
}

.btn-checkin:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn-checkin:active {
  transform: translateY(0);
}

.btn-checkin-in {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 2px 8px rgba(34,197,94,0.4);
}

.btn-checkin-break {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  box-shadow: 0 2px 8px rgba(245,158,11,0.4);
}

.btn-checkin-out {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 2px 8px rgba(239,68,68,0.4);
}

/* ═══════════════════════════════════════════════════════════════
   DOCTOR ROOM / DESK DENAH — Dashboard section
   ═══════════════════════════════════════════════════════════════ */
.doctor-rooms-section {
  padding: 24px 28px;
  border-top: 1px solid var(--border-light);
}

.doctor-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}

.doctor-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.doctor-section-title h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}

.doctor-rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* Doctor Room Card */
.doctor-room-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s ease;
}

.doctor-room-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.09);
}

.doctor-room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

.doctor-room-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.doctor-room-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.doctor-room-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.doctor-room-code {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

/* Doctor Desks List */
.doctor-desks-list {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Doctor Desk Card */
.doctor-desk-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid transparent;
  transition: all 0.25s ease;
  position: relative;
  cursor: default;
}

.doctor-desk-card.status-tidak_ditempat {
  background: #FEF2F2;
  border-color: #FECACA;
}

.doctor-desk-card.status-ditempat {
  background: #F8FAFC;
  border-color: #E2E8F0;
}

.doctor-desk-card.status-sedang_tindakan {
  background: #F0FDF4;
  border-color: #86EFAC;
  animation: desk-pulse-green 3s ease-in-out infinite;
}

@keyframes desk-pulse-green {
  0%, 100% { border-color: #86EFAC; box-shadow: 0 0 0 0 rgba(34,197,94,0); }
  50% { border-color: #22C55E; box-shadow: 0 0 0 6px rgba(34,197,94,0.08); }
}

.desk-status-indicator {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.status-tidak_ditempat .desk-status-indicator {
  background: #FEE2E2;
}

.status-ditempat .desk-status-indicator {
  background: #F1F5F9;
}

.status-sedang_tindakan .desk-status-indicator {
  background: #DCFCE7;
}

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

.desk-code {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.desk-doctor-name {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.desk-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.desk-status-badge.tidak_ditempat {
  background: #FEE2E2;
  color: #DC2626;
}

.desk-status-badge.ditempat {
  background: #F1F5F9;
  color: #475569;
}

.desk-status-badge.sedang_tindakan {
  background: #DCFCE7;
  color: #16A34A;
}

/* Doctor Action Buttons on desk card */
.desk-action-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.desk-action-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.desk-action-btn.take-task {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}

.desk-action-btn.complete-task {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 2px 8px rgba(34,197,94,0.3);
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR DOCTOR ROOMS & DESKS (LIVE STATUS)
   ═══════════════════════════════════════════════════════════════ */
.sidebar-doctor-rooms-list {
  padding: 0 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sidebar-dr-room {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.sidebar-dr-room:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.sidebar-dr-room-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px dashed #e2e8f0;
}

.sidebar-dr-room-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: #1e293b;
}

.sidebar-dr-room-badge {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 6px;
}

.sidebar-dr-desks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-dr-desk {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 6px 8px;
  transition: all 0.2s ease;
}

.sidebar-dr-desk.status-sedang_tindakan {
  background: #f0fdf4;
  border-color: #86efac;
}

.sidebar-dr-desk.status-ditempat {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.sidebar-dr-desk.status-tidak_ditempat {
  background: #fef2f2;
  border-color: #fecaca;
}

.sidebar-dr-desk-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
}

.sidebar-dr-desk-code {
  font-size: 10.5px;
  font-weight: 800;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 1px 5px;
  border-radius: 4px;
}

.sidebar-dr-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 12px;
  letter-spacing: 0.1px;
}

.sidebar-dr-status-pill.status-sedang_tindakan {
  background: #dcfce7;
  color: #15803d;
}

.sidebar-dr-status-pill.status-ditempat {
  background: #f1f5f9;
  color: #475569;
}

.sidebar-dr-status-pill.status-tidak_ditempat {
  background: #fee2e2;
  color: #b91c1c;
}

.sidebar-dr-status-pill .dot-live {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.sidebar-dr-status-pill.status-sedang_tindakan .dot-live {
  background: #22c55e;
  animation: pulse-sidebar-green 1.8s infinite;
}

.sidebar-dr-status-pill.status-ditempat .dot-live {
  background: #94a3b8;
}

.sidebar-dr-status-pill.status-tidak_ditempat .dot-live {
  background: #ef4444;
}

@keyframes pulse-sidebar-green {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.6; }
}

.sidebar-dr-doctor-name {
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-dr-patient-row {
  font-size: 9.5px;
  color: #15803d;
  font-weight: 600;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-dr-actions {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.sidebar-dr-btn {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1.2;
}

.sidebar-dr-btn.btn-dr-consult {
  background: #16a34a;
  color: #ffffff;
}

.sidebar-dr-btn.btn-dr-finish {
  background: #0284c7;
  color: #ffffff;
}

.sidebar-dr-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   WAITING BEDS NOTIFICATION PANEL — Doctor view
   ═══════════════════════════════════════════════════════════════ */
.waiting-beds-panel {
  margin: 0 28px 20px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 2px solid #fdba74;
  border-radius: 16px;
  padding: 16px 20px;
  display: none;
}

.waiting-beds-panel.visible {
  display: block;
  animation: slide-in-top 0.4s ease;
}

@keyframes slide-in-top {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.waiting-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.waiting-panel-header h3 {
  font-size: 14px;
  font-weight: 700;
  color: #9a3412;
  margin: 0;
}

.waiting-beds-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
}

.waiting-bed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #fed7aa;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.waiting-bed-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #ffedd5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.waiting-bed-info {
  flex: 1;
  min-width: 0;
}

.waiting-bed-code {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.waiting-bed-patient {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   SET WAITING BUTTON — on bed card for receptionist
   ═══════════════════════════════════════════════════════════════ */
.btn-set-waiting {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(249,115,22,0.3);
}

.btn-set-waiting:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

/* ═══════════════════════════════════════════════════════════════
   TASK MODAL — Unified Clinical Theme
   ═══════════════════════════════════════════════════════════════ */
.task-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.task-modal-overlay.open {
  display: flex;
  animation: modal-fade-in 0.2s ease;
}

.task-modal-box {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  animation: modal-slide-up 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-slide-up {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.task-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
}

.task-modal-title {
  font-size: 15.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.task-modal-close {
  background: #f1f5f9;
  border: none;
  color: #64748b;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  flex-shrink: 0;
}

.task-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.task-modal-body {
  padding: 20px 22px;
  background: #ffffff;
}

.task-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.task-info-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
}

.task-info-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #64748b;
  margin-bottom: 2px;
}

.task-info-value {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.task-checklist {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.task-checklist-title {
  font-size: 12px;
  font-weight: 700;
  color: #16a34a;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.task-checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-main);
  border-bottom: 1px solid rgba(134,239,172,0.4);
}

.task-checklist-item:last-child {
  border-bottom: none;
}

.task-checklist-item input[type="checkbox"] {
  accent-color: #22c55e;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.task-modal-actions {
  display: flex;
  gap: 10px;
}

.task-modal-actions .btn {
  flex: 1;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════
   UTILITY ADDITIONS — Missing helpers
   ═══════════════════════════════════════════════════════════════ */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-icon-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border-color);
  background: #ffffff;
  color: var(--text-main);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-icon-sm:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.btn-icon-sm.btn-danger {
  border-color: #fecaca;
  background: #fee2e2;
  color: #dc2626;
}

.btn-icon-sm.btn-danger:hover {
  background: #fca5a5;
  color: #b91c1c;
}

/* ═══════════════════════════════════════════════════════════════
   CLINICAL STATUS DOTS & HARMONIZED BADGES (NO EMOJIS)
   ═══════════════════════════════════════════════════════════════ */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  vertical-align: middle;
}

.status-dot.dot-green {
  background-color: #22c55e;
  box-shadow: 0 0 0 2.5px rgba(34, 197, 94, 0.2);
}

.status-dot.dot-red {
  background-color: #ef4444;
  box-shadow: 0 0 0 2.5px rgba(239, 68, 68, 0.2);
}

.status-dot.dot-amber {
  background-color: #f59e0b;
  box-shadow: 0 0 0 2.5px rgba(245, 158, 11, 0.2);
}

.status-dot.dot-orange {
  background-color: #f97316;
  box-shadow: 0 0 0 2.5px rgba(249, 115, 22, 0.2);
}

.status-dot.dot-blue {
  background-color: #3b82f6;
  box-shadow: 0 0 0 2.5px rgba(59, 130, 246, 0.2);
}

.status-dot.dot-slate {
  background-color: #94a3b8;
  box-shadow: 0 0 0 2.5px rgba(148, 163, 184, 0.2);
}

.status-dot.pulse {
  animation: dot-pulse-anim 2s infinite ease-in-out;
}

@keyframes dot-pulse-anim {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.desk-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid transparent;
  line-height: 1.2;
}

.desk-status-pill.status-ditempat {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

.desk-status-pill.status-sedang_tindakan {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}

.desk-status-pill.status-tidak_ditempat {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

/* ── Aura Global Confirmation Modal ─────────────────────────────── */
.aura-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.aura-confirm-overlay.open {
  opacity: 1;
  visibility: visible;
}

.aura-confirm-box {
  background: #ffffff;
  width: 100%;
  max-width: 440px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  transform: scale(0.97) translateY(10px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.aura-confirm-overlay.open .aura-confirm-box {
  transform: scale(1) translateY(0);
}

.aura-confirm-header {
  padding: 16px 22px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.aura-confirm-icon {
  display: none;
}

.aura-confirm-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.aura-confirm-subtitle {
  display: none;
}

.aura-confirm-close {
  margin-left: auto;
  background: #f1f5f9;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all 0.18s ease;
}

.aura-confirm-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.aura-confirm-body {
  padding: 20px 22px;
  background: #ffffff;
}

.aura-confirm-footer {
  padding: 14px 22px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   Aura Aesthetic Clinic - Premium Page Loader & Ready Transition
   ========================================================================== */
.aura-page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  background: radial-gradient(circle at 50% 38%, rgba(243, 248, 255, 0.98) 0%, rgba(255, 255, 255, 1) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              visibility 0.4s ease, 
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  user-select: none;
  pointer-events: all;
}

.aura-page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.02);
}

.aura-loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px;
  max-width: 380px;
  width: 90%;
  animation: auraLoaderContentIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes auraLoaderContentIn {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.aura-loader-brand {
  position: relative;
  margin-bottom: 22px;
}

.aura-loader-logo-ring {
  position: relative;
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aura-loader-pulse-glow {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22) 0%, rgba(99, 102, 241, 0.1) 50%, transparent 70%);
  animation: auraPulseGlow 2.2s ease-in-out infinite;
}

@keyframes auraPulseGlow {
  0%, 100% {
    transform: scale(0.92);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.18);
    opacity: 1;
  }
}

.aura-loader-spinner {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: auraSpinnerRotate 1.4s linear infinite;
}

@keyframes auraSpinnerRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.aura-spinner-track {
  stroke: rgba(226, 232, 240, 0.75);
}

.aura-spinner-path {
  stroke: url(#auraLoaderGradient);
  stroke-linecap: round;
  stroke-dasharray: 90, 150;
  stroke-dashoffset: 0;
  animation: auraSpinnerDash 1.5s ease-in-out infinite;
}

@keyframes auraSpinnerDash {
  0% {
    stroke-dasharray: 1, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -35;
  }
  100% {
    stroke-dasharray: 90, 150;
    stroke-dashoffset: -124;
  }
}

.aura-loader-logo-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 14px;
  background: #ffffff;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.14), 0 2px 6px rgba(0,0,0,0.04);
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
  animation: auraLogoBreathe 2.2s ease-in-out infinite;
}

@keyframes auraLogoBreathe {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.aura-loader-info {
  margin-bottom: 20px;
}

.aura-loader-title {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #0f172a;
  margin-bottom: 5px;
}

.aura-loader-subtitle {
  font-size: 12.5px;
  font-weight: 600;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.aura-loader-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2563eb;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
  animation: auraDotPulse 1.2s ease-in-out infinite;
}

@keyframes auraDotPulse {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

.aura-loader-progress-track {
  width: 200px;
  height: 4px;
  background: rgba(226, 232, 240, 0.8);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

.aura-loader-progress-bar {
  height: 100%;
  width: 20%;
  background: linear-gradient(90deg, #2563eb 0%, #4f46e5 50%, #06b6d4 100%);
  border-radius: 10px;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

/* Dokter tidak memiliki fitur ubah status manual bed */
body.role-doctor:not(.role-admin) .bed-quick-palette,
body[data-role="doctor"]:not([data-role="admin"]) .bed-quick-palette {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* API Patient Lookup & Synchronization Styling */
.api-sync-indicator {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 6px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.2px;
  transition: all 0.2s ease;
}
.badge-api-active {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  box-shadow: 0 1px 2px rgba(6, 95, 70, 0.05);
}
.badge-api-manual {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.btn-api-lookup {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff !important;
  border: none;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.25);
  transition: all 0.18s ease;
  user-select: none;
}
.btn-api-lookup:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
  filter: brightness(1.05);
}
.btn-api-lookup:active {
  transform: translateY(0);
}
.btn-api-lookup.btn-api-connected {
  background: #0284c7;
}

.btn-manual-unlock {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.18s ease;
}
.btn-manual-unlock:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

/* History Pagination */
.pagination-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  user-select: none;
}
.pagination-btn:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}
.pagination-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
}
.pagination-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}