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

/* CSS Variables */
:root {
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 80px;
  
  /* Color Palette */
  --primary-teal: #00897B;
  --primary-teal-dark: #00695C;
  --primary-teal-light: #E0F2F1;
  --primary-teal-glow: rgba(0, 137, 123, 0.15);
  
  --dark-charcoal: #1C2333;
  --dark-charcoal-light: #263147;
  --dark-charcoal-dark: #121722;
  
  --clinical-bg: #F7F9FC;
  --clinical-white: #FFFFFF;
  
  --alert-red: #E53935;
  --alert-red-light: #FFEBEE;
  --alert-red-glow: rgba(229, 57, 53, 0.2);
  
  --warning-amber: #FFB300;
  --warning-amber-light: #FFF8E1;
  --warning-amber-glow: rgba(255, 179, 0, 0.2);
  
  --success-green: #4CAF50;
  --success-green-light: #E8F5E9;
  
  --maintenance-grey: #9E9E9E;
  --maintenance-grey-light: #F5F5F5;
  
  /* Text */
  --text-main: #2C3A4E;
  --text-secondary: #607289;
  --text-muted: #9EADC1;
  --border-color: #E2E8F0;
  
  /* Shadows & Radius */
  --card-shadow: 0 10px 30px -5px rgba(28, 35, 51, 0.04), 0 1px 3px rgba(28, 35, 51, 0.02);
  --hover-shadow: 0 15px 35px -5px rgba(0, 137, 123, 0.08), 0 5px 15px -2px rgba(28, 35, 51, 0.03);
  --border-radius-lg: 16px;
  --border-radius-md: 12px;
  --border-radius-sm: 8px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Styles */
body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--clinical-bg);
  color: var(--text-main);
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--dark-charcoal);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--clinical-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-teal);
}

/* Layout System */
.app-wrapper {
  display: flex;
  width: 100vw;
  min-height: 100vh;
}

/* Sidebar Styling */
aside.sidebar {
  width: var(--sidebar-width);
  background-color: var(--dark-charcoal);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1050;
  transition: var(--transition-smooth);
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
}

.sidebar-header {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--dark-charcoal-light);
}

.sidebar-logo {
  width: 38px;
  height: 38px;
  background-color: var(--primary-teal-glow);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--primary-teal);
  color: var(--primary-teal);
  font-size: 1.25rem;
  transition: var(--transition-smooth);
}

.logo-pulse {
  animation: logo-pulse 2s infinite ease-in-out;
}

@keyframes logo-pulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(0, 137, 123, 0.7)); }
  70% { transform: scale(1.05); filter: drop-shadow(0 0 6px rgba(0, 137, 123, 0.4)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(0, 137, 123, 0)); }
}

.sidebar-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 0;
  background: linear-gradient(135deg, #FFFFFF 0%, #E0F2F1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Sidebar Nav */
.sidebar-menu {
  flex: 1;
  padding: 20px 14px;
  overflow-y: auto;
}

.sidebar-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--border-radius-md);
  font-weight: 500;
  transition: var(--transition-smooth);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.nav-item-btn:hover {
  color: #FFFFFF;
  background-color: var(--dark-charcoal-light);
}

.nav-item-btn i {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
  margin-right: 12px;
}

.nav-item-btn.active {
  color: #FFFFFF;
  background-color: var(--primary-teal);
  box-shadow: 0 4px 15px var(--primary-teal-glow);
}

.nav-item-btn.active i {
  color: #FFFFFF;
}

/* Alert badge on sidebar menu */
.emergency-badge {
  background-color: var(--alert-red);
  color: #FFFFFF;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  box-shadow: 0 0 10px var(--alert-red-glow);
  animation: pulse-red-badge 1.5s infinite;
}

@keyframes pulse-red-badge {
  0% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(229, 57, 53, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0); }
}

/* Sidebar Footer (Admin Profile) */
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--dark-charcoal-light);
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--dark-charcoal-dark);
}

.admin-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--primary-teal);
  object-fit: cover;
}

.admin-info {
  flex: 1;
  overflow: hidden;
}

.admin-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.admin-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

.logout-btn {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: var(--transition-smooth);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.logout-btn:hover {
  color: var(--alert-red);
  transform: translateX(2px);
}

/* Main Content Area */
main.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

/* Header Navbar */
.top-navbar {
  height: 70px;
  background-color: var(--clinical-white);
  border-bottom: 1px solid var(--border-color);
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.01);
}

.toggle-sidebar-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: var(--transition-smooth);
  display: none; /* Desktop hidden */
}

.toggle-sidebar-btn:hover {
  background-color: var(--clinical-bg);
  color: var(--primary-teal);
}

.dashboard-date {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  background-color: var(--clinical-bg);
  padding: 6px 14px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
}

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

.action-icon-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  border: 1px solid var(--border-color);
}

.action-icon-btn:hover {
  background-color: var(--primary-teal-light);
  color: var(--primary-teal);
  border-color: transparent;
}

.action-icon-btn .badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background-color: var(--alert-red);
  border-radius: 50%;
  border: 1.5px solid var(--clinical-white);
}

/* Page Layout Panel */
.content-body {
  padding: 30px;
  flex: 1;
}

.dashboard-tab {
  display: none;
}

.dashboard-tab.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Cards Design */
.card-premium {
  background-color: var(--clinical-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
  overflow: hidden;
  height: 100%;
}

.card-premium:hover {
  transform: translateY(-4px);
  box-shadow: var(--hover-shadow);
  border-color: rgba(0, 137, 123, 0.15);
}

.card-premium-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-premium-body {
  padding: 24px;
}

/* Overview Stat Cards */
.stat-card {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--border-radius-lg);
  background-color: var(--clinical-white);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--hover-shadow);
  border-color: rgba(0, 137, 123, 0.2);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--primary-teal);
}

.stat-card.alert-card::before {
  background-color: var(--alert-red);
}

.stat-card.warning-card::before {
  background-color: var(--warning-amber);
}

.stat-card-details h5 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.stat-card-details h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--dark-charcoal);
}

.stat-card-trend {
  font-size: 0.8rem;
  font-weight: 600;
}

.trend-up {
  color: var(--success-green);
}

.trend-down {
  color: var(--alert-red);
}

.stat-card-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--border-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  transition: var(--transition-smooth);
}

.icon-teal-theme {
  background-color: var(--primary-teal-light);
  color: var(--primary-teal);
}

.icon-red-theme {
  background-color: var(--alert-red-light);
  color: var(--alert-red);
}

.icon-amber-theme {
  background-color: var(--warning-amber-light);
  color: var(--warning-amber);
}

/* Custom Circle Gauge Container */
.gauge-container {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gauge-svg {
  transform: rotate(-90deg);
  width: 80px;
  height: 80px;
}

.gauge-bg-circle {
  fill: none;
  stroke: var(--border-color);
  stroke-width: 7px;
}

.gauge-progress-circle {
  fill: none;
  stroke: var(--primary-teal);
  stroke-width: 7px;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease-out;
}

.gauge-container.danger-gauge .gauge-progress-circle {
  stroke: var(--alert-red);
}

.gauge-value {
  position: absolute;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark-charcoal);
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.gauge-label {
  font-size: 0.6rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Custom Table Layouts */
.premium-table-wrapper {
  overflow-x: auto;
}

.premium-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px; /* Space out rows */
}

.premium-table th {
  background-color: transparent;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.8px;
  padding: 12px 24px;
}

.premium-table tbody tr {
  background-color: var(--clinical-white);
  box-shadow: 0 4px 10px rgba(28, 35, 51, 0.02);
  transition: var(--transition-smooth);
}

.premium-table tbody tr:hover {
  transform: scale(1.005) translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 137, 123, 0.05);
}

.premium-table td {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.premium-table td:first-child {
  border-left: 1px solid var(--border-color);
  border-radius: var(--border-radius-md) 0 0 var(--border-radius-md);
}

.premium-table td:last-child {
  border-right: 1px solid var(--border-color);
  border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
}

/* Badges styling */
.custom-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: capitalize;
}

.badge-admitted {
  background-color: var(--primary-teal-light);
  color: var(--primary-teal);
}

.badge-discharged {
  background-color: var(--success-green-light);
  color: var(--success-green);
}

.badge-critical {
  background-color: var(--alert-red-light);
  color: var(--alert-red);
  animation: pulse-critical-badge 2s infinite ease-in-out;
}

@keyframes pulse-critical-badge {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); box-shadow: 0 0 10px rgba(229, 57, 53, 0.25); }
  100% { transform: scale(1); }
}

.badge-maintenance {
  background-color: var(--maintenance-grey-light);
  color: var(--maintenance-grey);
}

.badge-oncall {
  background-color: var(--warning-amber-light);
  color: var(--warning-amber);
}

.badge-active {
  background-color: var(--primary-teal-light);
  color: var(--primary-teal);
}

/* Doctors Card Grid */
.doctor-avatar-wrapper {
  position: relative;
  display: inline-block;
}

.doctor-status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--clinical-white);
}

.status-active { background-color: var(--success-green); }
.status-surgery { background-color: var(--alert-red); }
.status-oncall { background-color: var(--warning-amber); }
.status-off { background-color: var(--maintenance-grey); }

.doctor-list-card {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px;
  transition: var(--transition-smooth);
  background-color: var(--clinical-white);
  height: 100%;
}

.doctor-list-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-teal);
  box-shadow: 0 6px 16px rgba(0, 137, 123, 0.05);
}

/* Weekly calendar grid for Doctor Schedule */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(130px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.calendar-day-header {
  text-align: center;
  padding: 12px;
  background-color: var(--dark-charcoal);
  color: #FFFFFF;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: 0.85rem;
}

.calendar-day-cell {
  background-color: var(--clinical-white);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  min-height: 450px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.schedule-card {
  padding: 10px;
  border-radius: var(--border-radius-sm);
  font-size: 0.8rem;
  border-left: 3px solid;
  transition: var(--transition-smooth);
}

.schedule-card:hover {
  transform: scale(1.02);
}

.schedule-card.shift-morning {
  background-color: var(--primary-teal-light);
  color: var(--primary-teal-dark);
  border-left-color: var(--primary-teal);
}

.schedule-card.shift-evening {
  background-color: var(--warning-amber-light);
  color: #906300;
  border-left-color: var(--warning-amber);
}

.schedule-card.shift-night {
  background-color: rgba(28, 35, 51, 0.05);
  color: var(--dark-charcoal);
  border-left-color: var(--dark-charcoal);
}

/* Bed Management Styles */
.floor-tab-btn {
  padding: 10px 20px;
  border: 1px solid var(--border-color);
  background-color: var(--clinical-white);
  color: var(--text-secondary);
  border-radius: 30px;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.floor-tab-btn.active {
  background-color: var(--primary-teal);
  color: #FFFFFF;
  border-color: var(--primary-teal);
  box-shadow: 0 4px 12px var(--primary-teal-glow);
}

.bed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.bed-card {
  border-radius: var(--border-radius-md);
  border: 1.5px solid var(--border-color);
  background-color: var(--clinical-white);
  padding: 16px;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

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

.bed-card.status-occupied {
  border-color: rgba(229, 57, 53, 0.3);
}

.bed-card.status-occupied::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background-color: var(--alert-red);
}

.bed-card.status-available {
  border-color: rgba(76, 175, 80, 0.3);
}

.bed-card.status-available::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background-color: var(--success-green);
}

.bed-card.status-maintenance {
  border-color: rgba(158, 158, 158, 0.3);
}

.bed-card.status-maintenance::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background-color: var(--maintenance-grey);
}

.bed-card-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
  transition: var(--transition-smooth);
}

.status-occupied .bed-card-icon { color: var(--alert-red); }
.status-available .bed-card-icon { color: var(--success-green); }
.status-maintenance .bed-card-icon { color: var(--maintenance-grey); }

.bed-number {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 2px;
}

.bed-patient {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* Appointment Timeline & Drag/Drop Queue */
.appointment-container {
  display: flex;
  gap: 20px;
}

@media (max-width: 991px) {
  .appointment-container {
    flex-direction: column;
  }
}

.appointment-timeline {
  flex: 2;
}

.appointment-unassigned {
  flex: 1;
}

.timeline-slot {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  align-items: flex-start;
  gap: 20px;
}

.timeline-time {
  width: 70px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding-top: 10px;
}

.timeline-dropzone {
  flex: 1;
  min-height: 80px;
  background-color: transparent;
  border: 2px dashed transparent;
  border-radius: var(--border-radius-md);
  padding: 6px;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-dropzone.drag-over {
  background-color: var(--primary-teal-light);
  border-color: var(--primary-teal);
  box-shadow: inset 0 0 10px rgba(0, 137, 123, 0.08);
}

/* Draggable Appointment Item */
.appointment-card {
  background-color: var(--clinical-white);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary-teal);
  border-radius: var(--border-radius-md);
  padding: 12px 16px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.01);
  cursor: grab;
  user-select: none;
  transition: var(--transition-smooth);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.appointment-card:active {
  cursor: grabbing;
}

.appointment-card.dragging {
  opacity: 0.5;
  border-style: dashed;
  box-shadow: 0 12px 20px rgba(0,0,0,0.08);
  transform: scale(0.98);
}

.appointment-card.status-checkedin {
  border-left-color: var(--success-green);
}

.appointment-card.status-waiting {
  border-left-color: var(--warning-amber);
}

.appointment-card-title {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.appointment-card-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.appointment-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
}

/* Search bar design */
.search-input-group {
  position: relative;
  max-width: 320px;
}

.search-input-group i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.search-input-group input {
  padding-left: 40px;
  border-radius: 30px;
  border-color: var(--border-color);
  font-size: 0.85rem;
  height: 40px;
}

.search-input-group input:focus {
  border-color: var(--primary-teal);
  box-shadow: 0 0 0 3px var(--primary-teal-glow);
}

/* Inventory Alerts & Indicators */
.inventory-stock-bar {
  height: 8px;
  border-radius: 10px;
  background-color: var(--border-color);
  overflow: hidden;
}

.inventory-stock-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 1s ease;
}

.stock-high { background-color: var(--success-green); }
.stock-medium { background-color: var(--warning-amber); }
.stock-low { background-color: var(--alert-red); }

/* Bottom Footer */
footer.bottom-bar {
  background-color: var(--dark-charcoal);
  color: var(--text-muted);
  border-top: 1px solid var(--dark-charcoal-light);
  padding: 16px 30px;
  font-size: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-left: var(--sidebar-width);
  transition: var(--transition-smooth);
}

footer.bottom-bar a {
  color: var(--primary-teal-light);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-smooth);
}

footer.bottom-bar a:hover {
  color: #FFFFFF;
}

/* Emergency Banner Drawer (Active Alerts) */
.emergency-drawer {
  position: fixed;
  bottom: 0;
  right: 30px;
  width: 380px;
  background-color: var(--dark-charcoal);
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
  z-index: 1060;
  transform: translateY(100%);
  transition: var(--transition-smooth);
  border: 1px solid var(--dark-charcoal-light);
  border-bottom: none;
}

.emergency-drawer.active {
  transform: translateY(0);
}

.emergency-drawer-header {
  padding: 14px 20px;
  background-color: var(--alert-red);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-radius: 14px 14px 0 0;
}

.emergency-drawer-body {
  padding: 20px;
  max-height: 300px;
  overflow-y: auto;
  color: #FFFFFF;
}

.alert-message-item {
  border-bottom: 1px solid var(--dark-charcoal-light);
  padding-bottom: 12px;
  margin-bottom: 12px;
  display: flex;
  gap: 12px;
}

.alert-message-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.alert-message-item i {
  color: var(--alert-red);
  font-size: 1.2rem;
  margin-top: 3px;
}

.alert-message-text h6 {
  color: #FFFFFF;
  margin-bottom: 2px;
  font-size: 0.85rem;
  font-weight: 600;
}

.alert-message-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Toast container styling */
.toast-container-custom {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast-custom {
  background-color: var(--dark-charcoal);
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  border-left: 4px solid var(--primary-teal);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  animation: slideUpToast 0.3s forwards, fadeOutToast 0.3s 2.7s forwards;
}

@keyframes slideUpToast {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeOutToast {
  to { transform: translateY(-20px); opacity: 0; }
}

/* Details drawout/modal backdrop styles */
.modal-backdrop-custom {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(28, 35, 51, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1080;
  display: none;
  opacity: 0;
  transition: var(--transition-smooth);
}

.modal-backdrop-custom.show {
  display: block;
  opacity: 1;
}

.modal-custom {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -45%);
  background-color: var(--clinical-white);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 50px rgba(28, 35, 51, 0.15);
  width: 100%;
  max-width: 600px;
  z-index: 1090;
  display: none;
  opacity: 0;
  transition: var(--transition-smooth);
}

.modal-custom.show {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%);
}

.modal-custom-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-custom-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-custom-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Custom buttons */
.btn-teal {
  background-color: var(--primary-teal);
  color: #FFFFFF;
  border: none;
  border-radius: 30px;
  padding: 8px 20px;
  font-weight: 500;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

.btn-teal:hover {
  background-color: var(--primary-teal-dark);
  box-shadow: 0 4px 10px var(--primary-teal-glow);
  color: #FFFFFF;
}

.btn-outline-teal {
  background-color: transparent;
  color: var(--primary-teal);
  border: 1.5px solid var(--primary-teal);
  border-radius: 30px;
  padding: 7px 18px;
  font-weight: 500;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

.btn-outline-teal:hover {
  background-color: var(--primary-teal-light);
  border-color: var(--primary-teal);
  color: var(--primary-teal-dark);
}

/* Responsive collapse classes */
@media (max-width: 1199px) {
  aside.sidebar {
    width: var(--sidebar-collapsed-width);
  }
  
  aside.sidebar .sidebar-title,
  aside.sidebar .admin-info,
  aside.sidebar .logout-btn,
  aside.sidebar .nav-item-text,
  aside.sidebar .emergency-badge {
    display: none !important;
  }
  
  aside.sidebar .sidebar-header {
    justify-content: center;
    padding: 20px 10px;
  }
  
  aside.sidebar .nav-item-btn {
    justify-content: center;
    padding: 12px;
  }
  
  aside.sidebar .nav-item-btn i {
    margin-right: 0;
  }
  
  aside.sidebar .sidebar-footer {
    justify-content: center;
    padding: 16px 10px;
  }
  
  main.main-content {
    margin-left: var(--sidebar-collapsed-width);
  }
  
  footer.bottom-bar {
    margin-left: var(--sidebar-collapsed-width);
  }
}

@media (max-width: 767px) {
  .toggle-sidebar-btn {
    display: block; /* Mobile menu activator */
  }
  
  aside.sidebar {
    transform: translateX(-100%);
    width: var(--sidebar-width);
  }
  
  aside.sidebar.mobile-open {
    transform: translateX(0);
  }
  
  aside.sidebar.mobile-open .sidebar-title,
  aside.sidebar.mobile-open .admin-info,
  aside.sidebar.mobile-open .logout-btn,
  aside.sidebar.mobile-open .nav-item-text,
  aside.sidebar.mobile-open .emergency-badge {
    display: inline-block !important;
  }
  
  aside.sidebar.mobile-open .sidebar-header {
    justify-content: flex-start;
    padding: 24px;
  }
  
  aside.sidebar.mobile-open .nav-item-btn {
    justify-content: space-between;
    padding: 12px 16px;
  }
  
  aside.sidebar.mobile-open .nav-item-btn i {
    margin-right: 12px;
  }
  
  aside.sidebar.mobile-open .sidebar-footer {
    justify-content: flex-start;
    padding: 16px 20px;
  }
  
  main.main-content {
    margin-left: 0;
  }
  
  footer.bottom-bar {
    margin-left: 0;
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  
  .top-navbar {
    padding: 0 16px;
  }
  
  .content-body {
    padding: 16px;
  }
}

/* Utility classes */
.font-w-600 { font-weight: 600; }
.font-w-700 { font-weight: 700; }
.cursor-pointer { cursor: pointer; }
.bg-clinical-white { background-color: var(--clinical-white) !important; }
.border-color-subtle { border-color: var(--border-color) !important; }
