/* ==========================================================================
   iSmartOffice Community Screening & Triage Portal
   Design System: Replicating ISO-Web-Clinic Theme & Aesthetics
   Typography: Poppins | Primary Blue: #0073E6 | Action Green: #10B981
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --font-main: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Primary Brand Colors (matching ISO-Web-Clinic) */
  --primary: #0073E6;
  --primary-hover: #005bb5;
  --primary-active: #004c99;
  --primary-subtle: #E5F5FF;
  --primary-muted: #CCE9FF;
  --primary-soft: #99D4FF;

  /* Secondary & Status Colors */
  --secondary: #06D6A0;
  --success: #10B981;
  --success-hover: #059669;
  --success-subtle: #ECFDF5;
  --warning: #F59E0B;
  --warning-subtle: #FFFBEB;
  --error: #EF4444;
  --error-hover: #DC2626;
  --error-subtle: #FEF2F2;
  --info: #0284C7;
  --info-subtle: #EFF6FF;

  /* Backgrounds & Canvas (Clean Clinical Light Theme) */
  --bg-body: #F4F6FB;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-sidebar: #0073E6;
  --bg-topbar: #FFFFFF;

  /* Borders & Lines */
  --border-light: #E8EEF5;
  --border-subtle: #E2E8F0;
  --border-strong: #CBD5E1;

  /* Text Colors */
  --text-main: #0F172A;
  --text-body: #334155;
  --text-muted: #64748B;
  --text-dim: #94A3B8;
  --text-white: #FFFFFF;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.06), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04);

  /* Border Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-body);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ==========================================================================
   1. LOGIN SECTION (Split Screen Replicating ISO-Web-Clinic)
   ========================================================================== */
.login-split-wrapper {
  min-height: 100vh;
  display: flex;
  background: linear-gradient(135deg, #F3F6FB 0%, #EEF1F6 100%);
  overflow: hidden;
}

/* Left: Visual Carousel (60%) */
.login-visual-panel {
  flex: 1 1 58%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #F7FAFF;
  position: relative;
}

.login-carousel-container {
  width: 100%;
  max-width: 720px;
  height: 440px;
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(0, 115, 230, 0.15), 0 10px 20px -5px rgba(0, 0, 0, 0.08);
  background: #FFFFFF;
}

.login-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1.04);
}

.login-carousel-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 10;
}

.login-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.login-carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 28px 20px;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.5) 65%, transparent 100%);
  color: #FFFFFF;
  z-index: 20;
}

.login-carousel-caption h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.login-carousel-caption p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.login-carousel-controls {
  position: absolute;
  bottom: 24px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 30;
}

.carousel-btn-next {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--success);
  color: #FFFFFF;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  transition: all 0.2s ease;
}

.carousel-btn-next:hover {
  background: var(--success-hover);
  transform: scale(1.08);
}

.carousel-dots {
  display: flex;
  gap: 6px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  cursor: pointer;
}

.carousel-dot.active {
  width: 22px;
  background: #FFFFFF;
}

.login-visual-footer-slogan {
  margin-top: 24px;
  font-size: 15px;
  font-weight: 500;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Right: Form Section (40%) with Rich Royal Blue */
.login-form-panel {
  flex: 1 1 42%;
  background: linear-gradient(135deg, #0060D6 0%, #0073E6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  color: #FFFFFF;
  position: relative;
}

.login-form-content {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.login-logo-pill {
  background: #FFFFFF;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.login-logo-pill img {
  height: 38px;
  width: auto;
  display: block;
}

.login-form-title {
  font-size: 22px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 6px;
}

.login-form-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 16px;
  line-height: 1.4;
}

/* Globe Tooth Spinner */
.login-spinner-container {
  width: 140px;
  height: 140px;
  margin: 4px 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.login-spinner-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.25));
}

.login-form-box {
  width: 100%;
  text-align: left;
}

.login-input-group {
  margin-bottom: 14px;
}

.login-input-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 6px;
}

.login-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  color: #94A3B8;
  font-size: 15px;
  pointer-events: none;
}

.login-input {
  width: 100%;
  height: 46px;
  padding: 10px 14px 10px 42px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #FFFFFF;
  color: #0F172A;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
}

.login-input:focus {
  border-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.login-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 12px;
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.9);
}

.login-demo-btn {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.login-demo-btn:hover {
  background: #FFFFFF;
  color: var(--primary);
}

.btn-login-submit {
  width: 100%;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--success);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-login-submit:hover {
  background: var(--success-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.45);
}

.login-trust-footer {
  margin-top: 18px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
}

/* ==========================================================================
   2. MAIN APPLICATION SHELL (Sidebar + Topbar + Content)
   ========================================================================== */
.app-container {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-body);
}

/* Sidebar (w-64 bg-[#0073E6]) */
.app-sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  color: var(--text-white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
  padding: 20px 18px 14px;
}

.sidebar-logo-container {
  background: #FFFFFF;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.sidebar-logo-container img {
  height: 30px;
  width: auto;
  display: block;
}

/* Active Clinic / Program Selector Box */
.sidebar-program-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 20px;
}

.sidebar-program-label {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-program-select {
  width: 100%;
  background: #FFFFFF;
  color: #0F172A;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  font-family: inherit;
}

/* Navigation Links */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 14px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  background: transparent;
  width: 100%;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  font-family: inherit;
}

.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
}

.sidebar-nav-item.active {
  background: #FFFFFF;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar-nav-item svg {
  flex-shrink: 0;
  transition: stroke 0.2s;
}

.sidebar-nav-item.active svg {
  stroke: var(--primary);
}

.sidebar-live-pill {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  background: #EF4444;
  color: #FFFFFF;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Sidebar Footer (Dr Annie Card) */
.sidebar-footer {
  padding: 16px 14px 20px;
}

.sidebar-annie-card {
  background: #FFFFFF;
  color: #0F172A;
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sidebar-annie-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background: #EFF6FF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-annie-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar-annie-info {
  line-height: 1.25;
}

.sidebar-annie-title {
  font-size: 12px;
  font-weight: 700;
  color: #0284C7;
}

.sidebar-annie-desc {
  font-size: 10.5px;
  color: #64748B;
}

.sidebar-signout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.sidebar-signout-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   3. TOPBAR & MAIN VIEWPORT
   ========================================================================== */
.app-content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.app-topbar {
  height: 68px;
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sidebar-toggle-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #475569;
  cursor: pointer;
  display: none;
}

.topbar-page-title {
  font-size: 19px;
  font-weight: 700;
  color: #0F172A;
}

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

.topbar-search-box input {
  width: 100%;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: #F8FAFC;
  padding: 8px 16px 8px 38px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
  transition: all 0.2s;
}

.topbar-search-box input:focus {
  background: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 115, 230, 0.12);
}

.topbar-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 14px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.active-event-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid var(--primary-soft);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--primary);
  display: inline-block;
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
  100% { transform: scale(0.9); opacity: 1; }
}

.topbar-user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 12px;
  border-left: 1px solid var(--border-subtle);
}

.user-avatar-img {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--primary-soft);
}

.user-avatar-initials {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: #0073E6;
  color: #FFFFFF;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.user-details {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0F172A;
}

.user-role-badge {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
}

/* Main Content Body */
.main-content-scroll {
  flex: 1;
  padding: 28px 32px 40px;
  overflow-y: auto;
}

/* ==========================================================================
   4. INSIDE PAGES FUNCTIONAL HERO & STAT CARDS (Replicating Clinic Dashboard)
   ========================================================================== */
.dashboard-hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

/* Card A: Welcome Gradient Banner */
.hero-welcome-card {
  background: linear-gradient(135deg, #0B2545 0%, #134074 50%, #0073E6 100%);
  border-radius: var(--radius-xl);
  padding: 28px;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0, 115, 230, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-welcome-left {
  position: relative;
  z-index: 2;
  max-width: 480px;
}

.hero-welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 12px;
}

.hero-welcome-title {
  font-size: 23px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.hero-welcome-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 18px;
  line-height: 1.5;
}

.hero-welcome-actions {
  display: flex;
  gap: 10px;
}

/* Card B: Functional Visual Banner (Featuring Community Screening Illustration) */
.hero-action-banner-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.action-banner-info {
  flex: 1;
  z-index: 2;
}

.action-banner-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.action-banner-title {
  font-size: 17px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 6px;
  line-height: 1.3;
}

.action-banner-desc {
  font-size: 12px;
  color: #64748B;
  margin-bottom: 14px;
}

.action-banner-image {
  width: 140px;
  height: 110px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.action-banner-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   5. 4 ILLUSTRATED FUNCTION STAT CARDS (from ISO-Web-Clinic)
   ========================================================================== */
.clinic-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.clinic-stat-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

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

.stat-card-text {
  display: flex;
  flex-direction: column;
}

.stat-card-title {
  font-size: 12px;
  font-weight: 600;
  color: #64748B;
  margin-bottom: 4px;
}

.stat-card-num {
  font-size: 26px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-card-badge {
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stat-card-svg-container {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card-svg-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ==========================================================================
   6. TAB PAGES & DATA TABLES
   ========================================================================== */
.page-section {
  display: none;
  animation: fadeIn 0.3s ease;
}

.page-section.active {
  display: block;
}

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

.section-header-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
}

.section-header-title {
  font-size: 18px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 4px;
}

.section-header-desc {
  font-size: 12.5px;
  color: #64748B;
}

/* Tables in Clean White Card */
.white-card-table {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.table-toolbar-bar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #FFFFFF;
}

.table-search-pill {
  position: relative;
  width: 300px;
}

.table-search-pill input {
  width: 100%;
  height: 38px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: #F8FAFC;
  padding: 8px 14px 8px 36px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
}

.table-search-pill input:focus {
  background: #FFFFFF;
  border-color: var(--primary);
}

.table-search-pill .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 14px;
}

.data-table-clinic {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.data-table-clinic thead th {
  background: #F8FAFC;
  color: #64748B;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

.data-table-clinic tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-light);
  color: #334155;
  vertical-align: middle;
}

.data-table-clinic tbody tr:hover td {
  background: #F8FAFC;
}

.data-table-clinic tbody tr:last-child td {
  border-bottom: none;
}

/* Badges & Chips */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.status-pill-green {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.status-pill-blue {
  background: #EFF6FF;
  color: #0284C7;
  border: 1px solid #BAE6FD;
}

.status-pill-yellow {
  background: #FFFBEB;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.status-pill-red {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

/* ==========================================================================
   7. BUTTONS & CONTROLS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(0, 115, 230, 0.25);
}

.btn-success {
  background: var(--success);
  color: #FFFFFF;
}

.btn-success:hover {
  background: var(--success-hover);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-outline {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  color: #334155;
}

.btn-outline:hover {
  background: #F8FAFC;
  border-color: #CBD5E1;
  color: #0F172A;
}

.btn-danger {
  background: var(--error);
  color: #FFFFFF;
}

.btn-danger:hover {
  background: var(--error-hover);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-icon {
  background: none;
  border: none;
  color: #64748B;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}

.btn-icon:hover {
  color: #0F172A;
  background: #F1F5F9;
}

/* ==========================================================================
   8. MODALS & POPUPS
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border-light);
}

.modal-backdrop.open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #0F172A;
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: #FFFFFF;
  padding: 8px 12px;
  font-size: 13.5px;
  color: #0F172A;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 115, 230, 0.15);
}

textarea.form-control {
  height: auto;
  min-height: 80px;
}

/* ==========================================================================
   9. BULK BADGE PRINTING STYLES & MEDIA QUERIES
   ========================================================================== */
.bulk-badges-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  max-height: 480px;
  overflow-y: auto;
  padding: 12px;
  background: #F8FAFC;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.bulk-badge-preview-item {
  background: #FFFFFF;
  border: 1.5px dashed #94A3B8;
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.bulk-badge-preview-item .badge-event {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.bulk-badge-preview-item .badge-num {
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
  font-family: var(--font-mono);
  margin-bottom: 2px;
}

.bulk-badge-preview-item .badge-name {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.2;
}

.bulk-badge-preview-item .badge-meta {
  font-size: 11px;
  color: #64748B;
  margin-top: 2px;
}

.bulk-badge-preview-item .badge-qr-box {
  margin: 8px 0;
  padding: 4px;
  background: #FFFFFF;
  border-radius: var(--radius-sm);
}

.bulk-badge-preview-item .badge-footer {
  font-size: 10px;
  color: #64748B;
  width: 100%;
  border-top: 1px dashed #E2E8F0;
  padding-top: 6px;
  margin-top: 4px;
}

/* ==========================================================================
   10. RESPONSIVE DESIGN (Mobile & Tablet)
   ========================================================================== */
@media (max-width: 1024px) {
  .dashboard-hero-grid {
    grid-template-columns: 1fr;
  }
  .clinic-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .login-split-wrapper {
    flex-direction: column;
  }
  .login-visual-panel {
    display: none;
  }
  .login-form-panel {
    flex: 1 1 100%;
  }
  .app-sidebar {
    position: fixed;
    left: -260px;
  }
  .app-sidebar.mobile-open {
    left: 0;
  }
  .sidebar-toggle-btn {
    display: block;
  }
  .topbar-search-box {
    display: none;
  }
  .clinic-stats-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   11. COMPONENT BADGES, PINS & LIVE CARDS
   ========================================================================== */
.badge-code {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  background: #EFF6FF;
  color: #0073E6;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #BFDBFE;
  display: inline-block;
}

.screener-pin {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  background: #F8FAFC;
  color: #334155;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px dashed #CBD5E1;
  display: inline-block;
  letter-spacing: 1px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge.status-active,
.status-badge.status-completed,
.status-badge.status-green {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}

.status-badge.status-draft,
.status-badge.status-yellow {
  background: #FFFBEB;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.status-badge.status-red {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
}

.status-badge.status-captured,
.status-badge.status-blue,
.status-badge.status-transferred {
  background: #EFF6FF;
  color: #0284C7;
  border: 1px solid #BAE6FD;
}

.status-badge.status-archived {
  background: #F1F5F9;
  color: #64748B;
  border: 1px solid #E2E8F0;
}

.sub-text {
  font-size: 11px;
  color: #64748B;
  margin-top: 2px;
}

.sub-text.text-warning {
  color: #D97706;
}

.action-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.live-participant-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 14px 16px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.live-participant-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.live-participant-card.border-red {
  border-left: 4px solid #EF4444;
}

.live-participant-card.border-green {
  border-left: 4px solid #10B981;
}

.live-participant-card.border-yellow {
  border-left: 4px solid #F59E0B;
}

.live-participant-card.border-blue {
  border-left: 4px solid #0073E6;
}

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

.card-body-compact {
  font-size: 13px;
  color: #334155;
}

.card-footer-compact {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #F1F5F9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.photos-preview-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.photo-thumbnail-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
}

.photo-thumbnail-card img, .photo-img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  display: block;
}

.photo-label {
  font-size: 10px;
  font-weight: 600;
  color: #64748B;
  padding: 4px;
  background: #FFFFFF;
}

.ai-findings-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 16px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  color: #64748B;
  text-align: center;
}

.empty-state svg {
  color: #94A3B8;
  margin-bottom: 8px;
}

.text-danger { color: #EF4444; }
.text-warning { color: #F59E0B; }
.text-primary { color: #0073E6; }
.text-green { color: #10B981; }
.text-muted { color: #64748B; }
.text-dim { color: #94A3B8; }
.text-end { text-align: right; }
.text-center { text-align: center; }

