/* DentisConnect - Dashboard Styles */
/* Dentist App - Professional dark blue theme */
:root {
  --primary: #1e3a5f;
  --primary-dark: #152d4a;
  --primary-light: #2a4a73;
  --secondary: #00b4b4;
  --accent: #40e0d0;
  --text: #333333;
  --text-light: #666666;
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --error: #dc3545;
  --success: #28a745;
  --warning: #ffc107;
  --border: #d8dce3;
  --shadow: rgba(30, 58, 95, 0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
  --app-indicator: #1e3a5f;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
}
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-alt);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--primary);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
}
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: #152d4a;
}
.btn-secondary {
  background: var(--secondary);
  color: white;
}
.btn-secondary:hover {
  background: #009999;
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-danger {
  background: var(--error);
  color: white;
}
.btn-danger:hover {
  background: #c82333;
}
.btn-icon {
  padding: 0.5rem;
  background: transparent;
  border-radius: 50%;
}
.btn-icon:hover {
  background: var(--bg-alt);
}
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(0, 180, 180, 0.1);
}
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text);
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-error {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}
.form-textarea {
  resize: vertical;
  min-height: 100px;
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}
.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}
.loading-content {
  text-align: center;
}
.loading-logo {
  width: 120px;
  margin-bottom: 1.5rem;
}
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-alt);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.loading-text {
  color: var(--text-light);
}

/* Layout */
.app-container {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 260px;
  background: var(--primary);
  color: white;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s ease;
}
.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.sidebar-logo {
  width: 40px;
  height: 40px;
}
.sidebar-title {
  font-weight: 600;
  font-size: 1.125rem;
}
.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}
.sidebar-footer {
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.5rem;
  color: rgba(255, 255, 255, 0.7);
  transition: all var(--transition);
  cursor: pointer;
}
.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}
.nav-item.active {
  border-left: 3px solid var(--accent);
}
.nav-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.nav-badge {
  margin-left: auto;
  background: var(--error);
  color: white;
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
}
.nav-badge.live {
  background: var(--success);
  animation: pulse 1.5s infinite;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  background: var(--bg);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 1rem;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.topbar-center {
  flex: 1;
  max-width: 500px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.menu-toggle {
  display: none;
}
.page-title {
  font-size: 1.25rem;
  font-weight: 600;
}

/* Search Box */
.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  cursor: text;
}
.search-box input {
  border: none;
  background: transparent;
  padding: 0;
  flex: 1;
  min-width: 150px;
}
.search-box input:focus {
  box-shadow: none;
}
.search-box kbd {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  color: var(--text-light);
}
.search-icon {
  color: var(--text-light);
  flex-shrink: 0;
}

/* User Menu */
.notification-btn {
  position: relative;
}
.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--error);
  color: white;
  font-size: 0.625rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-menu {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius);
  transition: background var(--transition);
}
.user-menu:hover {
  background: var(--bg-alt);
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--secondary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}
.user-avatar.dentist {
  background: var(--primary);
}
.user-avatar.large {
  width: 80px;
  height: 80px;
  font-size: 1.75rem;
}
.user-info {
  display: flex;
  flex-direction: column;
}
.user-name {
  font-weight: 500;
  font-size: 0.875rem;
}
.user-role {
  font-size: 0.75rem;
  color: var(--text-light);
}
.page-content {
  flex: 1;
  padding: 1.5rem;
}

/* Cards */
.card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 3px var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-body {
  padding: 1.5rem;
}

/* Status Indicators */
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.status-dot.online {
  background: var(--success);
}
.status-dot.offline {
  background: var(--error);
}
.status-dot.streaming {
  background: var(--success);
  animation: pulse 1.5s infinite;
}
.status-dot.recording {
  background: var(--error);
  animation: pulse 0.8s infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}
.status-badge.new {
  background: #e3f2fd;
  color: #1976d2;
}
.status-badge.examined {
  background: #e8f5e9;
  color: #388e3c;
}
.status-badge.invalid {
  background: #ffebee;
  color: #d32f2f;
}
.status-badge.scheduled {
  background: #e3f2fd;
  color: #1976d2;
}
.status-badge.completed {
  background: #e8f5e9;
  color: #388e3c;
}
.status-badge.cancelled {
  background: #ffebee;
  color: #d32f2f;
}
.status-badge.noshow {
  background: #fff3e0;
  color: #f57c00;
}

/* Live Indicator */
.live-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.live-dot {
  width: 8px;
  height: 8px;
  background: var(--error);
  border-radius: 50%;
  animation: pulse 1s infinite;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--error);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.stream-live-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 1s infinite;
}

/* Dashboard */
.dashboard-welcome {
  margin-bottom: 1.5rem;
}
.dashboard-welcome h2 {
  font-size: 1.5rem;
  font-weight: 600;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.stat-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 3px var(--shadow);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.stat-icon.primary {
  background: rgba(30, 58, 95, 0.1);
}
.stat-icon.secondary {
  background: rgba(0, 180, 180, 0.1);
}
.stat-icon.accent {
  background: rgba(64, 224, 208, 0.1);
}
.stat-icon.warning {
  background: rgba(255, 193, 7, 0.1);
}
.stat-icon.success {
  background: rgba(40, 167, 69, 0.1);
}
.stat-icon.error {
  background: rgba(220, 53, 69, 0.1);
}
.stat-content {
  flex: 1;
}
.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
}
.stat-label {
  color: var(--text-light);
  font-size: 0.875rem;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
}

/* Quick Actions */
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  color: var(--text);
  transition: all var(--transition);
}
.quick-action-btn:hover {
  background: var(--primary);
  color: white;
}
.quick-action-btn svg {
  width: 24px;
  height: 24px;
}

/* Streams List */
.streams-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.stream-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.stream-item:hover {
  background: var(--border);
}
.stream-patient-name {
  font-weight: 500;
  flex: 1;
}

/* Videos List */
.videos-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.video-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.video-item:hover {
  background: var(--border);
}
.video-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.video-patient {
  font-weight: 500;
}
.video-date {
  font-size: 0.875rem;
  color: var(--text-light);
}
.video-duration {
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Activity List */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.5rem 0;
}
.activity-icon {
  font-size: 1.25rem;
}
.activity-content {
  flex: 1;
}
.activity-text {
  font-size: 0.875rem;
}
.activity-time {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Patients */
.patients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.patient-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition);
}
.patient-card:hover {
  border-color: var(--secondary);
  box-shadow: 0 4px 12px var(--shadow);
}
.patient-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--secondary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}
.patient-info {
  flex: 1;
  min-width: 0;
}
.patient-name {
  font-weight: 600;
}
.patient-email {
  font-size: 0.875rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.patient-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}
.patient-videos {
  font-size: 0.75rem;
  color: var(--text-light);
}
.shared-badge {
  font-size: 0.625rem;
  background: var(--accent);
  color: var(--primary);
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
}

/* Patient Detail */
.patient-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.patient-header-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.patient-header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.patient-details h2 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}
.patient-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

/* Live Streams Page */
.streams-page {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.5rem;
  min-height: calc(100vh - 140px);
}
.streams-sidebar {
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.streams-sidebar-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.streams-list {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}
.stream-item.active {
  background: rgba(0, 180, 180, 0.1);
  border-left: 3px solid var(--secondary);
}
.stream-item-indicator {
  width: 8px;
}
.stream-item-info {
  flex: 1;
}
.stream-item-name {
  font-weight: 500;
  display: block;
}
.stream-item-meta {
  font-size: 0.75rem;
  color: var(--text-light);
}

.stream-main {
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.stream-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stream-viewer {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.stream-viewer.hidden {
  display: none;
}
.stream-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stream-patient-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stream-actions {
  display: flex;
  gap: 0.5rem;
}
.stream-container {
  flex: 1;
  background: #000;
  position: relative;
  min-height: 400px;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.stream-video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.stream-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.record-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--error);
  border: 4px solid white;
  cursor: pointer;
  transition: transform var(--transition);
}
.record-btn:hover {
  transform: scale(1.1);
}
.record-btn.recording {
  animation: pulse-record 1s infinite;
}
@keyframes pulse-record {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(220, 53, 69, 0);
  }
}
.record-timer {
  color: white;
  font-size: 1.25rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.stream-info-bar {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
}
.stream-metrics {
  display: flex;
  gap: 2rem;
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.video-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 3px var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  border: 1px solid var(--border);
}
.video-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}
.video-thumbnail {
  aspect-ratio: 16/9;
  background: #000;
  position: relative;
}
.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-duration {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
}
.video-new-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--error);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-size: 0.625rem;
  font-weight: 600;
}
.video-info {
  padding: 1rem;
}
.video-notes {
  font-size: 0.875rem;
  color: var(--text);
  margin-top: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Video Detail */
.video-detail-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 1.5rem;
}
.video-player-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.video-player-container {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.video-player {
  width: 100%;
  aspect-ratio: 16/9;
}
.video-player-info {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.video-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.video-actions {
  display: flex;
  gap: 0.75rem;
}
.annotations-section {
  display: flex;
  flex-direction: column;
}
.annotations-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.annotation-item {
  padding: 1rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.annotation-item:hover {
  background: var(--border);
}
.annotation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.annotation-type {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
}
.annotation-type.diagnosis {
  background: #e3f2fd;
  color: #1976d2;
}
.annotation-type.treatment {
  background: #e8f5e9;
  color: #388e3c;
}
.annotation-type.observation {
  background: #fff3e0;
  color: #f57c00;
}
.annotation-type.followup {
  background: #fce4ec;
  color: #c2185b;
}
.annotation-timestamp {
  font-size: 0.75rem;
  color: var(--text-light);
}
.annotation-text {
  font-size: 0.875rem;
}
.annotation-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* Appointments */
.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.calendar-title {
  font-weight: 600;
  min-width: 200px;
  text-align: center;
}
.calendar-views {
  display: flex;
  gap: 0.25rem;
}
.view-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
}
.view-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.day-view {
  display: flex;
  flex-direction: column;
}
.day-hour {
  display: flex;
  border-bottom: 1px solid var(--border);
  min-height: 60px;
}
.hour-label {
  width: 80px;
  padding: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-light);
  flex-shrink: 0;
}
.hour-slots {
  flex: 1;
  padding: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}
.week-view {
  display: flex;
  flex-direction: column;
}
.week-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
}
.week-day-header {
  padding: 0.75rem;
  text-align: center;
}
.week-day-header.today {
  background: rgba(0, 180, 180, 0.1);
}
.day-name {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
}
.day-number {
  font-weight: 600;
}
.week-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  min-height: 400px;
}
.week-day {
  border-right: 1px solid var(--border);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.week-day:last-child {
  border-right: none;
}
.week-day.today {
  background: rgba(0, 180, 180, 0.05);
}
.month-view {
  display: flex;
  flex-direction: column;
}
.month-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
}
.month-day-name {
  padding: 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-light);
}
.month-body {
  display: flex;
  flex-direction: column;
}
.month-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.month-day {
  padding: 0.5rem;
  min-height: 80px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  position: relative;
}
.month-day:nth-child(7n) {
  border-right: none;
}
.month-day.empty {
  background: var(--bg-alt);
}
.month-day.today {
  background: rgba(0, 180, 180, 0.1);
}
.month-day-number {
  font-weight: 500;
}
.month-day-count {
  position: absolute;
  bottom: 0.25rem;
  right: 0.25rem;
  background: var(--secondary);
  color: white;
  font-size: 0.625rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.appointment-slot {
  padding: 0.25rem 0.5rem;
  background: var(--primary);
  color: white;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  margin-bottom: 0.25rem;
}
.appointment-slot.emergency {
  background: var(--error);
}
.appointment-slot.cleaning {
  background: var(--secondary);
}
.slot-time {
  font-weight: 600;
}
.slot-patient {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slot-type {
  font-size: 0.625rem;
  opacity: 0.8;
}

/* Appointment List */
.appointment-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.appointment-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.appointment-item:hover {
  background: var(--border);
}
.appointment-date {
  text-align: center;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  min-width: 60px;
}
.appointment-day {
  font-size: 1.5rem;
  font-weight: 700;
}
.appointment-month {
  font-size: 0.75rem;
  text-transform: uppercase;
}
.appointment-info {
  flex: 1;
}
.appointment-patient {
  font-weight: 600;
}
.appointment-time {
  font-weight: 500;
}
.appointment-type {
  color: var(--text-light);
  font-size: 0.875rem;
}
.appointment-status {
  margin-left: auto;
}

/* Messages */
.messages-page {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  min-height: calc(100vh - 140px);
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.conversations-panel {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.conversations-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.conversations-list {
  flex: 1;
  overflow-y: auto;
}
.conversation-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border);
}
.conversation-item:hover,
.conversation-item.active {
  background: var(--bg-alt);
}
.conversation-item.unread {
  font-weight: 600;
}
.conversation-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--secondary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}
.conversation-info {
  flex: 1;
  min-width: 0;
}
.conversation-name {
  font-weight: 500;
}
.conversation-preview {
  font-size: 0.875rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conversation-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}
.conversation-time {
  font-size: 0.75rem;
  color: var(--text-light);
}
.unread-badge {
  background: var(--secondary);
  color: white;
  font-size: 0.625rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-panel {
  display: flex;
  flex-direction: column;
}
.chat-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.chat-container.hidden {
  display: none;
}
.chat-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.chat-user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}
.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--secondary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}
.chat-user-name {
  font-weight: 600;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.message {
  max-width: 70%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
}
.message.sent {
  align-self: flex-end;
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}
.message.received {
  align-self: flex-start;
  background: var(--bg-alt);
  border-bottom-left-radius: 4px;
}
.message-content {
  word-wrap: break-word;
}
.message-time {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.25rem;
}
.chat-input-area {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
}
.chat-input-area input {
  flex: 1;
}
.back-to-list {
  display: none;
}

/* Notifications */
.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.notification-item:hover {
  background: var(--border);
}
.notification-item.unread {
  background: rgba(0, 180, 180, 0.1);
  border-left: 3px solid var(--secondary);
}
.notification-icon {
  font-size: 1.5rem;
}
.notification-content {
  flex: 1;
}
.notification-text {
  font-size: 0.875rem;
}
.notification-time {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}
.notification-dismiss {
  opacity: 0;
  transition: opacity var(--transition);
}
.notification-item:hover .notification-dismiss {
  opacity: 1;
}

/* Profile */
.profile-page {
  max-width: 900px;
}
.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.profile-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.profile-name {
  font-size: 1.5rem;
  font-weight: 600;
}
.profile-email {
  color: var(--text-light);
}
.profile-role {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  margin-top: 0.5rem;
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}
.preferences-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.preference-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}
.preference-item input {
  width: 18px;
  height: 18px;
}
.language-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
}
.language-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
}
.language-option:hover {
  border-color: var(--secondary);
}
.language-option.active {
  border-color: var(--secondary);
  background: rgba(0, 180, 180, 0.1);
}
.language-option input {
  display: none;
}
.lang-flag {
  font-size: 1.25rem;
}
.lang-name {
  font-weight: 500;
}

/* Auth Pages */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, #2d5a8a 100%);
  padding: 1rem;
}
.auth-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
}
.auth-logo {
  width: 160px;
  margin: 0 auto 1.5rem;
  display: block;
}
.auth-title {
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
}
.auth-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 2rem;
}
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-light);
  font-size: 0.875rem;
}

/* Tabs */
.tabs-container {
  margin-bottom: 0;
}
.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
}
.tab {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-light);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition);
}
.tab:hover {
  color: var(--text);
}
.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab-icon {
  font-size: 1rem;
}
.tab-count {
  background: var(--bg-alt);
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
}

/* Filters */
.filters-bar {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius-lg);
}
.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.filter-group label {
  font-size: 0.75rem;
  color: var(--text-light);
}
.filter-group input,
.filter-group select {
  min-width: 150px;
  padding: 0.5rem 0.75rem;
}

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.page-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.page-header-actions {
  display: flex;
  gap: 0.75rem;
}
.back-btn {
  margin-right: 0.5rem;
}
.search-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
}
.search-input input {
  border: none;
  background: transparent;
  padding: 0;
  min-width: 200px;
}
.search-input input:focus {
  box-shadow: none;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}
.pagination-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
}
.pagination-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}
.pagination-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.pagination-ellipsis {
  padding: 0 0.5rem;
  color: var(--text-light);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 1rem;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.modal-large {
  max-width: 700px;
}
.modal-overlay.active .modal {
  transform: scale(1);
}
.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-weight: 600;
  font-size: 1.125rem;
}
.modal-close {
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  line-height: 1;
}
.modal-body {
  padding: 1.5rem;
}
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Toast */
.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px var(--shadow);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.toast.success {
  border-left: 4px solid var(--success);
}
.toast.error {
  border-left: 4px solid var(--error);
}
.toast.warning {
  border-left: 4px solid var(--warning);
}
.toast.info {
  border-left: 4px solid var(--secondary);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
}
.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}
.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.empty-state-small {
  text-align: center;
  padding: 2rem 1rem;
}

/* Language Selector */
.lang-selector {
  position: relative;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
}
.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px var(--shadow);
  min-width: 150px;
  display: none;
  z-index: 100;
}
.lang-dropdown.open {
  display: block;
}
.lang-option {
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background var(--transition);
}
.lang-option:hover {
  background: var(--bg-alt);
}
.lang-option.active {
  color: var(--secondary);
  font-weight: 500;
}

/* Utilities */
.hidden {
  display: none !important;
}
.flex {
  display: flex;
}
.flex-col {
  flex-direction: column;
}
.items-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-1 {
  gap: 0.25rem;
}
.gap-2 {
  gap: 0.5rem;
}
.gap-3 {
  gap: 0.75rem;
}
.gap-4 {
  gap: 1rem;
}
.mt-1 {
  margin-top: 0.25rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-3 {
  margin-top: 0.75rem;
}
.mt-4 {
  margin-top: 1rem;
}
.mb-1 {
  margin-bottom: 0.25rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-3 {
  margin-bottom: 0.75rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.text-center {
  text-align: center;
}
.text-sm {
  font-size: 0.875rem;
}
.text-light {
  color: var(--text-light);
}
.font-medium {
  font-weight: 500;
}
.font-semibold {
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1200px) {
  .video-detail-layout {
    grid-template-columns: 1fr;
  }
  .annotations-section {
    order: 2;
  }
}
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .menu-toggle {
    display: block;
  }
  .streams-page {
    grid-template-columns: 1fr;
  }
  .streams-sidebar {
    display: none;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .topbar {
    padding: 0.75rem 1rem;
  }
  .topbar-center {
    display: none;
  }
  .page-content {
    padding: 1rem;
  }
  .messages-page {
    grid-template-columns: 1fr;
  }
  .conversations-panel {
    display: none;
  }
  .chat-panel {
    display: flex;
  }
  .back-to-list {
    display: block;
  }
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .calendar-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .calendar-views {
    justify-content: center;
  }
  .week-view,
  .month-view {
    overflow-x: auto;
  }
  .patient-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .patient-header-actions {
    width: 100%;
  }
}


/* Add Patient Modal - Flexbox based */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: hidden;
}
.modal .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.modal .modal-content {
  position: relative;
  background: var(--bg);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.modal .modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal .modal-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}
.modal .modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.modal .modal-close:hover {
  color: var(--text);
}
.modal .modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
}

/* Patient Search Results */
.patient-search-results {
  margin-top: 1rem;
  max-height: 300px;
  overflow-y: auto;
}
.patient-search-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  transition: border-color var(--transition);
}
.patient-search-item:hover {
  border-color: var(--secondary);
}
.patient-search-info {
  flex: 1;
  min-width: 0;
}
.patient-search-name {
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}
.patient-search-email {
  font-size: 0.875rem;
  color: var(--text-light);
  word-break: break-all;
}
.patient-search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.patient-search-actions .btn {
  flex: 1;
  min-width: 120px;
  white-space: nowrap;
  text-align: center;
}
.form-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}
.text-muted {
  color: var(--text-light);
}
.text-error {
  color: var(--error);
}

@media (min-width: 500px) {
  .patient-search-item {
    flex-direction: row;
    align-items: center;
  }
  .patient-search-actions {
    flex-shrink: 0;
    flex-wrap: nowrap;
  }
  .patient-search-actions .btn {
    flex: none;
    min-width: auto;
  }
}

/* Button loading state */
.btn.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* Patient card unassign button */
.patient-card .unassign-btn {
  opacity: 0.5;
  transition: opacity var(--transition), color var(--transition);
}
.patient-card:hover .unassign-btn {
  opacity: 1;
}
.patient-card .unassign-btn:hover {
  color: var(--error);
  background: rgba(220, 53, 69, 0.1);
}

/* Patient search item transition */
.patient-search-item {
  transition: opacity 0.2s ease, transform 0.2s ease, border-color var(--transition);
}

/* Assignment Requests List */
.assignment-requests-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.assignment-request-item {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
@media (min-width: 600px) {
  .assignment-request-item {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
.request-info {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex: 1;
}
.request-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--secondary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  flex-shrink: 0;
}
.request-details {
  flex: 1;
  min-width: 0;
}
.request-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}
.request-email {
  font-size: 0.875rem;
  color: var(--text-light);
}
.request-message {
  font-size: 0.875rem;
  color: var(--text);
  font-style: italic;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
}
.request-date {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}
.request-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.request-actions .btn {
  white-space: nowrap;
}

/* Tab badge for requests count */
.tab-badge {
  background: var(--error);
  color: white;
  font-size: 0.6875rem;
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
  margin-left: 0.5rem;
}

/* Patient select list for new message */
.patient-select-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all var(--transition);
}
.patient-select-item:hover {
  border-color: var(--secondary);
  background: var(--bg-alt);
}
.patient-avatar-small {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--secondary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

/* Conversations header with button */
.conversations-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}


/* App Badge - Dentist */
.app-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.025em;
}
.app-badge svg {
  flex-shrink: 0;
}
.app-badge-dentist {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(30, 58, 95, 0.3);
}

/* Topbar center for badge */
.topbar-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .app-badge {
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
  }
}
