:root {
  --base-bg: #F8FAFC;
  --card-bg: #FFFFFF;
  --card-border: rgba(0, 0, 0, 0.06);
  --accent-cyan: #3B82F6;
  --accent-purple: #c084fc;
  --accent-green: #10B981;
  --alert-red: #EF4444;
  --warning-amber: #F59E0B;
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --glass-blur: blur(40px);
  --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.05);
  --transition-smooth: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; }

.hospital-console-container ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.hospital-console-container ::-webkit-scrollbar-track {
  background: transparent;
}

.hospital-console-container ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.hospital-console-container ::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

.hospital-console-container {
  height: 100vh;
  width: 100vw;
  background: #F8FAFC;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* --- SELECTION LANDING --- */
.hospital-selection-overlay {
  position: fixed;
  inset: 0;
  background: var(--base-bg);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 40px;
  overflow-y: auto;
  scroll-behavior: smooth;
  background-image: url('/console_bg.png');
  background-size: cover;
  background-position: center;
}

@media (max-width: 768px) {
  .hospital-selection-overlay { padding: 40px 20px; }
}

.selection-background {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.glow-sphere {
  position: absolute;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  filter: blur(160px);
  opacity: 0.12;
  animation: float-slow 20s infinite alternate;
}

.glow-sphere.top-left { top: -300px; left: -300px; background: var(--accent-cyan); }
.glow-sphere.bottom-right { bottom: -300px; right: -300px; background: var(--accent-purple); animation-delay: -10s; }

@keyframes float-slow {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(100px, 50px) scale(1.1); }
}

.selection-content {
  width: 100%;
  max-width: 1400px;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: auto;
  padding: 40px 0;
  min-height: calc(100vh - 160px);
}

.selection-header {
  text-align: center;
  margin-bottom: 60px;
  max-width: 800px;
}

.brand-logo.large {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -2px;
  margin-bottom: 32px;
  color: var(--accent-cyan);
  text-shadow: 0 0 30px rgba(59, 130, 246, 0.4);
}

.selection-header h1 {
  font-size: 4rem;
  font-weight: 950;
  background: linear-gradient(180deg, #1E293B 30%, rgba(30, 41, 59, 0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 24px;
  letter-spacing: -3px;
  line-height: 0.9;
}

.selection-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hospital-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
  padding: 20px;
  width: 100%;
  justify-content: center;
}

@media (max-width: 768px) {
  .selection-header h1 { font-size: 2.2rem; letter-spacing: -1.5px; }
  .brand-logo.large { font-size: 1.6rem; gap: 12px; margin-bottom: 16px; }
  .selection-subtitle { font-size: 0.9rem; letter-spacing: 0.05em; line-height: 1.4; }
  .hospital-grid { grid-template-columns: 1fr; gap: 20px; padding: 10px; }
  .hospital-selection-overlay { padding: 40px 16px; }
}

@media (max-width: 380px) {
  .selection-header h1 { font-size: 1.8rem; }
  .hospital-select-card { padding: 20px; gap: 20px; }
}

.hospital-select-card {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}

.hospital-select-card:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(0, 0, 0, 0.02);
}

.h-icon-bg {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.15);
  margin: 0 auto;
}

.hospital-select-card h3 {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 950;
  margin: 0;
  letter-spacing: -0.5px;
}

.no-hospitals, .loading-hospitals {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  text-align: center;
  padding: 60px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 32px;
  max-width: 600px;
  margin: 40px auto;
  backdrop-filter: var(--glass-blur);
}

.security-scan-line {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  margin: 40px 0;
  position: relative;
  overflow: hidden;
}

.security-scan-line::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
  animation: scan-move 3s infinite linear;
}

@keyframes scan-move {
  0% { left: -100%; }
  100% { left: 100%; }
}

.h-status-pulse {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}
.h-status-pulse.Active { background: rgba(0, 226, 114, 0.1); color: var(--accent-green); border: 1px solid rgba(0, 226, 114, 0.2); }

.bed-progress { height: 10px; background: rgba(255,255,255,0.05); border-radius: 5px; overflow: hidden; }
.progress-fill { height: 100%;  background: linear-gradient(90deg, var(--accent-cyan), #3B82F6); box-shadow: 0 0 20px rgba(59, 130, 246, 0.4); }

.select-hospital-btn {
  margin-top: auto;
  padding: 18px;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 16px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.4s;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
}

.h-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.h-type {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.h-beds {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bed-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* --- CONSOLE HEADER --- */
.console-header.premium {
  padding: 0 16px;
  height: 58px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(50px) saturate(2);
  border-bottom: 1px solid var(--card-border);
  display: grid;
  grid-template-columns: minmax(0, 140px) 1fr auto;
  align-items: center;
  gap: 8px;
  z-index: 1200;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  overflow: hidden;
}

.header-left {
  min-width: 0;
  overflow: hidden;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .console-header.premium {
    padding: 0 12px;
    height: auto;
    min-height: 56px;
    grid-template-columns: 1fr auto;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .header-left { grid-column: 1; }
  .console-nav-modern { grid-column: 1 / -1; order: 3; }
}

.brand-glow-container {
  position: relative;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.h-glow {
  position: absolute;
  inset: -10px;
  background: var(--accent-cyan);
  filter: blur(25px);
  opacity: 0.15;
}

.console-nav-modern {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-tab-container {
  display: flex;
  align-items: center;
  gap: 1px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* IE/Edge */
  flex-wrap: nowrap;
  width: 100%;
  justify-content: center;
}

.nav-tab-container::-webkit-scrollbar { display: none; }

.nav-divider {
  width: 1px;
  height: 18px;
  background: var(--card-border);
  margin: 0 3px;
  flex-shrink: 0;
}

/* ── HAMBURGER DRAWER: true mobile only ─────────── */
@media (max-width: 860px) {
  .console-nav-modern {
    position: fixed;
    top: 0; right: 0;
    width: 300px; height: 100vh;
    background: #F8FAFC;
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 28px;
    z-index: 3000;
    border-left: 1px solid var(--card-border);
    box-shadow: -40px 0 80px rgba(0,0,0,0.1);
    transform: translateX(105%);
    visibility: hidden;
    gap: 32px;
  }

  .console-nav-modern.mobile-open {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-tab-container {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 8px;
  }

  .nav-divider {
    width: 100%;
    height: 1px;
    margin: 4px 0;
  }

  .nav-tab {
    width: 100%;
    padding: 12px 16px !important;
    font-size: 0.9rem !important;
    gap: 14px !important;
  }

  .nav-tab span { display: inline !important; }
}

/* ── COMPACT: hide labels 900–1200px ─────────────── */
@media (min-width: 861px) and (max-width: 1200px) {
  .nav-tab {
    padding: 8px 10px !important;
    gap: 0 !important;
    border-radius: 10px !important;
  }
  .nav-tab span { display: none !important; }
  .nav-divider { margin: 0 2px; }
  .nav-tab-container { gap: 1px; }
}

/* ── FULL LABELS: 1200px+ ─────────────────────────── */
@media (min-width: 1201px) {
  .nav-tab {
    padding: 7px 11px !important;
    font-size: 0.72rem !important;
    gap: 6px !important;
  }
  .nav-tab-container { gap: 0px; }
  .nav-divider { margin: 0 3px; }
}

.mobile-close-btn, .menu-toggle-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-close-btn { position: absolute; top: 24px; right: 24px; }
.menu-toggle-btn { padding: 10px; background: rgba(255,255,255,0.05); border-radius: 12px; }

.back-btn-mobile {
  background: rgba(255,255,255,0.05);
  border: none;
  color: #fff;
  padding: 8px;
  border-radius: 10px;
  cursor: pointer;
  margin-right: 12px;
}

.nav-tab {
  padding: 7px 10px;
  border-radius: 9px;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.73rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s cubic-bezier(0.2, 1, 0.2, 1);
  position: relative;
  border: none;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.01em;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.03);
}

.nav-tab.active {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-cyan);
  box-shadow: inset 0 0 12px rgba(59, 130, 246, 0.08);
}

.search-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.02);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-mini:focus-within {
  border-color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

.search-mini input {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 0.85rem;
  outline: none;
  width: 220px;
}

.tab-indicator {
  position: absolute;
  bottom: 0px;
  left: 25%;
  right: 25%;
  height: 3px;
  background: var(--accent-cyan);
  opacity: 0;
  transition: all 0.4s;
  border-radius: 5px 5px 0 0;
  box-shadow: 0 0 15px var(--accent-cyan);
}

.nav-tab.active .tab-indicator { opacity: 1; }

/* --- MODULE CONTENT --- */
.console-main {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.03), transparent 40%);
}

@media (max-width: 768px) {
  .console-main { padding: 16px; }
}

.module-content {
  height: 100%;
  animation: slide-up-premium 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slide-up-premium {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ED MONITOR GRID */
.ed-grid-modern {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
  min-width: 0;
}

@media (max-width: 1500px) {
  .ed-grid-modern { grid-template-columns: 1fr 320px; gap: 20px; }
}

@media (max-width: 1280px) {
  .ed-grid-modern { grid-template-columns: 1fr 280px; gap: 16px; }
}

@media (max-width: 1100px) {
  .ed-grid-modern { grid-template-columns: 1fr; }
  .ed-ops-side-panel { position: static !important; }
}

.module-header-modern {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.title-wrap h3 {
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: -1px;
  background: linear-gradient(180deg, #1E293B 40%, rgba(30, 41, 59, 0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 12px 0;
}

@media (max-width: 768px) {
  .title-wrap h3 { font-size: 1.4rem; }
  .module-header-modern { flex-direction: column; align-items: flex-start; gap: 16px; }
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 59, 59, 0.08);
  color: var(--alert-red);
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 900;
  border: 1px solid rgba(255, 59, 59, 0.2);
}

.pulse {
  width: 10px;
  height: 10px;
  background: var(--alert-red);
  border-radius: 50%;
  animation: pulse-aura 2s infinite;
}

@keyframes pulse-aura {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 59, 59, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 15px rgba(255, 59, 59, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 59, 59, 0); }
}

/* PATIENT CARDS */
.patient-alert-card.premium {
  display: flex;
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 20px 20px 20px 30px;
  position: relative;
  transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
  margin-bottom: 20px;
  overflow: hidden;
  min-width: 0;
}

.patient-alert-card.premium:hover {
  transform: translateX(12px) scale(1.01);
  background: rgba(0, 0, 0, 0.01);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.1);
}

.triage-accent { position: absolute; left: 0; top: 0; bottom: 0; width: 10px; }
.triage-accent.RED { background: linear-gradient(to bottom, var(--alert-red), #991b1b); box-shadow: 5px 0 25px rgba(255, 59, 59, 0.4); }
.triage-accent.YELLOW { background: linear-gradient(to bottom, var(--warning-amber), #92400e); box-shadow: 5px 0 25px rgba(255, 184, 0, 0.4); }
.triage-accent.GREEN { background: linear-gradient(to bottom, var(--accent-green), #065f46); box-shadow: 5px 0 25px rgba(0, 226, 114, 0.4); }

.alert-grid {
  display: grid;
  grid-template-columns: 90px 1fr minmax(0, 1.4fr) 160px;
  gap: 20px;
  width: 100%;
  align-items: center;
  min-width: 0;
}

@media (max-width: 1500px) {
  .alert-grid { grid-template-columns: 90px 1fr minmax(0, 1.3fr) 150px; gap: 16px; }
}

@media (max-width: 1280px) {
  .alert-grid { grid-template-columns: 85px 1fr minmax(0, 1.2fr) 140px; gap: 14px; }
}

@media (max-width: 1100px) {
  .alert-grid { 
    grid-template-columns: 90px 1fr minmax(0, 1.4fr) 150px;
    gap: 16px;
  }
}

@media (max-width: 900px) {
  .alert-grid { 
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 16px;
  }
  .unit-info { 
    grid-column: 1;
    grid-row: 1;
  }
  .patient-details {
    grid-column: 2;
    grid-row: 1;
  }
  .vital-telemetry-grid { 
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: repeat(4, 1fr);
  }
  .card-actions-area { 
    grid-column: 1 / -1;
    grid-row: 3;
    flex-direction: row !important;
  }
  .card-actions-area button { flex: 1; }
}

@media (max-width: 600px) {
  .alert-grid { grid-template-columns: 1fr; gap: 16px; }
  .unit-info { 
    display: flex !important; 
    flex-direction: row !important; 
    justify-content: space-between !important; 
    align-items: center; 
    width: 100%; 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
    padding-bottom: 14px; 
  }
  .vital-telemetry-grid { grid-template-columns: repeat(2, 1fr) !important; width: 100%; }
  .card-actions-area { flex-direction: column !important; width: 100%; }
  .card-actions-area button { width: 100%; }
}

.ambulance-badge {
  background: rgba(13, 148, 136, 0.1);
  color: #5eead4;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(13, 148, 136, 0.2);
  font-family: 'JetBrains Mono';
  font-weight: 800;
  font-size: 0.75rem;
  text-align: center;
  letter-spacing: 0.05em;
}

.eta-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 8px;
}

.eta-value { font-size: 1.6rem; font-weight: 950; color: var(--accent-cyan); line-height: 1; letter-spacing: -1px; }
.eta-label { font-size: 0.55rem; color: var(--text-secondary); font-weight: 800; text-transform: uppercase; margin-top: 2px; }

.patient-details h4 { 
  font-size: 1.3rem; 
  font-weight: 950; 
  margin: 0 0 6px 0; 
  letter-spacing: -0.5px;
  color: var(--text-primary);
}
.p-sub { 
  font-size: 0.8rem; 
  color: var(--text-secondary); 
  font-weight: 700; 
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.t-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.t-status.RED { color: var(--alert-red); }
.t-status.YELLOW { color: var(--warning-amber); }
.t-status.GREEN { color: var(--accent-green); }

.vital-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  min-width: 0;
}

.vital-cell {
  background: rgba(0, 0, 0, 0.01);
  border: 1px solid var(--card-border);
  padding: 8px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  min-width: 0;
  overflow: hidden;
}

.vital-cell:hover {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.vital-cell.critical {
  background: rgba(255, 59, 59, 0.1);
  border-color: rgba(255, 59, 59, 0.3);
  animation: critical-vibrate 0.3s infinite alternate;
}

@keyframes critical-vibrate {
  from { transform: translateX(-1px); }
  to { transform: translateX(1px); }
}

.v-data { min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.v-val { font-size: 1.1rem; font-weight: 900; line-height: 1; white-space: nowrap; }
.v-label { font-size: 0.6rem; color: var(--text-secondary); font-weight: 800; text-transform: uppercase; margin-top: 3px; white-space: nowrap; }

.card-actions-area {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
  align-items: stretch;
  width: 160px;
  flex-shrink: 0;
}

.telelink-btn-premium {
  background: var(--accent-cyan);
  color: #000;
  border: none;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.4s;
  font-size: 0.75rem;
  text-transform: uppercase;
  white-space: nowrap;
}

.assign-btn-premium {
  background: rgba(0,0,0,0.03);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.75rem;
  text-transform: uppercase;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.telelink-btn-premium:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4); }
.assign-btn-premium:hover { background: rgba(255,255,255,0.1); border-color: var(--accent-cyan); }

.ed-ops-side-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 0;
  height: max-content;
  min-width: 0;
  overflow: hidden;
}

/* OPERATIONS PANEL */
.hub-card.premium-ops {
  padding: 20px;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  min-width: 0;
  overflow: hidden;
}

.hub-card h4 { font-size: 1.1rem; font-weight: 900; margin: 0 0 10px 0; letter-spacing: -0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-desc { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; }

.codes-stack { display: flex; flex-direction: column; gap: 12px; }

.code-btn-modern {
  height: 54px;
  border-radius: 14px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: uppercase;
  font-weight: 900;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  width: 100%;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  min-width: 0;
  overflow: hidden;
}

.c-info { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; overflow: hidden; }
.c-info strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.85rem; }
.c-info span { font-size: 0.65rem; opacity: 0.75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.code-btn-modern.red { background: linear-gradient(135deg, #ef4444, #7f1d1d); box-shadow: 0 10px 25px rgba(239, 68, 68, 0.25); }
.code-btn-modern.blue { background: linear-gradient(135deg, #3b82f6, #1e3a8a); box-shadow: 0 10px 25px rgba(59, 130, 246, 0.25); }
.code-btn-modern.trauma { background: linear-gradient(135deg, #f59e0b, #78350f); box-shadow: 0 10px 25px rgba(245, 158, 11, 0.25); }

.code-btn-modern:hover { transform: scale(1.05) translateY(-8px); filter: brightness(1.2); }

.inventory-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border) !important;
  border-radius: 20px !important;
  padding: 20px;
  min-width: 0;
  overflow: hidden;
}

.triage-feed-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.triage-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 4px 12px 24px 4px;
}

.operational-clock-card {
  padding: 24px;
  background: linear-gradient(180deg, rgba(0,0,0,0.01) 0%, rgba(0,0,0,0.03) 100%);
  border-radius: 20px;
  border: 1px solid var(--card-border);
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.05);
  min-width: 0;
  overflow: hidden;
}

.o-time { font-size: 1.6rem; font-weight: 900; letter-spacing: -1px; color: var(--accent-cyan); text-shadow: 0 0 30px rgba(59, 130, 246, 0.3); font-family: 'JetBrains Mono'; white-space: nowrap; }
.o-status { margin-top: 10px; font-size: 0.65rem; font-weight: 800; color: var(--accent-green); letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* TRIP MANAGEMENT */
.trip-card-premium {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  margin-bottom: 12px;
  transition: all 0.3s;
}

.trip-card-premium:hover { background: rgba(0, 0, 0, 0.01); border-color: var(--accent-cyan); }

.trip-patient-main { font-size: 1rem; font-weight: 900; margin-bottom: 4px; }
.trip-id-mono { font-family: 'JetBrains Mono'; font-size: 0.7rem; color: var(--accent-cyan); opacity: 0.7; }

.trip-status-timeline {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  background: rgba(0,0,0,0.02);
  padding: 4px;
  border-radius: 20px;
}
.ts-step { width: 10px; height: 10px; border-radius: 50%; background: rgba(0,0,0,0.05); }
.ts-step.active { background: var(--accent-cyan); box-shadow: 0 0 10px var(--accent-cyan); }
.ts-step.completed { background: var(--accent-green); }
.ts-line { flex: 1; height: 2px; background: rgba(0,0,0,0.03); }
.ts-line.active { background: var(--accent-cyan); }

/* FLEET DASHBOARD */
.fleet-dashboard-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  height: calc(100vh - 140px);
}

@media (max-width: 1200px) {
  .fleet-dashboard-layout { grid-template-columns: 1fr 340px; }
}

@media (max-width: 1024px) {
  .fleet-dashboard-layout { grid-template-columns: 1fr; height: auto; }
  .fleet-map-container { height: 400px; }
}

.fleet-map-container {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 32px;
  position: relative;
  overflow: hidden;
}

.mock-map-view {
  width: 100%;
  height: 100%;
  background: #f8fafc url('https://tiles.stadiamaps.com/tiles/alidade_smooth/{z}/{x}/{y}.png');
  background-size: cover;
  position: relative;
}

.map-overlay-controls {
  position: absolute;
  top: 24px; left: 24px; right: 24px;
  display: flex;
  justify-content: space-between;
  z-index: 10;
}

.map-search {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  padding: 12px 20px;
  border-radius: 16px;
  border: 1px solid var(--card-border);
}

.map-search input { background: transparent; border: none; color: var(--text-primary); font-weight: 600; font-size: 0.9rem; outline: none; }

.map-marker {
  position: absolute;
  width: 40px;
  height: 40px;
  background: var(--accent-cyan);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
  cursor: pointer;
  transition: all 0.3s;
}

.map-marker:hover { transform: scale(1.2); z-index: 20; }
.marker-pulse { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid; opacity: 0; animation: marker-ping 2s infinite; }
.marker-pulse.RED { border-color: var(--alert-red); }
.marker-pulse.GREEN { border-color: var(--accent-green); }

@keyframes marker-ping {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* SETUP LAYOUT */
/* --- SETUP MODULE PREMIUM --- */
.setup-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  height: calc(100vh - 140px);
  min-height: 0;
}

.setup-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(0, 0, 0, 0.01);
  border: 1px solid var(--card-border);
  padding: 20px;
  border-radius: 24px;
  backdrop-filter: blur(20px);
}

.setup-nav-item {
  width: 100%;
  padding: 14px 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.setup-nav-item:hover {
  background: rgba(0, 0, 0, 0.02);
  color: var(--text-primary);
  transform: translateX(5px);
}

.setup-nav-item.active {
  background: rgba(0, 209, 255, 0.1);
  border-color: rgba(0, 209, 255, 0.2);
  color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 209, 255, 0.05);
}

.setup-content-modern {
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 12px;
  height: 100%;
  min-width: 0;
  max-width: 100%;
}

.setup-content-modern > div {
  min-width: 0;
  width: 100%;
}

.setup-content-modern::-webkit-scrollbar { width: 4px; }
.setup-content-modern::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.05); }

/* Form Elements */
.setup-form-modern {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-group-premium {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group-premium label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-left: 4px;
}

.setup-input-premium {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--card-border);
  padding: 14px 20px;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.setup-input-premium:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.03);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 209, 255, 0.15);
}

select.setup-input-premium {
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg fill="%2300d1ff" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 14px top 50%;
  padding-right: 40px;
}

.setup-confirm-btn {
  background: var(--text-primary);
  color: var(--base-bg);
  padding: 16px 32px;
  border-radius: 14px;
  font-weight: 950;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  border: none;
  cursor: pointer;
  transition: all 0.4s;
  align-self: flex-start;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.setup-confirm-btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

/* Service Nodes */
.dept-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.service-node-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 24px;
  border-radius: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.4s;
}

.service-node-card:hover {
  background: rgba(0, 0, 0, 0.01);
  transform: translateY(-8px);
}

.service-node-card.active { border-color: var(--accent-green); }
.service-node-card.inactive { opacity: 0.6; grayscale: 1; }

.node-info-text strong { display: block; font-size: 1.1rem; margin-bottom: 4px; }
.node-status-text { font-size: 0.7rem; font-weight: 900; letter-spacing: 0.1em; }
.node-status-text.ON { color: var(--accent-green); }
.node-status-text.OFF { color: var(--text-secondary); }

.toggle-btn-modern {
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 900;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.3s;
}

.toggle-btn-modern.enable { border-color: var(--accent-green); color: var(--accent-green); background: rgba(0, 226, 114, 0.05); }
.toggle-btn-modern.disable { border-color: var(--alert-red); color: var(--alert-red); background: rgba(255, 59, 59, 0.05); }

/* Users & Beds Tabs */
.setup-actions-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
}

@media (max-width: 860px) {
  .setup-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

.search-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--card-border);
  padding: 10px 16px;
  border-radius: 12px;
  flex: 1;
  min-width: 200px;
  max-width: 350px;
}

.search-mini input {
  background: transparent;
  border: none;
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
  width: 100%;
}

.staff-table-premium {
  display: block;
  width: 100%;
  overflow-x: auto;
  white-space: nowrap;
}

.register-staff-btn-premium {
  background: var(--accent-cyan);
  color: #fff;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 950;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  white-space: nowrap;
}

.register-staff-btn-premium:hover {
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(0, 209, 255, 0.3);
  
}

.pulse.status-sync {
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 8px;
  background: var(--accent-green);
}

.fleet-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-title { font-size: 1.25rem; font-weight: 900; margin: 0; }

.fleet-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  padding-right: 8px;
}

.fleet-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 24px;
  transition: all 0.3s;
}

.fleet-item:hover { border-color: var(--accent-cyan); background: rgba(0, 0, 0, 0.01); }

.f-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.v-tag { font-family: 'JetBrains Mono'; font-weight: 900; font-size: 0.9rem; color: var(--accent-cyan); }
.v-type { font-size: 0.7rem; color: var(--text-secondary); margin-left: 8px; text-transform: uppercase; font-weight: 800; }

.v-status { font-size: 0.65rem; font-weight: 900; border: 1px solid; padding: 4px 10px; border-radius: 6px; text-transform: uppercase; }
.v-status.RUNNING { color: var(--accent-green); border-color: rgba(0, 226, 114, 0.3); background: rgba(0, 226, 114, 0.05); }
.v-status.IDLE { color: var(--text-secondary); border-color: var(--card-border); }
.v-status.BREAKDOWN { color: var(--alert-red); border-color: rgba(255, 59, 59, 0.3); background: rgba(255, 59, 59, 0.05); }

.f-body { display: flex; flex-direction: column; gap: 8px; }
.f-row { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; }
.f-row.highlight { color: var(--text-primary); background: rgba(59, 130, 246, 0.03); padding: 8px 12px; border-radius: 12px; }

/* TELELINK CONSOLE */
.telelink-workspace {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 32px;
  height: calc(100vh - 140px);
}

@media (max-width: 1024px) {
  .telelink-workspace { grid-template-columns: 1fr; height: auto; }
  .video-central-hub { height: 500px; order: 1; }
  .telelink-queues { order: 2; }
}

@media (max-width: 768px) {
  .video-central-hub { height: 400px; }
  .local-preview { width: 120px; height: 80px; bottom: 20px; right: 20px; border-width: 2px; }
  .video-controls { padding: 12px 20px; gap: 10px; width: 90%; }
  .ctrl-btn { width: 44px; height: 44px; }
}

.telelink-queues {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.q-header-main h3 { font-size: 1.5rem; font-weight: 900; display: flex; align-items: center; gap: 12px; }
.console-mode { font-size: 0.7rem; color: var(--accent-cyan); font-weight: 900; letter-spacing: 0.2em; margin-top: 4px; }

.queue-section .q-title { font-size: 0.75rem; font-weight: 900; color: var(--text-secondary); letter-spacing: 0.1em; margin-bottom: 20px; display: flex; justify-content: space-between; }
.q-count { color: var(--alert-red); }

.q-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: all 0.3s;
}

.q-card:hover { border-color: var(--accent-cyan); background: rgba(0, 0, 0, 0.01); }
.q-card.RED { border-left: 6px solid var(--alert-red); }

.q-top { display: flex; justify-content: space-between; margin-bottom: 12px; }
.q-badge { font-size: 0.65rem; font-weight: 900; text-transform: uppercase; }
.q-timer { font-size: 0.7rem; color: var(--alert-red); font-weight: 800; display: flex; align-items: center; gap: 4px; }

.q-patient-info .q-name { font-size: 1rem; font-weight: 900; margin-bottom: 4px; }
.q-desc { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.4; }

.video-central-hub {
  background: var(--base-bg);
  border-radius: 40px;
  position: relative;
  overflow: hidden;
  border: 2px solid var(--card-border);
}

.remote-feed { width: 100%; height: 100%; position: relative; }
.placeholder-video { 
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  background: linear-gradient(180deg, var(--base-bg) 0%, var(--card-bg) 100%);
}

.local-preview {
  position: absolute;
  bottom: 40px; right: 40px;
  width: 240px; height: 160px;
  background: var(--card-bg);
  border-radius: 24px;
  border: 4px solid var(--accent-cyan);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  overflow: hidden;
}

.video-controls {
  position: absolute;
  bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 20px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  padding: 20px 40px;
  border-radius: 32px;
  border: 1px solid var(--card-border);
}

.ctrl-btn {
  width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.03); color: var(--text-primary); border: 1px solid var(--card-border); cursor: pointer; transition: all 0.3s;
}
.ctrl-btn:hover { background: rgba(0,0,0,0.05); transform: scale(1.1); }
.ctrl-btn.hangup { background: var(--alert-red); border: none; }

/* EPCR & ARCHIVE TABLES */
.staff-table-premium { width: 100%; border-collapse: separate; border-spacing: 0 12px; margin-top: -12px; }
.staff-table-premium th { padding: 0 24px 12px 24px; text-align: left; font-size: 0.75rem; font-weight: 800; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.1em; }
.staff-table-premium tr td { padding: 14px 24px; background: var(--card-bg); border-top: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border); }
.staff-table-premium tr td:first-child { border-left: 1px solid var(--card-border); border-radius: 14px 0 0 14px; }
.staff-table-premium tr td:last-child { border-right: 1px solid var(--card-border); border-radius: 0 14px 14px 0; }

/* REPORTS GRID */
.reports-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 1024px) {
  .reports-grid { grid-template-columns: 1fr; }
}

/* HEADER RESPONSIVENESS */
@media (max-width: 1024px) {
  .header-left .h-node-id, .header-left .h-loc, .header-left .separator { display: none; }
  .header-right .time-date-panel { display: none; }
}

@media (max-width: 768px) {
  .hospital-info-stack { max-width: 120px; }
  .hospital-name { font-size: 0.85rem; }
}

/* Always truncate hospital name */
.hospital-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.hospital-info-stack {
  min-width: 0;
  overflow: hidden;
}

.hospital-brand {
  min-width: 0;
  overflow: hidden;
}

/* SHARED COMPONENTS */
.stat-card-premium {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: auto;
  min-height: 100px;
  padding: 16px;
}

.stat-trend { font-size: 0.7rem; font-weight: 900; margin-top: 12px; display: flex; align-items: center; gap: 4px; }
.stat-trend.up { color: var(--accent-green); }
.stat-trend.down { color: var(--alert-red); }
.stat-value { font-size: 1.5rem; font-weight: 900; color: var(--text-primary); margin-top: 4px; }
.stat-label { font-size: 0.7rem; font-weight: 800; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }

/* RESPONSIVE UTILITIES */
.stats-grid-responsive {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.action-area-header {
  display: flex;
  gap: 12px;
}

@media (max-width: 1024px) {
  .stats-grid-responsive {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .stats-grid-responsive {
    grid-template-columns: 1fr;
  }
  
  .action-area-header {
    width: 100%;
    margin-top: 12px;
  }
  
  .search-mini {
    flex: 1;
  }
}

.hide-tablet { display: block; }

@media (max-width: 1024px) {
  .hide-tablet { display: none !important; }
}

@media (max-width: 860px) {
  .hide-mobile { display: none !important; }
  .show-mobile { display: inline-flex !important; }
}

.show-mobile { display: none !important; }

@media (max-width: 768px) {
  .staff-table-premium { 
    display: block; 
    overflow-x: auto; 
    white-space: nowrap; 
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }
}

.map-tabs .nav-tab {
  padding: 8px 16px;
  font-size: 0.7rem;
}

@keyframes slide-up-premium {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* AUTHENTIC DOC MOCK */
.pcr-document-mock {
  width: 100%;
  max-width: 800px;
  background: #fff;
  color: #000;
  padding: 60px;
  border-radius: 4px;
  box-shadow: 0 40px 100px rgba(0,0,0,0.5);
  font-family: 'Helvetica', sans-serif;
}

.pcr-header { border-bottom: 3px solid #000; padding-bottom: 24px; margin-bottom: 40px; display: flex; justify-content: space-between; align-items: flex-end; }
.pcr-logo { font-size: 2rem; font-weight: 950; letter-spacing: -2px; }
.pcr-title { font-size: 1rem; font-weight: 800; text-transform: uppercase; }

.ps-title { font-size: 0.85rem; font-weight: 900; background: #f1f5f9; padding: 8px 16px; margin-bottom: 20px; border-left: 4px solid #000; }
.ps-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 16px; font-size: 0.9rem; }
.ps-row div span { font-weight: 800; display: block; font-size: 0.7rem; color: #64748b; margin-bottom: 4px; }

/* PREMIUM MODALS */
.premium-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(25px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.premium-modal-container {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  width: 100%;
  max-width: 680px;
  padding: 32px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.premium-modal-container::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
}

.modal-header-premium {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 16px;
}

.modal-header-premium h3 {
  font-size: 1.4rem;
  font-weight: 900;
  margin: 0;
  letter-spacing: -0.5px;
  background: linear-gradient(180deg, #fff 40%, rgba(255,255,255,0.4) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.modal-close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.modal-close-btn:hover {
  background: rgba(255, 59, 59, 0.1);
  color: var(--alert-red);
  border-color: rgba(255, 59, 59, 0.3);
}

.premium-modal-container .setup-form-modern {
  gap: 20px;
}

.modal-footer-premium {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-footer-premium button {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s;
  border: none;
}

.btn-primary-glass {
  background: var(--accent-cyan);
  color: #000;
  border: none !important;
  box-shadow: 0 10px 30px rgba(0, 209, 255, 0.3);
}

.btn-primary-glass:hover {
  background: #00ecff;
  color: #000;
  box-shadow: 0 10px 40px rgba(0, 209, 255, 0.5);
  transform: translateY(-2px);
}

.btn-secondary-glass {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid var(--card-border) !important;
}

.btn-secondary-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}
