/* ==========================================================================
   Kyra Clinic - Surgical & Patient Follow-up Management Software
   Lead Surgeon: Dr. Vikas Gawri (Plastic & Cosmetic Surgery)
   Design System & Main Stylesheet
   ========================================================================== */

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

:root {
  /* Color Palette - Premium Medical Aesthetics */
  --bg-primary: #0a0f1d;
  --bg-secondary: #111827;
  --bg-card: #1e293b;
  --bg-card-hover: #24334a;
  --bg-glass: rgba(30, 41, 59, 0.75);
  --bg-input: #0f172a;

  /* Accent & Brand Colors */
  --kyra-navy: #0f172a;
  --kyra-teal: #0ea5e9;
  --kyra-cyan: #06b6d4;
  --kyra-emerald: #10b981;
  --kyra-gold: #d97706;
  --kyra-gold-light: #fbbf24;
  --kyra-rose: #f43f5e;
  --kyra-purple: #8b5cf6;

  /* Status Colors */
  --status-pending: #f59e0b;
  --status-completed: #10b981;
  --status-overdue: #ef4444;
  --status-doctor-review: #ec4899;
  --status-rescheduled: #3b82f6;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Text Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-highlight: #38bdf8;

  /* Borders & Shadows */
  --border-light: rgba(255, 255, 255, 0.08);
  --border-active: rgba(14, 165, 233, 0.4);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.25);

  /* Layout Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* App Container Layout */
#app-root {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Sidebar Navigation */
.sidebar {
  width: 260px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  z-index: 20;
}

.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-light);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--kyra-teal), var(--kyra-cyan));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.brand-text h1 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-main);
  line-height: 1.2;
}

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

.nav-menu {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  padding: 10px 12px 6px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.nav-item:hover {
  background-color: var(--bg-card-hover);
  color: var(--text-main);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.15), rgba(6, 182, 212, 0.05));
  color: var(--kyra-teal);
  border-left: 3px solid var(--kyra-teal);
  font-weight: 600;
}

.nav-item .badge {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  background-color: var(--kyra-rose);
  color: #fff;
  font-weight: 700;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-light);
  background-color: rgba(15, 23, 42, 0.4);
}

.surgeon-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

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

.surgeon-info {
  line-height: 1.2;
}

.surgeon-info .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.surgeon-info .role {
  font-size: 11px;
  color: var(--kyra-teal);
}

/* Main Content Area */
.main-wrapper {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--bg-primary);
}

/* Header Top Bar */
.top-header {
  height: 64px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 10;
}

.search-box {
  position: relative;
  width: 340px;
}

.search-box input {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 8px 14px 8px 38px;
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.search-box input:focus {
  border-color: var(--kyra-teal);
  box-shadow: var(--shadow-glow);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 14px;
}

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

/* Role Selector Switcher */
.role-switcher-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  padding: 4px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.role-switcher-container label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.role-select {
  background: transparent;
  color: var(--kyra-teal);
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.role-select option {
  background-color: var(--bg-secondary);
  color: var(--text-main);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--kyra-teal), var(--kyra-cyan));
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

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

.btn-secondary {
  background-color: var(--bg-card-hover);
  color: var(--text-main);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background-color: #2e3e59;
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}

.btn-danger {
  background-color: rgba(244, 63, 94, 0.15);
  color: var(--kyra-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
  background-color: var(--kyra-rose);
  color: #fff;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* Page View Content Container */
.content-area {
  flex-grow: 1;
  overflow-y: auto;
  padding: 24px;
}

.page-view {
  display: none;
}

.page-view.active {
  display: block;
  animation: fadeIn 0.25s ease-in-out;
}

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

/* View Header */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.view-title h2 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
}

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

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-card-hover);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}
