﻿/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â
   CLAIMS STATUS MANAGEMENT SYSTEM Ã¢â‚¬â€ Design System
   Premium dark theme with glassmorphism
   Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */

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

/* Ã¢â€â‚¬Ã¢â€â‚¬ CSS Custom Properties Ã¢â€â‚¬Ã¢â€â‚¬ */
:root {
  /* Base Colors */
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-tertiary: #1a2236;
  --bg-card: rgba(17, 24, 39, 0.85);
  --bg-card-hover: rgba(26, 34, 54, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-input: rgba(255, 255, 255, 0.05);

  /* Text */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0f172a;

  /* Brand */
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
  --accent-glow: rgba(99, 102, 241, 0.3);

  /* Semantic */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #3b82f6;

  /* Borders */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(99, 102, 241, 0.3);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);

  /* Spacing */
  --sidebar-width: 260px;
  --sidebar-collapsed: 70px;
  --header-height: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Light Theme Ã¢â€â‚¬Ã¢â€â‚¬ */
[data-theme="light"] {
  /* Base Colors */
  --bg-primary: #f1f5f9;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e2e8f0;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: rgba(241, 245, 249, 0.98);
  --bg-glass: rgba(0, 0, 0, 0.02);
  --bg-input: rgba(0, 0, 0, 0.04);

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-inverse: #f8fafc;

  /* Brand Ã¢â‚¬â€ slightly deepened for contrast on white */
  --accent-primary: #4f46e5;
  --accent-secondary: #7c3aed;
  --accent-gradient: linear-gradient(135deg, #4f46e5, #7c3aed);
  --accent-glow: rgba(79, 70, 229, 0.15);

  /* Semantic Ã¢â‚¬â€ slightly darker for white bg readability */
  --color-success: #059669;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --color-info: #2563eb;

  /* Borders */
  --border-color: rgba(0, 0, 0, 0.1);
  --border-accent: rgba(79, 70, 229, 0.25);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 30px rgba(79, 70, 229, 0.08);
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Theme Toggle Button Ã¢â€â‚¬Ã¢â€â‚¬ */
.theme-toggle {
  margin-left: auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-glass);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  position: relative;
}

.theme-toggle:hover {
  background: var(--bg-input);
  color: var(--accent-primary);
  border-color: var(--border-accent);
  transform: rotate(15deg);
}

.theme-icon {
  position: absolute;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Dark mode (default): show moon, hide sun */
.theme-icon-sun {
  opacity: 0;
  transform: scale(0.6) rotate(-90deg);
}

.theme-icon-moon {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* Light mode: show sun, hide moon */
[data-theme="light"] .theme-icon-sun {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

[data-theme="light"] .theme-icon-moon {
  opacity: 0;
  transform: scale(0.6) rotate(90deg);
}

.theme-toggle-float {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 10;
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Reset & Base Ã¢â€â‚¬Ã¢â€â‚¬ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Background pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(139, 92, 246, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
}

a:hover {
  color: var(--accent-secondary);
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Scrollbar Ã¢â€â‚¬Ã¢â€â‚¬ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â LOGIN PAGE Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.login-page {
  display: none;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── Split Layout ── */
.login-panel-left {
  position: fixed;
  left: 0;
  top: 0;
  width: 50%;
  height: 100vh;
  background: linear-gradient(135deg, #0c1222 0%, #111b33 40%, #1a1040 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px;
  overflow: hidden;
}

.login-panel-right {
  margin-left: 50%;
  width: 50%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  background: var(--bg-primary);
}

/* ── Animated Background Orbs ── */
.login-bg-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: loginOrbFloat 12s ease-in-out infinite;
}

.login-orb-1 {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.6), transparent 70%);
  top: 10%;
  left: 15%;
  animation-delay: 0s;
}

.login-orb-2 {
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.5), transparent 70%);
  bottom: 15%;
  right: 10%;
  animation-delay: -4s;
  animation-duration: 15s;
}

.login-orb-3 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.4), transparent 70%);
  top: 55%;
  left: 55%;
  animation-delay: -8s;
  animation-duration: 18s;
}

@keyframes loginOrbFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -20px) scale(1.08);
  }

  66% {
    transform: translate(-20px, 15px) scale(0.95);
  }
}

/* ── Brand Content (Left Panel) ── */
.login-brand-content {
  position: relative;
  z-index: 2;
  max-width: 480px;
  animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 48px;
}

.login-brand-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-gradient);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.login-brand-logo h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.3px;
}

.login-brand-tag {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 2px;
  display: block;
}

.login-hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  color: #f1f5f9;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.login-hero-title span {
  background: linear-gradient(135deg, #818cf8, #a78bfa, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-hero-desc {
  font-size: 1.05rem;
  color: #94a3b8;
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 420px;
}

/* ── Feature Highlights ── */
.login-features {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.login-feature-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(99, 102, 241, 0.25);
  transform: translateX(4px);
}

.login-feature-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-feature-item strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #f1f5f9;
}

.login-feature-item span {
  font-size: 0.8rem;
  color: #64748b;
}

.login-panel-footer {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 2;
}

.login-panel-footer span {
  font-size: 0.75rem;
  color: #475569;
}

/* ── Right Panel — Form ── */
.login-panel-right .theme-toggle-float {
  position: absolute;
  top: 24px;
  right: 24px;
}

.login-form-wrapper {
  width: 100%;
  max-width: 400px;
  animation: slideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.login-form-header {
  margin-bottom: 32px;
}

.login-form-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.login-form-header p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ── Form Inputs with Icons ── */
.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.2s;
  z-index: 1;
}

.login-input-wrap:focus-within .login-input-icon {
  color: var(--accent-primary);
}

.login-input {
  padding-left: 44px !important;
  padding-right: 14px;
  height: 48px;
  font-size: 0.95rem;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  transition: all 0.25s ease;
}

.login-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(255, 255, 255, 0.06);
}

/* ── Password Toggle ── */
.login-pw-toggle {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.login-pw-toggle:hover {
  color: var(--text-primary);
}

/* ── Submit Button ── */
.login-submit-btn {
  height: 50px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent-gradient);
  border: none;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
  margin-top: 4px;
}

.login-submit-btn:hover {
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.login-submit-btn:active {
  transform: translateY(0);
}

.login-submit-btn svg {
  transition: transform 0.3s ease;
}

.login-submit-btn:hover svg {
  transform: translateX(3px);
}

/* ── Divider ── */
.login-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0 20px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.login-divider span {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  white-space: nowrap;
}

/* ── Demo Accounts (redesigned) ── */
.demo-accounts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-accounts h4 {
  display: none;
}

.demo-account-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.demo-account-btn:last-child {
  margin-bottom: 0;
}

.demo-account-btn:hover {
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateX(2px);
}

.demo-account-btn .role-badge {
  font-size: 0.65rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 72px;
  text-align: center;
}

.demo-btn-label {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.3;
  font-weight: 500;
}

.demo-btn-label small {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ── Login Error ── */
.login-error {
  color: var(--color-danger);
  font-size: 0.85rem;
  text-align: center;
  display: none;
  padding: 10px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
}

/* ── Responsive: Stack panels on mobile ── */
@media (max-width: 1024px) {
  .login-panel-left {
    display: none;
  }

  .login-panel-right {
    margin-left: 0;
    width: 100%;
  }
}

/* ═══ BASE FORM STYLES ═══ */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input,
.form-select {
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  width: 100%;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* ═══ LAYOUT ═══ */
.app-layout {
  display: none;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.app-layout.active {
  display: flex;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Sidebar Ã¢â€â‚¬Ã¢â€â‚¬ */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 100;
  backdrop-filter: blur(20px);
  transition: width var(--transition-normal), transform var(--transition-normal);
  overflow: hidden;
}

.sidebar.collapsed {
  width: 0;
  border-right: none;
}

.sidebar.collapsed .sidebar-logo,
.sidebar.collapsed .sidebar-nav,
.sidebar.collapsed .sidebar-footer,
.sidebar.collapsed .sidebar-org-context,
.sidebar.collapsed .theme-toggle {
  opacity: 0;
  pointer-events: none;
}

.sidebar-collapse-btn {
  position: fixed;
  left: calc(var(--sidebar-width) - 12px);
  top: 28px;
  width: 24px;
  height: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  z-index: 200;
  transition: all var(--transition-normal);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sidebar-collapse-btn:hover {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
}

.sidebar-collapse-btn svg {
  transition: transform var(--transition-normal);
}

body.sidebar-collapsed .sidebar-collapse-btn {
  left: 6px;
}

body.sidebar-collapsed .sidebar-collapse-btn svg {
  transform: rotate(180deg);
}

.sidebar-toggle {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  padding: 0;
  transition: margin-left var(--transition-normal);
}

.sidebar.collapsed~.main-content,
body.sidebar-collapsed .main-content {
  margin-left: 0;
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo-icon {
  width: 38px;
  height: 38px;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.sidebar-logo-text h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.sidebar-logo-text span {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â GLOBAL ORG CONTEXT SELECTOR Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.sidebar-org-context {
  padding: 0 14px;
  margin-bottom: 4px;
  transition: opacity 0.2s ease;
}

.org-context-selector {
  padding: 8px 10px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.06) 0%, rgba(99, 102, 241, 0.08) 100%);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-md);
}

.org-context-label-text {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  color: #8b5cf6;
  margin-bottom: 6px;
}

.org-context-select {
  width: 100%;
  padding: 6px 28px 6px 8px;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b5cf6' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: all 0.2s ease;
}

.org-context-select:hover {
  border-color: rgba(139, 92, 246, 0.4);
}

.org-context-select:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.org-context-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.1);
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.org-context-label svg {
  color: #8b5cf6;
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  padding: 12px 10px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 16px 12px 6px;
  font-weight: 600;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 2px;
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.nav-item:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  width: 3px;
  height: 24px;
  background: var(--accent-gradient);
  border-radius: 0 4px 4px 0;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-item.active svg {
  opacity: 1;
}

.nav-badge {
  margin-left: auto;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--color-danger);
  color: white;
  font-weight: 600;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Claims Segment Toggle Ã¢â€â‚¬Ã¢â€â‚¬ */
.claims-segment-toggle {
  display: flex;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
}

.segment-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
  position: relative;
}

.segment-btn+.segment-btn {
  border-left: 1px solid var(--border-color);
}

.segment-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.segment-btn.active {
  color: white;
  background: var(--accent-primary);
  font-weight: 600;
}

.segment-btn.active .segment-count {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

.segment-count {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--bg-hover);
  color: var(--text-secondary);
  min-width: 20px;
  text-align: center;
  line-height: 1.3;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ View Toggle Ã¢â€â‚¬Ã¢â€â‚¬ */
.view-toggle {
  display: flex;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.view-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  white-space: nowrap;
}

.view-toggle-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.view-toggle-btn.active {
  color: white;
  background: var(--accent-primary);
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Inline Select Dropdowns Ã¢â€â‚¬Ã¢â€â‚¬ */
.inline-select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 4px 22px 4px 8px;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inline-select:hover {
  border-color: var(--border-color);
  background-color: var(--bg-hover);
}

.inline-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.inline-status-select {
  border-radius: 20px;
  padding: 3px 22px 3px 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.inline-status-select.badge-new {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
}

.inline-status-select.badge-in_progress {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}

.inline-status-select.badge-pending_payer {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.inline-status-select.badge-follow_up {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}

.inline-status-select.badge-denied {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.inline-status-select.badge-appealed {
  background: rgba(249, 115, 22, 0.12);
  color: #f97316;
}

.inline-status-select.badge-paid {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.inline-status-select.badge-closed {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}

.inline-status-select.badge-escalated {
  background: rgba(225, 29, 72, 0.12);
  color: #e11d48;
}

.inline-status-select:hover {
  background-color: var(--bg-hover);
}

.inline-action-select {
  color: var(--text-secondary);
  max-width: 170px;
  font-size: 0.72rem;
}

.inline-assign-select {
  color: var(--text-secondary);
  max-width: 130px;
}

.inline-date {
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  max-width: 120px;
}

.inline-date:hover {
  border-color: var(--border-color);
  background-color: var(--bg-hover);
}

.inline-date:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.inline-date-overdue {
  color: #ef4444;
  font-weight: 600;
}

.inline-date-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.inline-date-btns {
  display: flex;
  gap: 3px;
}

.inline-date-quick {
  border: none;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  line-height: 1.3;
}

.inline-date-quick:hover {
  background: var(--accent-primary);
  color: white;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Inline Notes Ã¢â€â‚¬Ã¢â€â‚¬ */
.btn-notes-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-notes-icon:hover {
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary);
}

.inline-note-popup {
  position: fixed;
  z-index: 1000;
  width: 300px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  padding: 0;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.inline-note-popup.visible {
  opacity: 1;
  transform: scale(1);
}

.inline-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
  border-bottom: 1px solid var(--border-color);
}

.inline-note-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.inline-note-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  border-radius: var(--radius-sm);
}

.inline-note-close:hover {
  color: var(--color-danger);
}

.inline-note-meta {
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-hover);
}

.inline-note-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inline-note-field label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
}

.inline-note-locked {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-primary);
}

.inline-note-textarea {
  width: 100%;
  border: none;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: transparent;
  padding: 10px 14px;
  font-size: 0.8rem;
  color: var(--text-primary);
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
  box-sizing: border-box;
}

.inline-note-textarea:focus {
  outline: none;
  background: var(--bg-hover);
}

.inline-note-textarea::placeholder {
  color: var(--text-muted);
}

.inline-note-save {
  margin: 10px 14px 12px;
  width: calc(100% - 28px);
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Insurance Buckets Ã¢â€â‚¬Ã¢â€â‚¬ */
.buckets-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 0 16px;
  align-items: center;
}

.buckets-summary-stat {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 7px 14px;
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.buckets-summary-stat strong {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.95rem;
}

.buckets-summary-stat svg {
  opacity: 0.6;
}

.buckets-summary-danger {
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.06);
}

.buckets-summary-danger strong {
  color: #ef4444;
}

.buckets-summary-danger svg {
  stroke: #ef4444;
  opacity: 0.8;
}

.buckets-summary-warn {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.06);
}

.buckets-summary-warn strong {
  color: #f59e0b;
}

.buckets-summary-warn svg {
  stroke: #f59e0b;
  opacity: 0.8;
}

.ins-bucket {
  margin-bottom: 10px;
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
  border-radius: var(--radius-md) !important;
}

.ins-bucket:hover {
  box-shadow: var(--shadow-sm);
}

.ins-bucket.expanded {
  box-shadow: var(--shadow-md);
  border-color: var(--accent-primary);
}

.ins-bucket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  cursor: pointer;
  gap: 16px;
  transition: background var(--transition-fast);
}

.ins-bucket-header:hover {
  background: var(--bg-hover);
}

.ins-bucket-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ins-bucket-chevron {
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-muted);
}

.ins-bucket.expanded .ins-bucket-chevron {
  transform: rotate(180deg);
  color: var(--accent-primary);
}

.ins-bucket-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.12));
  color: var(--accent-primary);
  flex-shrink: 0;
}

.ins-bucket.expanded .ins-bucket-icon {
  background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
  color: white;
}

.ins-bucket-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.ins-bucket-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ins-bucket-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.ins-bucket-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ins-badge {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.ins-badge-open {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.ins-badge-overdue {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.ins-badge-today {
  background: rgba(6, 182, 212, 0.12);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.ins-badge-unassigned {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.ins-badge-amount {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  font-weight: 700;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.buckets-summary-amount {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.06);
}

.buckets-summary-amount strong {
  color: #10b981;
}

.buckets-summary-amount svg {
  stroke: #10b981;
  opacity: 0.8;
}

.ins-bucket-bar {
  width: 60px;
  height: 4px;
  background: var(--bg-glass);
  border-radius: 2px;
  overflow: hidden;
}

.ins-bucket-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), #8b5cf6);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}


@keyframes bucketSlideDown {
  from {
    opacity: 0;
    max-height: 0;
  }

  to {
    opacity: 1;
    max-height: 2000px;
  }
}

.ins-bucket-body {
  border-top: 1px solid var(--border-color);
  animation: bucketSlideDown 0.35s ease forwards;
  overflow: hidden;
}

.ins-bucket-meta {
  display: flex;
  gap: 20px;
  padding: 10px 20px;
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-color);
}

.ins-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
}

.ins-meta-label {
  color: var(--text-muted);
}

.ins-meta-value {
  font-weight: 600;
  color: var(--text-primary);
}

.ins-bucket-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-glass);
  flex-wrap: wrap;
}

.ins-bucket-action-group {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.ins-action-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  width: 100%;
  margin-bottom: 2px;
}

.ins-bucket-action-divider {
  width: 1px;
  height: 32px;
  background: var(--border-color);
  margin: 0 6px;
  flex-shrink: 0;
}

/* Clinic subgroups */
.ins-clinic-subgroup {
  border-bottom: 1px solid var(--border-color);
}

.ins-clinic-subgroup:last-child {
  border-bottom: none;
}

.ins-clinic-subheader {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(139, 92, 246, 0.04));
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.ins-clinic-subheader svg {
  color: var(--accent-primary);
  opacity: 0.6;
}

.ins-clinic-subcount {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-left: auto;
}

.ins-bucket-loadmore {
  display: flex;
  justify-content: center;
  padding: 12px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-glass);
}


/* Ã¢â€â‚¬Ã¢â€â‚¬ Practice Info View Ã¢â€â‚¬Ã¢â€â‚¬ */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  animation: slideUp 0.4s ease;
}

.practice-card-wide {
  grid-column: 1 / -1;
}

.practice-card {
  overflow: hidden;
}

.practice-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border-color);
}

.practice-card-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

.practice-card-body {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.practice-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.practice-field-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.practice-field-value {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 500;
}

.practice-field-value.mono {
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.practice-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-color);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
}

.practice-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 8px;
  background: var(--bg-card);
  gap: 4px;
}

.practice-stat-val {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1;
}

.practice-stat-lbl {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.practice-providers-list {
  padding: 8px 20px 16px;
}

.practice-provider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.practice-provider-row+.practice-provider-row {
  border-top: 1px solid var(--border-color);
}

.practice-provider-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.practice-provider-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-primary);
}

.practice-provider-npi {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

.practice-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  text-align: center;
}

.practice-empty-state span {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.sidebar-user:hover {
  background: var(--bg-input);
}

.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

.sidebar-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.sidebar-logout:hover {
  color: var(--color-danger);
}



/* Ã¢â€â‚¬Ã¢â€â‚¬ View System Ã¢â€â‚¬Ã¢â€â‚¬ */
.view {
  display: none;
  padding: 28px 32px;
  animation: fadeIn 0.3s ease;
}

.view.active {
  display: block;
}

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

.view-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.view-subtitle {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: 4px;
}

.view-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â BUTTONS Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: var(--border-accent);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  background: rgba(16, 185, 129, 0.25);
}

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

.btn-xs {
  padding: 4px 10px;
  font-size: 0.75rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn-icon {
  padding: 8px;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--bg-input);
  color: var(--text-primary);
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â CARDS Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: box-shadow var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  padding: 22px;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â KPI CARDS Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--transition-normal);
  cursor: default;
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.kpi-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.kpi-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-glow);
}

.kpi-card:hover::after {
  opacity: 1;
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-icon-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.kpi-icon-green {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.kpi-icon-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.kpi-icon-purple {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.kpi-icon-red {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.kpi-icon-indigo {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
}

.kpi-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.kpi-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.kpi-trend {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 4px;
}

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

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

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â DATA TABLE Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table thead tr {
  background: rgba(255, 255, 255, 0.03);
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color var(--transition-fast);
}

.data-table th:hover {
  color: var(--text-primary);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: var(--bg-glass);
}

.data-table tbody tr.selected {
  background: rgba(99, 102, 241, 0.08);
}

/* Text helpers */
.text-center {
  text-align: center;
}

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

.text-right {
  text-align: right;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â STATUS BADGE Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-new {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
}

.badge-in_progress {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.badge-pending_payer {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.badge-follow_up {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.badge-denied {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.badge-appealed {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

.badge-paid {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.badge-closed {
  background: rgba(100, 116, 139, 0.15);
  color: #64748b;
}

.badge-escalated {
  background: rgba(225, 29, 72, 0.15);
  color: #e11d48;
}

/* Duplicate result badges */
.dup-new {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.dup-exact {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.dup-possible {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.dup-reopen {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
  font-weight: 600;
}

.dup-addcpt {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  font-weight: 600;
}

.dup-error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* Role badges */
.role-admin {
  background: rgba(225, 29, 72, 0.15);
  color: #e11d48;
}

.role-manager {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
}

.role-agent {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â UPLOAD AREA Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.upload-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.upload-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.upload-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
}

.upload-step.active {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
}

.upload-step.completed {
  color: var(--color-success);
  border-color: var(--color-success);
  background: rgba(16, 185, 129, 0.1);
}

.upload-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bg-input);
}

.upload-step.active .upload-step-num {
  background: var(--accent-primary);
  color: white;
}

.upload-step.completed .upload-step-num {
  background: var(--color-success);
  color: white;
}

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

.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  background: var(--bg-glass);
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.05);
}

.dropzone-icon {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.dropzone-text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.dropzone-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.dropzone-formats {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 16px;
}

.file-info-icon {
  width: 40px;
  height: 40px;
  background: rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}

.file-info-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.88rem;
}

.file-info-size {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.file-info-remove {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.file-info-remove:hover {
  color: var(--color-danger);
}

/* Upload clinic selector */
.upload-config {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.upload-config .form-group {
  flex: 1;
  min-width: 200px;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â STAGING / REVIEW TABLE Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.staging-summary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.staging-stat {
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.staging-stat:hover {
  transform: translateY(-1px);
}

.staging-stat-count {
  font-size: 1.2rem;
  font-weight: 800;
}

.staging-stat.new {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.staging-stat.exact {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.staging-stat.possible {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.staging-stat.error {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.staging-stat.total {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}

.staging-stat.active {
  border-color: currentColor;
}

.review-actions-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.review-actions-bar .btn {
  font-size: 0.8rem;
}

.action-select {
  padding: 6px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-family: inherit;
}

.action-select option {
  background: var(--bg-secondary);
}

/* Column mapping */
.column-mapping {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  padding: 20px;
}

.column-map-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.column-map-from {
  font-size: 0.82rem;
  color: var(--text-secondary);
  min-width: 100px;
}

.column-map-arrow {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.column-map-to {
  flex: 1;
}

/* Format badge in column mapping */
.mapping-format-badge {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(59, 130, 246, 0.06));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}

.format-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.format-label strong {
  color: var(--accent-primary);
}

.mapped-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-glass);
  padding: 3px 10px;
  border-radius: 12px;
}

.column-map-item.mapped {
  border-left: 3px solid var(--color-success);
}


/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â AGENT QUEUE FILTERS Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.queue-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

/* ── Clinic Toggle Chips ── */
.queue-clinic-toggles {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  padding: 0 2px;
}

.clinic-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  letter-spacing: 0.2px;
}

.clinic-chip:hover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.06);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.clinic-chip.active {
  background: rgba(99, 102, 241, 0.14);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.18);
}

.clinic-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.clinic-chip.active .clinic-chip-count {
  background: var(--accent-primary);
  color: white;
}

.queue-search-wrapper {
  flex: 1;
  min-width: 200px;
}

.queue-filter-select {
  max-width: 180px;
  font-size: 0.82rem !important;
  padding: 8px 12px !important;
}

.queue-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 5px 12px;
  background: var(--bg-tertiary);
  border-radius: 20px;
  white-space: nowrap;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Visit Cell (DOS + CPT grouped) Ã¢â€â‚¬Ã¢â€â‚¬ */
.queue-visit-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.queue-visit-dos {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.queue-visit-cpts {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.queue-cpt-code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.75rem;
  color: var(--accent-secondary);
  background: rgba(16, 185, 129, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.queue-cpt-more {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  cursor: default;
}

.queue-merged-badge {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
}

/* â•â•â• CLAIM DETAIL PANEL â€” Compact Inline-Editable â•â•â• */
.detail-panel {
  position: fixed;
  right: -620px;
  top: 0;
  width: 620px;
  height: 100vh;
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  z-index: 200;
  transition: right 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  backdrop-filter: blur(24px);
  box-shadow: -8px 0 48px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.detail-panel.open {
  right: 0;
}

/* â”€â”€ Header row â”€â”€ */
.detail-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(180deg, var(--bg-card) 60%, var(--bg-secondary));
  flex-shrink: 0;
}

.detail-patient-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
  color: white;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.25);
}

.detail-header-info {
  flex: 1;
  min-width: 0;
}

.detail-header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.detail-header-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.detail-meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.4;
  flex-shrink: 0;
}

.detail-header-status {
  flex-shrink: 0;
  margin-top: 6px;
}

#detail-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
}

.detail-header-status select {
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary);
  transition: all 0.15s ease;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 18px;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='3'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 5px center;
}

.detail-header-status select:hover {
  border-color: var(--accent-primary);
}

.detail-close {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  line-height: 1;
  flex-shrink: 0;
  transition: all 0.12s ease;
}

.detail-close:hover {
  color: var(--text-primary);
  background: var(--bg-input);
  border-color: var(--accent-primary);
}

/* â”€â”€ Scrollable body â”€â”€ */
.detail-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 16px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 102, 241, 0.15) transparent;
}

.detail-body::-webkit-scrollbar {
  width: 4px;
}

.detail-body::-webkit-scrollbar-track {
  background: transparent;
}

.detail-body::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.15);
  border-radius: 4px;
}

/* â”€â”€ Denied action card â”€â”€ */
.detail-denied-card {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
  animation: denyPulse 2.5s infinite;
}

@keyframes denyPulse {

  0%,
  100% {
    border-color: rgba(239, 68, 68, 0.18);
  }

  50% {
    border-color: rgba(239, 68, 68, 0.35);
  }
}

.detail-denied-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 6px;
}

.detail-denied-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.detail-denied-grid .dp-field label {
  font-size: 0.62rem;
  color: #ef4444;
  opacity: 0.7;
}

.detail-denied-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.detail-denied-actions .btn {
  font-size: 0.72rem;
  padding: 4px 10px;
  flex: 1;
}

/* â”€â”€ 2-column inline-editable field grid â”€â”€ */
.dp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}

.dp-field {
  padding: 6px 10px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 1px;
  transition: background 0.12s ease;
}

.dp-field:hover {
  background: var(--bg-glass);
}

.dp-field.span2 {
  grid-column: span 2;
}

.dp-field label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1;
}

.dp-field .dp-val {
  font-size: 0.82rem;
  color: var(--text-primary);
  font-weight: 500;
  padding: 3px 0 1px;
}

.dp-field .dp-val.financial {
  color: #10b981;
  font-weight: 700;
}

.dp-field .dp-val.mono {
  font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--accent-secondary);
}

.dp-field .dp-val.overdue {
  color: #ef4444;
}

/* Inline editable inputs */
.dp-field select,
.dp-field input[type="date"],
.dp-field input[type="text"] {
  width: 100%;
  padding: 3px 6px;
  font-size: 0.8rem;
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--text-primary);
  font-family: inherit;
  transition: all 0.12s ease;
  cursor: pointer;
}

.dp-field select:hover,
.dp-field input:hover {
  border-color: rgba(99, 102, 241, 0.25);
}

.dp-field select:focus,
.dp-field input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.dp-field select option {
  background: var(--bg-secondary);
}

/* Follow-up quick chips */
.dp-followup-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.dp-followup-row input[type="date"] {
  flex: 1;
}

.dp-fup-chip {
  padding: 2px 6px;
  font-size: 0.62rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: all 0.12s ease;
  white-space: nowrap;
}

.dp-fup-chip:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

/* CPT chips */
.dp-cpt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 2px 0;
}

.dp-cpt-chip {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.72rem;
  color: var(--accent-secondary);
  background: rgba(16, 185, 129, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.dp-merged-badge {
  font-size: 0.58rem;
  text-transform: uppercase;
  font-weight: 700;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  padding: 1px 5px;
  border-radius: 3px;
}

/* â”€â”€ Section headers (collapsible) â”€â”€ */
.dp-section {
  margin-top: 8px;
}

.dp-section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  cursor: pointer;
  user-select: none;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--accent-primary);
  font-weight: 700;
}

.dp-section-header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15), transparent);
}

.dp-section-header svg {
  transition: transform 0.2s ease;
}

.dp-section.collapsed .dp-section-header svg {
  transform: rotate(-90deg);
}

.dp-section-body {
  overflow: hidden;
  transition: max-height 0.25s ease;
  max-height: 500px;
}

.dp-section.collapsed .dp-section-body {
  max-height: 0;
}

/* â”€â”€ Notes mini-section â”€â”€ */
.dp-note-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.dp-note-row textarea {
  flex: 1;
  min-height: 80px;
  max-height: 160px;
  font-size: 0.78rem;
  padding: 8px 10px;
  resize: vertical;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: inherit;
  transition: border-color 0.12s ease;
}

.dp-note-row textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.08);
}

.dp-note-row .btn {
  font-size: 0.72rem;
  padding: 6px 10px;
  align-self: flex-end;
  flex-shrink: 0;
  border-radius: 6px;
}

.dp-note-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 8px;
  margin-bottom: 4px;
}

.dp-note-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}

.dp-note-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), #8b5cf6);
  color: white;
  font-size: 0.55rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dp-note-author {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-primary);
}

.dp-note-time {
  font-size: 0.64rem;
  color: var(--text-muted);
  margin-left: auto;
}

.dp-note-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.dp-notes-empty {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: center;
  padding: 8px;
  opacity: 0.5;
}

/* â”€â”€ Activity timeline compact â”€â”€ */
.dp-timeline-item {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  font-size: 0.72rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.dp-timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
  background: var(--accent-primary);
}

.dp-timeline-dot.status_change {
  background: #f59e0b;
}

.dp-timeline-dot.reassign {
  background: #8b5cf6;
}

.dp-timeline-dot.followup_set {
  background: #10b981;
}

.dp-timeline-dot.import_create {
  background: var(--text-muted);
}

.dp-timeline-dot.action_taken {
  background: #3b82f6;
}

.dp-timeline-content {
  flex: 1;
  min-width: 0;
}

.dp-timeline-who {
  font-weight: 600;
  color: var(--text-primary);
}

.dp-timeline-what {
  color: var(--text-muted);
}

.dp-timeline-note {
  color: var(--text-secondary);
  margin-top: 2px;
  padding: 3px 6px;
  background: var(--bg-glass);
  border-radius: 4px;
  border-left: 2px solid var(--border-accent);
}

.dp-timeline-when {
  font-size: 0.64rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

/* â”€â”€ Sticky save bar â”€â”€ */
.detail-save-bar {
  padding: 8px 16px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.detail-save-bar .dp-save-hint {
  font-size: 0.68rem;
  color: var(--text-muted);
  flex: 1;
}

.detail-save-bar .dp-save-hint kbd {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  padding: 1px 4px;
  font-size: 0.62rem;
  font-family: inherit;
}

.detail-save-bar .btn {
  padding: 7px 20px;
  font-size: 0.8rem;
  border-radius: 8px;
  font-weight: 600;
}

.detail-save-bar .btn-cancel {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  padding: 7px 14px;
  font-size: 0.8rem;
  border-radius: 8px;
  transition: all 0.12s ease;
}

.detail-save-bar .btn-cancel:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.dp-saved-indicator {
  font-size: 0.7rem;
  color: #10b981;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dp-saved-indicator.show {
  opacity: 1;
}

/* ── Header financial badges ── */
.detail-header-badges {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.dp-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 8px;
  letter-spacing: 0.3px;
}

.dp-badge-amount {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.dp-badge-sub {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.75rem;
}

.dp-badge-cpt {
  background: rgba(6, 182, 212, 0.12);
  color: #06b6d4;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.75rem;
}

.dp-badge-clinic {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Click-outside backdrop ── */
.detail-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.detail-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Activity Timeline */
.timeline {
  position: relative;
  padding-left: 24px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline-item {
  position: relative;
  padding: 12px 0 16px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid var(--bg-card);
}

.timeline-item.note::before {
  background: var(--color-info);
}

.timeline-item.status_change::before {
  background: var(--color-warning);
}

.timeline-item.followup_set::before {
  background: var(--color-success);
}

.timeline-item.reassign::before {
  background: #8b5cf6;
}

.timeline-item.import_create::before {
  background: var(--text-muted);
}

.timeline-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.timeline-author {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.timeline-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.timeline-type {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--bg-input);
  color: var(--text-muted);
  font-weight: 500;
  text-transform: capitalize;
}

.timeline-note {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 10px 14px;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--border-accent);
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â DETAIL PANEL NOTES Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.detail-notes-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--accent-primary);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  margin-left: 6px;
  letter-spacing: 0;
  text-transform: none;
}

.detail-note-add {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
}

.detail-note-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.84rem;
  padding: 10px 12px;
  resize: vertical;
  min-height: 214px;
  transition: border-color var(--transition-fast);
}

.detail-note-input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.detail-note-input::placeholder {
  color: var(--text-muted);
}

.detail-note-save-btn {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.detail-notes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-note-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: border-color var(--transition-fast);
}

.detail-note-card:hover {
  border-color: var(--border-accent);
}

.detail-note-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.detail-note-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary, #8b5cf6));
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.detail-note-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.detail-note-author {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.detail-note-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.detail-note-ago {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.detail-note-text {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-notes-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* Activity Log Toggle */
.detail-activity-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  user-select: none;
  transition: color var(--transition-fast);
}

.detail-activity-toggle:hover {
  color: var(--text-secondary);
}

.detail-activity-chevron {
  transition: transform var(--transition-fast);
}

/* Claims Table Notes Icon */
.btn-notes-icon {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 5px 7px;
  cursor: pointer;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-notes-icon:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-notes-icon.has-notes {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #10b981;
}

.btn-notes-icon.has-notes:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â NOTES PANEL (slim slide-in) Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
/* ── Notes panel backdrop overlay ── */
.notes-panel-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.notes-panel-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.notes-panel {
  position: fixed;
  right: -380px;
  top: 0;
  width: 360px;
  height: 100vh;
  background: #111827;
  border-left: 1px solid var(--border-color);
  z-index: 200;
  transition: right var(--transition-slow);
  box-shadow: -4px 0 32px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

[data-theme="light"] .notes-panel {
  background: #ffffff;
}

.notes-panel.open {
  right: 0;
}

.notes-panel-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  background: inherit;
}

.notes-panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.notes-panel-title-wrap h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}

.notes-panel-title-wrap svg {
  opacity: 0.5;
  flex-shrink: 0;
}

.notes-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  background: inherit;
}

.notes-panel-add {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 16px;
}

[data-theme="light"] .notes-panel-add {
  background: rgba(0, 0, 0, 0.03);
}

.notes-panel-count {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.notes-panel-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Note Form */
.note-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.note-textarea {
  width: 100%;
  min-height: 80px;
  padding: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  resize: vertical;
  outline: none;
}

.note-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.note-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.note-form-actions .form-group {
  flex: 1;
  min-width: 140px;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â MODAL Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

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

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 18px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â DASHBOARD CHARTS Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.chart-bar-container {
  padding: 6px 0;
}

.chart-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.chart-bar-label {
  width: 100px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: right;
}

.chart-bar-track {
  flex: 1;
  height: 28px;
  background: var(--bg-glass);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.chart-bar-fill {
  height: 100%;
  border-radius: 6px;
  display: flex;
  align-items: center;
  padding-left: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
}

.chart-bar-value {
  font-size: 0.82rem;
  color: var(--text-primary);
  font-weight: 600;
  width: 40px;
  text-align: right;
}

/* Aging donut placeholder */
.aging-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.aging-bucket {
  text-align: center;
  padding: 16px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.aging-bucket:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.aging-bucket-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  display: block;
}

.aging-bucket-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Open A/R CPT Summary Ã¢â€â‚¬Ã¢â€â‚¬ */
.ar-cpt-summary {
  font-size: 0.82rem;
  color: var(--text-secondary);
  padding: 8px 0 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 12px;
}

.ar-cpt-summary strong {
  color: var(--text-primary);
  font-weight: 700;
}

.chart-bar-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 65px;
  text-align: right;
}

.ar-dollar {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ar-pct {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
}

.ar-pct.ar-high-risk {
  color: #ef4444;
  font-weight: 700;
}

/* Single-column chart grid */
.charts-grid-single {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Payer A/R Table Ã¢â€â‚¬Ã¢â€â‚¬ */
.payer-ar-table {
  padding: 4px 0;
}

.payer-ar-header {
  display: grid;
  grid-template-columns: 1.8fr 0.5fr 2fr 0.6fr;
  gap: 12px;
  padding: 8px 12px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.payer-ar-row {
  display: grid;
  grid-template-columns: 1.8fr 0.5fr 2fr 0.6fr;
  gap: 12px;
  padding: 10px 12px;
  align-items: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
  transition: background var(--transition-fast);
}

.payer-ar-row:hover {
  background: var(--bg-hover);
}

.payer-ar-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payer-ar-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-secondary);
  text-align: center;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
}

.payer-ar-amount {
  display: flex;
  align-items: center;
  gap: 10px;
}

.payer-ar-bar-track {
  flex: 1;
  height: 8px;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.payer-ar-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  transition: width 0.6s ease;
}

.payer-ar-pct {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
}

.payer-ar-pct.ar-high-risk {
  color: #ef4444;
  font-weight: 700;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Open A/R Trend Chart Ã¢â€â‚¬Ã¢â€â‚¬ */
.trend-chart-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 16px;
}

.trend-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.trend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.trend-chart-wrapper {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.trend-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 8px 28px 0;
  min-width: 48px;
  text-align: right;
}

.trend-y-axis span {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.trend-y-right {
  padding: 0 0 28px 8px;
  text-align: left;
}

.trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex: 1;
  height: 200px;
  padding: 0 4px;
  border-bottom: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

.trend-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.trend-bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  width: 100%;
  justify-content: center;
}

.trend-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 32px;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}

.trend-bar-tooltip {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  margin-bottom: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.trend-bar-group:hover .trend-bar-tooltip {
  opacity: 1;
}

.trend-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 4px;
  cursor: default;
}

.trend-bar:hover {
  filter: brightness(1.15);
}

.trend-bar-ar {
  background: linear-gradient(180deg, #f59e0b, #ef4444);
}

.trend-bar-claims {
  background: linear-gradient(180deg, #3b82f6, #6366f1);
}

.trend-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 8px;
  white-space: nowrap;
}

.trend-direction {
  display: flex;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 4px;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â
   DASHBOARD v2 Ã¢â‚¬â€ Revenue Operations
   Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */

/* Ã¢â€â‚¬Ã¢â€â‚¬ Revenue Risk Strip Ã¢â€â‚¬Ã¢â€â‚¬ */
.db-risk-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  gap: 24px;
  flex-wrap: wrap;
}

.db-risk-strip-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.db-risk-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: dbRiskPulse 2s ease-in-out infinite;
}

@keyframes dbRiskPulse {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 currentColor;
  }

  50% {
    opacity: 0.7;
    box-shadow: 0 0 0 4px transparent;
  }
}

.db-risk-label {
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.3px;
}

.db-risk-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

.db-risk-strip-stats {
  display: flex;
  gap: 32px;
}

.db-risk-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.db-risk-stat-val {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.db-risk-stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ KPI Grid Ã¢â€â‚¬Ã¢â€â‚¬ */
.db-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.db-kpi {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--transition-normal);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.db-kpi::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: var(--kc);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.db-kpi:hover {
  border-color: var(--border-accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.db-kpi:hover::before {
  opacity: 1;
}

.db-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.db-kpi-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.db-kpi-val {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.db-kpi-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.db-kpi-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Dashboard Card Ã¢â€â‚¬Ã¢â€â‚¬ */
.db-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: border-color var(--transition-normal);
}

.db-card:hover {
  border-color: var(--border-accent);
}

.db-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 8px;
}

.db-card-head h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.2px;
}

.db-card-subtitle {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Row layout (2-col) Ã¢â€â‚¬Ã¢â€â‚¬ */
.db-row-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Aging Buckets Ã¢â€â‚¬Ã¢â€â‚¬ */
.db-aging-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.db-aging-bucket {
  text-align: center;
  padding: 18px 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.db-aging-bucket:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.db-aging-val {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.db-aging-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.db-aging-ar {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 2px;
}

.db-aging-alert {
  font-size: 0.65rem;
  font-weight: 700;
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 4px;
  white-space: nowrap;
}

.db-aging-critical {
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.2), 0 4px 16px rgba(220, 38, 38, 0.08);
  animation: dbAgingPulse 3s ease-in-out infinite;
}

@keyframes dbAgingPulse {

  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.2), 0 4px 16px rgba(220, 38, 38, 0.08);
  }

  50% {
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.3), 0 4px 20px rgba(220, 38, 38, 0.12);
  }
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Status Breakdown Ã¢â€â‚¬Ã¢â€â‚¬ */
.db-status-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.db-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.db-status-label {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 130px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
  flex-shrink: 0;
}

.db-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.db-status-track {
  flex: 1;
  height: 22px;
  background: var(--bg-glass);
  border-radius: 5px;
  overflow: hidden;
}

.db-status-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
}

.db-status-count {
  width: 32px;
  text-align: right;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Trend Chart v2 Ã¢â€â‚¬Ã¢â€â‚¬ */
.db-trend-legend {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 14px;
}

.db-trend-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}

.db-trend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.db-trend-wrapper {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.db-trend-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 8px 36px 0;
  min-width: 44px;
  text-align: right;
}

.db-trend-y-axis span {
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.db-trend-y-right {
  padding: 0 0 36px 8px;
  text-align: left;
}

.db-trend-chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex: 1;
  height: 180px;
  padding: 0 4px;
  border-bottom: 1px solid var(--border-color);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

.db-trend-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.db-trend-bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  width: 100%;
  justify-content: center;
}

.db-trend-bar-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 28px;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}

.db-trend-tooltip {
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  margin-bottom: 3px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.db-trend-bar-group:hover .db-trend-tooltip {
  opacity: 1;
}

.db-trend-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 3px;
  cursor: default;
}

.db-trend-bar:hover {
  filter: brightness(1.15);
}

.db-trend-bar-ar {
  background: linear-gradient(180deg, #f59e0b, #ef4444);
}

.db-trend-bar-claims {
  background: linear-gradient(180deg, #3b82f6, #6366f1);
}

.db-trend-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 6px;
  white-space: nowrap;
}

.db-trend-dir {
  display: flex;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 2px;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ CPT Bars Ã¢â€â‚¬Ã¢â€â‚¬ */
.db-cpt-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.db-cpt-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.db-cpt-code {
  width: 70px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: right;
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;
}

.db-cpt-track {
  flex: 1;
  height: 24px;
  background: var(--bg-glass);
  border-radius: 5px;
  overflow: hidden;
}

.db-cpt-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.db-cpt-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  min-width: 55px;
  text-align: right;
}

.db-cpt-claims {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.db-cpt-ar {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
}

.db-concentration-risk .db-cpt-code {
  color: #ef4444;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Payer Table Ã¢â€â‚¬Ã¢â€â‚¬ */
.db-payer-table {
  padding: 4px 0;
}

.db-payer-head {
  display: grid;
  grid-template-columns: 1.8fr 0.5fr 2fr 0.6fr;
  gap: 12px;
  padding: 8px 12px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.db-payer-row {
  display: grid;
  grid-template-columns: 1.8fr 0.5fr 2fr 0.6fr;
  gap: 12px;
  padding: 10px 12px;
  align-items: center;
  border-bottom: 1px solid rgba(148, 163, 184, 0.06);
  transition: all var(--transition-fast);
  border-radius: 6px;
}

.db-payer-row:hover {
  background: var(--bg-hover);
  transform: translateX(2px);
  box-shadow: -2px 0 0 var(--accent-primary);
}

.db-payer-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.db-payer-risk-badge {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.db-payer-cnt {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-secondary);
  text-align: center;
  background: rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
}

.db-payer-ar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.db-payer-bar-track {
  flex: 1;
  height: 7px;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 4px;
  overflow: hidden;
}

.db-payer-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  transition: width 0.6s ease;
}

.db-payer-ar-val {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 45px;
  text-align: right;
}

.db-payer-pct {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: right;
}

.db-pct-risk {
  color: #ef4444;
  font-weight: 700;
}

.db-payer-risk {
  background: rgba(220, 38, 38, 0.02);
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Recommended Actions Ã¢â€â‚¬Ã¢â€â‚¬ */
.db-card-actions {
  display: flex;
  flex-direction: column;
}

.db-actions-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.12));
  color: #8b5cf6;
  padding: 3px 10px;
  border-radius: 10px;
}

.db-actions-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.db-action-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.db-action-group-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.db-action-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--bg-glass);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.db-action-item:hover {
  border-color: var(--border-accent);
  background: var(--bg-hover);
}

.db-action-patient {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.db-action-detail {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.db-action-countdown {
  font-size: 0.68rem;
  font-weight: 700;
  color: #dc2626;
  margin-top: 2px;
}

.db-action-urgent {
  border-left: 3px solid #dc2626;
}

.db-action-warn {
  border-left: 3px solid #ea580c;
}

.db-actions-clear {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 32px 16px;
  text-align: center;
  flex: 1;
}

.db-actions-clear span {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Dashboard Responsive Ã¢â€â‚¬Ã¢â€â‚¬ */
@media (max-width: 768px) {
  .db-risk-strip {
    flex-direction: column;
    gap: 12px;
  }

  .db-risk-strip-stats {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .db-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .db-row-2 {
    grid-template-columns: 1fr;
  }

  .db-aging-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .db-payer-head,
  .db-payer-row {
    grid-template-columns: 1fr 0.5fr 1.5fr 0.5fr;
  }
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Dashboard v2 Light Theme Ã¢â€â‚¬Ã¢â€â‚¬ */
[data-theme="light"] .db-kpi {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .db-card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .db-aging-bucket {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .db-payer-row:hover {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .db-action-item {
  background: rgba(0, 0, 0, 0.015);
}

/* Production table */
.production-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.production-table th {
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}

.production-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}

.production-table tbody tr:hover {
  background: var(--bg-glass);
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â FILTERS BAR Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.filters-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  align-items: center;
}

.search-input {
  padding: 8px 14px 8px 36px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  width: 240px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-wrapper {
  position: relative;
}

.search-wrapper svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.filter-select {
  padding: 8px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  min-width: 140px;
  outline: none;
}

.filter-select option {
  background: var(--bg-secondary);
}

/* Bulk Action Bar */
.bulk-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-secondary);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 150;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transition: transform var(--transition-slow);
  backdrop-filter: blur(16px);
}

.bulk-bar.active {
  transform: translateX(-50%) translateY(0);
}

.bulk-bar-count {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-primary);
  white-space: nowrap;
}

.bulk-bar-divider {
  width: 1px;
  height: 24px;
  background: var(--border-color);
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â CHECKBOX Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.custom-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  flex-shrink: 0;
}

.custom-checkbox:checked {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.custom-checkbox:checked::after {
  content: 'Ã¢Å“â€œ';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â TOAST Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 420px;
  backdrop-filter: blur(12px);
  animation: slideInRight 0.3s ease;
  border: 1px solid;
}

.toast.success {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

.toast.error {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.toast.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.3);
}

.toast.info {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.3);
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â EMPTY STATE Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state svg {
  color: var(--text-muted);
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h4 {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â PAGINATION Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.pagination {
  padding: 0;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-light, rgba(0, 0, 0, 0.06));
  background: rgba(0, 0, 0, 0.01);
  border-radius: 0 0 12px 12px;
  flex-wrap: wrap;
}

.pagination-info {
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.pagination-info strong {
  color: var(--text-primary);
  font-weight: 600;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  min-width: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-btn:hover {
  background: var(--bg-input);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

.page-btn.active {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  font-weight: 600;
}

.page-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.page-ellipsis {
  padding: 4px 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
  user-select: none;
}

.pagination-per-page {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.pagination-select {
  font-size: 0.78rem !important;
  padding: 4px 8px !important;
  min-width: 60px;
  border-radius: 6px !important;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â COMMIT SUCCESS Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.commit-result {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  text-align: center;
}

.commit-result-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.commit-result h3 {
  font-size: 1.3rem;
  margin-bottom: 16px;
}

.commit-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.commit-stat {
  text-align: center;
}

.commit-stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  display: block;
}

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

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â ADMIN SECTION Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.admin-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
  border: none;
  border-bottom: 2px solid var(--border-color);
  width: 100%;
}

.admin-tab {
  padding: 12px 24px;
  border-radius: 0;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: inherit;
  position: relative;
}

.admin-tab.active {
  background: transparent;
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
  font-weight: 600;
}

.admin-tab:hover:not(.active) {
  color: var(--text-primary);
  border-bottom-color: var(--text-muted);
}

/* Admin section toolbar Ã¢â‚¬â€ used in all tabs now */
.admin-section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0 16px;
  flex-wrap: wrap;
}

.admin-section-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-section-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-section-search {
  position: relative;
  display: flex;
  align-items: center;
}

.admin-section-search svg {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  pointer-events: none;
}

.admin-section-search input {
  padding: 8px 14px 8px 34px;
  font-size: 0.84rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  width: 240px;
  transition: all 0.2s ease;
}

.admin-section-search input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  width: 280px;
}

/* Admin data table Ã¢â‚¬â€ clean table layout for users/teams/clinics */
.admin-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.admin-data-table thead th {
  padding: 12px 16px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  white-space: nowrap;
}

.admin-data-table tbody tr {
  transition: background var(--transition-fast);
}

.admin-data-table tbody tr:hover {
  background: var(--bg-hover);
}

.admin-data-table tbody tr:not(:last-child) td {
  border-bottom: 1px solid var(--border-color);
}

.admin-data-table tbody td {
  padding: 14px 16px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  vertical-align: middle;
}

.admin-data-table .td-name {
  color: var(--text-primary);
  font-weight: 600;
}

.admin-data-table .td-actions {
  text-align: right;
  white-space: nowrap;
}

.admin-data-table .td-avatar {
  width: 42px;
  padding-right: 0;
}

.admin-data-table .td-avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  color: white;
}

.admin-data-table .shield-icon {
  display: inline-block;
  vertical-align: -1px;
  margin-left: 4px;
}

/* Keep card styles for backward compat but improve them */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.admin-card {
  padding: 18px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all var(--transition-fast);
}

.admin-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-input);
}

.admin-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.admin-card-info {
  flex: 1;
  min-width: 0;
}

.admin-card-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.92rem;
}

.admin-card-detail {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.admin-card-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

/* Icon Button */
.btn-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--bg-input);
  color: var(--text-primary);
}

.btn-icon:hover[style*="color:var(--color-danger)"],
.btn-icon[style*="color:var(--color-danger)"]:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444 !important;
}

/* Danger Button */
.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.2);
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â WARNING BANNER Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.warning-banner {
  padding: 14px 20px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  color: #f59e0b;
  font-size: 0.88rem;
  margin-bottom: 16px;
}

.warning-banner svg {
  flex-shrink: 0;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â ANIMATIONS Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â RESPONSIVE Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
@media (max-width: 1024px) {
  .sidebar {
    width: var(--sidebar-collapsed);
  }

  .sidebar .sidebar-logo-text,
  .sidebar .nav-item span,
  .sidebar .nav-section-label,
  .sidebar .sidebar-user-info,
  .sidebar .nav-badge {
    display: none;
  }

  .sidebar .nav-item {
    justify-content: center;
    padding: 12px;
  }

  .main-content {
    margin-left: var(--sidebar-collapsed);
  }

  .view {
    padding: 20px;
  }

  .detail-panel {
    width: 100%;
    right: -100%;
  }
}

@media (max-width: 768px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .charts-grid {
    grid-template-columns: 1fr;
  }

  .aging-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .filters-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input {
    width: 100%;
  }
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â OVERDUE HIGHLIGHT Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.overdue {
  color: var(--color-danger) !important;
  font-weight: 600;
}

.overdue-row {
  border-left: 3px solid var(--color-danger);
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â TAB SYSTEM (for Claims/Queue views) Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.tab-bar {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â LOADING OVERLAY Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 26, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  border-radius: inherit;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â MISC Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.gap-4 {
  gap: 16px;
}

.mt-2 {
  margin-top: 8px;
}

.mt-3 {
  margin-top: 12px;
}

.mt-4 {
  margin-top: 16px;
}

.mb-2 {
  margin-bottom: 8px;
}

.mb-3 {
  margin-bottom: 12px;
}

.mb-4 {
  margin-bottom: 16px;
}

.w-full {
  width: 100%;
}

.hidden {
  display: none !important;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â FORM LAYOUT Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 0;
}

.form-row .form-group {
  flex: 1;
  min-width: 0;
}

.form-section-divider {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
  padding: 14px 0 8px;
  margin-top: 8px;
  border-top: 1px solid var(--border-color);
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â PROVIDER ROW Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.provider-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  animation: fadeIn 0.2s ease;
}

.provider-row .form-input {
  flex: 1;
  min-width: 0;
}

.provider-row .prov-name {
  flex: 2;
}

.provider-row .prov-npi {
  flex: 1;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â BUTTON SIZES Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â CLINIC ADMIN CARD Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.admin-card-clinic {
  align-items: flex-start;
}

.admin-card-clinic .admin-card-avatar {
  margin-top: 2px;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â CHECKBOX GROUP (for multi-select clinics) Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  max-height: 180px;
  overflow-y: auto;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.checkbox-item:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}

.checkbox-item input:checked+span {
  color: var(--text-primary);
  font-weight: 500;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â CLINIC TAGS (on team cards) Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.clinic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.clinic-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 500;
  background: rgba(99, 102, 241, 0.12);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
  white-space: nowrap;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â LIGHT THEME OVERRIDES Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .sidebar {
  background: #ffffff;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .nav-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .nav-item.active {
  background: rgba(79, 70, 229, 0.08);
}

[data-theme="light"] .data-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .demo-account-btn {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .demo-account-btn:hover {
  background: rgba(79, 70, 229, 0.06);
  border-color: rgba(79, 70, 229, 0.2);
}

[data-theme="light"] .dropzone {
  border-color: rgba(0, 0, 0, 0.15);
  background: rgba(0, 0, 0, 0.01);
}

[data-theme="light"] .dropzone:hover,
[data-theme="light"] .dropzone.drag-over {
  border-color: var(--accent-primary);
  background: rgba(79, 70, 229, 0.03);
}

[data-theme="light"] .kpi-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .detail-panel {
  background: #ffffff;
}

[data-theme="light"] .modal {
  background: #ffffff;
}

[data-theme="light"] .bulk-bar {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .toast {
  background: #1e293b;
  color: #f8fafc;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â PRACTICE LOGINS Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.plogin-portal-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.plogin-url {
  font-size: 0.76rem;
  color: var(--accent-primary);
  opacity: 0.75;
  text-decoration: none;
  transition: opacity var(--transition-fast);
  display: block;
  margin-top: 2px;
}

.plogin-url:hover {
  opacity: 1;
  text-decoration: underline;
}

.plogin-username {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  font-size: 0.82rem;
  color: var(--accent-secondary);
  user-select: all;
}

.plogin-password {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
  font-size: 0.85rem;
  color: var(--text-muted);
  min-width: 110px;
  user-select: none;
}

.plogin-password:hover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.06);
}

.plogin-password.revealed {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--color-success);
}

.plogin-password.revealed .plogin-pw-masked {
  font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  user-select: all;
}

.plogin-pw-eye {
  opacity: 0.5;
  flex-shrink: 0;
  transition: opacity var(--transition-fast);
}

.plogin-password:hover .plogin-pw-eye {
  opacity: 1;
}

.plogin-toggle-pw-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-fast);
}

.plogin-toggle-pw-btn:hover {
  color: var(--accent-primary);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
  transform: translateY(-1px);
}

.btn-xs.btn-danger {
  box-shadow: none;
}

.btn-xs.btn-danger:hover {
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â ORGANIZATIONS Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 20px;
  padding: 4px 0;
}

.org-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  position: relative;
}

.org-card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md), 0 0 20px rgba(99, 102, 241, 0.08);
  transform: translateY(-3px);
}

.org-card-inactive {
  opacity: 0.55;
  filter: grayscale(0.2);
}

.org-card-inactive:hover {
  opacity: 0.8;
}

.org-card-header {
  padding: 20px 24px 14px;
}

.org-card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.org-card-title-group {
  flex: 1;
  min-width: 0;
}

.org-card-name {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.3;
}

.org-card-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.org-card-plan-badge {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(100, 116, 139, 0.08);
  border: 1px solid rgba(100, 116, 139, 0.12);
}

.org-card-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
}

.org-card-status--active {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.org-card-status--inactive {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}

.org-card-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.org-card-status--active .org-card-status-dot {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
  animation: statusPulse 2s ease-in-out infinite;
}

.org-card-status--inactive .org-card-status-dot {
  background: #64748b;
}

@keyframes statusPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

.org-card-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-color);
  margin: 0 24px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.org-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  background: var(--bg-secondary);
  transition: background 0.2s ease;
}

.org-card:hover .org-stat {
  background: rgba(99, 102, 241, 0.04);
}

.org-stat-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.org-stat-lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 4px;
}

.org-card-meta {
  padding: 10px 24px 0;
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.org-card-clinics {
  padding: 10px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.org-card-clinics-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
}

.org-clinic-chip {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
  transition: all 0.2s ease;
}

.org-clinic-chip--clickable {
  cursor: pointer;
}

.org-clinic-chip--clickable:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.org-clinic-chip--empty {
  background: rgba(100, 116, 139, 0.06);
  color: var(--text-muted);
  border: 1px dashed rgba(100, 116, 139, 0.2);
  font-style: italic;
}

.org-card-actions {
  padding: 14px 24px 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-color);
  margin-top: 4px;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â ADMIN ORG SUMMARY BAR Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.admin-org-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 20px;
}

.admin-summary-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
}

.admin-summary-val {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.admin-summary-lbl {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.admin-summary-stat--active .admin-summary-val {
  color: #10b981;
}

.admin-summary-stat--inactive .admin-summary-val {
  color: #64748b;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â ADMIN TOOLBAR Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.admin-toolbar-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 0 16px;
  flex-wrap: wrap;
}

.admin-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-toolbar-search {
  position: relative;
  display: flex;
  align-items: center;
}

.admin-toolbar-search svg {
  position: absolute;
  left: 10px;
  color: var(--text-muted);
  pointer-events: none;
}

.admin-toolbar-search input {
  padding: 7px 12px 7px 32px;
  font-size: 0.82rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  width: 220px;
  transition: all 0.2s ease;
}

.admin-toolbar-search input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  width: 260px;
}

.filter-select-sm {
  font-size: 0.8rem !important;
  padding: 6px 28px 6px 10px !important;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â ADMIN SCOPE BANNER (Enhanced Multi-Tenant) Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.admin-scope-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  margin-bottom: 20px;
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--scope-color, #8b5cf6) 6%, transparent) 0%,
      color-mix(in srgb, var(--scope-color, #8b5cf6) 10%, transparent) 100%);
  border: 1px solid color-mix(in srgb, var(--scope-color, #8b5cf6) 18%, transparent);
  border-left: 4px solid var(--scope-color, #8b5cf6);
  border-radius: var(--radius-lg);
  animation: scopeBannerIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.admin-scope-banner::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 150px;
  height: 100%;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--scope-color, #8b5cf6) 4%, transparent));
  pointer-events: none;
}

@keyframes scopeBannerIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scopeFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.admin-scope-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.admin-scope-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.admin-scope-info {
  min-width: 0;
}

.admin-scope-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.3;
}

.admin-scope-plan {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(100, 116, 139, 0.1);
  color: var(--text-muted);
  border: 1px solid rgba(100, 116, 139, 0.12);
}

.admin-scope-meta {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.admin-scope-meta::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--scope-color, #8b5cf6);
  opacity: 0.6;
  display: inline-block;
  flex-shrink: 0;
}

.admin-scope-stats {
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}

.admin-scope-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 14px;
  min-width: 52px;
  transition: background 0.2s ease;
}

.admin-scope-stat:hover {
  background: color-mix(in srgb, var(--scope-color, #8b5cf6) 6%, transparent);
}

.admin-scope-stat+.admin-scope-stat {
  border-left: 1px solid var(--border-color);
}

.admin-scope-stat-val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.admin-scope-stat-lbl {
  font-size: 0.58rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 3px;
}

.admin-scope-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.admin-scope-org-switcher {
  font-size: 0.78rem;
  padding: 6px 28px 6px 10px;
  border: 1px solid color-mix(in srgb, var(--scope-color, #8b5cf6) 25%, transparent);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%238b5cf6' stroke-width='2.5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  max-width: 180px;
}

.admin-scope-org-switcher:hover {
  border-color: var(--scope-color, #8b5cf6);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--scope-color, #8b5cf6) 10%, transparent);
}

.admin-scope-org-switcher:focus {
  outline: none;
  border-color: var(--scope-color, #8b5cf6);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--scope-color, #8b5cf6) 12%, transparent);
}

.admin-scope-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.admin-scope-back-btn:hover {
  background: color-mix(in srgb, var(--scope-color, #8b5cf6) 10%, transparent);
  border-color: color-mix(in srgb, var(--scope-color, #8b5cf6) 25%, transparent);
  color: var(--scope-color, #8b5cf6);
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Scope Warning (no org selected) Ã¢â€â‚¬Ã¢â€â‚¬ */
.admin-scope-warning {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.06) 0%, rgba(239, 68, 68, 0.06) 100%);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-left: 4px solid #f59e0b;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  color: #f59e0b;
  font-weight: 500;
  animation: scopeFadeIn 0.3s ease;
}

.admin-scope-warning svg {
  flex-shrink: 0;
  color: #f59e0b;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Admin Empty State (inside tables) Ã¢â€â‚¬Ã¢â€â‚¬ */
.admin-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 0;
}

.admin-empty-state span {
  font-size: 0.86rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Legacy support Ã¢â‚¬â€ keep old class name working */
.admin-scope-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.06) 0%, rgba(99, 102, 241, 0.08) 100%);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  color: var(--text-secondary);
  animation: scopeFadeIn 0.3s ease;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â ADMIN UNIFIED SECTIONS (stacked org view) Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.admin-unified-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  animation: unifiedFadeIn 0.35s ease;
}

.admin-unified-section:last-child {
  margin-bottom: 0;
}

@keyframes unifiedFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.admin-unified-section:nth-child(2) {
  animation-delay: 0.05s;
}

.admin-unified-section:nth-child(3) {
  animation-delay: 0.1s;
}

.admin-unified-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.03), rgba(99, 102, 241, 0.04));
  border-bottom: 1px solid var(--border-color);
}

.admin-unified-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-unified-header-left svg {
  color: var(--accent-secondary);
  flex-shrink: 0;
  opacity: 0.7;
}

.admin-unified-header-left h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.admin-unified-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-secondary);
  background: rgba(99, 102, 241, 0.1);
  border-radius: 100px;
}

.admin-unified-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-unified-body {
  padding: 0;
}

.admin-unified-body .admin-data-table {
  border: none;
  border-radius: 0;
  margin: 0;
}

[data-theme="light"] .admin-unified-section {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .admin-unified-header {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.02), rgba(139, 92, 246, 0.03));
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

.admin-scope-bar strong {
  color: #8b5cf6;
  font-weight: 600;
}

.admin-scope-bar svg {
  color: #8b5cf6;
  flex-shrink: 0;
}

.admin-scope-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 500;
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-scope-btn:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â HIERARCHY BREADCRUMB Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.hierarchy-breadcrumb {
  margin-bottom: 16px;
}

.breadcrumb-trail {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}

.breadcrumb-item {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.breadcrumb-clickable {
  cursor: pointer;
}

.breadcrumb-clickable:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
}

.breadcrumb-super {
  background: rgba(225, 29, 72, 0.1);
  color: #e11d48;
  border: 1px solid rgba(225, 29, 72, 0.15);
}

.breadcrumb-super.breadcrumb-clickable:hover {
  background: rgba(225, 29, 72, 0.18);
  border-color: rgba(225, 29, 72, 0.3);
}

.breadcrumb-org {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.breadcrumb-org.breadcrumb-clickable:hover {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.3);
}

.breadcrumb-active {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  font-weight: 600;
  border: 1px solid rgba(59, 130, 246, 0.15);
}

.breadcrumb-sep {
  color: var(--text-muted);
  font-size: 0.8rem;
  user-select: none;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â ADMIN TABS ENHANCEMENTS Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-tab svg {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.admin-tab.active svg {
  opacity: 1;
}

.admin-tab-count {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(100, 116, 139, 0.12);
  color: var(--text-muted);
  min-width: 18px;
  text-align: center;
}

.admin-tab.active .admin-tab-count {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â GHOST DANGER BUTTON Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.btn-ghost-danger {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.btn-ghost-danger:hover {
  background: rgba(239, 68, 68, 0.08);
  color: var(--color-danger);
  border-color: rgba(239, 68, 68, 0.2);
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â ROLE BADGES Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.role-badge.role-superadmin,
.role-superadmin {
  background: rgba(225, 29, 72, 0.15);
  color: #e11d48;
}

.role-badge.role-org_admin,
.role-org_admin {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.role-badge.role-viewer,
.role-viewer {
  background: rgba(100, 116, 139, 0.15);
  color: #64748b;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â EMPTY STATE CARD Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.empty-state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 32px;
  background: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--text-muted);
  gap: 12px;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â FORM ROW Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 4px;
}

@media (max-width: 768px) {
  .admin-toolbar-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-toolbar-right {
    flex-wrap: wrap;
  }

  .admin-toolbar-search input {
    width: 100%;
  }

  .admin-toolbar-search input:focus {
    width: 100%;
  }

  .admin-org-summary {
    flex-wrap: wrap;
  }

  .admin-section-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-section-search input {
    width: 100%;
  }

  .admin-section-search input:focus {
    width: 100%;
  }

  .admin-data-table {
    font-size: 0.82rem;
  }
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .org-grid {
    grid-template-columns: 1fr;
  }

  .admin-scope-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .admin-scope-btn {
    margin-left: 0;
  }

  .admin-scope-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 16px;
  }

  .admin-scope-stats {
    width: 100%;
    justify-content: center;
  }

  .admin-scope-stat {
    flex: 1;
  }

  .admin-scope-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .admin-scope-org-switcher {
    max-width: none;
    flex: 1;
  }

  .admin-scope-back-btn {
    flex-shrink: 0;
  }

  .admin-data-table thead th,
  .admin-data-table tbody td {
    padding: 10px 10px;
    font-size: 0.8rem;
  }
}

/* Light theme overrides for admin data table */
[data-theme="light"] .admin-data-table {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .admin-data-table thead th {
  background: #f8fafc;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .admin-data-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] .admin-data-table tbody tr:not(:last-child) td {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

/* Light theme overrides for scope banner */
[data-theme="light"] .admin-scope-banner {
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--scope-color, #8b5cf6) 4%, #ffffff) 0%,
      color-mix(in srgb, var(--scope-color, #8b5cf6) 7%, #ffffff) 100%);
}

[data-theme="light"] .admin-scope-banner::before {
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--scope-color, #8b5cf6) 3%, #ffffff));
}

[data-theme="light"] .admin-scope-stats {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .admin-scope-stat+.admin-scope-stat {
  border-left-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .admin-scope-org-switcher {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .admin-scope-back-btn {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .admin-scope-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.04) 0%, rgba(239, 68, 68, 0.04) 100%);
}

[data-theme="light"] .admin-scope-icon {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ General Button Icon Utility Ã¢â€â‚¬Ã¢â€â‚¬ */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}

.btn-icon:hover {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.08);
}

.btn-icon-sm {
  padding: 4px;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Admin Mode Toggle (Organizations / Log Tracking) Ã¢â€â‚¬Ã¢â€â‚¬ */
.admin-mode-toggle {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3px;
  gap: 2px;
  margin-bottom: 20px;
}

.admin-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 22px;
  border: none;
  border-radius: calc(var(--radius-lg) - 2px);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-muted);
  background: transparent;
}

.admin-mode-btn:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.05);
}

.admin-mode-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.admin-mode-btn.active svg {
  stroke: #ffffff;
}

[data-theme="light"] .admin-mode-toggle {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

[data-theme="light"] .admin-mode-btn:hover:not(.active) {
  background: rgba(99, 102, 241, 0.08);
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â
   LOG TRACKING STYLES
   Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */

/* Ã¢â€â‚¬Ã¢â€â‚¬ Segmented Toggle Ã¢â€â‚¬Ã¢â€â‚¬ */
.log-toggle-bar {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3px;
  gap: 2px;
  margin-bottom: 16px;
}

.log-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border: none;
  border-radius: calc(var(--radius-lg) - 2px);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: var(--text-muted);
  background: transparent;
  position: relative;
}

.log-toggle-btn:hover:not(.active) {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.05);
}

.log-toggle-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.log-toggle-btn.active svg {
  stroke: #ffffff;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Filters Bar Ã¢â€â‚¬Ã¢â€â‚¬ */
.log-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  animation: logFiltersIn 0.3s ease;
}

@keyframes logFiltersIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.log-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  min-width: 200px;
  transition: border-color 0.2s ease;
}

.log-search-wrap:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.12);
}

.log-search-wrap svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.log-search-input {
  border: none;
  background: transparent;
  padding: 7px 0;
  font-size: 0.84rem;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
  width: 100%;
}

.log-search-input::placeholder {
  color: var(--text-muted);
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Log Table Ã¢â€â‚¬Ã¢â€â‚¬ */
.log-table {
  width: 100%;
}

.log-table thead th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
  padding: 10px 14px;
  white-space: nowrap;
}

.log-table tbody td {
  padding: 12px 14px;
  font-size: 0.84rem;
  vertical-align: middle;
}

.log-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.log-row:hover {
  background: rgba(99, 102, 241, 0.04);
}

.log-row-alert {
  background: rgba(239, 68, 68, 0.03);
}

.log-row-alert:hover {
  background: rgba(239, 68, 68, 0.06);
}

.log-time {
  color: var(--text-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.log-actor {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.log-actor-name {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

/* Action Badge */
.log-action-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  background: color-mix(in srgb, var(--badge-color, #6366f1) 8%, transparent);
  color: var(--badge-color, #6366f1);
  border: 1px solid color-mix(in srgb, var(--badge-color, #6366f1) 15%, transparent);
}

.log-action-badge svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* Entity Tag */
.log-entity-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-secondary);
}

.log-entity-id {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(100, 116, 139, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
}

.log-summary {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.log-org-name {
  color: var(--text-muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

/* IP */
.log-ip {
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.8rem;
  color: var(--accent-secondary);
  background: rgba(99, 102, 241, 0.06);
  padding: 2px 8px;
  border-radius: 4px;
}

/* User Agent */
.log-ua {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Status Pill */
.log-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.log-status-success {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.log-status-failed {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.log-empty {
  text-align: center;
  padding: 48px 20px !important;
}

.log-detail-btn {
  opacity: 0.4;
  transition: opacity 0.15s ease;
}

.log-row:hover .log-detail-btn {
  opacity: 1;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Details Drawer Ã¢â€â‚¬Ã¢â€â‚¬ */
.log-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}

.log-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.log-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 90vw;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--border-color);
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
}

.log-drawer.open {
  transform: translateX(0);
}

.log-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}

.log-drawer-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.log-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.log-detail-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.08);
}

.log-detail-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.log-detail-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.log-detail-value {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.log-null {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.84rem;
}

/* JSON Pretty Print */
.log-json {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(100, 116, 139, 0.15);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  font-size: 0.78rem;
  line-height: 1.6;
  color: #93c5fd;
  overflow-x: auto;
  white-space: pre;
  margin: 6px 0 0;
}

.log-json-before {
  border-left: 3px solid #ef4444;
}

.log-json-after {
  border-left: 3px solid #10b981;
}

[data-theme="light"] .log-json {
  background: #f8fafc;
  color: #1e293b;
  border-color: #e2e8f0;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Light Theme Overrides Ã¢â€â‚¬Ã¢â€â‚¬ */
[data-theme="light"] .log-toggle-bar {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

[data-theme="light"] .log-toggle-btn:hover:not(.active) {
  background: rgba(99, 102, 241, 0.08);
}

[data-theme="light"] .log-row:hover {
  background: rgba(99, 102, 241, 0.04);
}

[data-theme="light"] .log-row-alert {
  background: rgba(239, 68, 68, 0.04);
}

[data-theme="light"] .log-drawer {
  background: #ffffff;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .log-drawer-overlay {
  background: rgba(0, 0, 0, 0.25);
}

[data-theme="light"] .log-detail-section {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Responsive Ã¢â€â‚¬Ã¢â€â‚¬ */
@media (max-width: 768px) {
  .log-toggle-bar {
    width: 100%;
  }

  .log-toggle-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  .log-filters-bar {
    gap: 8px;
  }

  .log-search-wrap {
    min-width: 100%;
  }

  .log-drawer {
    width: 100%;
    max-width: 100vw;
  }

  .log-summary {
    max-width: 140px;
  }

  .log-ua {
    max-width: 100px;
  }
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â
   CREDENTIALING v2 Ã¢â‚¬â€ Operational Dashboard
   Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */

/* Ã¢â€â‚¬Ã¢â€â‚¬ Metric Cards Ã¢â€â‚¬Ã¢â€â‚¬ */
.crd-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.crd-metric {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.crd-metric::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--mc);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.crd-metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
  border-color: var(--mc);
}

.crd-metric:hover::before {
  opacity: 1;
}

.crd-metric-active {
  border-color: var(--mc);
  background: var(--mb);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.crd-metric-active::before {
  opacity: 1;
}

.crd-metric-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--mb);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.crd-metric:hover .crd-metric-icon {
  transform: scale(1.06);
}

.crd-metric-active .crd-metric-icon {
  background: rgba(255, 255, 255, 0.45);
}

.crd-metric-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.crd-metric-val {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1;
  color: var(--mc);
}

.crd-metric-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.crd-metric-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
}

.crd-metric-active-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mc);
  background: var(--mb);
  padding: 2px 7px;
  border-radius: 6px;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Table Card Ã¢â€â‚¬Ã¢â€â‚¬ */
.crd-table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
}

.crd-table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
}

.crd-table-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.crd-table-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.crd-table-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.crd-table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.crd-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Table Ã¢â€â‚¬Ã¢â€â‚¬ */
.crd-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.crd-table thead th {
  padding: 11px 16px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-hover);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}

.crd-th-payer {
  min-width: 180px;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Rows Ã¢â€â‚¬Ã¢â€â‚¬ */
.crd-row {
  transition: background 0.15s ease;
  cursor: pointer;
}

.crd-row:hover {
  background: var(--bg-hover);
}

.crd-table tbody tr:not(:last-child) td {
  border-bottom: 1px solid var(--border-color);
}

/* Urgency row tints */
.crd-urgency-overdue {
  background: rgba(220, 38, 38, 0.025);
}

.crd-urgency-critical {
  background: rgba(234, 88, 12, 0.025);
}

.crd-urgency-warning {
  background: rgba(217, 119, 6, 0.015);
}

/* Left urgency accent */
.crd-row td:first-child {
  position: relative;
}

.crd-urgency-overdue td:first-child::before,
.crd-urgency-critical td:first-child::before,
.crd-urgency-warning td:first-child::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 2px;
}

.crd-urgency-overdue td:first-child::before {
  background: #dc2626;
}

.crd-urgency-critical td:first-child::before {
  background: #ea580c;
}

.crd-urgency-warning td:first-child::before {
  background: #d97706;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Cell styles Ã¢â€â‚¬Ã¢â€â‚¬ */
.crd-td-payer {
  padding: 14px 16px 14px 20px;
}

.crd-payer-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.crd-clinic-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.crd-td-status {
  padding: 14px 16px;
}

.crd-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.crd-alert-tag {
  display: block;
  font-size: 0.63rem;
  font-weight: 700;
  color: #7c3aed;
  background: rgba(124, 58, 237, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
  width: fit-content;
  letter-spacing: 0.02em;
}

.crd-td-text {
  padding: 14px 16px;
  font-size: 0.82rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.crd-td-date {
  padding: 14px 16px;
  font-size: 0.82rem;
  color: var(--text-primary);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.crd-revalid-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
}

.crd-muted {
  color: var(--text-muted);
  opacity: 0.45;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Countdown Ã¢â€â‚¬Ã¢â€â‚¬ */
.crd-td-countdown {
  padding: 14px 16px;
}

.crd-countdown {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
}

.crd-countdown-normal {
  color: var(--text-muted);
  background: transparent;
}

.crd-countdown-attention {
  color: #6366f1;
  background: rgba(99, 102, 241, 0.07);
}

.crd-countdown-warning {
  color: #b45309;
  background: rgba(217, 119, 6, 0.08);
}

.crd-countdown-critical {
  color: #c2410c;
  background: rgba(234, 88, 12, 0.1);
  font-weight: 800;
}

.crd-countdown-overdue {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.07);
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Lifecycle Progress Ã¢â€â‚¬Ã¢â€â‚¬ */
.crd-td-lifecycle {
  padding: 14px 16px;
}

.crd-lifecycle {
  display: flex;
  align-items: center;
  gap: 0;
}

.crd-lc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.crd-lc-filled {
  background: #059669;
}

.crd-lc-current {
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.18);
}

.crd-lc-reset {
  background: rgba(220, 38, 38, 0.18);
}

.crd-lc-line {
  width: 14px;
  height: 2px;
  background: var(--border-color);
  transition: background 0.25s ease;
}

.crd-lc-line-filled {
  background: #059669;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Action Tags Ã¢â€â‚¬Ã¢â€â‚¬ */
.crd-td-action {
  padding: 14px 16px;
}

.crd-action-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  color: var(--text-secondary);
  background: var(--bg-hover);
  transition: all 0.15s ease;
}

.crd-action-urgent {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.07);
}

.crd-action-warn {
  color: #92400e;
  background: rgba(217, 119, 6, 0.07);
}

.crd-row:hover .crd-action-tag {
  filter: brightness(0.95);
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Empty / No Results Ã¢â€â‚¬Ã¢â€â‚¬ */
.crd-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 64px 24px;
  text-align: center;
}

.crd-empty-state h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.crd-empty-state p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

.crd-no-results {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.crd-no-results p {
  margin: 0;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Modal meta (keep for edit modal) Ã¢â€â‚¬Ã¢â€â‚¬ */
.cred-modal-meta {
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  margin-top: 12px;
  font-size: 0.82rem;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Sidebar Badge Ã¢â€â‚¬Ã¢â€â‚¬ */
.cred-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  margin-left: auto;
  animation: credBadgePop 0.3s ease;
}

@keyframes credBadgePop {
  0% {
    transform: scale(0);
  }

  70% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
  }
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â CREDENTIALING LIGHT THEME Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
[data-theme="light"] .crd-metric {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .crd-metric:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .crd-table-card {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .crd-urgency-overdue {
  background: rgba(220, 38, 38, 0.03);
}

[data-theme="light"] .crd-urgency-critical {
  background: rgba(234, 88, 12, 0.03);
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â CREDENTIALING RESPONSIVE Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
@media (max-width: 1024px) {
  .crd-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .crd-metrics {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .crd-metric {
    padding: 14px;
  }

  .crd-metric-val {
    font-size: 1.4rem;
  }

  .crd-table-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .crd-th-payer {
    min-width: 140px;
  }
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â CLINIC NOTES Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.clinic-notes-list {
  display: flex;
  flex-direction: column;
}

.clinic-note-item {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}

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

.clinic-note-item:hover {
  background: var(--bg-glass);
}

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

.clinic-note-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.clinic-note-author {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.clinic-note-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.clinic-note-edited {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.clinic-note-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.clinic-note-actions {
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.clinic-note-item:hover .clinic-note-actions {
  opacity: 1;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-glass);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.btn-icon-danger:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  gap: 4px;
}

.form-textarea {
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  width: 100%;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â MESSAGING Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.messaging-container {
  display: flex;
  height: calc(100vh - 160px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Contacts Sidebar Ã¢â€â‚¬Ã¢â€â‚¬ */
.msg-sidebar {
  width: 320px;
  min-width: 280px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
}

.msg-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.msg-sidebar-header .search-wrapper {
  margin: 0;
}

.msg-contacts-list {
  flex: 1;
  overflow-y: auto;
}

.msg-contacts-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.msg-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid var(--border-color);
}

.msg-contact-item:hover {
  background: var(--bg-hover);
}

.msg-contact-item.active {
  background: var(--bg-hover);
  border-left: 3px solid var(--accent-primary);
}

.msg-contact-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
  position: relative;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Online Status Dot Ã¢â€â‚¬Ã¢â€â‚¬ */
.msg-status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
  background: #6b7280;
  transition: background 0.3s ease;
}

.msg-status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.msg-status-dot.online::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid rgba(34, 197, 94, 0.4);
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0;
    transform: scale(1.5);
  }
}

.msg-status-text {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.msg-status-text.online {
  color: #22c55e;
}

.msg-contact-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.msg-contact-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.msg-contact-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.msg-contact-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.msg-contact-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.msg-contact-preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.msg-contact-role {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.msg-unread-badge {
  background: var(--accent-primary);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  flex-shrink: 0;
}

.msg-nav-badge {
  background: var(--accent-primary);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  margin-left: auto;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Chat Area Ã¢â€â‚¬Ã¢â€â‚¬ */
.msg-chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.msg-chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.msg-chat-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.msg-back-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.msg-back-btn:hover {
  background: rgba(99, 102, 241, 0.12);
  color: var(--color-primary);
}

.msg-chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.msg-chat-header-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.msg-chat-header-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Messages Ã¢â€â‚¬Ã¢â€â‚¬ */
.msg-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.msg-no-messages {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 60px 20px;
}

.msg-date-separator {
  text-align: center;
  margin: 16px 0;
}

.msg-date-separator span {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 4px 14px;
  border-radius: 12px;
  letter-spacing: 0.3px;
}

.msg-bubble-row {
  display: flex;
  margin-bottom: 2px;
}

.msg-bubble-row.msg-mine {
  justify-content: flex-end;
}

.msg-bubble-row.msg-theirs {
  justify-content: flex-start;
}

.msg-bubble {
  max-width: 65%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  position: relative;
  word-break: break-word;
}

.msg-mine .msg-bubble {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  border-bottom-right-radius: 4px;
}

.msg-theirs .msg-bubble {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
}

.msg-bubble-text {
  white-space: pre-wrap;
}

.msg-bubble-attachment {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  font-size: 0.8rem;
}

.msg-theirs .msg-bubble-attachment {
  background: rgba(0, 0, 0, 0.05);
}

.msg-bubble-time {
  font-size: 0.65rem;
  opacity: 0.7;
  margin-top: 4px;
  text-align: right;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Input Area Ã¢â€â‚¬Ã¢â€â‚¬ */
.msg-chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: var(--bg-secondary);
}

.msg-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.4;
  resize: none;
  max-height: 120px;
  overflow-y: auto;
  transition: border-color var(--transition-fast);
}

.msg-input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.msg-attach-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-glass);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.msg-attach-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--accent-primary);
}

.msg-send-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.msg-send-btn:hover {
  opacity: 0.85;
  transform: scale(1.05);
}

.msg-attachment-preview {
  padding: 6px 0;
  width: 100%;
  flex-basis: 100%;
}

.msg-attach-preview-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.msg-attach-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0 2px;
  line-height: 1;
}

.msg-attach-remove:hover {
  color: #ef4444;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Input area wrap for attachment preview Ã¢â€â‚¬Ã¢â€â‚¬ */
.msg-chat-input-area {
  flex-wrap: wrap;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Responsive Ã¢â€â‚¬Ã¢â€â‚¬ */
@media (max-width: 768px) {
  .messaging-container {
    flex-direction: column;
    height: calc(100vh - 140px);
  }

  .msg-sidebar {
    width: 100%;
    min-width: unset;
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .msg-bubble {
    max-width: 85%;
  }
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Message Read Receipts Ã¢â€â‚¬Ã¢â€â‚¬ */
.msg-tick {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: -2px;
  margin-left: 2px;
}

.msg-tick-read {
  color: #34d399;
}

/* In contact preview (dark/light safe) */
.msg-contact-preview .msg-tick {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.msg-contact-preview .msg-tick-read {
  color: #3b82f6;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Monitor Mode Ã¢â€â‚¬Ã¢â€â‚¬ */
.msg-monitor-avatars {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.msg-avatar-sm {
  width: 32px;
  height: 32px;
  font-size: 0.65rem;
}

.msg-avatar-overlap {
  margin-left: -12px;
  border: 2px solid var(--bg-secondary);
}

.msg-bubble-sender {
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 2px;
  opacity: 0.8;
}

/* Ã¢â€â‚¬Ã¢â€â‚¬ Import Logins Ã¢â€â‚¬Ã¢â€â‚¬ */
.import-logins-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.import-info-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.import-info-bar svg {
  flex-shrink: 0;
  color: var(--accent-primary);
}

.import-drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 32px 24px;
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  background: var(--bg-primary);
  transition: all 0.2s ease;
  cursor: pointer;
}

.import-drop-zone:hover,
.import-drop-zone.dragover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.04);
}

.import-drop-zone.dragover {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.import-preview {
  margin-top: 8px;
}

.import-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.import-preview-table-wrap {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.import-preview-table {
  font-size: 0.8rem;
}

.import-preview-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--bg-secondary);
}

.import-preview-table td {
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â
   ORG SETTINGS
   Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */

.os-section {
  margin-top: 16px;
}

.os-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.os-section-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.os-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 20px;
  background: var(--color-primary-bg);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Dropdown Options Grid */
.os-dropdowns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.os-dropdown-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.os-dropdown-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.os-dropdown-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border-light);
}

.os-dropdown-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.os-dropdown-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 3px 0 0;
}

.os-dropdown-items {
  max-height: 360px;
  overflow-y: auto;
  padding: 4px 0;
}

.os-dd-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px 7px 12px;
  min-height: 34px;
  transition: background 0.15s;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.os-dd-item:hover {
  background: var(--bg-hover);
}

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

.os-dd-drag {
  color: var(--text-muted);
  font-size: 0.84rem;
  cursor: grab;
  opacity: 0.35;
  user-select: none;
  flex-shrink: 0;
  width: 14px;
  text-align: center;
}

.os-dd-text {
  flex: 1;
  font-size: 0.84rem;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.4;
}

.os-dd-value {
  font-size: 0.68rem;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(99, 102, 241, 0.08);
  color: var(--text-secondary);
  margin-left: 4px;
  vertical-align: middle;
}

.os-dd-edit-btn,
.os-dd-delete-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  color: var(--text-muted);
  opacity: 0;
  transition: all 0.15s;
  flex-shrink: 0;
}

.os-dd-item:hover .os-dd-edit-btn,
.os-dd-item:hover .os-dd-delete-btn {
  opacity: 1;
}

.os-dd-edit-btn:hover {
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

.os-dd-delete-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.os-dropdown-add {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid var(--border-light);
  background: rgba(0, 0, 0, 0.015);
}

/* Item count badge */
.os-count {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.08);
  line-height: 1.4;
}

/* Color swatch dot */
.os-dd-color-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

/* Segment tags (New, In Progress, Closed) */
.os-dd-segment-tag {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  text-transform: capitalize;
}

.os-dd-seg-new {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
}

.os-dd-seg-in_progress {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}

.os-dd-seg-closed {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}

/* Section divider (In Progress Statuses label) */
.os-dd-divider {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 16px 4px;
  border-top: 1px solid var(--border-light);
  margin-top: 2px;
}

/* Lock icon for system statuses */
.os-dd-lock {
  color: var(--text-muted);
  opacity: 0.4;
  flex-shrink: 0;
  margin-left: auto;
}

/* System status rows Ã¢â‚¬â€ slightly muted */
.os-dd-system {
  opacity: 0.75;
}

.os-dd-system:hover {
  opacity: 1;
}

/* Modal Form */
.os-modal-form .form-group {
  margin-bottom: 14px;
}

.os-modal-form .form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.os-checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-card);
}

.os-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-primary);
  cursor: pointer;
  padding: 3px 4px;
  border-radius: 4px;
  transition: background 0.15s;
}

.os-checkbox-label:hover {
  background: var(--bg-hover);
}

.os-checkbox-label input[type="checkbox"] {
  accent-color: var(--color-primary);
}

/* Outline danger button */
.btn-outline-danger {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.btn-outline-danger:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â
   AGENT PRODUCTION VIEW
   Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */

/* KPI Cards */
.prod-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.prod-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: box-shadow 0.2s, transform 0.15s;
}

.prod-kpi-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.prod-kpi-alert {
  border-color: rgba(239, 68, 68, 0.3);
  background: linear-gradient(135deg, var(--bg-card), rgba(239, 68, 68, 0.03));
}

.prod-kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prod-kpi-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.prod-kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.prod-kpi-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.prod-kpi-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 1px;
}

/* trend badges */
.prod-kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
}

.prod-trend-up {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.prod-trend-down {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* progress cells */
.prod-progress-cell {
  width: 120px;
}

.prod-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prod-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 600;
}

.prod-progress-bar {
  height: 6px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
}

.prod-progress-fill {
  height: 100%;
}

.prod-presence {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--bg-card);
  position: absolute;
  bottom: 0;
  right: 0;
}

.prod-presence-online {
  background: #10b981;
}

.prod-presence-away {
  background: #f59e0b;
}

.prod-presence-offline {
  background: #94a3b8;
}

/* Filters */
.prod-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  margin-bottom: 18px;
}

.prod-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}

.prod-filter-group label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prod-filter-group .form-select {
  font-size: 0.82rem;
  padding: 6px 10px;
  min-width: 140px;
}

/* Custom date range picker */
.prod-custom-date-wrap {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 8px;
  animation: prodDateSlide 0.2s ease-out;
}

@keyframes prodDateSlide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.prod-custom-date-inputs {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.prod-custom-date-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.prod-custom-date-field label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prod-custom-date-field .form-input {
  font-size: 0.8rem;
  padding: 5px 8px;
  min-width: 130px;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

.prod-custom-date-field .form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.prod-custom-date-field .form-input::-webkit-calendar-picker-indicator {
  filter: invert(0.7);
  cursor: pointer;
}

.prod-filter-actions {
  margin-left: auto;
  justify-content: flex-end;
}

/* Agent Table */
.prod-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
}

.prod-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.prod-table thead th {
  background: rgba(0, 0, 0, 0.02);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  user-select: none;
}

.prod-th-sortable {
  cursor: pointer;
  transition: color 0.15s;
}

.prod-th-sortable:hover {
  color: var(--color-primary);
}

.prod-th-num {
  text-align: right !important;
}

.prod-sort-icon {
  font-size: 0.7rem;
  opacity: 0.3;
  margin-left: 4px;
}

.prod-sort-icon.active {
  opacity: 1;
  color: var(--color-primary);
}

.prod-agent-row {
  cursor: pointer;
  transition: background 0.15s;
}

.prod-agent-row:hover {
  background: var(--bg-hover);
}

.prod-agent-row td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
}

.prod-row-expanded {
  background: rgba(99, 102, 241, 0.04);
}

.prod-row-expanded td {
  border-bottom-color: transparent;
}

.prod-agent-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  white-space: nowrap;
}

.prod-agent-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--color-primary), #818cf8);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prod-td-secondary {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.prod-td-clinic {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prod-td-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.prod-td-highlight {
  color: var(--color-primary);
  font-weight: 600;
}

.prod-td-overdue {
  color: #ef4444;
  font-weight: 600;
}

/* Drill-down row */
.prod-drilldown-row>td {
  padding: 0 !important;
  background: rgba(99, 102, 241, 0.02);
  border-bottom: 2px solid var(--color-primary);
}

/* Drilldown styles */
.prod-drill {
  padding: 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  border-bottom: 2px solid var(--border-light);
}

.prod-drill-header-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 10px;
  align-items: center;
}

.prod-drill-stat {
  display: flex;
  flex-direction: column;
}

.prod-drill-stat strong {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.prod-drill-stat span {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

.prod-drill-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.prod-drill-tab {
  padding: 6px 14px;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.prod-drill-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.prod-drill-tab.active {
  background: var(--tab-color, var(--color-primary));
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.prod-drill-count {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.2);
}

.prod-drill-tab:not(.active) .prod-drill-count {
  background: rgba(0, 0, 0, 0.06);
}

.prod-drill-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: 8px;
}

.prod-drill-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.prod-drill-table thead th {
  padding: 10px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(0, 0, 0, 0.02);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prod-drill-table tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}

.prod-drill-table tbody tr:hover {
  background: var(--bg-hover);
}

.prod-drill-table td {
  padding: 8px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prod-drill-claim .prod-claim-id {
  color: var(--color-primary);
  font-weight: 600;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.78rem;
}

.prod-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.prod-drill-empty {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.prod-drill-more {
  text-align: center;
  padding: 8px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.prod-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.prod-empty p {
  margin-top: 8px;
  font-size: 0.9rem;
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â DETAILED PRODUCTION REPORT MODAL Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.report-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
}

.report-modal-overlay.open {
  display: flex;
}

.report-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 560px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  animation: reportModalIn 0.25s ease;
}

@keyframes reportModalIn {
  from {
    transform: translateY(20px) scale(0.97);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

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

.report-modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.report-modal-title-wrap svg {
  color: var(--accent-primary);
}

.report-modal-title-wrap h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

.report-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.report-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.report-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.report-checkbox-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.report-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.report-check input[type="checkbox"] {
  accent-color: var(--accent-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.report-summary {
  margin: 16px 0;
  min-height: 20px;
}

.report-summary-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
}

.report-summary-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-primary);
  line-height: 1;
}

.report-summary-label {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.report-summary-ar {
  margin-left: auto;
  font-size: 0.9rem;
  font-weight: 700;
  color: #10b981;
}

.report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
  margin-top: 8px;
}

@media (max-width: 600px) {
  .report-form-row {
    grid-template-columns: 1fr;
  }

  .report-modal {
    width: 100%;
    margin: 12px;
  }
}

/* Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â USER LOCKED STATE Ã¢â€¢ÂÃ¢â€¢ÂÃ¢â€¢Â */
.user-row-locked {
  opacity: 0.55;
}

.user-row-locked:hover {
  opacity: 0.8;
}

.avatar-locked {
  background: var(--text-muted) !important;
  opacity: 0.6;
}

.user-locked-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-radius: 4px;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════
   ATTENDANCE MODULE STYLES
   ═══════════════════════════════════════════════════════ */

.attendance-clock-section {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.attendance-widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  text-align: center;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.attendance-widget--active {
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.08);
}

.attendance-widget-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.attendance-pulse {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #10b981;
  animation: attendancePulse 2s ease-in-out infinite;
}

@keyframes attendancePulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
}

.attendance-dot--off {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.5;
}

.attendance-status-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: #10b981;
}

.attendance-status-text--off {
  color: var(--text-muted);
}

.attendance-widget-time {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.attendance-widget-details {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.attendance-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.attendance-detail-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.attendance-detail-value {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.attendance-timer {
  color: #10b981 !important;
  font-variant-numeric: tabular-nums;
}

.attendance-btn {
  width: 100%;
  height: 48px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.attendance-btn--in {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.attendance-btn--in:hover {
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.45);
  transform: translateY(-1px);
}

.attendance-btn--out {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.attendance-btn--out:hover {
  box-shadow: 0 8px 28px rgba(239, 68, 68, 0.45);
  transform: translateY(-1px);
}

.attendance-note {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

/* Team Status Grid */
.attendance-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.attendance-team-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  transition: all var(--transition-fast);
}

.attendance-team-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.attendance-team-card--in {
  border-color: rgba(16, 185, 129, 0.25);
}

.attendance-team-card--done {
  border-color: rgba(59, 130, 246, 0.2);
}

.attendance-team-card--off {
  opacity: 0.6;
}

.attendance-team-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-size: 0.78rem;
  font-weight: 600;
}

.attendance-team-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attendance-team-role {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.attendance-team-status {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.attendance-team-status--in {
  color: #10b981;
}

.attendance-team-status--done {
  color: #3b82f6;
}

.attendance-team-status--off {
  color: var(--text-muted);
}

.attendance-team-time {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* Summary badges */
.attendance-team-summary {
  display: flex;
  gap: 8px;
}

.attendance-summary-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.attendance-summary-badge--in {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.attendance-summary-badge--done {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.attendance-summary-badge--off {
  background: rgba(100, 116, 139, 0.15);
  color: #64748b;
}

/* History summary */
.attendance-history-summary {
  display: flex;
  gap: 16px;
}

.attendance-stat {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.attendance-stat strong {
  color: var(--text-primary);
}

.attendance-stat--warn {
  color: #f59e0b;
}

.attendance-stat--warn strong {
  color: #f59e0b;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.mt-4 {
  margin-top: 16px;
}

/* ═══ Attendance Tabs ═══ */
.attendance-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
  width: fit-content;
}

.attendance-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.attendance-tab:hover {
  color: var(--text-primary);
  background: var(--bg-input);
}

.attendance-tab.active {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.attendance-tab-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--color-danger);
  color: white;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

.attendance-tab.active .attendance-tab-badge {
  background: rgba(255, 255, 255, 0.3);
}

/* ═══ Leave Approval Items ═══ */
.leave-approvals-card {
  border-color: rgba(245, 158, 11, 0.2);
}

.leave-approval-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.leave-approval-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.leave-approval-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-glow);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
  flex-shrink: 0;
}

.leave-approval-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.leave-approval-type {
  font-size: 0.8rem;
  font-weight: 500;
}

.leave-approval-dates {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.leave-days-badge {
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--bg-input);
  padding: 2px 8px;
  border-radius: 10px;
  color: var(--text-muted);
}

.leave-approval-reason {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
}

.leave-approval-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ═══ Leave Calendar ═══ */
.leave-calendar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leave-calendar-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.leave-calendar-item:hover {
  background: var(--bg-card-hover);
}

.leave-calendar-date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  padding: 4px 8px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
}

.leave-calendar-month {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent-primary);
  letter-spacing: 0.5px;
}

.leave-calendar-day {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.leave-calendar-info {
  flex: 1;
}

.leave-calendar-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.leave-calendar-type {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 2px;
}

.leave-calendar-duration {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 4px 10px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
}

/* ═══ Leave Balance Bar ═══ */
.leave-balance-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  margin-bottom: 16px;
  overflow: hidden;
}

.leave-balance-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.schedule-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.schedule-week-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 220px;
  text-align: center;
}

.schedule-grid {
  display: grid;
  grid-template-columns: 180px repeat(7, 1fr);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.schedule-grid-header {
  display: contents;
}

.schedule-grid-header>div {
  padding: 10px 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg-glass);
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.schedule-grid-row {
  display: contents;
}

.schedule-grid-row:hover>div {
  background: var(--bg-card-hover);
}

.schedule-user-col {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-color);
  text-align: left !important;
}

.schedule-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
}

.schedule-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-user-role {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.schedule-day-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.schedule-day-name {
  font-size: 0.7rem;
}

.schedule-day-num {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.schedule-day-today {
  background: rgba(99, 102, 241, 0.06) !important;
}

.schedule-day-weekend {
  opacity: 0.7;
}

.schedule-cell {
  padding: 6px 4px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
}

.schedule-shift {
  padding: 4px 6px;
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  width: 100%;
}

.schedule-shift:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-sm);
}

.schedule-shift-label {
  font-size: 0.72rem;
  font-weight: 600;
  display: block;
}

.schedule-shift-time {
  font-size: 0.62rem;
  opacity: 0.8;
  display: block;
}

.schedule-add-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px dashed var(--border-color);
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.schedule-add-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: var(--accent-glow);
}

.schedule-empty {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.schedule-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  padding: 8px 0;
}

.schedule-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.schedule-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.report-period-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px;
  width: fit-content;
}

.report-period-btn {
  padding: 6px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.report-period-btn:hover {
  color: var(--text-primary);
  background: var(--bg-input);
}

.report-period-btn.active {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.report-period-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: 12px;
}

.report-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.report-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  transition: all var(--transition-fast);
}

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

.report-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.report-kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.report-kpi-unit {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 2px;
}

.report-kpi-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.report-chart {
  position: relative;
  display: flex;
  gap: 8px;
  height: 200px;
}

.report-chart-y-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 4px 24px 0;
  width: 32px;
  flex-shrink: 0;
}

.report-chart-y-axis span {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.report-chart-bars {
  display: flex;
  gap: 4px;
  flex: 1;
  align-items: flex-end;
  padding-bottom: 24px;
}

.report-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.report-bar-wrap {
  width: 100%;
  height: 176px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.report-bar {
  width: 70%;
  max-width: 36px;
  border-radius: 4px 4px 0 0;
  transition: height 0.5s ease;
  position: relative;
  min-height: 2px;
}

.report-bar-value {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.report-bar-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-top: 4px;
}

.report-bar-label span {
  font-size: 0.6rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.report-bar-today span {
  color: var(--accent-primary);
  font-weight: 600;
}

.report-chart-target {
  position: absolute;
  left: 40px;
  right: 0;
  border-top: 2px dashed rgba(100, 116, 139, 0.3);
  pointer-events: none;
}

.report-chart-target span {
  position: absolute;
  right: 0;
  top: -14px;
  font-size: 0.6rem;
  color: var(--text-muted);
  background: var(--bg-card);
  padding: 0 4px;
}

.report-team-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-team-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.report-team-rank {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 28px;
  text-align: center;
}

.report-team-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
}

.report-team-info {
  flex: 1;
  min-width: 0;
}

.report-team-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.report-team-bar-wrap {
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}

.report-team-bar {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.report-team-stats {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.report-team-stat {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.report-team-stat strong {
  color: var(--text-primary);
}

.report-team-stat--warn {
  color: #f59e0b;
}

.report-team-stat--warn strong {
  color: #f59e0b;
}

/* Team Comparison Header Enhancements */
.tc-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 500;
  border-radius: 20px;
  background: rgba(100, 116, 139, 0.08);
  color: var(--text-secondary);
  white-space: nowrap;
}

.tc-header-pill strong {
  font-weight: 700;
  color: var(--text-primary);
}

.tc-pill-primary {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}

.tc-pill-primary strong {
  color: #6366f1;
}

.tc-pill-success {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.tc-pill-success strong {
  color: #10b981;
}

.tc-pill-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.tc-pill-warning strong {
  color: #f59e0b;
}

.tc-pill-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.tc-pill-danger strong {
  color: #ef4444;
}

.tc-col-labels {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.tc-col-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}

.tc-col-label-highlight {
  color: #10b981;
}

.tc-login-late {
  color: #ef4444 !important;
  font-weight: 600 !important;
}

/* ═══ Monthly Attendance Register ═══ */
.register-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.register-month-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 140px;
  text-align: center;
}

.register-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-glass);
}

.register-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.register-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.register-th-name {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--bg-glass);
  text-align: left;
  padding: 8px 10px;
  min-width: 140px;
  max-width: 160px;
  border-bottom: 2px solid var(--border-color);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.65rem;
}

.register-th-day {
  padding: 6px 2px;
  text-align: center;
  border-bottom: 2px solid var(--border-color);
  min-width: 28px;
  font-weight: 600;
  color: var(--text-muted);
}

.register-th-day .register-day-name {
  display: block;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted);
}

.register-th-day .register-day-num {
  display: block;
  font-size: 0.72rem;
  color: var(--text-primary);
  margin-top: 1px;
}

.register-th-summary {
  padding: 6px 4px;
  text-align: center;
  border-bottom: 2px solid var(--border-color);
  min-width: 32px;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  background: var(--bg-glass);
}

.register-td-name {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--bg-card);
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-color);
}

.register-emp {
  display: flex;
  align-items: center;
  gap: 8px;
}

.register-emp-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 600;
  flex-shrink: 0;
}

.register-emp-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.register-emp-role {
  font-size: 0.6rem;
  color: var(--text-muted);
}

.register-td-day {
  padding: 4px 2px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s;
}

.register-td-day:hover {
  background: var(--bg-card-hover) !important;
}

.register-td-summary {
  padding: 4px 4px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-glass);
}

.register-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
}

.register-icon--present {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.register-icon--late {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.register-icon--leave {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.register-icon--wfh {
  background: rgba(20, 184, 166, 0.15);
  color: #14b8a6;
}

.register-icon--absent {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.register-icon--weekend {
  background: transparent;
  color: var(--text-muted);
  font-size: 0.6rem;
  opacity: 0.5;
}

.register-weekend {
  background: rgba(100, 116, 139, 0.04) !important;
}

.register-today {
  background: rgba(99, 102, 241, 0.08) !important;
}

.register-future {
  opacity: 0.3;
}

.register-summary-present {
  color: #10b981 !important;
}

.register-summary-late {
  color: #f59e0b !important;
}

.register-summary-leave {
  color: #3b82f6 !important;
}

.register-summary-absent {
  color: #ef4444 !important;
}

/* ═══ Heatmap Calendar ═══ */
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  max-width: 380px;
}

.heatmap-header {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 4px 0;
}

.heatmap-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: default;
  transition: all var(--transition-fast);
}

.heatmap-cell:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-sm);
}

.heatmap-empty {
  visibility: hidden;
}

.heatmap-full {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.heatmap-partial {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.heatmap-shortleave {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.heatmap-halfday {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.heatmap-insufficient {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.heatmap-late {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.heatmap-leave {
  background: rgba(99, 102, 241, 0.15);
  color: #6366f1;
}

.heatmap-holiday {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

.heatmap-absent {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.heatmap-weekend {
  background: rgba(100, 116, 139, 0.06);
  color: var(--text-muted);
  opacity: 0.5;
}

.heatmap-future {
  opacity: 0.25;
  color: var(--text-muted);
}

.heatmap-today {
  outline: 2px solid var(--accent-primary);
  outline-offset: -1px;
}

.heatmap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.heatmap-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.heatmap-dot {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  display: inline-block;
}

/* ═══ Holiday Styles ═══ */
.register-icon--holiday {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
}

.register-holiday {
  background: rgba(168, 85, 247, 0.05) !important;
}

.holiday-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.holiday-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
  min-width: 180px;
}

.holiday-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

/* ═══ Attendance Alerts ═══ */
.alert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.alert-row:last-child {
  border-bottom: none;
}

.alert-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

/* ═══ Shift Comparison Badges ═══ */
.comparison-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}

.comparison-early {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.comparison-ontime {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.comparison-late {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.comparison-missed {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* ═══ Break Tracking ═══ */
.attendance-widget--break {
  border: 2px solid #f59e0b !important;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(217, 119, 6, 0.04)) !important;
}

.attendance-break-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f59e0b;
  animation: breakPulse 1.5s ease-in-out infinite;
}

@keyframes breakPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.3);
  }
}

.break-log-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.break-entry {
  font-size: 0.68rem;
  color: var(--text-muted);
  padding: 2px 8px;
  background: rgba(245, 158, 11, 0.08);
  border-radius: 4px;
  white-space: nowrap;
}

.attendance-summary-badge--break {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.attendance-team-card--break {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.04);
}

.attendance-team-status--break {
  color: #f59e0b;
}

/* ═══ Employee Detail Modal ═══ */
.detail-session {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  margin-bottom: 8px;
  background: var(--bg-primary);
}

.detail-session--break {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.04);
}

.detail-session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.detail-session-time {
  font-weight: 600;
  font-size: 0.88rem;
}

.detail-session-hours {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.detail-session-breaks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border-color);
}

.detail-break-entry {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.08);
  color: var(--text-secondary);
}

.detail-break-total {
  font-size: 0.7rem;
  font-weight: 700;
  color: #f59e0b;
  padding: 2px 8px;
}

.detail-week-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.detail-week-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--bg-secondary);
  min-width: 62px;
  flex: 1;
}

.detail-week-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.detail-week-label {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* ═══ Break Analytics Chart ═══ */
.break-analytics-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.break-chart-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  transition: background var(--transition-fast);
  border-radius: 6px;
}

.break-chart-row:hover {
  background: var(--bg-secondary);
}

.break-chart-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 140px;
}

.break-chart-name {
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.break-chart-bar-wrap {
  flex: 1;
  height: 18px;
  background: var(--bg-secondary);
  border-radius: 4px;
  position: relative;
  overflow: visible;
}

.break-chart-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}

.break-chart-avg-line {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: var(--text-muted);
  opacity: 0.5;
}

.break-chart-val {
  min-width: 100px;
  text-align: right;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════
   ADMIN TRACKER STYLES
   ═══════════════════════════════════════════════════════ */

/* Period Selector Bar */
.tracker-period-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tracker-period-btns {
  display: flex;
  gap: 4px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 3px;
}

.tracker-period-btn {
  padding: 7px 16px;
  font-size: 0.78rem;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.tracker-period-btn:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--color-primary);
}

.tracker-period-btn.active {
  background: var(--accent-gradient, linear-gradient(135deg, #6366f1, #818cf8));
  color: white;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.tracker-actions {
  display: flex;
  gap: 8px;
}

/* Real-time Status Bar */
.tracker-realtime-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.tracker-rt-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.tracker-rt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.tracker-rt-period {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Alerts Rail */
.tracker-alerts-rail {
  padding: 10px 16px;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: 10px;
  margin-bottom: 16px;
}

.tracker-alerts-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.tracker-alerts-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tracker-alert-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.72rem;
  border: 1px solid;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.6);
}

/* Workforce Dashboard Table */
.tracker-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.tracker-table thead th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.02);
}

.tracker-th-name {
  min-width: 180px;
}

.tracker-th-time {
  min-width: 80px;
}

.tracker-th-num {
  text-align: right !important;
  min-width: 70px;
}

.tracker-th-status {
  min-width: 90px;
  text-align: center !important;
}

.tracker-row {
  cursor: pointer;
  transition: background 0.15s;
}

.tracker-row:hover {
  background: var(--bg-hover);
}

.tracker-row td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
}

.tracker-td-name {
  font-weight: 500;
}

.tracker-emp {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tracker-emp-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
}

.tracker-emp-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tracker-emp-role {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.tracker-td-time {
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
}

.tracker-td-late {
  color: #ef4444 !important;
}

.tracker-late-badge {
  display: inline-block;
  padding: 1px 6px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-radius: 4px;
  margin-left: 4px;
}

.tracker-td-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.tracker-td-net {
  color: #10b981 !important;
  font-weight: 700 !important;
}

/* Activity-based fraud detection flags */
.tracker-flag {
  display: inline-block;
  padding: 2px 7px;
  font-size: 0.62rem;
  font-weight: 600;
  border-radius: 4px;
  margin: 1px 2px;
  white-space: nowrap;
}

.tracker-flag-warn {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.tracker-flag-alert {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.tracker-flag-info {
  background: rgba(100, 116, 139, 0.1);
  color: #94a3b8;
}

.tracker-td-status {
  text-align: center;
}

.tracker-break-warn {
  color: #ef4444 !important;
  font-weight: 700 !important;
}

.tracker-break-caution {
  color: #f59e0b !important;
}

.tracker-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.tracker-status-active {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.tracker-status-break {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.tracker-status-done {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
}

.tracker-status-absent {
  background: rgba(100, 116, 139, 0.1);
  color: #64748b;
}

.tracker-totals-row {
  background: rgba(0, 0, 0, 0.03);
  border-top: 2px solid var(--border-color);
}

.tracker-totals-row td {
  padding: 12px 14px;
  border-bottom: none;
}

/* Daily Time Log */
.tracker-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  transition: background 0.15s;
  user-select: none;
}

.tracker-day-header:hover {
  background: var(--bg-hover);
}

.tracker-day-today {
  background: rgba(16, 185, 129, 0.04) !important;
  border-left: 3px solid #10b981;
}

.tracker-day-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tracker-day-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tracker-day-label-today {
  color: #10b981;
}

.tracker-day-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tracker-day-stat {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.tracker-day-detail {
  border-bottom: 2px solid var(--border-color);
  background: rgba(0, 0, 0, 0.01);
}

.tracker-day-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px 8px 36px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  transition: background 0.15s;
}

.tracker-day-row:hover {
  background: var(--bg-hover);
}

.tracker-day-row-late {
  border-left: 3px solid #ef4444;
}

.tracker-day-user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
}

.tracker-day-username {
  font-size: 0.8rem;
  font-weight: 600;
}

.tracker-day-times {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tracker-day-clock {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.tracker-break-chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.tracker-break-chip {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.68rem;
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border-radius: 12px;
  font-weight: 500;
}

.tracker-day-hours {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.78rem;
  min-width: 180px;
  justify-content: flex-end;
}

.tracker-absent-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 36px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.tracker-absent-chip {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.68rem;
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border-radius: 12px;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .tracker-period-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .tracker-realtime-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .tracker-rt-period {
    margin-left: 0;
  }

  .tracker-day-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-left: 16px;
  }

  .tracker-day-right {
    flex-wrap: wrap;
    gap: 8px;
  }

  .tracker-day-hours {
    min-width: auto;
    justify-content: flex-start;
  }
}