/* High-Fidelity UI Styles for Clinic Management System */
/* Healthcare Professional Edition */

@import url('healthcare-design-system.css');

/* Global Customizations */
:root {
  --primary-gradient: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
  --secondary-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --border-radius: 10px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  background: var(--health-bg, #F0F4F8);
}

/* Enhanced Sidebar — Dark Premium Theme */
.sidebar {
  transition: var(--transition);
  backdrop-filter: blur(10px);
  background: var(--health-sidebar-bg, linear-gradient(180deg, #0F172A 0%, #1E293B 100%));
}

.nav-link {
  position: relative;
  transition: var(--transition);
  border-radius: var(--border-radius);
  margin: 0.125rem 0.5rem;
  padding: 0.625rem 1rem;
  color: var(--health-sidebar-text, #CBD5E1);
}

.nav-link:hover {
  background: var(--health-sidebar-hover, rgba(14, 165, 233, 0.1));
  transform: translateX(4px);
  color: var(--health-sidebar-text-active, #FFFFFF);
  box-shadow: none;
}

.nav-link::before {
  content: '';
  position: absolute;
  left: -0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--health-primary-gradient, linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%));
  transition: height 0.3s ease;
  border-radius: 0 2px 2px 0;
}

.nav-link:hover::before {
  height: 60%;
}

/* Stats Cards — Healthcare Premium */
.stat-card {
  background: white;
  border-radius: var(--health-radius-lg, 14px);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  border-left: 4px solid;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--health-border-light, #F1F5F9);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--hover-shadow);
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--health-radius, 10px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 165, 233, 0.1);
  color: #0EA5E9;
  transition: var(--transition);
}

.stat-card:hover .stat-icon {
  background: var(--primary-gradient);
  color: white;
  transform: scale(1.05);
}

/* Enhanced Tables */
.table-container {
  background: white;
  border-radius: var(--health-radius-lg, 14px);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--health-border-light, #F1F5F9);
}

.table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.table th {
  background: var(--health-bg-alt, #F8FAFC);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--health-text-muted, #94A3B8);
  padding: 0.875rem 1.25rem;
  font-size: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--health-border, #E2E8F0);
}

.table td {
  transition: var(--transition);
  border-bottom: 1px solid var(--health-border-light, #F1F5F9);
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem;
  color: var(--health-text-secondary, #475569);
}

.table tr:hover {
  background: rgba(14, 165, 233, 0.03);
  transform: none;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.2rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-scheduled,
.status-pending {
  background: var(--health-primary-light, #E0F2FE);
  color: var(--health-primary-dark, #0284C7);
}

.status-completed,
.status-active {
  background: var(--health-secondary-light, #D1FAE5);
  color: var(--health-secondary-dark, #059669);
}

.status-cancelled,
.status-inactive {
  background: var(--health-danger-light, #FEE2E2);
  color: var(--health-danger-dark, #DC2626);
}

.status-in_progress {
  background: var(--health-primary-light, #E0F2FE);
  color: var(--health-primary-dark, #0284C7);
}

/* Forms */
.form-input {
  border: 2px solid var(--health-border, #E2E8F0);
  border-radius: var(--health-radius, 10px);
  padding: 0.625rem 1rem;
  transition: var(--transition);
  background: white;
  width: 100%;
  font-size: 0.875rem;
  color: var(--health-text-primary, #0F172A);
  outline: none;
}

.form-input:focus {
  outline: none;
  border-color: #0EA5E9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
  transform: translateY(-1px);
}

.form-input::placeholder {
  color: var(--health-text-muted, #94A3B8);
}

.btn-primary {
  background: var(--health-primary-gradient, linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%));
  border-radius: var(--health-radius, 10px);
  padding: 0.625rem 1.5rem;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.3);
  color: white;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

/* Charts Container */
.chart-container {
  background: white;
  border-radius: var(--health-radius-lg, 14px);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
  border: 1px solid var(--health-border-light, #F1F5F9);
}

/* Mobile Sidebar */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    position: fixed;
    z-index: 50;
    height: 100vh;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(1px);
    z-index: 40;
  }
}

/* RTL Support - dir="rtl" naturally flows flex right-to-left */
[dir="rtl"] .nav-link:hover {
  transform: translateX(-4px);
}

/* Loading States */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #E2E8F0;
  border-top: 3px solid #0EA5E9;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Alert / Notification Banners */
.alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border-radius: var(--health-radius, 10px);
  border-left: 4px solid;
  margin-bottom: 1rem;
}

.alert-banner-info {
  background: var(--health-primary-light, #E0F2FE);
  border-color: var(--health-primary, #0EA5E9);
  color: var(--health-primary-dark, #0284C7);
}

.alert-banner-warning {
  background: var(--health-warning-light, #FEF3C7);
  border-color: var(--health-warning, #F59E0B);
  color: #92400E;
}

.alert-banner-danger {
  background: var(--health-danger-light, #FEE2E2);
  border-color: var(--health-danger, #EF4444);
  color: var(--health-danger-dark, #DC2626);
}

.alert-banner-success {
  background: var(--health-secondary-light, #D1FAE5);
  border-color: var(--health-secondary, #10B981);
  color: var(--health-secondary-dark, #059669);
}

/* Page Title */
.page-title {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--health-text-primary, #0F172A);
}

.page-subtitle {
  font-size: 0.9375rem;
  color: var(--health-text-muted, #94A3B8);
  margin-top: 0.25rem;
}

/* Quick Action Buttons */
.quick-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--health-radius, 10px);
  font-weight: 600;
  font-size: 0.875rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
}

.quick-action:hover {
  transform: translateY(-2px);
  text-decoration: none;
}
