/* ==========================================================================
   MEDASTRAX PREMIUM DESIGN SYSTEM & CUSTOM CSS
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens & CSS Variables
   -------------------------------------------------------------------------- */
:root {
  /* Common System Values */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-width: 280px;

  /* Theme Defaults (Light Theme with MedAstraX Branding) */
  --bg-primary: linear-gradient(135deg, #eef2f6 0%, #ffffff 50%, #ccfbf1 100%);
  --bg-secondary: #ffffff;
  --card-bg: rgba(255, 255, 255, 0.85);
  --card-bg-hover: rgba(255, 255, 255, 0.98);
  --border-color: rgba(5, 47, 95, 0.08);
  --border-focus: #00a896; /* MedAstraX Teal */
  --text-primary: #052f5f; /* MedAstraX Deep Blue text */
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  /* Vibrant Accents */
  --accent-color: #00a896; /* MedAstraX Teal */
  --accent-glow: rgba(0, 168, 150, 0.35);
  --accent-secondary: #052f5f; /* MedAstraX Deep Blue */
  --accent-secondary-glow: rgba(5, 47, 95, 0.25);
  
  /* Status Colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-info: #3b82f6;

  /* Dynamic Overlays */
  --overlay-bg: rgba(248, 250, 252, 0.85);
  --shadow-sm: 0 2px 8px rgba(5, 47, 95, 0.05);
  --shadow-md: 0 8px 24px rgba(5, 47, 95, 0.1);
  --shadow-lg: 0 16px 32px rgba(5, 47, 95, 0.15);
  --shadow-accent: 0 0 15px rgba(0, 168, 150, 0.15);
}

/* Dark Theme overrides */
[data-theme="dark"] {
  --bg-primary: linear-gradient(135deg, #050811 0%, #0a0e1a 100%);
  --bg-secondary: #0a0e1a;
  --card-bg: rgba(13, 20, 38, 0.75);
  --card-bg-hover: rgba(21, 31, 57, 0.9);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #00a896;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-color: #00a896;
  --accent-glow: rgba(0, 168, 150, 0.45);
  --accent-secondary: #0f52ba;
  --accent-secondary-glow: rgba(15, 82, 186, 0.3);
  
  --overlay-bg: rgba(5, 8, 17, 0.85);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
  --shadow-accent: 0 0 20px rgba(0, 168, 150, 0.25);
}

/* --------------------------------------------------------------------------
   2. Reset & General Styles
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition-normal), color var(--transition-normal);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Utility classes */
.hidden {
  display: none !important;
}

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

.text-accent {
  color: var(--accent-color) !important;
}

/* --------------------------------------------------------------------------
   3. Custom Typography & UI Headers
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

p.subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   4. Buttons & Form Elements
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-color), var(--accent-secondary));
  color: #ffffff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background-color: var(--card-bg-hover);
  border-color: var(--text-muted);
}

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

.btn-icon-only {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 50%;
}

.btn-block {
  width: 100%;
}

/* Form Styling */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background-color: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

/* Password Toggle Wrapper */
.password-input-wrapper {
  position: relative;
  display: flex;
}
.password-input-wrapper input {
  padding-right: 48px;
}
.icon-btn-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
}
.icon-btn-toggle:hover {
  color: var(--text-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* --------------------------------------------------------------------------
   5. Login Screen (Glassmorphism & Neon Aura)
   -------------------------------------------------------------------------- */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 20px;
  background: transparent;
  overflow: hidden;
  z-index: 2;
}

/* Modern tech grid overlay pattern */
.login-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.7;
  z-index: 1;
  pointer-events: none;
}

#ecg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Background animated floating glowing blobs */
.login-background-glow {
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  top: -100px;
  right: -100px;
  z-index: 1;
  filter: blur(80px);
  animation: floatGlow 15s ease-in-out infinite alternate;
}
.login-wrapper::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-secondary-glow) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
  z-index: 1;
  filter: blur(80px);
  animation: floatGlow 20s ease-in-out infinite alternate-reverse;
}

/* Portal Selector Grid (CUIMS style) with Cascade Entry */
.portal-select-container {
  width: 100%;
  max-width: 900px;
  text-align: center;
  z-index: 2;
}

.portal-select-header {
  margin-bottom: 40px;
}

.brand-logo-large {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 12px;
  animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.portal-select-header h1 {
  font-family: var(--font-heading);
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 6px;
  animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
  opacity: 0;
}

.portal-select-header .subtitle {
  font-size: 1.1rem;
  color: var(--accent-color);
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 16px;
  animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
  opacity: 0;
}

.portal-instruction {
  font-size: 1rem;
  color: var(--text-secondary);
  animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.25s forwards;
  opacity: 0;
}

.portal-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 800px;
  margin: 0 auto;
}

.portal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 30px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.4s;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Cascaded entry delays for cards */
.portal-cards-grid > .portal-card:nth-child(1) {
  animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
  opacity: 0;
}
.portal-cards-grid > .portal-card:nth-child(2) {
  animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.45s forwards;
  opacity: 0;
}

.portal-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--accent-color);
  box-shadow: var(--shadow-lg), var(--shadow-accent);
}

.portal-card-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: #ffffff;
  font-size: 1.5rem;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.portal-card:hover .portal-card-icon {
  transform: scale(1.15) rotate(8deg);
}

.portal-card-icon i {
  width: 28px;
  height: 28px;
}

.portal-card-icon.admin-icon {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

.portal-card-icon.staff-icon {
  background: linear-gradient(135deg, #00a896, #028090);
  box-shadow: 0 4px 14px rgba(0, 168, 150, 0.4);
}

.portal-card h3 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.portal-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 28px;
  flex-grow: 1;
}

/* Card hover propagates dynamic glowing button styles */
.portal-card .btn-primary {
  transition: all 0.3s ease;
}
.portal-card:hover .btn-primary {
  transform: scale(1.04);
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-color));
  box-shadow: 0 0 20px rgba(0, 168, 150, 0.4);
}

/* Back Button Top in Login Card */
.back-btn-top {
  position: absolute;
  top: 24px;
  left: 24px;
  padding: 6px 12px;
  font-size: 0.8rem;
  background-color: transparent !important;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.back-btn-top:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
  transform: translateX(-4px);
}

.brand-logo-medium {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 12px;
}

.login-card {
  width: 100%;
  max-width: 460px;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  z-index: 2;
  position: relative;
  animation: cardFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
  padding-top: 20px;
}

.brand-logo-large {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

.login-header h1 {
  font-size: 2.2rem;
  letter-spacing: 0.15em;
  background: linear-gradient(135deg, #ffffff, #93c5fd, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.demo-credentials {
  margin-top: 15px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  text-align: left;
  color: var(--text-secondary);
}
.demo-credentials div {
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}
.demo-credentials code {
  color: var(--accent-color);
  font-family: monospace;
}

.login-footer {
  margin-top: 30px;
  font-size: 0.85rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   6. Workspace Dashboard & Layout
   -------------------------------------------------------------------------- */
.workspace-wrapper {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 2;
}

/* Sidebar Design */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px;
  flex-shrink: 0;
  transition: all var(--transition-normal);
  position: relative;
  overflow: visible;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.brand-logo-small {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, #ffffff, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* User profile widget in sidebar */
.user-profile-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background-color: rgba(0, 0, 0, 0.15);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

.avatar-container {
  position: relative;
  width: 44px;
  height: 44px;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-secondary), var(--accent-color));
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  font-family: var(--font-heading);
  box-shadow: var(--shadow-sm);
}

.status-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
}
.status-indicator.online {
  background-color: var(--color-success);
}

.user-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  flex: 1;
}

.user-details h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
  margin-bottom: 4px;
}

.user-details .badge {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 100%;
  font-size: 0.62rem;
  padding: 3px 8px;
  letter-spacing: 0.3px;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 20px;
  background-color: rgba(6, 182, 212, 0.15);
  color: var(--accent-color);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-manager {
  background-color: rgba(99, 102, 241, 0.15);
  color: var(--accent-secondary);
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-employee {
  background-color: rgba(156, 163, 175, 0.15);
  color: var(--text-secondary);
  border: 1px solid rgba(156, 163, 175, 0.3);
}

.badge-technical-lead {
  background-color: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-team-lead {
  background-color: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-software-developer, .role-software-developer {
  background-color: rgba(6, 182, 212, 0.15) !important;
  color: #06b6d4 !important;
  border: 1px solid rgba(6, 182, 212, 0.3) !important;
}

.badge-mse-tl, .role-mse-tl {
  background-color: rgba(139, 92, 246, 0.15) !important;
  color: #8b5cf6 !important;
  border: 1px solid rgba(139, 92, 246, 0.3) !important;
}

.badge-mse, .role-mse {
  background-color: rgba(244, 63, 94, 0.15) !important;
  color: #f43f5e !important;
  border: 1px solid rgba(244, 63, 94, 0.3) !important;
}

/* Sidebar Navigation Items */
.sidebar-nav {
  flex-grow: 1;
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav li {
  margin-bottom: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link i {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.nav-link:hover i {
  transform: translateX(3px);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.15) 0%, rgba(99, 102, 241, 0.03) 100%);
  color: var(--accent-color);
  font-weight: 600;
  border-left: 3px solid var(--accent-color);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.sidebar-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
}

/* Main Content Structure */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top bar style */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.welcome-message h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.quick-stats {
  display: flex;
  gap: 16px;
}

.stat-mini {
  background-color: var(--bg-primary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-mini .label {
  color: var(--text-secondary);
}

.stat-mini .value {
  font-weight: 700;
}

/* Content Container */
.content-wrapper {
  padding: 40px;
  flex-grow: 1;
  overflow-y: auto;
}

/* Tab panes */
.tab-pane {
  animation: fadeIn 0.4s ease forwards;
}

/* --------------------------------------------------------------------------
   7. Card Components
   -------------------------------------------------------------------------- */
.dashboard-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}
.dashboard-card:hover {
  background: var(--card-bg-hover);
  border-color: rgba(6, 182, 212, 0.2);
  box-shadow: var(--shadow-md);
}

.dashboard-card h3 {
  font-size: 1.15rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Stats dashboard grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.stat-card-left h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.stat-card-left .stat-value {
  font-size: 2.2rem;
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--text-primary);
}

.stat-card-right {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background-color: rgba(6, 182, 212, 0.1);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--accent-color);
}

.stat-card.stat-secondary::before {
  background-color: var(--accent-secondary);
}
.stat-card.stat-secondary .stat-card-right {
  background-color: rgba(99, 102, 241, 0.1);
  color: var(--accent-secondary);
}

.stat-card.stat-success::before {
  background-color: var(--color-success);
}
.stat-card.stat-success .stat-card-right {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--color-success);
}

.stat-card.stat-warning::before {
  background-color: var(--color-warning);
}
.stat-card.stat-warning .stat-card-right {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--color-warning);
}

/* Double column overview layouts */
.overview-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

/* --------------------------------------------------------------------------
   8. Activity Timeline
   -------------------------------------------------------------------------- */
.activity-timeline {
  position: relative;
  padding-left: 24px;
  border-left: 2px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.activity-item {
  position: relative;
}

.activity-item::before {
  content: '';
  position: absolute;
  left: -31px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--accent-color);
  border: 3px solid var(--bg-secondary);
}
.activity-item.system-activity::before {
  background-color: var(--accent-secondary);
}
.activity-item.success-activity::before {
  background-color: var(--color-success);
}
.activity-item.danger-activity::before {
  background-color: var(--color-danger);
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.activity-desc {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.activity-desc span {
  font-weight: 600;
}

/* Security profile grid card */
.profile-details-card .profile-info-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}
.info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.info-val {
  font-weight: 500;
  font-size: 0.9rem;
}

.status-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
}
.status-pill.active-status {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.status-pill.warning-status {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--color-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.status-pill.info-status {
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--color-info);
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.status-pill.success-status {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.status-pill.danger-status {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.status-pill.review-status {
  background-color: rgba(99, 102, 241, 0.15);
  color: #6366f1;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

/* --------------------------------------------------------------------------
   9. Directory Table UI
   -------------------------------------------------------------------------- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.table-card {
  padding: 0;
  overflow: hidden;
}

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

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 320px;
}
.search-box i {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  width: 16px;
  height: 16px;
}
.search-box input {
  padding: 8px 16px 8px 36px;
  border-radius: var(--radius-sm);
  background-color: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 100%;
}
.search-box input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.filter-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}
.filter-box select {
  padding: 8px 12px;
  background-color: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
}

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  table-layout: auto; /* Let columns adjust naturally based on viewport space */
}

#tasks-table, #employees-table {
  min-width: 1050px; /* Enforces a minimum readable space so text never gets squished or cut off */
}

th {
  background-color: rgba(5, 47, 95, 0.03);
  padding: 16px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border-color);
  vertical-align: middle;
}

td {
  padding: 16px 20px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: rgba(0, 168, 150, 0.015);
}

/* Specific alignments for tasks board table (Admin/Manager view) */
#tasks-table th:nth-child(1), #tasks-table td:nth-child(1) {
  width: 28%; /* Task Title & Description */
  text-align: left;
}

#tasks-table th:nth-child(2), #tasks-table td:nth-child(2) {
  width: 18%; /* Assignee */
  text-align: left;
}

#tasks-table th:nth-child(3), #tasks-table td:nth-child(3) {
  width: 11%; /* Priority */
  text-align: center;
}

#tasks-table th:nth-child(4), #tasks-table td:nth-child(4) {
  width: 13%; /* Due Date */
  text-align: center;
}

#tasks-table th:nth-child(5), #tasks-table td:nth-child(5) {
  width: 12%; /* Status */
  text-align: center;
}

#tasks-table th:nth-child(6), #tasks-table td:nth-child(6) {
  width: 18%; /* Reporting Line */
  text-align: left;
}

#tasks-table th:nth-child(7), #tasks-table td:nth-child(7) {
  width: 10%; /* Actions */
  text-align: center;
}

/* Specific alignments for employee directory table */
#employees-table th:nth-child(1), #employees-table td:nth-child(1) { width: 12%; } /* ID */
#employees-table th:nth-child(2), #employees-table td:nth-child(2) { width: 22%; } /* Name */
#employees-table th:nth-child(3), #employees-table td:nth-child(3) { width: 15%; } /* Username */
#employees-table th:nth-child(4), #employees-table td:nth-child(4) { width: 13%; } /* Role */
#employees-table th:nth-child(5), #employees-table td:nth-child(5) { width: 18%; } /* Manager */
#employees-table th:nth-child(6), #employees-table td:nth-child(6) { width: 12%; text-align: center; } /* Status */
#employees-table th:nth-child(7), #employees-table td:nth-child(7) { width: 10%; text-align: center; } /* Actions */

/* Structural layout helpers to prevent cell wrapping inside pills/badges */
.task-priority-badge,
.status-pill,
.task-due-date,
#tasks-table td:nth-child(7) .btn,
#employees-table td:nth-child(7) .btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* --------------------------------------------------------------------------
   10. Org Chart / Team Hierarchy Visualizer
   -------------------------------------------------------------------------- */
.org-chart-card {
  min-height: 500px;
  display: block;
  padding: 40px;
  overflow: auto;
}

.org-chart-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  margin: 0 auto;
}

/* Visual tree structures styling */
.chart-tree, .chart-tree ul {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

.chart-tree ul {
  flex-direction: row;
  align-items: flex-start;
  position: relative;
  padding-top: 40px;
}
.chart-tree ul.collapsed {
  display: none !important;
}
.collapsible-node {
  cursor: pointer;
}
.collapsible-node::after {
  content: '▼';
  font-size: 0.6rem;
  color: var(--text-muted);
  position: absolute;
  bottom: 6px;
  right: 12px;
  transition: transform var(--transition-fast);
}
.collapsible-node.node-collapsed::after {
  content: '▲';
  color: var(--accent-color);
}

/* Line connections logic (Horizontal lines) */
.chart-tree ul::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 40px;
  background-color: var(--border-color);
}

.chart-tree li {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 0 10px;
}

/* Connector lines between siblings */
.chart-tree li::before, .chart-tree li::after {
  content: '';
  position: absolute;
  top: 0;
  right: 50%;
  width: 50%;
  height: 40px;
  border-top: 2px solid var(--border-color);
}
.chart-tree li::after {
  right: auto;
  left: 50%;
  border-left: 2px solid var(--border-color);
}

.chart-tree li:only-child::after, .chart-tree li:only-child::before {
  display: none;
}

.chart-tree li:only-child {
  padding-top: 0;
}

.chart-tree li:first-child::before, .chart-tree li:last-child::after {
  border: none;
}

.chart-tree li:last-child::before {
  border-right: 2px solid var(--border-color);
  border-top-right-radius: var(--radius-sm);
}

.chart-tree li:first-child::after {
  border-top-left-radius: var(--radius-sm);
}

.dual-node-container {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 6;
}

/* Tri-admin row: all 3 co-founder admins side-by-side at the top */
.tri-admin-container {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 6;
}

/* Peer admin cards (not the logged-in admin) — slightly dimmed */
.admin-peer-card {
  opacity: 0.72;
  transform: scale(0.94);
  filter: saturate(0.8);
  transition: opacity var(--transition-normal), transform var(--transition-normal), filter var(--transition-normal);
  cursor: default !important;
}

.admin-peer-card:hover {
  opacity: 1;
  transform: scale(0.97) translateY(-4px);
  filter: saturate(1);
}

/* Node cards design */
.node-card {
  width: 180px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-sm);
  z-index: 5;
  transition: all var(--transition-normal);
}

.node-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
  box-shadow: 0 10px 25px rgba(6, 182, 212, 0.2);
}

.node-card.admin-node {
  border-top: 4px solid var(--accent-color);
}
.node-card.manager-node {
  border-top: 4px solid var(--accent-secondary);
}
.node-card.employee-node {
  border-top: 4px solid var(--text-muted);
}
.node-card.technical-lead-node {
  border-top: 4px solid #10b981;
}
.node-card.team-lead-node {
  border-top: 4px solid #f59e0b;
}
.node-card.software-developer-node {
  border-top: 4px solid #06b6d4;
}
.node-card.mse-tl-node {
  border-top: 4px solid #8b5cf6;
}
.node-card.mse-node {
  border-top: 4px solid #f43f5e;
}

.node-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-primary), var(--card-bg));
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid var(--border-color);
}

.node-card.admin-node .node-avatar {
  background: linear-gradient(135deg, var(--accent-glow), var(--accent-color));
  color: #fff;
}
.node-card.manager-node .node-avatar {
  background: linear-gradient(135deg, var(--accent-secondary-glow), var(--accent-secondary));
  color: #fff;
}
.node-card.technical-lead-node .node-avatar {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), #10b981);
  color: #fff;
}
.node-card.team-lead-node .node-avatar {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), #f59e0b);
  color: #fff;
}
.node-card.software-developer-node .node-avatar {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), #06b6d4);
  color: #fff;
}
.node-card.mse-tl-node .node-avatar {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), #8b5cf6);
  color: #fff;
}
.node-card.mse-node .node-avatar {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.25), #f43f5e);
  color: #fff;
}

.node-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: block;
}

.node-reports-to {
  font-size: 0.65rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 10px;
  display: inline-block;
}

.hierarchy-legend {
  display: flex;
  gap: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.admin-dot { background-color: var(--accent-color); }
.manager-dot { background-color: var(--accent-secondary); }
.employee-dot { background-color: var(--text-muted); }
.tech-lead-dot { background-color: #10b981; }
.team-lead-dot { background-color: #f59e0b; }
.software-developer-dot { background-color: #06b6d4; }
.mse-tl-dot { background-color: #8b5cf6; }
.mse-dot { background-color: #f43f5e; }

/* --------------------------------------------------------------------------
   11. Tasks & Kanban Boards
   -------------------------------------------------------------------------- */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.kanban-column {
  background-color: rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  min-height: 500px;
  display: flex;
  flex-direction: column;
}

.kanban-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
}
#col-pending .kanban-column-header { border-bottom-color: var(--color-warning); }
#col-in-progress .kanban-column-header { border-bottom-color: var(--color-info); }
#col-completed .kanban-column-header { border-bottom-color: var(--color-success); }

.kanban-column-header h3 {
  font-size: 1.1rem;
}

.count-badge {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.kanban-cards-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-grow: 1;
}

.task-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.task-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-md);
}

.task-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.task-card-header h4 {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

.task-priority-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.priority-critical { background-color: rgba(239, 68, 68, 0.15); color: var(--color-danger); border: 1px solid rgba(239, 68, 68, 0.3); }
.priority-high { background-color: rgba(245, 158, 11, 0.15); color: var(--color-warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.priority-medium { background-color: rgba(59, 130, 246, 0.15); color: var(--color-info); border: 1px solid rgba(59, 130, 246, 0.3); }
.priority-low { background-color: rgba(156, 163, 175, 0.15); color: var(--text-secondary); border: 1px solid rgba(156, 163, 175, 0.3); }

.task-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.task-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
}

.task-due-date {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
}
.task-due-date i {
  width: 12px;
  height: 12px;
}

/* Kanban quick action transition button */
.task-action-btn {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--accent-color);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.task-action-btn:hover {
  background-color: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

/* --------------------------------------------------------------------------
   12. Pop-up Modals
   -------------------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--overlay-bg);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 520px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform var(--transition-normal);
}

.modal-overlay:not(.hidden) .modal-card {
  transform: translateY(0);
}

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

.modal-header h2 {
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.close-modal-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 2rem;
  cursor: pointer;
  transition: color var(--transition-fast);
  line-height: 1;
}
.close-modal-btn:hover {
  color: var(--text-primary);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* --------------------------------------------------------------------------
   13. Toast Notification Alert UI
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 200;
  pointer-events: none;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  min-width: 300px;
  max-width: 450px;
  pointer-events: auto;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
  overflow: hidden;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
}

.toast.toast-success::before { background-color: var(--color-success); }
.toast.toast-error::before { background-color: var(--color-danger); }
.toast.toast-info::before { background-color: var(--color-info); }

.toast-success i { color: var(--color-success); }
.toast-error i { color: var(--color-danger); }
.toast-info i { color: var(--color-info); }

/* --------------------------------------------------------------------------
   14. Animations Definition
   -------------------------------------------------------------------------- */
@keyframes cardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* View Transition Animations */
.slide-out-left {
  animation: slideOutLeft 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.slide-in-right {
  animation: slideInRightTransition 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.slide-out-right {
  animation: slideOutRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.slide-in-left {
  animation: slideInLeftTransition 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes floatGlow {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.08); }
  100% { transform: translate(-20px, 40px) scale(0.92); }
}

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

@keyframes slideOutLeft {
  from { transform: translateX(0); opacity: 1; filter: blur(0); }
  to { transform: translateX(-40px); opacity: 0; filter: blur(4px); }
}

@keyframes slideInRightTransition {
  from { transform: translateX(40px); opacity: 0; filter: blur(4px); }
  to { transform: translateX(0); opacity: 1; filter: blur(0); }
}

@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; filter: blur(0); }
  to { transform: translateX(40px); opacity: 0; filter: blur(4px); }
}

@keyframes slideInLeftTransition {
  from { transform: translateX(-40px); opacity: 0; filter: blur(4px); }
  to { transform: translateX(0); opacity: 1; filter: blur(0); }
}

/* Subordinate Performance Progress Bars */
.progress-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}
.progress-bar-bg {
  height: 8px;
  background-color: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
  border-radius: 4px;
  transition: width var(--transition-slow);
}

/* Comment UI Bubbles */
.comment-item {
  background-color: rgba(5, 47, 95, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
}
.comment-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}
.comment-text {
  color: var(--text-primary);
  line-height: 1.4;
}

/* Tasks Control bar elements */
.tasks-control-bar select {
  padding: 8px 12px;
  background-color: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
}
[data-theme="dark"] .tasks-control-bar select {
  background-color: rgba(0, 0, 0, 0.25);
}

/* --------------------------------------------------------------------------
   15. Responsive Styling Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .workspace-wrapper {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  
  .sidebar-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .sidebar-nav li {
    margin-bottom: 0;
  }
  
  .top-bar {
    padding: 16px 20px;
  }
  
  .content-wrapper {
    padding: 20px;
  }
  
  .overview-layout {
    grid-template-columns: 1fr;
  }
  
  .kanban-board {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Custom Remember Me Checkbox */
.remember-me-group {
  display: flex;
  align-items: center;
  margin-top: 15px;
  margin-bottom: 20px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  user-select: none;
  gap: 10px;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-checkmark {
  position: relative;
  height: 18px;
  width: 18px;
  background-color: rgba(0, 0, 0, 0.1);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  transition: all var(--transition-fast);
}

[data-theme="dark"] .checkbox-checkmark {
  background-color: rgba(255, 255, 255, 0.05);
}

.checkbox-container:hover input ~ .checkbox-checkmark {
  border-color: var(--border-focus);
}

.checkbox-container input:checked ~ .checkbox-checkmark {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  box-shadow: 0 0 8px var(--accent-glow);
}

.checkbox-checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkbox-checkmark:after {
  display: block;
}

.checkbox-container .checkbox-checkmark:after {
  left: 6px;
  top: 2px;
  width: 4px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Sidebar Inner Content */
.sidebar-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: calc(var(--sidebar-width) - 48px);
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
  opacity: 1;
  visibility: visible;
}

/* Sidebar Toggle Button Styles */
#sidebar-toggle-btn {
  position: absolute;
  top: 24px;
  left: calc(var(--sidebar-width) - 56px);
  z-index: 100;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: left var(--transition-normal), background-color var(--transition-fast), border-color var(--transition-fast);
}

#sidebar-toggle-btn:hover {
  border-color: var(--border-focus);
  color: var(--accent-color);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.15);
}

/* Collapsed Sidebar Styles */
.workspace-wrapper.sidebar-collapsed .sidebar {
  width: 0 !important;
  padding: 0 !important;
  border-right: none !important;
}

.workspace-wrapper.sidebar-collapsed .sidebar-content {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.workspace-wrapper.sidebar-collapsed #sidebar-toggle-btn {
  left: 24px;
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
  box-shadow: var(--shadow-md);
}

/* Adjust header spacing when collapsed */
.top-bar {
  transition: padding-left var(--transition-normal);
}

.workspace-wrapper.sidebar-collapsed .top-bar {
  padding-left: 80px;
}



/* ──────────────────────────────────────────────────────────────────────────
   PREMIUM ACTIVITY TIMELINE STYLES
   ────────────────────────────────────────────────────────────────────────── */
.activity-timeline {
  position: relative;
  padding-left: 36px;
  border-left: 2px dashed var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 15px;
}

.activity-item {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
}

/* Disable old circle bullet dot marker */
.activity-item::before {
  display: none !important;
}

.activity-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 8px);
  padding: 12px 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.activity-card:hover {
  transform: translateX(4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.04);
  border-color: rgba(5, 47, 95, 0.15);
}

.activity-icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  position: absolute;
  left: -53px; /* Centered exactly on the dashed line! */
  top: 8px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease;
}

.activity-item:hover .activity-icon-badge {
  transform: scale(1.1);
}

/* Leave Application PDF Aesthetics */
.leave-modal-card {
  max-width: 650px !important;
  background-color: var(--card-bg) !important;
  border: 1px solid var(--border-color) !important;
}

.leave-pdf-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
}

.leave-pdf-brand .brand-logo-small {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
}

.leave-pdf-brand .brand-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.leave-pdf-brand .brand-tagline {
  font-size: 0.75rem;
  color: var(--accent-color);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 4px;
}

.leave-section-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 20px;
  margin-bottom: 10px;
  border-left: 4px solid var(--accent-color);
  padding-left: 10px;
}

.leave-pdf-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.leave-pdf-table th, 
.leave-pdf-table td {
  border: 1px solid var(--border-color);
  padding: 12px;
  font-size: 0.9rem;
}

.leave-pdf-table th {
  background-color: rgba(6, 182, 212, 0.08);
  color: var(--text-primary);
  text-align: left;
  font-weight: 700;
}

.leave-pdf-table td input[type="text"],
.leave-pdf-table td input[type="date"],
.leave-pdf-table td textarea {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 4px;
}

.leave-pdf-table td input:focus,
.leave-pdf-table td textarea:focus {
  border-bottom: 1px solid var(--accent-color);
  outline: none;
}

.leave-pdf-table td input[readonly] {
  color: var(--text-secondary);
  cursor: not-allowed;
}

.leave-date-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.leave-date-row input[type="date"] {
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  padding: 6px 12px !important;
  background-color: var(--card-bg) !important;
}

.leave-guideline-note {
  background-color: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.leave-guideline-note p {
  margin: 0;
}

/* Leaves Tab Specific Layout */
.leaves-layout-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}

/* Action button spacing */
.leave-action-btn-group {
  display: flex;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   15. Attendance Tab Styles
   -------------------------------------------------------------------------- */
.attendance-marking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.date-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.date-picker-wrapper label {
  font-weight: 500;
  color: var(--text-secondary);
}

.date-picker-wrapper input[type="date"] {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 8px 12px;
  font-family: inherit;
}

.attendance-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-status-mark {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-status-mark.status-present {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.2);
}
.btn-status-mark.status-present.active,
.btn-status-mark.status-present:hover {
  background-color: #10b981;
  color: #fff;
}

.btn-status-mark.status-late {
  background-color: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.2);
}
.btn-status-mark.status-late.active,
.btn-status-mark.status-late:hover {
  background-color: #f59e0b;
  color: #fff;
}

.btn-status-mark.status-half {
  background-color: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
  border-color: rgba(139, 92, 246, 0.2);
}
.btn-status-mark.status-half.active,
.btn-status-mark.status-half:hover {
  background-color: #8b5cf6;
  color: #fff;
}

.btn-status-mark.status-absent {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}
.btn-status-mark.status-absent.active,
.btn-status-mark.status-absent:hover {
  background-color: #ef4444;
  color: #fff;
}

.border-left-success { border-left: 4px solid #10b981 !important; }
.border-left-warning { border-left: 4px solid #f59e0b !important; }
.border-left-purple { border-left: 4px solid #8b5cf6 !important; }
.border-left-danger { border-left: 4px solid #ef4444 !important; }
.border-left-info { border-left: 4px solid #06b6d4 !important; }


/* =========================
/* ==========================================================================
   WHATSAPP WEB STYLE EMPLOYEE CHAT SYSTEM
   ========================================================================== */

.wa-chat-container {
  display: grid;
  grid-template-columns: 340px 1fr;
  height: calc(100vh - 160px);
  min-height: 520px;
  max-height: calc(100vh - 150px);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-top: 15px;
}

/* --- Left Sidebar --- */
.wa-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  border-right: 1px solid var(--border-color);
  background: var(--bg-secondary);
  position: relative;
  user-select: none;
  overflow: hidden;
}

.wa-sidebar-header {
  height: 60px;
  padding: 10px 16px;
  background: var(--overlay-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wa-current-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.wa-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00a896 0%, #052f5f 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 2px 6px rgba(0, 168, 150, 0.25);
  position: relative;
}

.wa-current-user-title {
  min-width: 0;
  flex: 1;
}

.wa-current-user-title strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-current-user-title small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.wa-action-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 50%;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.wa-action-btn:hover {
  background: rgba(0, 168, 150, 0.1);
  color: var(--accent-color);
}

/* Dropdown Menu */
.wa-menu-dropdown-container {
  position: relative;
}

.wa-dropdown-menu {
  position: absolute;
  top: 42px;
  right: 0;
  width: 190px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  padding: 6px 0;
}

.wa-dropdown-item {
  width: 100%;
  padding: 10px 16px;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 0.85rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.wa-dropdown-item:hover {
  background: rgba(0, 168, 150, 0.08);
  color: var(--accent-color);
}

/* --- Search Bar --- */
.wa-search-container {
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.wa-search-box {
  display: flex;
  align-items: center;
  background: var(--overlay-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  gap: 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wa-search-box:focus-within {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px var(--accent-glow);
}

.wa-search-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.wa-search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.wa-search-clear {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
}

/* --- Filter Pills --- */
.wa-filter-pills {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
  overflow-x: auto;
}

.wa-pill {
  padding: 4px 12px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  background: var(--overlay-bg);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wa-pill:hover {
  background: rgba(0, 168, 150, 0.1);
  color: var(--accent-color);
}

.wa-pill.active {
  background: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
}

.wa-pill-badge {
  background: #ffffff;
  color: var(--accent-color);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 0.7rem;
  font-weight: 700;
}

.wa-pill.active .wa-pill-badge {
  background: #ffffff;
  color: var(--accent-color);
}

/* --- Archived Banner --- */
.wa-archived-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 168, 150, 0.05);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-color);
}

.wa-archived-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wa-archived-count-badge {
  background: var(--accent-color);
  color: #ffffff;
  border-radius: 10px;
  padding: 2px 8px;
  font-size: 0.72rem;
}

/* --- Chat Item List --- */
.wa-chat-list {
  flex: 1;
  overflow-y: auto;
}

.wa-chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}

.wa-chat-item:hover {
  background: rgba(0, 168, 150, 0.05);
}

.wa-chat-item.active {
  background: rgba(0, 168, 150, 0.12);
  border-left: 4px solid var(--accent-color);
}

.wa-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.wa-item-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #052f5f 0%, #00a896 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.wa-item-avatar.group {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
}

/* Status Indicator Dots */
.wa-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
}

.wa-status-dot.free {
  background-color: #10b981; /* Green */
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.wa-status-dot.in_meeting {
  background-color: #ef4444; /* Red */
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
  animation: pulse-red 2s infinite;
}

.wa-status-dot.on_leave {
  background-color: #ef4444; /* Red dot for On Leave as requested */
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

@keyframes pulse-red {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.85; }
  100% { transform: scale(1); opacity: 1; }
}

.wa-chat-item-content {
  flex: 1;
  min-width: 0;
}

.wa-chat-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}

.wa-chat-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-chat-item-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.wa-chat-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.wa-chat-item-snippet {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* Status Badges */
.wa-status-badge-inline {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.wa-status-badge-inline.free {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.wa-status-badge-inline.in_meeting {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.wa-status-badge-inline.on_leave {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.wa-unread-badge {
  background: var(--accent-color);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 10px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.wa-pin-indicator {
  color: var(--accent-color);
  width: 13px;
  height: 13px;
  margin-left: 2px;
  transform: rotate(45deg);
}

.wa-item-pin-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}

.wa-item-pin-btn:hover {
  color: var(--accent-color);
  background: rgba(0, 168, 150, 0.1);
}

.wa-chat-item:hover .wa-item-pin-btn {
  display: inline-flex;
}

.wa-action-btn.active {
  background: rgba(0, 168, 150, 0.15);
  color: var(--accent-color);
}

/* Context Action Trigger */
.wa-item-options-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 2px 4px;
}

.wa-chat-item:hover .wa-item-options-btn {
  display: block;
}

/* --- Right Chat Panel --- */
.wa-chat-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  background: var(--bg-primary);
  position: relative;
}

/* Empty State */
.wa-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.wa-empty-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0, 168, 150, 0.1);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.wa-empty-icon-wrap i {
  width: 36px;
  height: 36px;
}

.wa-empty-state h3 {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.wa-empty-state p {
  max-width: 400px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.wa-empty-security {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-secondary);
  padding: 6px 14px;
  border-radius: 16px;
  border: 1px solid var(--border-color);
}

/* Active Chat */
.wa-active-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.wa-chat-header {
  height: 60px;
  padding: 10px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.wa-chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wa-chat-header-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00a896 0%, #052f5f 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
}

.wa-chat-header-text h4 {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.2;
}

.wa-chat-header-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.wa-role-domain-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.wa-chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Messages Container */
.wa-messages-container {
  flex: 1;
  min-height: 0;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-primary);
}

/* WhatsApp Message Bubbles */
.wa-msg-bubble {
  max-width: 65%;
  padding: 8px 12px 6px 12px;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.4;
  position: relative;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.wa-msg-bubble.outgoing {
  align-self: flex-end;
  background: #00a896;
  color: #ffffff;
  border-bottom-right-radius: 2px;
}

.wa-msg-bubble.incoming {
  align-self: flex-start;
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 2px;
}

.wa-msg-sender {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-color);
  margin-bottom: 2px;
}

.wa-msg-text {
  white-space: pre-wrap;
}

.wa-msg-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 0.65rem;
  opacity: 0.75;
  margin-top: 4px;
  float: right;
  margin-left: 10px;
}

.wa-msg-ticks {
  color: #a7f3d0;
  font-weight: bold;
}

/* Input Bar */
.wa-chat-input-bar {
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.wa-chat-input-bar input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  outline: none;
  background: var(--overlay-bg);
  color: var(--text-primary);
  font-size: 0.88rem;
  transition: border-color 0.2s ease;
}

.wa-chat-input-bar input:focus {
  border-color: var(--accent-color);
}

.wa-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--accent-color);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 168, 150, 0.3);
}

.wa-send-btn:hover {
  transform: scale(1.05);
  background: #008f80;
}

/* ==================== NOTIFICATIONS HUB & TOGGLE STYLES ==================== */

/* Sidebar Navigation Badge Pill */
.sidebar-nav .nav-link {
  position: relative;
}

.nav-badge {
  margin-left: auto;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
  transition: transform 0.2s ease, opacity 0.2s ease;
  line-height: 1.2;
}

.nav-badge.pulse {
  animation: badgePulse 0.6s ease-in-out 2;
}

@keyframes badgePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Modern iOS / Material Style Toggle Switch */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-color, #cbd5e1);
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.switch-toggle input:checked + .switch-slider {
  background: linear-gradient(135deg, var(--accent-color, #06b6d4) 0%, #3b82f6 100%);
}

.switch-toggle input:focus + .switch-slider {
  box-shadow: 0 0 1px var(--accent-color);
}

.switch-toggle input:checked + .switch-slider:before {
  transform: translateX(20px);
}

/* Category Filter Pills */
.notif-filter-btn {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  color: var(--text-secondary, #64748b);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.notif-filter-btn:hover {
  background: var(--hover-bg, rgba(6, 182, 212, 0.08));
  color: var(--text-primary, #0f172a);
}

.notif-filter-btn.active {
  background: var(--accent-color, #06b6d4);
  color: #ffffff;
  border-color: var(--accent-color, #06b6d4);
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.notif-filter-btn .filter-count {
  background: rgba(0, 0, 0, 0.12);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.notif-filter-btn.active .filter-count {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* Notification Card Formats */
.notif-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--radius-md, 12px);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.notif-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.notif-card.unread {
  background: var(--card-bg, #ffffff);
  border-left: 4px solid var(--accent-color, #06b6d4);
}

.notif-card.unread::after {
  content: '';
  position: absolute;
  top: 16px;
  right: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-color, #06b6d4);
  box-shadow: 0 0 6px var(--accent-color, #06b6d4);
}

.notif-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.notif-icon-box.chat {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.notif-icon-box.task_assigned {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}

.notif-icon-box.task_completed {
  background: rgba(139, 92, 246, 0.12);
  color: #8b5cf6;
}

.notif-icon-box.meeting {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.notif-icon-box.system {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.notif-type-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 4px;
}

.notif-type-tag.chat { background: rgba(16, 185, 129, 0.15); color: #059669; }
.notif-type-tag.task_assigned { background: rgba(59, 130, 246, 0.15); color: #2563eb; }
.notif-type-tag.task_completed { background: rgba(139, 92, 246, 0.15); color: #7c3aed; }
.notif-type-tag.meeting { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.notif-type-tag.system { background: rgba(239, 68, 68, 0.15); color: #dc2626; }

.notif-time {
  font-size: 0.78rem;
  color: var(--text-secondary, #64748b);
  margin-left: auto;
}

.notif-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #0f172a);
  margin-bottom: 4px;
}

.notif-desc {
  font-size: 0.86rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.4;
  margin-bottom: 10px;
}

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

.notif-action-btn {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color, #e2e8f0);
  background: transparent;
  color: var(--text-primary, #0f172a);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.notif-action-btn:hover {
  background: var(--accent-color, #06b6d4);
  color: #ffffff;
  border-color: var(--accent-color, #06b6d4);
}

.notif-delete-btn {
  color: var(--text-secondary, #94a3b8);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.notif-delete-btn:hover {
  color: #ef4444;
}

/* ==================== MEETINGS PORTAL REDESIGN STYLES ==================== */

.meetings-portal-container {
  display: flex;
  height: calc(100vh - 120px);
  min-height: 580px;
  border-radius: var(--radius-md, 12px);
  overflow: hidden;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
}

/* Sidebar styling */
.meetings-sidebar {
  width: 320px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.meetings-sidebar-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.meetings-sidebar-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.meetings-menu-trigger {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 168, 150, 0.1);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.meetings-menu-trigger:hover {
  background: var(--accent-color);
  color: #ffffff;
}

.meetings-filter-tabs {
  display: flex;
  padding: 10px 16px;
  gap: 6px;
  border-bottom: 1px solid var(--border-color);
}

.meetings-filter-btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 0.78rem;
  border-radius: 20px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.meetings-filter-btn.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: #64748b;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

/* Previous Meetings History Timeline View */
.history-timeline-container {
  position: relative;
  padding-left: 20px;
  border-left: 2px solid var(--border-color);
  margin-left: 10px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.history-date-header {
  position: relative;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
}

.history-date-header::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #94a3b8;
  border: 2px solid var(--bg-primary);
}

.history-meeting-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  margin-bottom: 10px;
}

.history-meeting-card:hover {
  border-color: var(--accent-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.history-card-time {
  font-size: 13px;
  font-weight: 700;
  color: #3b82f6;
}

.history-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}

.history-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.history-duration-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.meetings-search-box {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
}

.meetings-search-input-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.meetings-search-input-wrapper input {
  width: 100%;
  padding: 9px 36px 9px 36px;
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.meetings-search-input-wrapper input:focus {
  border-color: var(--accent-color);
}

.meetings-search-input-wrapper .search-icon-left {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.meetings-search-input-wrapper .calendar-icon-right {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease;
}

.meetings-search-input-wrapper .calendar-icon-right:hover {
  color: var(--accent-color);
}

.meetings-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.meetings-empty-sidebar {
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  padding: 20px;
}

.meetings-empty-sidebar i {
  color: var(--border-color);
  width: 44px;
  height: 44px;
}

.meetings-empty-sidebar p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
  max-width: 200px;
}

.meetings-sidebar-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm, 6px);
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.meetings-sidebar-item:hover {
  border-color: var(--accent-color);
  background: rgba(0, 168, 150, 0.03);
}

/* Main Panel styling */
.meetings-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  position: relative;
  overflow-y: auto;
}

.meetings-dashboard-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 40px;
  text-align: center;
}

.meetings-welcome-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color) 0%, #00a896 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(0, 168, 150, 0.25);
}

.meetings-dashboard-view h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 0;
  margin-bottom: 8px;
}

.meetings-dashboard-view p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 0;
  max-width: 480px;
}

.meetings-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 200px));
  gap: 16px;
  margin-top: 36px;
  width: 100%;
  max-width: 660px;
  justify-content: center;
}

.meeting-action-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md, 12px);
  padding: 20px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.meeting-action-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-color);
  background: var(--bg-primary);
  box-shadow: 0 10px 20px rgba(0, 168, 150, 0.05);
}

.meeting-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 168, 150, 0.1);
  color: var(--accent-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.meeting-card-icon i {
  width: 22px;
  height: 22px;
}

.meeting-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-color);
  margin: 0;
}

.meeting-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
  margin: 0;
}

.active-meeting-view {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #0f172a;
}

.active-meeting-view:fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  padding: 0 !important;
  background-color: #0f172a !important;
}

.active-meeting-header {
  padding: 14px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.active-meeting-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  padding: 16px;
  min-height: 0;
}

.active-meeting-controls {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  display: flex;
  justify-content: center;
  gap: 16px;
  align-items: center;
}

.active-meeting-controls .btn-icon {
  background-color: var(--bg-primary);
  border-radius: 50%;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.active-meeting-controls .btn-icon:hover {
  background-color: var(--border-color);
}

.active-meeting-controls .btn-icon.disabled {
  background-color: #ef4444;
  color: white;
  border-color: #ef4444;
}

.active-meeting-controls .btn-leave {
  background-color: #ef4444;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.active-meeting-controls .btn-leave:hover {
  opacity: 0.9;
}

/* Quick Actions Dropdown */
.quick-actions-menu {
  position: absolute;
  right: 16px;
  top: 52px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm, 6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  min-width: 170px;
  z-index: 110;
  overflow: hidden;
}

.quick-actions-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--text-primary);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.quick-actions-item:hover {
  background: rgba(0, 168, 150, 0.08);
  color: var(--accent-color);
}

.quick-actions-item i {
  width: 16px;
  height: 16px;
}

/* Meeting Lobby Modal - Centered dialog with dark overlay */
#meeting-lobby-modal {
  background-color: rgba(0, 0, 0, 0.65) !important;
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex !important;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#meeting-lobby-modal:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

#meeting-lobby-modal .modal-card {
  position: relative;
  width: 90% !important;
  max-width: 820px !important;
  height: auto !important;
  max-height: 92vh !important;
  border-radius: 16px !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6) !important;
  padding: 36px !important;
  background-color: #1a2332 !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
  transform: translateY(24px) scale(0.97);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#meeting-lobby-modal:not(.hidden) .modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* iOS Toggle Switch Styles */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #475569;
  transition: .4s;
  border-radius: 24px;
}

.slider-round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.switch-toggle input:checked + .slider-round {
  background-color: #82b834;
}

.switch-toggle input:checked + .slider-round:before {
  transform: translateX(20px);
}

/* ============================================================
   INCOMING CALL BANNER & ADD PARTICIPANTS ANIMATIONS
   ============================================================ */
@keyframes callBannerSlideIn {
  from { opacity: 0; transform: translateX(120%) scale(0.9); }
  to   { opacity: 1; transform: translateX(0)    scale(1); }
}

@keyframes ringPulse {
  0%   { transform: scale(0.9); opacity: 0.7; }
  60%  { transform: scale(1.7); opacity: 0.2; }
  100% { transform: scale(2.0); opacity: 0;   }
}

#incoming-call-banner.hidden {
  display: none !important;
}

/* Add participants modal — uses display:flex/none, no modal-overlay class */
#add-participants-modal {
  /* opened via style.display = 'flex' from JS */
}

/* Employee row in picker */
.ap-employee-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}
.ap-employee-row:hover {
  background: rgba(255,255,255,0.04);
}
.ap-employee-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #82b834;
  cursor: pointer;
  flex-shrink: 0;
}
.ap-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.ap-emp-name {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}
.ap-emp-role {
  font-size: 11px;
  color: #64748b;
  margin-top: 1px;
}

/* Btn-accept / decline hover */
#btn-accept-call:hover  { filter: brightness(1.15); transform: scale(1.03); }
#btn-decline-call:hover { filter: brightness(1.15); transform: scale(1.03); }
