:root {
  /* Colors - Enterprise Healthcare Palette */
  --color-primary: #0052CC;
  --color-primary-light: #E9F2FF;
  --color-success: #36B37E;
  --color-warning: #FFAB00;
  --color-danger: #FF5630;
  --color-info: #00B8D9;
  --color-text-main: #172B4D;
  --color-text-muted: #6B778C;
  --color-bg-body: #F4F5F7;
  --color-bg-card: #FFFFFF;
  --color-border: #DFE1E6;
  --sidebar-width: 260px;
  --header-height: 70px;
  
  /* Typography */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  
  /* Effects */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background-color: var(--color-bg-body);
  color: var(--color-text-main);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: #0747A6; /* Darker blue for sidebar */
  color: white;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.logo-container {
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0747A6;
  font-weight: bold;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-list {
  list-style: none;
  padding: var(--space-md) 0;
  margin: 0;
  flex-grow: 1;
}

.nav-item {
  padding: 2px 16px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  text-decoration: none;
  color: rgba(255,255,255,0.7);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,0.1);
  color: white;
}

.nav-link svg {
  width: 20px;
  height: 20px;
  opacity: 0.8;
}

/* Main Content Wrapper */
.main-wrapper {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  height: var(--header-height);
  background: white;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-xl);
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-search {
  display: flex;
  align-items: center;
  background: var(--color-bg-body);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  width: 300px;
}

.header-search input {
  border: none;
  background: transparent;
  padding: 10px;
  width: 100%;
  outline: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.date-display {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  position: relative;
}

.notification-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--color-danger);
  color: white;
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 10px;
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: var(--color-bg-body);
  border-radius: 30px;
  cursor: pointer;
}

.profile-avatar {
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.profile-info span {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
}

.profile-info small {
  color: var(--color-text-muted);
  font-size: 0.75rem;
}

/* Dashboard Content */
.content {
  padding: var(--space-xl);
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

.page-title {
  margin-bottom: var(--space-lg);
}

.page-title h1 {
  font-size: 1.5rem;
  margin: 0;
  color: var(--color-text-main);
}

.page-title p {
  margin: 4px 0 0;
  color: var(--color-text-muted);
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.kpi-card {
  background: white;
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.kpi-title {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.kpi-trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
}

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

/* Main Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-lg);
}

.grid-span-8 { grid-column: span 8; }
.grid-span-4 { grid-column: span 4; }
.grid-span-6 { grid-column: span 6; }
.grid-span-12 { grid-column: span 12; }

/* Cards */
.card {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-lg);
  height: 100%;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

/* Charts Placeholder */
.chart-placeholder {
  width: 100%;
  height: 250px;
  background: #f8f9fa;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 150px;
  padding-bottom: 20px;
}

.bar {
  width: 40px;
  background: var(--color-primary);
  border-radius: 4px 4px 0 0;
  transition: height 0.3s;
}

.status-dots {
  display: flex;
  gap: 16px;
  margin-top: var(--space-md);
}

.status-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Tables */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 12px;
  border-bottom: 2px solid var(--color-bg-body);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
}

td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--color-bg-body);
  font-size: 0.9rem;
}

.badge {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success { background: #E3FCEF; color: #006644; }
.badge-warning { background: #FFF0B3; color: #825C00; }
.badge-danger { background: #FFEBE6; color: #BF2600; }
.badge-info { background: #E6FCFF; color: #008DA6; }
.badge-neutral { background: #F4F5F7; color: #42526E; }

.btn {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: white;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s;
}

.btn:hover { background: var(--color-bg-body); }
.btn-primary { background: var(--color-primary); color: white; border-color: var(--color-primary); }
.btn-primary:hover { opacity: 0.9; }

/* Revenue Panel Specifics */
.revenue-stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-bg-body);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.stat-value {
  font-weight: 600;
}

/* Vocal-Dx Panel */
.monitoring-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.monitor-item {
  padding: var(--space-md);
  background: var(--color-bg-body);
  border-radius: var(--radius-sm);
}

.monitor-label {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.monitor-value {
  font-size: 1.1rem;
  font-weight: 700;
}

/* Alert Section */
.alert-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alert-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: #FFF9F9;
  border-left: 4px solid var(--color-danger);
}

.alert-item.warning {
  background: #FFFCF2;
  border-left-color: var(--color-warning);
}

.alert-content p {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
}

.alert-content small {
  color: var(--color-text-muted);
}

/* Utils */
.flex-column { display: flex; flex-direction: column; }
.gap-sm { gap: var(--space-sm); }
.mt-xl { margin-top: var(--space-xl); }
