/* ==========================================================================
   CYH DoctorHub — Premium Dark (Navy + Glassmorphism) Design System
   ========================================================================== */

:root {
  --cyh-bg-main: #070d1e;
  --cyh-bg-surface: #0b1528;
  --cyh-bg-card: rgba(14, 25, 48, 0.65);
  --cyh-bg-card-hover: rgba(20, 35, 68, 0.75);
  --cyh-bg-glass-input: rgba(11, 22, 44, 0.7);
  
  --cyh-border-glass: rgba(255, 255, 255, 0.08);
  --cyh-border-glass-glow: rgba(0, 242, 254, 0.35);
  --cyh-border-focus: #00f2fe;

  --cyh-accent-cyan: #00f2fe;
  --cyh-accent-blue: #4facfe;
  --cyh-accent-emerald: #10b981;
  --cyh-accent-amber: #f59e0b;
  --cyh-accent-rose: #f43f5e;
  --cyh-accent-purple: #8b5cf6;

  --cyh-text-primary: #f8fafc;
  --cyh-text-secondary: #94a3b8;
  --cyh-text-muted: #64748b;

  --cyh-glass-blur: blur(18px) saturate(180%);
  --cyh-shadow-glass: 0 12px 35px -5px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --cyh-shadow-glow: 0 0 25px rgba(0, 242, 254, 0.25);
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--cyh-bg-main);
  background-image: 
    radial-gradient(circle at 10% 15%, rgba(0, 242, 254, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 25%, rgba(79, 172, 254, 0.07) 0%, transparent 45%),
    radial-gradient(circle at 50% 80%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--cyh-text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ================= Glass Containers & Cards ================= */
.glass-panel {
  background: var(--cyh-bg-card);
  backdrop-filter: var(--cyh-glass-blur);
  -webkit-backdrop-filter: var(--cyh-glass-blur);
  border: 1px solid var(--cyh-border-glass);
  border-radius: 16px;
  box-shadow: var(--cyh-shadow-glass);
  transition: all 0.25s ease;
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.glass-card {
  background: var(--cyh-bg-card);
  backdrop-filter: var(--cyh-glass-blur);
  -webkit-backdrop-filter: var(--cyh-glass-blur);
  border: 1px solid var(--cyh-border-glass);
  border-radius: 14px;
  box-shadow: var(--cyh-shadow-glass);
  padding: 1.25rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
  transform: translateY(-2px);
  border-color: var(--cyh-border-glass-glow);
  box-shadow: 0 16px 35px -5px rgba(0, 0, 0, 0.6), var(--cyh-shadow-glow);
}

/* ================= Stat Cards ================= */
.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: rgba(0, 242, 254, 0.12);
  color: var(--cyh-accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.25);
}

.stat-icon-emerald {
  background: rgba(16, 185, 129, 0.12);
  color: var(--cyh-accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.stat-icon-amber {
  background: rgba(245, 158, 11, 0.12);
  color: var(--cyh-accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.stat-icon-purple {
  background: rgba(139, 92, 246, 0.12);
  color: var(--cyh-accent-purple);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.stat-value {
  font-size: 1.85rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--cyh-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* ================= Buttons ================= */
.glass-btn-primary {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  color: #070d1e;
  border: none;
  font-weight: 600;
  padding: 0.6rem 1.3rem;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.glass-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.5);
  color: #070d1e;
}

.glass-btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--cyh-text-primary);
  border: 1px solid var(--cyh-border-glass);
  font-weight: 500;
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.glass-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.glass-btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

.glass-btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.glass-btn-danger:hover {
  background: rgba(244, 63, 94, 0.25);
  color: #ffffff;
}

/* ================= Form Controls ================= */
.glass-input {
  background: rgba(11, 22, 44, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 0.72rem 1rem;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.glass-input:focus {
  border-color: #00f2fe;
  box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.25);
  background: rgba(14, 27, 54, 0.95);
  color: #ffffff;
}

.glass-input::placeholder {
  color: #94a3b8;
  opacity: 0.85;
}

/* ================= Tables ================= */
.glass-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.glass-table th {
  background: rgba(14, 25, 48, 0.85);
  color: var(--cyh-text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--cyh-border-glass);
}

.glass-table th:first-child {
  border-top-left-radius: 12px;
}
.glass-table th:last-child {
  border-top-right-radius: 12px;
}

.glass-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--cyh-text-primary);
  font-size: 0.9rem;
  vertical-align: middle;
}

.glass-table tbody tr {
  transition: background 0.15s ease;
}

.glass-table tbody tr:hover {
  background: rgba(0, 242, 254, 0.04);
}

/* ================= Badges ================= */
.badge-status {
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.badge-scheduled {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.badge-confirmed {
  background: rgba(0, 242, 254, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(0, 242, 254, 0.35);
}

.badge-inconsultation {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  animation: pulse-glow 2s infinite;
}

.badge-completed {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-cancelled {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ================= Sidebar & Layout ================= */
.cyh-app-container {
  display: flex;
  min-height: 100vh;
}

.cyh-sidebar {
  width: 260px;
  background: rgba(9, 18, 36, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--cyh-border-glass);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
}

.cyh-brand {
  padding: 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--cyh-border-glass);
}

.cyh-brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #070d1e;
  font-size: 1.2rem;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.cyh-brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #ffffff;
}

.cyh-brand-subtitle {
  font-size: 0.7rem;
  color: var(--cyh-accent-cyan);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cyh-nav {
  padding: 1rem 0.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow-y: auto;
}

.cyh-nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  color: var(--cyh-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.cyh-nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.cyh-nav-item.active {
  color: var(--cyh-accent-cyan);
  background: rgba(0, 242, 254, 0.1);
  border-color: rgba(0, 242, 254, 0.3);
  box-shadow: inset 0 0 12px rgba(0, 242, 254, 0.1);
  font-weight: 600;
}

.cyh-nav-divider {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--cyh-text-muted);
  padding: 0.85rem 0.9rem 0.35rem 0.9rem;
  font-weight: 700;
}

.cyh-sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--cyh-border-glass);
}

.cyh-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cyh-topbar {
  height: 70px;
  background: rgba(9, 18, 36, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--cyh-border-glass);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
}

.cyh-body {
  padding: 2rem;
  flex: 1;
}

/* User pill */
.user-profile-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.85rem;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--cyh-border-glass);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #070d1e;
  font-size: 0.85rem;
}

/* Quick Switcher bar */
.demo-role-switcher {
  background: rgba(0, 242, 254, 0.08);
  border: 1px dashed rgba(0, 242, 254, 0.35);
  border-radius: 10px;
  padding: 0.6rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ================= Auth Role Switcher Tabs ================= */
.auth-role-tabs {
  display: flex;
  padding: 5px;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  background: rgba(11, 22, 44, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  gap: 6px;
}

.auth-role-tab {
  flex: 1;
  padding: 0.65rem 0.75rem;
  text-align: center;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.auth-role-tab:hover:not(.active-doctor):not(.active-admin) {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(0, 242, 254, 0.45);
  box-shadow: 0 0 12px rgba(0, 242, 254, 0.2);
  transform: translateY(-1px);
}

.auth-role-tab.active-doctor {
  background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%) !important;
  color: #070d1e !important;
  font-weight: 700 !important;
  border: 1px solid #00f2fe !important;
  box-shadow: 0 4px 18px rgba(0, 242, 254, 0.45) !important;
  text-shadow: none !important;
}

.auth-role-tab.active-admin {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%) !important;
  color: #070d1e !important;
  font-weight: 700 !important;
  border: 1px solid #f59e0b !important;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.45) !important;
  text-shadow: none !important;
}

#blazor-error-ui {
  background: rgba(15, 23, 42, 0.95) !important;
  color: #fda4af !important;
  border-top: 1px solid rgba(244, 63, 94, 0.4) !important;
  backdrop-filter: blur(12px) !important;
  bottom: 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5) !important;
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 9999;
  font-size: 0.85rem;
}

#blazor-error-ui .reload {
  color: #38bdf8 !important;
  text-decoration: underline;
  margin-left: 0.5rem;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
  color: #cbd5e1 !important;
}

