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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #F9FAFB;
  color: #111827;
  line-height: 1.5;
}

.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: #FFFFFF;
  border-right: 1px solid #E5E7EB;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: #4F46E5;
  padding: 0 24px 32px;
  letter-spacing: -0.5px;
}

.nav {
  flex: 1;
  padding: 0 12px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: #6B7280;
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-item:hover {
  background: #F3F4F6;
  color: #111827;
}

.nav-item.active {
  background: #EEF2FF;
  color: #4F46E5;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid #E5E7EB;
  margin-top: auto;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.user-role {
  font-size: 12px;
  color: #6B7280;
}

.main-content {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
}

.top-bar {
  background: white;
  border-bottom: 1px solid #E5E7EB;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.top-bar h1 {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

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

.notification-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FEE2E2;
  color: #DC2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

.content-area {
  padding: 32px;
  flex: 1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 20px;
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-label {
  font-size: 13px;
  color: #6B7280;
  font-weight: 500;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}

.stat-change {
  font-size: 13px;
  font-weight: 500;
}

.stat-change.positive {
  color: #10B981;
}

.stat-change.neutral {
  color: #6B7280;
}

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.card {
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 24px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.link {
  font-size: 14px;
  color: #4F46E5;
  text-decoration: none;
  font-weight: 500;
}

.link:hover {
  text-decoration: underline;
}

.appointment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.appointment-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  transition: all 0.2s;
}

.appointment-item:hover {
  border-color: #4F46E5;
  background: #F9FAFB;
}

.appointment-time {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  min-width: 70px;
}

.appointment-details {
  flex: 1;
}

.appointment-patient {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 2px;
}

.appointment-type {
  font-size: 13px;
  color: #6B7280;
}

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

.badge-scheduled {
  background: #DBEAFE;
  color: #1E40AF;
}

.badge-active {
  background: #D1FAE5;
  color: #065F46;
}

.badge-pending {
  background: #FEF3C7;
  color: #92400E;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}

.activity-prescription {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.activity-note {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

.activity-lab {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.activity-appointment {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
}

.activity-message {
  background: linear-gradient(135deg, #EC4899 0%, #DB2777 100%);
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 2px;
}

.activity-meta {
  font-size: 13px;
  color: #6B7280;
}

.chart-container {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 200px;
  padding: 20px 0;
}

.chart-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #4F46E5 0%, #7C3AED 100%);
  border-radius: 6px 6px 0 0;
  height: 100%;
  transition: all 0.3s;
}

.chart-bar:hover .bar-fill {
  opacity: 0.8;
}

.bar-label {
  font-size: 12px;
  color: #6B7280;
  margin-top: 8px;
  font-weight: 500;
}

.filter-select {
  padding: 6px 12px;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-size: 14px;
  color: #111827;
  background: white;
  cursor: pointer;
}

.btn-primary {
  padding: 10px 20px;
  background: #4F46E5;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #4338CA;
}

.btn-secondary {
  padding: 10px 20px;
  background: white;
  color: #111827;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover {
  background: #F9FAFB;
}

.btn-text {
  padding: 6px 12px;
  background: none;
  color: #4F46E5;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-text:hover {
  background: #EEF2FF;
}

.btn-icon {
  width: 36px;
  height: 36px;
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: #F9FAFB;
}

.search-input {
  padding: 10px 16px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  font-size: 14px;
  width: 300px;
}

.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.filter-btn {
  padding: 8px 16px;
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  background: #F9FAFB;
}

.filter-btn.active {
  background: #4F46E5;
  color: white;
  border-color: #4F46E5;
}

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

.data-table th {
  text-align: left;
  padding: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #6B7280;
  border-bottom: 1px solid #E5E7EB;
}

.data-table td {
  padding: 16px 12px;
  font-size: 14px;
  color: #111827;
  border-bottom: 1px solid #F3F4F6;
}

.data-table tr:hover {
  background: #F9FAFB;
}

.patient-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.patient-name {
  font-weight: 600;
  color: #111827;
  margin-bottom: 2px;
}

.patient-id {
  font-size: 12px;
  color: #6B7280;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.pagination-btn {
  padding: 8px 12px;
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-size: 14px;
  color: #111827;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  background: #F9FAFB;
}

.pagination-btn.active {
  background: #4F46E5;
  color: white;
  border-color: #4F46E5;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.calendar-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.calendar-nav {
  display: flex;
  gap: 8px;
}

.timeline-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
}

.timeline {
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 20px;
}

.time-slot {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 16px;
  border-bottom: 1px solid #F3F4F6;
  padding: 12px 0;
  min-height: 80px;
}

.time-label {
  font-size: 13px;
  color: #6B7280;
  font-weight: 500;
}

.slot-empty {
  background: #F9FAFB;
  border-radius: 6px;
  border: 1px dashed #E5E7EB;
}

.appointment-block {
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  border-left: 3px solid #4F46E5;
  border-radius: 6px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.appointment-block:hover {
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

.appointment-duration {
  font-size: 12px;
  color: #6B7280;
  margin-top: 4px;
}

.appointment-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.appointment-sidebar .card {
  padding: 20px;
}

.appointment-sidebar h3 {
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 16px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #F3F4F6;
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-label {
  font-size: 14px;
  color: #6B7280;
}

.summary-value {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.action-btn {
  width: 100%;
  padding: 10px;
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  cursor: pointer;
  margin-bottom: 8px;
  transition: all 0.2s;
}

.action-btn:hover {
  background: #F9FAFB;
  border-color: #4F46E5;
}

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