:root {
  --bg-main: #070b14;
  --bg-sidebar: #0b1120;
  --bg-card: rgba(15, 23, 42, 0.78);
  --bg-card-hover: rgba(30, 41, 59, 0.88);
  --bg-input: rgba(11, 17, 32, 0.85);
  
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-bright: rgba(56, 189, 248, 0.25);
  --border-focus: #06b6d4;

  --accent-cyan: #06b6d4;
  --accent-blue: #38bdf8;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-purple: #8b5cf6;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-glow-cyan: none;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.4);
}

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

body.dark-theme {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 10% 15%, rgba(6, 182, 212, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 90% 85%, rgba(139, 92, 246, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.04) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-family);
  height: 100vh;
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* Utilities & Screens */
.hide { display: none !important; }
.screen {
  width: 100vw;
  height: 100vh;
}
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.w-100 { width: 100%; }
.text-cyan { color: var(--accent-cyan); }
.text-blue { color: var(--accent-blue); }
.text-emerald { color: var(--accent-emerald); }
.text-amber { color: var(--accent-amber); }
.text-rose { color: var(--accent-rose); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* Custom Site Scrollbar - Futuristic Obsidian Cyan/Glass */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(6, 182, 212, 0.4) rgba(7, 11, 20, 0.7);
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(7, 11, 20, 0.85);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.5), rgba(16, 185, 129, 0.4));
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #06b6d4, #10b981);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
}

.custom-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scroll::-webkit-scrollbar-track { background: rgba(7, 11, 20, 0.85); }
.custom-scroll::-webkit-scrollbar-thumb { background: linear-gradient(180deg, rgba(6, 182, 212, 0.5), rgba(16, 185, 129, 0.4)); border-radius: 4px; }
.custom-scroll::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, #06b6d4, #10b981); }

/* Futuristic Bar Loader (Replacing circular spinner) */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 10px;
  color: var(--text-dim);
  font-size: 0.82rem;
  gap: 12px;
}
.futuristic-bar-loader {
  width: 140px;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.bar-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 50%;
  background: linear-gradient(90deg, #0284c7, #06b6d4, #10b981);
  border-radius: 4px;
  animation: cyberSlide 1.4s infinite cubic-bezier(0.65, 0, 0.35, 1);
}
@keyframes cyberSlide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

/* Window Decor Bar */
.window-decor-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid var(--border-glass);
  border-radius: 14px 14px 0 0;
  margin: 0 -32px 20px -32px;
}
.traffic-lights { display: flex; gap: 7px; }
.traffic-lights .light {
  width: 11px; height: 11px;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.3);
}
.traffic-lights.small .light { width: 9px; height: 9px; }
.light-close { background: #ff5f56; border: 1px solid #e0443e; }
.light-min { background: #ffbd2e; border: 1px solid #dea123; }
.light-max { background: #27c93f; border: 1px solid #1aab29; }
.window-decor-title {
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
}

/* Glass Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
}
.glass-card.inner-card {
  background: rgba(11, 17, 32, 0.6);
  border-color: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.2;
}
.badge-sm { padding: 2px 7px; font-size: 0.65rem; }
.badge-outline { border: 1px solid var(--border-glass); color: #94a3b8; background: rgba(255, 255, 255, 0.04); }
.badge-accent { background: rgba(6, 182, 212, 0.18); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.4); }
.badge-cyan { background: rgba(6, 182, 212, 0.2); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.35); }
.badge-info { background: rgba(56, 189, 248, 0.18); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.35); }
.badge-success { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.35); }
.badge-warning { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.35); }
.badge-danger { background: rgba(244, 63, 94, 0.18); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.35); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  user-select: none;
  font-family: inherit;
}
.btn-sm { padding: 6px 12px; font-size: 0.78rem; border-radius: 6px; }
.btn-primary { 
  background: linear-gradient(135deg, #0284c7, #06b6d4); 
  color: white; 
  border-color: rgba(6, 182, 212, 0.4);
}
.btn-primary:hover { 
  background: linear-gradient(135deg, #0369a1, #0891b2); 
  transform: translateY(-1px);
}
.btn-secondary { 
  background: rgba(255, 255, 255, 0.08); 
  color: var(--text-main); 
  border-color: var(--border-glass);
}
.btn-secondary:hover { 
  background: rgba(255, 255, 255, 0.15); 
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-accent { background: linear-gradient(135deg, #4f46e5, #06b6d4); color: white; }
.btn-accent:hover { transform: translateY(-1px); }
.btn-emerald { background: linear-gradient(135deg, #059669, #10b981); color: white; }
.btn-emerald:hover { transform: translateY(-1px); }
.btn-warning { background: linear-gradient(135deg, #d97706, #f59e0b); color: #1e1e1e; font-weight: 700; }
.btn-warning:hover { transform: translateY(-1px); }
.btn-danger { background: rgba(244, 63, 94, 0.15); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.35); }
.btn-danger:hover { background: #f43f5e; color: white; }

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 6px 8px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}
.btn-icon:hover { color: var(--text-main); background: rgba(255, 255, 255, 0.08); }

/* Inputs & Form Elements */
.input-custom {
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  color: white;
  padding: 8px 12px;
  font-size: 0.86rem;
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
  width: 100%;
}
.input-custom:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
}
.input-sm { padding: 6px 10px; font-size: 0.8rem; }
.form-grid-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

/* 1. LOGIN SCREEN */
#login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100vw;
  background: radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.6) 0%, rgba(7, 11, 20, 0.95) 100%);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  padding: 20px;
}
#login-screen.hide {
  display: none !important;
}
.login-wrapper {
  width: 460px;
  max-width: 92vw;
  margin: auto;
}
.login-card {
  padding: 36px 36px 38px 36px;
  border: 1px solid rgba(6, 182, 212, 0.35);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.9), 0 0 25px rgba(6, 182, 212, 0.12);
  border-radius: 20px;
  overflow: hidden;
}
.logo-aura {
  display: inline-block;
  padding: 12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.22) 0%, transparent 70%);
  margin-bottom: 6px;
}
.brand-header {
  text-align: center;
  margin-bottom: 28px;
}
.brand-logo { width: 62px; height: 62px; }
.pulse-glow { animation: pulseGlow 3s infinite; }
@keyframes pulseGlow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.4)); }
  50% { filter: drop-shadow(0 0 22px rgba(6, 182, 212, 0.9)); }
}
.brand-title { font-size: 1.85rem; font-weight: 800; letter-spacing: -0.5px; margin-top: 6px; }
.brand-title .highlight { color: var(--accent-cyan); }
.brand-tagline { font-size: 0.85rem; color: var(--text-muted); margin: 8px 0 16px; letter-spacing: 0.2px; }
.brand-badge-row { display: flex; justify-content: center; gap: 10px; }

.custom-form .input-group { margin-bottom: 20px; text-align: left; }
.input-group label { display: block; font-size: 0.82rem; font-weight: 600; color: #cbd5e1; margin-bottom: 8px; }
.input-inner-wrap { position: relative; display: flex; align-items: center; }
.input-inner-wrap input {
  width: 100%;
  padding: 12px 42px 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  color: white;
  font-size: 0.92rem;
  outline: none;
  transition: all 0.2s;
}
.input-inner-wrap input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.35);
}
.input-right-icon { position: absolute; right: 16px; color: var(--text-dim); pointer-events: none; }
.btn-input-eye {
  position: absolute; right: 10px; background: transparent; border: none; color: var(--text-dim); cursor: pointer; padding: 10px; font-size: 1.05rem; z-index: 10; display: inline-flex; align-items: center; justify-content: center; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.btn-input-eye:hover { color: var(--accent-cyan); }
.custom-form .btn-glow {
  padding: 12px 20px;
  font-size: 0.95rem;
  margin-top: 6px;
  border-radius: 10px;
}
.error-msg {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  margin-top: 14px;
  text-align: center;
}

/* 2. MAIN APP PORTAL - PIXEL-PERFECT DESKTOP & CROSS-PLATFORM HEADER */
#app-screen { display: flex; flex-direction: column; height: 100vh; }
.top-nav {
  height: 60px;
  background: rgba(8, 14, 26, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(6, 182, 212, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
  gap: 12px;
}
.nav-left { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  flex-shrink: 0; 
}
.nav-logo { 
  width: 28px; 
  height: 28px; 
  border-radius: 6px;
  filter: drop-shadow(0 0 6px rgba(6, 182, 212, 0.45));
}
.nav-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.nav-title { 
  font-size: 1.12rem; 
  font-weight: 800; 
  letter-spacing: -0.2px;
  white-space: nowrap;
}
.nav-title .highlight { color: var(--accent-cyan); }
.nav-sub { 
  font-size: 0.68rem; 
  color: var(--text-dim); 
  text-transform: uppercase; 
  letter-spacing: 0.6px; 
  font-weight: 700;
  white-space: nowrap;
  opacity: 0.85;
}

.nav-center { 
  flex: 1; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: 14px; 
  min-width: 0;
  margin: 0 10px; 
}
.nav-tab-group {
  display: inline-flex;
  align-items: center;
  background: rgba(3, 7, 18, 0.7);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid rgba(6, 182, 212, 0.25);
  flex-shrink: 0;
}
.nav-tab {
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.nav-tab.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(14, 165, 233, 0.12));
  color: #ffffff;
  border: 1px solid rgba(6, 182, 212, 0.55);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.35);
}
.nav-tab:hover:not(.active) { 
  color: #e2e8f0; 
  background: rgba(255, 255, 255, 0.05); 
}

.global-search-bar {
  display: flex;
  align-items: center;
  background: rgba(3, 7, 18, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 0 14px;
  gap: 8px;
  height: 34px;
  width: 100%;
  max-width: 380px;
  min-width: 140px;
  transition: all 0.2s ease;
}
.global-search-bar:focus-within {
  border-color: rgba(6, 182, 212, 0.65);
  background: rgba(2, 6, 23, 0.95);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.3);
}
.global-search-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 500;
  width: 100%;
}
.global-search-bar input::placeholder {
  color: #64748b;
  font-size: 0.76rem;
}

.nav-right { 
  display: flex; 
  align-items: center; 
  gap: 7px; 
  flex-shrink: 0; 
}
.nav-right .btn-sm,
.nav-right .bot-pill {
  height: 34px;
  padding: 0 11px;
  font-size: 0.76rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  white-space: nowrap;
  box-sizing: border-box;
}

.bot-pill {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.32);
  color: #38bdf8;
  text-decoration: none;
  transition: all 0.2s ease;
}
.bot-pill:hover {
  background: var(--accent-cyan);
  color: #ffffff;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.45);
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  background: rgba(15, 23, 42, 0.75);
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.2s;
}
.user-pill:hover {
  border-color: rgba(6, 182, 212, 0.4);
}
.user-pill #nav-username {
  font-weight: 700;
  color: #ffffff;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#btn-logout {
  height: 34px;
  width: 34px;
  min-width: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
  transition: all 0.2s ease;
}
#btn-logout:hover {
  background: #f43f5e;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.45);
}

/* Hide Teammates Live Progress & Security Monitor from regular agents */
body:not(.role-team-leader):not(.role-admin) #top-priv-monitor-cluster,
body.role-agent #top-priv-monitor-cluster,
body:not(.role-team-leader):not(.role-admin) #top-dash-teammates,
body.role-agent #top-dash-teammates,
body:not(.role-team-leader):not(.role-admin) #top-dash-security-card,
body.role-agent #top-dash-security-card {
  display: none !important;
  visibility: hidden !important;
}

/* Only Admin and Team Leaders have access to the Intelligence Dashboard tab */
body:not(.role-admin):not(.role-team-leader) #tab-dashboard,
body:not(.role-admin):not(.role-team-leader) #dashboard-view-container {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* When logged in as Admin, Request Leads, Report Issue, and Caller Help are not needed */
body.role-admin #btn-open-request-leads,
body.role-admin #btn-open-request-leads-mob,
body.role-admin #btn-open-report,
body.role-admin #btn-open-report-mob,
body.role-admin #btn-open-call-guide,
body.role-admin #btn-open-call-guide-mob {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Also for Admin on mobile, hide the caller-specific bot pill in the action row */
body.role-admin #mob-bot-pill {
  display: none !important;
  visibility: hidden !important;
}


/* Sidebar & Workspace */
.workspace-layout { display: flex; flex: 1; overflow: hidden; }
.sidebar {
  width: 250px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
}
.sidebar-header { 
  padding: 12px 14px; 
  border-bottom: 1px solid var(--border-glass); 
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sidebar-title-row { display: flex; align-items: center; justify-content: space-between; }
.sidebar-title { font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); display: flex; align-items: center; gap: 7px; }

/* Admin Inspecting User Banner */
.admin-inspecting-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(2, 132, 199, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 4px 20px rgba(14, 165, 233, 0.15);
  border-radius: 12px;
}
.inspect-banner-info {
  display: flex;
  align-items: center;
  gap: 14px;
}
.inspect-banner-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
}
.inspect-banner-desc {
  font-size: 0.76rem;
  margin-top: 2px;
}

/* Admin User Switcher Filter in Sidebar */
.sidebar-user-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(14, 165, 233, 0.5);
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.15);
  padding: 5px 10px;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
}
.sidebar-user-select {
  background: transparent;
  border: none;
  outline: none;
  color: #38bdf8;
  font-size: 0.78rem;
  font-weight: 600;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
}
.sidebar-user-select option {
  background: #0b1329;
  color: #f8fafc;
  padding: 6px 10px;
}

/* Live Real-Time Bank Search Bar in Sidebar */
.sidebar-bank-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(6, 182, 212, 0.35);
  padding: 5px 10px;
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.2s;
}
.sidebar-bank-search-bar:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.3);
}
.sidebar-bank-input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.78rem;
  width: 100%;
}
.sidebar-bank-input::placeholder {
  color: #64748b;
  font-size: 0.74rem;
}

.batch-list { flex: 1; overflow-y: auto; padding: 10px; }

/* Bank Accordion Group - High Contrast Obsidian Glass Card */
.bank-group-item {
  margin-bottom: 14px;
  background: rgba(11, 17, 32, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}
.bank-group-item:hover {
  border-color: rgba(6, 182, 212, 0.45);
}
.bank-group-item.bank-active {
  /* Controlled dynamically by inline styles per bank color */
}
.bank-group-header {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.75);
  user-select: none;
  transition: background 0.15s;
}
.bank-group-header:hover {
  background: rgba(6, 182, 212, 0.12);
}
.bank-group-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.bank-group-title-col {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.bank-icon-badge {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--accent-cyan);
  flex-shrink: 0;
}
.bank-title-text-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}
.bank-group-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.bank-group-subinfo {
  font-size: 0.68rem;
  color: var(--text-dim);
}
.bank-group-stats {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.bank-group-pct-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #38bdf8;
}
.bank-group-pct-badge.done {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}
.bank-group-chevron {
  font-size: 0.72rem;
  color: var(--text-dim);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.bank-group-item.open .bank-group-chevron {
  transform: rotate(90deg);
  color: var(--accent-cyan);
}

/* Bank Overall Progress Bar */
.bank-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.bank-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #06b6d4, #10b981);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.bank-batches-sublist {
  display: none;
  padding: 12px 14px;
  background: rgba(7, 11, 20, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0 0 11px 11px;
}
.bank-group-item.open .bank-batches-sublist {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Individual Batch Card Inside Bank Group */
.batch-card {
  padding: 12px 14px;
  margin-bottom: 2px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.batch-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateX(3px);
}
.batch-card.active {
  background: rgba(6, 182, 212, 0.16) !important;
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
}
.batch-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
}
.batch-code-col {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.batch-folder-icon {
  font-size: 0.76rem;
  color: var(--accent-cyan);
  flex-shrink: 0;
}
.batch-code-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.batch-agent-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.batch-status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pulse-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-cyan);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulseGlow 1.4s infinite ease-in-out;
}
@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}
.batch-status-badge.badge-idle {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.batch-status-badge.badge-calling {
  background: rgba(6, 182, 212, 0.22);
  color: #fff;
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}
.batch-status-badge.badge-completed {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.batch-card-bottom-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.batch-mini-track {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}
.batch-mini-fill {
  height: 100%;
  background: #34d399;
  border-radius: 2px;
  transition: width 0.3s ease;
}
.batch-counts-text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.68rem;
  color: var(--text-dim);
}
.batch-pct-num {
  font-weight: 700;
  color: #38bdf8;
}
.batch-card-title { font-size: 0.84rem; font-weight: 700; color: #fff; margin-bottom: 3px; }
.batch-card-bank { font-size: 0.72rem; color: var(--accent-cyan); margin-bottom: 4px; }
.batch-card-meta { display: flex; justify-content: space-between; font-size: 0.7rem; color: var(--text-dim); }

/* Content Area */
.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 10px;
}
#terminal-view-container { 
  display: flex; 
  flex-direction: column; 
  flex: 1; 
  min-height: min-content; 
}
#batch-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: min-content;
}
.mobile-sticky-top-cluster {
  display: contents;
}
.view-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; margin-bottom: 14px; }
.batch-title-area h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.batch-metadata { display: flex; gap: 8px; }
.batch-actions-area { display: flex; gap: 8px; }

/* Lead Focus Card */
.lead-focus-card {
  margin-bottom: 14px;
  padding: 16px 20px;
  border: 1px solid rgba(6, 182, 212, 0.35);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(7, 11, 20, 0.95));
}
.focus-card-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; border-bottom: 1px solid var(--border-glass); padding-bottom: 8px;
}
.card-title-group { display: flex; align-items: center; gap: 10px; }
.card-title-group h3 { font-size: 1.25rem; color: #fff; font-weight: 700; }
.focus-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-bottom: 16px; }
.field-item { display: flex; align-items: center; margin-bottom: 8px; font-size: 0.88rem; }
.field-lbl { width: 110px; color: var(--text-muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.field-val { color: #f1f5f9; font-weight: 500; }
.field-val.phones-list { display: flex; flex-wrap: wrap; gap: 6px; }
.phone-chip {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.phone-chip:hover {
  background: #10b981;
  color: white;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

/* Disposition Buttons */
.disposition-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid var(--border-glass);
}
.dispo-title { font-size: 0.82rem; font-weight: 700; color: var(--text-muted); }
.dispo-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-dispo {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}
.btn-dispo-good { border-color: rgba(16, 185, 129, 0.4); color: #34d399; }
.btn-dispo-good:hover, .btn-dispo-good.active { background: #10b981; color: white; }
.btn-dispo-hot { border-color: rgba(245, 158, 11, 0.4); color: #fbbf24; }
.btn-dispo-hot:hover, .btn-dispo-hot.active { background: #f59e0b; color: #1e1e1e; }
.btn-dispo-callback { border-color: rgba(56, 189, 248, 0.4); color: #38bdf8; }
.btn-dispo-callback:hover, .btn-dispo-callback.active { background: #0284c7; color: white; }
.btn-dispo-bad { border-color: rgba(244, 63, 94, 0.4); color: #fb7185; }
.btn-dispo-bad:hover, .btn-dispo-bad.active { background: #f43f5e; color: white; }
.btn-dispo-noans { border-color: rgba(148, 163, 184, 0.4); color: #cbd5e1; }
.btn-dispo-noans:hover, .btn-dispo-noans.active { background: #64748b; color: white; }
.btn-dispo-wrong { border-color: rgba(239, 68, 68, 0.4); color: #f87171; }
.btn-dispo-wrong:hover, .btn-dispo-wrong.active { background: #ef4444; color: white; }
.btn-dispo-unattend { border-color: rgba(6, 182, 212, 0.45); color: #38bdf8; background: rgba(6, 182, 212, 0.08); }
.btn-dispo-unattend:hover, .btn-dispo-unattend.active { background: #06b6d4; color: #04101e; font-weight: 700; box-shadow: 0 0 10px rgba(6, 182, 212, 0.4); }

.btn-matrix-unattend {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.35);
  color: #38bdf8;
}
.btn-matrix-unattend:hover {
  background: #06b6d4;
  color: #04101e;
  font-weight: 700;
}
/* Attend Again (Reattempt Lead) Button Styles */
.btn-matrix-reattend {
  background: rgba(245, 158, 11, 0.16) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
  color: #fbbf24 !important;
  font-weight: 700 !important;
}
.btn-matrix-reattend:hover {
  background: #f59e0b !important;
  color: #111827 !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.45) !important;
}
.btn-dispo-reattend {
  border-color: rgba(245, 158, 11, 0.5) !important;
  color: #fbbf24 !important;
  background: rgba(245, 158, 11, 0.12) !important;
  font-weight: 700 !important;
}
.btn-dispo-reattend:hover {
  background: #f59e0b !important;
  color: #111827 !important;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.45) !important;
}

/* Attended Masked Phone Pills */
.phone-pill-masked {
  background: rgba(148, 163, 184, 0.12) !important;
  border: 1px dashed rgba(245, 158, 11, 0.5) !important;
  color: #fbbf24 !important;
  cursor: pointer !important;
  font-family: monospace !important;
  letter-spacing: 0.8px !important;
  transition: all 0.2s ease !important;
}
.phone-pill-masked:hover {
  background: rgba(245, 158, 11, 0.22) !important;
  border-color: #f59e0b !important;
  color: #fff !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.35) !important;
}
.phone-pill-unmasked-fresh {
  border: 1px solid rgba(16, 185, 129, 0.6) !important;
  background: rgba(16, 185, 129, 0.15) !important;
}

.callback-picker { display: flex; align-items: center; gap: 8px; margin-left: 10px; }

/* =================== TOP MINI-DASHBOARD & CIRCLE CHARTS =================== */
.quick-top-dash {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  background: rgba(11, 17, 32, 0.75);
  border: 1px solid var(--border-glass);
}
.top-dash-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}
.mini-kpi-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 7px 12px;
  transition: all 0.2s;
}
.mini-kpi-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(6, 182, 212, 0.3);
}
.kpi-ring-wrap {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kpi-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.kpi-ring .ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 3.5;
}
.kpi-ring .ring-fill {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s ease;
}
.ring-cyan { stroke: #06b6d4; }
.ring-emerald { stroke: #10b981; }
.ring-amber { stroke: #f59e0b; }
.ring-rose { stroke: #f43f5e; }
.kpi-ring-wrap .ring-icon {
  position: absolute;
  font-size: 0.85rem;
}
.mini-kpi-info {
  display: flex;
  flex-direction: column;
}
.mini-kpi-num {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
}
.mini-kpi-lbl {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* 2-Row Horizontal Bank Strip with Bank Search & Interactive Bank Switcher */
.top-dash-banks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.dash-banks-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.dash-banks-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-banks-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dash-banks-count {
  font-size: 0.7rem;
  font-weight: 800;
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #38bdf8;
  padding: 1px 7px;
  border-radius: 10px;
}
.dash-banks-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(2, 6, 23, 0.85);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 3px 10px;
  border-radius: 16px;
  width: 220px;
  transition: all 0.2s;
}
.dash-banks-search-wrap:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}
.bank-search-input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 0.76rem;
  width: 100%;
}

/* 1-Line Clean Horizontal Bank Cards on PC / Desktop */
.dash-banks-grid-carousel {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 8px 2px;
  scrollbar-width: thin;
}
.bank-card-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}
.bank-card-pill:hover {
  background: rgba(6, 182, 212, 0.14);
  border-color: rgba(6, 182, 212, 0.5);
  transform: translateY(-1px);
}
.bank-card-pill.active {
  /* Controlled dynamically by inline styles per bank color */
}
.bank-card-chart {
  position: relative;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bank-card-chart svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.bank-card-chart .pill-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 4;
}
.bank-card-chart .pill-fill {
  fill: none;
  stroke: #10b981;
  stroke-width: 4;
  stroke-linecap: round;
}
.bank-card-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}
.bank-card-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
.bank-card-meta {
  font-size: 0.68rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}
.bank-card-pct {
  color: #38bdf8;
  font-weight: 800;
}
.bank-card-rem {
  color: #fbbf24;
  font-weight: 600;
}

/* Bank Batches Sub-Strip: Lists Batches For Currently Selected Bank Underneath */
.dash-bank-batches-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(7, 11, 20, 0.7);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 8px;
  padding: 6px 12px;
  margin-top: 4px;
}
.bank-batches-label {
  font-size: 0.74rem;
  font-weight: 800;
  color: #f1f5f9;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bank-batches-pill-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  flex: 1;
  padding-bottom: 2px;
}
.substrip-batch-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.substrip-batch-pill:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
}
.substrip-batch-pill.active {
  background: rgba(6, 182, 212, 0.25);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.35);
}
.substrip-batch-code {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
}
.substrip-batch-stat {
  font-size: 0.68rem;
  font-weight: 800;
  color: #34d399;
}
.substrip-batch-rem {
  font-size: 0.68rem;
  color: #fbbf24;
}

/* Multi-Select Bulk Actions Bar */
.multi-select-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.4);
  padding: 4px 10px;
  border-radius: 8px;
  animation: fadeIn 0.2s ease;
}
.multi-select-count {
  font-size: 0.78rem;
  font-weight: 800;
  color: #38bdf8;
  white-space: nowrap;
}

/* Category Tabs Bar */
.batch-category-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  margin-bottom: 12px;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(11, 17, 32, 0.7);
  border: 1px solid var(--border-glass);
}
.category-tabs-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.cat-tab-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.cat-tab-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.cat-tab-btn.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}
.cat-tab-badge {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 800;
}
.cat-tab-badge.badge-amber { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.cat-tab-badge.badge-emerald { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.cat-tab-badge.badge-rose { background: rgba(244, 63, 94, 0.2); color: #fb7185; }
.cat-tab-badge.badge-blue { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }

.category-filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
}
.category-filter-search input {
  padding: 5px 10px;
  font-size: 0.78rem;
  width: 100%;
}

/* Leads Table Default Display Modes (Desktop Default) */
.header-desktop-only { display: table-row; }
.header-mobile-only { display: none; }
.mobile-layout-item { display: none !important; }
.desktop-layout-item { display: block; }
.col-desktop-only { display: table-cell; }

/* 3-Section Grid Special Layout */
.leads-grid-3sec {
  table-layout: fixed;
  width: 100%;
}
.leads-grid-3sec th {
  padding: 8px 12px;
}
.leads-grid-3sec td {
  padding: 8px 12px;
  vertical-align: middle;
}

/* SECTION 1: Company, Role, Address & Revenue Badge */
.sec-company-dossier {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sec-company-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.sec-company-name {
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  line-height: 1.2;
}
.sec-company-name:hover {
  color: var(--accent-cyan);
}
.sec-rev-badge {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.sec-company-role {
  font-size: 0.73rem;
  color: var(--text-dim);
  line-height: 1.1;
}
.sec-company-addr {
  font-size: 0.74rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 5px;
  word-break: break-word;
  line-height: 1.25;
}

/* SECTION 2: Phone & Contact */
.sec-contact-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sec-contact-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  gap: 5px;
}
.sec-phone-pill {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  white-space: nowrap !important;
  transition: all 0.15s;
}

.cell-phones {
  min-width: 110px;
  white-space: nowrap;
}

.cell-revenue {
  min-width: 65px;
  white-space: nowrap;
}

.cell-contact {
  min-width: 115px;
}
.sec-phone-pill:hover {
  background: #10b981;
  color: #fff;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

/* SECTION 3: Action Controls & Status */
.sec-action-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 100%;
}
.sec-status-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.sec-status-row .badge {
  font-size: 0.72rem;
  padding: 3px 10px;
}

/* 6-Button Grid (3 Columns x 2 Rows) */
.sec-buttons-matrix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5px;
  width: 100%;
  max-width: 185px;
}

.btn-matrix-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 4px;
  border-radius: 5px;
  font-size: 0.69rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  line-height: 1;
  text-align: center;
}
.btn-matrix-good {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
  color: #34d399;
}
.btn-matrix-good:hover {
  background: #10b981;
  color: #fff;
}
.btn-matrix-hot {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
}
.btn-matrix-hot:hover {
  background: #f59e0b;
  color: #111827;
}
.btn-matrix-callback {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.45);
  color: #38bdf8;
}
.btn-matrix-callback:hover {
  background: #0284c7;
  color: #fff;
}
.btn-matrix-bad {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fb7185;
}
.btn-matrix-bad:hover {
  background: #f43f5e;
  color: #fff;
}
.btn-matrix-noans {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}
.btn-matrix-noans:hover {
  background: #64748b;
  color: #fff;
}
.btn-matrix-notes {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
  color: #c084fc;
}
.btn-matrix-notes:hover {
  background: #8b5cf6;
  color: #fff;
}
.btn-matrix-wrong {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}
.btn-matrix-wrong:hover {
  background: #ef4444;
  color: #fff;
}
.grid-dispo-select:hover, .grid-dispo-select:focus {
  border-color: var(--accent-cyan);
  color: #38bdf8;
}

/* Table */
.table-wrap {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  overflow: auto;
  max-width: 100%;
}
.leads-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.8rem;
  table-layout: auto;
}
.leads-table th {
  background: rgba(11, 17, 32, 0.98);
  position: sticky; top: 0;
  padding: 7px 5px;
  color: #94a3b8;
  font-weight: 700;
  border-bottom: 2px solid rgba(6, 182, 212, 0.3);
  z-index: 10;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.leads-table td {
  padding: 6px 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  vertical-align: middle;
  white-space: normal;
  word-break: break-word;
}
.leads-table tbody tr {
  transition: background 0.15s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.leads-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}
.leads-table tbody tr:hover {
  background: rgba(6, 182, 212, 0.08);
}
.leads-table tbody tr.row-active {
  background: rgba(6, 182, 212, 0.14) !important;
  border-left: 3px solid var(--accent-cyan);
}
.leads-table .col-phones { display: flex; gap: 3px; flex-direction: column; }
.lead-phone-btn {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
}
.lead-phone-btn:hover { background: #10b981; color: white; }
.empty-state { padding: 60px 20px; color: var(--text-dim); }

/* =================== INTELLIGENCE DASHBOARD =================== */
#dashboard-view-container { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.dashboard-wrapper { flex: 1; display: flex; flex-direction: column; gap: 16px; padding-bottom: 20px; }

.bot-promo-card {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(6, 182, 212, 0.3);
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.12), rgba(15, 23, 42, 0.8));
}
.bot-promo-content { display: flex; align-items: center; gap: 16px; }
.bot-promo-icon {
  font-size: 2.2rem;
  color: var(--accent-cyan);
  filter: drop-shadow(0 0 10px rgba(6, 182, 212, 0.5));
}
.bot-promo-content h3 { font-size: 1.05rem; font-weight: 700; color: #fff; }

.stats-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.metric-card {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border-glass);
}
.metric-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.metric-icon-cyan { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); border: 1px solid rgba(6, 182, 212, 0.3); }
.metric-icon-emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.metric-icon-amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); border: 1px solid rgba(245, 158, 11, 0.3); }
.metric-icon-blue { background: rgba(56, 189, 248, 0.15); color: var(--accent-blue); border: 1px solid rgba(56, 189, 248, 0.3); }
.metric-icon-rose { background: rgba(244, 63, 94, 0.15); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.35); }
.metric-icon-purple { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }

/* Team Leader Scope Switch Button Group */
.tl-scope-switch-group {
  display: inline-flex;
  align-items: center;
  background: rgba(3, 7, 18, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  padding: 3px;
  gap: 4px;
}
.tl-scope-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tl-scope-switch-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}
.tl-scope-switch-btn.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.3), rgba(14, 165, 233, 0.4));
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}
.metric-row-clickable:hover {
  background: rgba(56, 189, 248, 0.08) !important;
  cursor: pointer;
}

.user-roster-dash-panel {
  margin-top: 18px;
  background: rgba(11, 19, 43, 0.7);
  border: 1px solid rgba(6, 182, 212, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.user-roster-table th {
  font-size: 0.76rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.user-roster-table td {
  padding: 12px 14px;
}
.row-suspended {
  opacity: 0.6;
  background: rgba(239, 68, 68, 0.05);
}

/* User Bank Chips & Expanded Batches Drawer */
.user-banks-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.user-bank-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  background: rgba(6, 182, 212, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.agent-expanded-card {
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.95);
  border-left: 3px solid var(--accent-cyan);
}
.agent-expanded-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}
.agent-expanded-header h5 {
  margin: 0;
  font-size: 0.92rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.inner-batch-table {
  width: 100%;
  border-collapse: collapse;
}
.inner-batch-table th {
  font-size: 0.72rem;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.03);
}
.inner-batch-table td {
  font-size: 0.8rem;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.btn-xs {
  padding: 3px 7px;
  font-size: 0.7rem;
  border-radius: 4px;
}

/* Mobile Adaptive Card Toggle: Desktop vs Mobile view */
.agent-mobile-card-row {
  display: none;
}
.metric-data { display: flex; flex-direction: column; }
.metric-lbl { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); font-weight: 700; }
.metric-val { font-size: 1.45rem; font-weight: 800; color: #fff; margin-top: 2px; }

.dash-columns-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 16px;
}
/* Responsive Layout Breakpoints for All Devices */
@media (max-width: 1024px) {
  .sidebar { width: 260px; }
  .dash-columns-grid { grid-template-columns: 1fr; }
  .stats-metric-grid { grid-template-columns: repeat(2, 1fr); }
  .global-search-bar { width: 220px; }
}

.dash-panel { padding: 18px; }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; border-bottom: 1px solid var(--border-glass); padding-bottom: 10px; }
.panel-header h4 { font-size: 0.95rem; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 8px; }

.bank-item {
  padding: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.bank-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-cyan);
}
.bank-item-top { display: flex; justify-content: space-between; font-size: 0.85rem; font-weight: 700; color: #fff; margin-bottom: 6px; }
.bank-item-progress-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.bank-item-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #10b981);
  border-radius: 4px;
  transition: width 0.4s ease;
}
.bank-item-meta { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-dim); }

.bank-list-wrap {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
  gap: 8px !important;
}
@media (min-width: 1024px) {
  .bank-list-wrap {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
  }
}
@media (min-width: 1380px) {
  .bank-list-wrap {
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 8px !important;
  }
}
@media (max-width: 768px) {
  .bank-list-wrap {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
}

/* Compact Bank Item Styling so 6 fit in standard row */
.bank-item-compact,
.bank-item {
  padding: 8px 10px !important;
  border-radius: 6px !important;
  background: rgba(15, 23, 42, 0.6) !important;
  border: 1px solid rgba(6, 182, 212, 0.25) !important;
  margin-bottom: 0 !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
}
.bank-item-compact:hover,
.bank-item:hover {
  background: rgba(6, 182, 212, 0.1) !important;
  border-color: rgba(6, 182, 212, 0.6) !important;
  transform: translateY(-1px) !important;
}
.bank-item-top {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  margin-bottom: 4px !important;
}
.bank-item-progress-track {
  height: 4px !important;
  margin-bottom: 4px !important;
}
.bank-item-meta {
  font-size: 0.68rem !important;
}

.bank-item {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  margin-bottom: 0;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.bank-item:hover {
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Custom Progress Bar for Agent Performance */
.agent-progress-cell { width: 120px; }
.agent-mini-track { height: 6px; background: rgba(255, 255, 255, 0.08); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.agent-mini-fill { height: 100%; background: var(--accent-emerald); border-radius: 4px; }

/* 3. MODALS (Universal Obsidian Dark Glass) */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000 !important;
}
.modal-content {
  width: 520px;
  max-width: 94vw;
  padding: 0 24px 24px 24px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(6, 182, 212, 0.2);
}
.modal-content.modal-lg { 
  width: 1180px; 
  max-width: 96vw; 
  padding: 24px 28px;
  max-height: 90vh;
}

#custom-dialog-modal {
  z-index: 30000 !important;
}

#custom-dialog-modal .dialog-card {
  width: 480px;
  max-width: 95vw;
}

/* Universal Clean Portal Footer */
.portal-footer {
  width: 100%;
  text-align: center;
  padding: 20px 16px;
  margin-top: 36px;
  font-size: 0.76rem;
  letter-spacing: 0.5px;
  color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(10, 15, 26, 0.5);
  border-radius: 8px;
  box-sizing: border-box;
}
.portal-footer strong {
  color: #38bdf8;
  font-weight: 700;
}
.portal-footer span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Assigned TL Badge and Button in Table */
.badge-assigned-tl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.badge-assigned-tl:hover {
  background: rgba(168, 85, 247, 0.3);
  border-color: #c084fc;
  transform: translateY(-1px);
}
.badge-unassigned-tl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(100, 116, 139, 0.15);
  border: 1px dashed rgba(100, 116, 139, 0.4);
  color: #94a3b8;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.badge-unassigned-tl:hover {
  background: rgba(100, 116, 139, 0.3);
  border-color: #cbd5e1;
  color: #fff;
  transform: translateY(-1px);
}

/* Enhanced Modern Obsidian Styling for Users Directory */
.users-table-custom {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.users-table-custom th {
  background: rgba(15, 23, 42, 0.95);
  padding: 11px 14px;
  font-size: 0.74rem;
  letter-spacing: 0.5px;
  color: #94a3b8;
  font-weight: 700;
  text-transform: uppercase;
  border-bottom: 2px solid rgba(6, 182, 212, 0.35);
  white-space: nowrap;
}
.users-table-custom td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  vertical-align: middle;
  white-space: nowrap;
}
.users-table-custom tbody tr:hover {
  background: rgba(6, 182, 212, 0.05);
}
.users-action-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; border-bottom: 1px solid var(--border-glass); padding-bottom: 12px; }
.modal-header h3 { font-size: 1.15rem; font-weight: 700; color: #fff; }
.modal-body { margin-bottom: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border-glass); padding-top: 14px; }

/* PDF Format Options */
.pdf-format-options { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.pdf-opt {
  display: flex; align-items: flex-start; gap: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-glass); padding: 14px 16px; border-radius: 10px; cursor: pointer; transition: all 0.2s;
}
.pdf-opt:hover { background: rgba(255, 255, 255, 0.07); border-color: var(--accent-cyan); }
.pdf-opt input { margin-top: 4px; accent-color: var(--accent-cyan); }
.opt-box { display: flex; flex-direction: column; }
.opt-title { font-weight: 700; color: #fff; font-size: 0.92rem; }
.opt-desc { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }

/* Custom Dialog Modal */
.dialog-card { width: 440px; }
.dialog-body-wrap { display: flex; gap: 18px; align-items: flex-start; padding: 10px 0 16px 0; }
.dialog-icon-col {
  width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); border: 1px solid rgba(6, 182, 212, 0.3);
}
.dialog-icon-col.icon-warning { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); border-color: rgba(245, 158, 11, 0.3); }
.dialog-icon-col.icon-error { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); border-color: rgba(244, 63, 94, 0.3); }
.dialog-icon-col.icon-success { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); border-color: rgba(16, 185, 129, 0.3); }
.dialog-text-col h3 { font-size: 1.1rem; color: #fff; margin-bottom: 6px; font-weight: 700; }
.dialog-text-col p { font-size: 0.86rem; color: var(--text-muted); line-height: 1.45; }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px; background: rgba(11, 17, 32, 0.95); backdrop-filter: blur(12px); border: 1px solid var(--accent-cyan); box-shadow: 0 10px 30px rgba(6, 182, 212, 0.3); color: white; padding: 12px 20px; border-radius: 10px; font-size: 0.88rem; font-weight: 600; z-index: 1000; display: flex; align-items: center; gap: 10px; animation: slideInRight 0.3s ease;
}
@keyframes slideInRight { from { transform: translateX(50px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Animations */
.animate-fade-in { animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes fadeIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }

/* =================== MOBILE & SMALL SCREEN RESPONSIVENESS =================== */
/* Mobile elements default hide on desktop, shown inside @media (max-width: 900px) */
.mobile-only,
.mobile-only-btn {
  display: none;
}

@media (max-width: 900px) {
  html, body.dark-theme {
    height: auto !important;
    min-height: 100vh;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    user-select: auto;
  }

  .screen {
    height: auto !important;
    min-height: 100vh;
    overflow: visible !important;
  }

  .mobile-only-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 8px;
    cursor: pointer;
  }
  .desktop-only {
    display: none !important;
  }

  /* Navigation on mobile: Keep Brand Logo, Title, and User/Logout in top header bar */
  .top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 6px 12px;
    height: auto;
    min-height: 52px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: rgba(7, 11, 20, 0.96) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glass);
  }
  .nav-left {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .nav-logo {
    width: 26px;
    height: 26px;
  }
  .nav-title {
    font-size: 1rem;
    font-weight: 800;
  }
  .nav-right {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
  }
  .user-pill {
    padding: 3px 8px;
    font-size: 0.76rem;
  }
  .user-pill #nav-username {
    display: inline-block !important;
    font-size: 0.74rem;
  }
  #btn-logout {
    padding: 4px 8px;
    font-size: 0.74rem;
  }
  .nav-right .bot-pill span,
  .nav-right #btn-open-request-leads span,
  .nav-right #btn-open-report span,
  .nav-right #btn-open-users-admin span {
    display: none;
  }

  /* Second line of nav on mobile: Terminal/Dashboard tabs + Search bar */
  .nav-center {
    order: 3;
    width: 100%;
    margin: 4px 0 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .nav-tab-group {
    flex: 1;
    display: flex;
    justify-content: center;
  }
  .global-search-bar {
    flex: 1;
    width: auto;
    max-width: 200px;
    padding: 4px 10px;
  }
  .nav-tab {
    padding: 4px 8px;
    font-size: 0.72rem;
  }

  /* Drawer Sidebar on Mobile */
  .workspace-layout {
    position: relative;
    height: auto !important;
    min-height: calc(100vh - 60px);
    overflow: visible !important;
    display: block !important;
  }
  /* Backdrop Dimmer overlay when mobile sidebar opens */
  .sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1199 !important;
    transition: opacity 0.25s ease;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 300px;
    max-width: 86vw;
    height: 100vh !important;
    z-index: 1200 !important;
    transform: translateX(-100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.85);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar .sidebar-header {
    padding: 14px 16px !important;
    background: rgba(11, 17, 32, 0.98) !important;
    border-bottom: 1px solid rgba(6, 182, 212, 0.25) !important;
  }
  #btn-close-mobile-sidebar {
    width: 32px !important;
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(239, 68, 68, 0.12) !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
    border-radius: 6px !important;
    color: #f87171 !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
  }
  #btn-close-mobile-sidebar:active {
    background: rgba(239, 68, 68, 0.35) !important;
    transform: scale(0.95);
  }

  /* Content Area on Mobile */
  .content-area {
    padding: 0 6px 12px 6px;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: calc(100vh - 54px) !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch;
  }

  #terminal-view-container {
    overflow: visible !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }

  #terminal-view-container.hide {
    display: none !important;
  }

  body.role-admin:not(.admin-inspecting) #terminal-view-container {
    display: none !important;
  }

  body.role-admin:not(.admin-inspecting) .mobile-sticky-top-cluster {
    display: none !important;
  }

  /* Top Sticky Control Cluster on Mobile: Bank Portfolios, Batches, and Filters stacked seamlessly with 0 gap */
  .mobile-sticky-top-cluster {
    position: static !important;
    top: auto !important;
    z-index: 10 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    border: 1px solid rgba(6, 182, 212, 0.35) !important;
    border-top: none !important;
    border-radius: 0 0 8px 8px !important;
    background: rgba(11, 17, 32, 0.98) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7) !important;
    overflow: visible !important;
  }

  .quick-top-dash {
    position: static !important;
    padding: 5px 8px 3px 8px !important;
    margin: 0 !important;
    gap: 3px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  /* Regular agents have KPI circles hidden on mobile to keep page clean & focused; TL and Admin keep them! */
  body.role-agent .top-dash-kpis {
    display: none !important;
  }

  /* Bank Portfolio Strip on Mobile */
  .top-dash-banks {
    gap: 3px;
    padding-top: 0;
    width: 100%;
    box-sizing: border-box;
  }
  .dash-banks-header-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 6px;
    margin-bottom: 2px;
    width: 100%;
    box-sizing: border-box;
  }
  .dash-banks-title {
    font-size: 0.72rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .dash-banks-search-wrap {
    width: auto;
    flex: 1;
    min-width: 0;
    padding: 2px 6px;
    box-sizing: border-box;
  }
  .dash-banks-search-wrap input {
    font-size: 0.7rem;
    width: 100%;
    min-width: 0;
  }
  .dash-banks-grid-carousel {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 5px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 1px 1px 3px 1px !important;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .bank-card-pill {
    min-width: 185px !important;
    max-width: 260px !important;
    padding: 4px 8px !important;
    gap: 4px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }
  .dash-bank-batches-strip {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 2px 2px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    margin-top: 2px;
    width: 100%;
    box-sizing: border-box;
  }
  .bank-batches-label {
    font-size: 0.66rem;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .bank-batches-pill-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 4px !important;
  }
  .substrip-batch-pill {
    padding: 2px 5px;
    font-size: 0.66rem;
    flex-shrink: 0;
  }

  /* Category Tabs Bar on Mobile inside Sticky Cluster: zero gap right beneath banks/batches */
  .batch-category-tabs-bar {
    position: static !important;
    background: transparent !important;
    border: none !important;
    border-top: 1px solid rgba(6, 182, 212, 0.25) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 4px 6px 5px 6px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .category-tabs-group {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 3px !important;
    width: 100% !important;
    padding-bottom: 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }
  .cat-tab-btn {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
    padding: 4px 2px !important;
    font-size: 0.66rem !important;
    font-weight: 700 !important;
    border-radius: 5px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    gap: 3px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .cat-tab-badge {
    padding: 1px 4px !important;
    font-size: 0.6rem !important;
    margin-left: 2px !important;
    flex-shrink: 0 !important;
  }
  .category-filter-search {
    width: 100% !important;
    min-width: 0 !important;
    margin-top: 1px !important;
  }
  .category-filter-search input {
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 0.72rem !important;
    padding: 3px 6px !important;
  }

  /* Batch Hero Bar on Mobile: clean layout inside or below sticky cluster */
  .view-header.batch-hero-bar {
    padding: 6px 8px !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 10 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    width: 100% !important;
  }
  .batch-title-area {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 6px !important;
  }
  .batch-title-area h2 {
    font-size: 0.8rem !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
    flex: 1 !important;
  }
  .batch-metadata {
    gap: 3px !important;
    display: flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
  }
  .batch-metadata .badge {
    padding: 1px 5px !important;
    font-size: 0.62rem !important;
  }

  /* Quick Action Controls on next line in same card, cleanly fitting inside mobile viewport */
  .batch-actions-area {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 5px !important;
    margin-top: 2px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .batch-actions-area .btn {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: 0 !important;
    font-size: 0.68rem !important;
    padding: 5px 2px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    box-sizing: border-box !important;
  }
  .batch-actions-area .btn i {
    font-size: 0.68rem !important;
    flex-shrink: 0 !important;
  }
  .batch-actions-area .btn span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    min-width: 0 !important;
  }

  /* User Operations Table on Mobile - Switches to Card-Based Adaptive View */
  .user-roster-table thead {
    display: none !important;
  }
  .agent-main-row {
    display: none !important;
  }
  .agent-mobile-card-row {
    display: table-row !important;
  }
  .agent-mobile-card {
    padding: 14px;
    margin-bottom: 12px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  }
  .agent-mob-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
  }
  .agent-mob-id {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.12);
    padding: 4px 8px;
    border-radius: 6px;
  }
  .agent-mob-title {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  .agent-mob-title strong {
    font-size: 0.95rem;
    color: #fff;
  }
  .agent-mob-sub {
    font-size: 0.72rem;
    color: var(--text-dim);
  }
  .agent-mob-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    background: rgba(0, 0, 0, 0.25);
    padding: 8px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 10px;
  }
  .mob-kpi-item {
    display: flex;
    flex-direction: column;
  }
  .mob-kpi-val {
    font-size: 1.05rem;
    font-weight: 800;
  }
  .mob-kpi-lbl {
    font-size: 0.65rem;
    color: var(--text-dim);
    text-transform: uppercase;
  }
  .agent-mob-progress {
    margin-bottom: 10px;
  }
  .agent-mob-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
  }
  .agent-mob-actions button {
    flex: 1;
  }

  /* Data Table on Mobile - Transforms each lead into an Adaptive Dossier Card */
  .header-desktop-only { display: none !important; }
  .header-mobile-only { display: table-row !important; }
  .desktop-layout-item { display: none !important; }
  .mobile-layout-item { display: flex !important; }
  .col-desktop-only { display: none !important; }

  .table-wrap {
    overflow-x: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 8px;
    margin-bottom: 20px;
    background: transparent !important;
    border: none !important;
  }

  .leads-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    border-collapse: collapse !important;
  }

  .leads-table thead {
    display: none !important;
  }

  .leads-table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .leads-table tr {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    background: rgba(15, 23, 42, 0.92) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
  }

  .leads-table tr:hover {
    border-color: rgba(6, 182, 212, 0.4) !important;
  }

  .leads-table tr.row-active {
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.25) !important;
  }

  .leads-table td {
    border: none !important;
    background: transparent !important;
    padding: 10px 8px !important;
    box-sizing: border-box !important;
  }

  .leads-table td.cell-chk {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    flex-shrink: 0 !important;
    background: rgba(0, 0, 0, 0.25) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding-top: 14px !important;
  }

  .leads-table td.cell-company {
    display: block !important;
    flex: 1 !important;
    min-width: 0 !important;
    width: auto !important;
    padding: 10px 12px 12px 12px !important;
  }

  .sec-mobile-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
  }
  .sec-mob-top-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    width: 100%;
  }
  .sec-company-name {
    font-size: 0.94rem;
    font-weight: 800;
    line-height: 1.35;
    color: #fff;
    width: 100%;
    display: block;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
  }
  .sec-mob-top-row .sec-status-row {
    display: flex;
    justify-content: flex-start;
    margin-top: 2px;
  }
  .sec-company-role {
    font-size: 0.72rem;
    color: var(--text-dim);
  }
  .sec-mob-contact-row {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .sec-contact-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #f1f5f9;
  }
  .sec-company-addr {
    font-size: 0.7rem;
    line-height: 1.35;
    display: flex !important;
    align-items: flex-start;
    gap: 5px;
    color: #94a3b8;
    white-space: normal !important;
    word-break: break-word;
    margin-top: 2px;
  }
  .sec-mob-rev-row {
    margin-top: 2px;
  }
  .sec-rev-badge {
    font-size: 0.7rem;
    padding: 2px 7px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    font-weight: 700;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .sec-phone-pill {
    font-size: 0.74rem;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    font-weight: 700;
    white-space: nowrap !important;
  }
  .sec-phone-pill .phone-dial-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: #10b981;
    color: #fff;
    border-radius: 4px;
    padding: 2px 6px;
    margin-left: 4px;
    font-size: 0.68rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.15s;
  }
  .sec-phone-pill .phone-dial-btn:hover {
    transform: scale(1.05);
  }

  /* Quick Action Buttons: Single row underneath each lead card on mobile */
  .sec-mob-actions-matrix {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 3px;
    width: 100%;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
  }
  .sec-mob-actions-matrix .btn-matrix-act {
    padding: 6px 2px;
    font-size: 0.65rem;
    border-radius: 4px;
    gap: 2px;
    font-weight: 700;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
  }

  /* Mobile Styling for Quick Lead Focus Card (#lead-focus-card) */
  .lead-focus-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 12px !important;
    margin: 6px 0 10px 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
  }
  .focus-card-header {
    margin-bottom: 8px !important;
    padding-bottom: 6px !important;
    gap: 8px !important;
  }
  .card-title-group {
    min-width: 0 !important;
    flex: 1 !important;
    gap: 6px !important;
  }
  .card-title-group h3 {
    font-size: 0.95rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
  }
  .focus-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .focus-col {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .field-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
    margin-bottom: 3px !important;
    font-size: 0.76rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .field-lbl {
    width: 100% !important;
    font-size: 0.72rem !important;
    color: var(--text-muted) !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }
  .field-val {
    width: 100% !important;
    word-break: break-word !important;
    color: #f1f5f9 !important;
  }
  .field-val.phones-list {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    width: 100% !important;
  }
  .phone-chip {
    padding: 3px 7px !important;
    font-size: 0.74rem !important;
  }
  #focus-notes {
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 0.72rem !important;
    padding: 4px 8px !important;
  }
  .disposition-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    padding-top: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .dispo-title {
    font-size: 0.74rem !important;
  }
  .dispo-btns {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .btn-dispo {
    padding: 6px 3px !important;
    font-size: 0.68rem !important;
    border-radius: 5px !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    box-sizing: border-box !important;
  }
  .btn-dispo i {
    font-size: 0.7rem !important;
  }

  /* Seamless styling for .batch-hero-bar when nested inside .mobile-sticky-top-cluster */
  .mobile-sticky-top-cluster .view-header.batch-hero-bar {
    position: static !important;
    background: transparent !important;
    border: none !important;
    border-top: 1px solid rgba(6, 182, 212, 0.25) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 4px 6px 5px 6px !important;
    z-index: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .mobile-sticky-top-cluster .batch-title-area {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .mobile-sticky-top-cluster .batch-title-area h2 {
    font-size: 0.8rem !important;
    margin: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-width: 0 !important;
    flex: 1 !important;
  }
  .mobile-sticky-top-cluster .batch-metadata {
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    flex-shrink: 0 !important;
  }
  .mobile-sticky-top-cluster .batch-metadata .badge {
    padding: 1px 5px !important;
    font-size: 0.62rem !important;
  }
  /* Buttons placed in the next line within the card, completely contained in screen */
  .mobile-sticky-top-cluster .batch-actions-area {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 2px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }
  .mobile-sticky-top-cluster .batch-actions-area .btn {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: 0 !important;
    padding: 5px 2px !important;
    font-size: 0.66rem !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  .mobile-sticky-top-cluster .batch-actions-area .btn span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    min-width: 0 !important;
  }
}

/* Strict Admin-Only controls */
#btn-delete-batch.hide,
.batch-actions-area #btn-delete-batch.hide {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  pointer-events: none !important;
}

/* User Presence Telemetry Pills & Glowing Dots */
.presence-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.presence-online {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.presence-away-5 {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.4);
}
.presence-away-10 {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.presence-idle-15 {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.4);
}
.presence-inactive-30 {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
}
.presence-away {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.presence-offline {
  background: rgba(100, 116, 139, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}
.presence-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.presence-online .presence-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-presence 2s infinite ease-in-out;
}
.presence-away-5 .presence-dot {
  background: #facc15;
  box-shadow: 0 0 6px #facc15;
}
.presence-away-10 .presence-dot {
  background: #fbbf24;
  box-shadow: 0 0 6px #fbbf24;
}
.presence-idle-15 .presence-dot {
  background: #fb923c;
  box-shadow: 0 0 6px #fb923c;
}
.presence-inactive-30 .presence-dot {
  background: #c084fc;
  box-shadow: 0 0 6px #c084fc;
}
.presence-away .presence-dot {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}
.presence-offline .presence-dot {
  background: #64748b;
}
@keyframes pulse-presence {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Enhanced Action Buttons in User Roster Table */
.action-cell-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}
.btn-open-act {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  background: #00a8e8 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.8rem !important;
  padding: 5px 16px !important;
  border-radius: 6px !important;
  border: 1px solid #0096d1 !important;
  box-shadow: 0 2px 6px rgba(0, 168, 232, 0.3) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  min-width: 95px !important;
}
.btn-open-act:hover {
  background: #0096d1 !important;
  box-shadow: 0 4px 12px rgba(0, 168, 232, 0.45) !important;
  transform: translateY(-1px) !important;
}
.btn-batches-act {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  background: #1e2638 !important;
  color: #f1f5f9 !important;
  font-weight: 600 !important;
  font-size: 0.76rem !important;
  padding: 4px 12px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  min-width: 95px !important;
}
.btn-batches-act:hover {
  background: #2a354c !important;
  border-color: rgba(6, 182, 212, 0.4) !important;
  color: #38bdf8 !important;
}
.btn-delete-act {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(244, 63, 94, 0.12) !important;
  color: #fb7185 !important;
  border: 1px solid rgba(244, 63, 94, 0.25) !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-size: 0.78rem !important;
  transition: all 0.2s ease !important;
}
.btn-delete-act:hover {
  background: #f43f5e !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.4) !important;
}

/* Team Leader & Assistant Leader Badges & Hierarchy */
.badge-tl {
  background: rgba(168, 85, 247, 0.2) !important;
  color: #c084fc !important;
  border: 1px solid rgba(168, 85, 247, 0.4) !important;
  font-weight: 700 !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.5px !important;
}
.badge-al {
  background: rgba(59, 130, 246, 0.2) !important;
  color: #60a5fa !important;
  border: 1px solid rgba(59, 130, 246, 0.4) !important;
  font-weight: 700 !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.5px !important;
}
.tl-assigned-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  color: #a855f7;
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
  margin-top: 2px;
}

/* Sidebar Team Members Section (for Team Leaders & Admin) */
.sidebar-team-section {
  padding: 10px 12px;
  border-top: 1px solid rgba(6, 182, 212, 0.25);
  background: rgba(11, 17, 32, 0.95);
  flex-shrink: 0;
  max-height: 40vh;
  display: flex;
  flex-direction: column;
}
.sidebar-team-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.sidebar-team-title {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-cyan);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sidebar-team-cards-wrap {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.team-member-card {
  min-width: 140px;
  max-width: 155px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.team-member-card:hover {
  background: rgba(6, 182, 212, 0.08);
  border-color: rgba(6, 182, 212, 0.35);
  transform: translateY(-2px);
}
.team-member-card.active {
  background: rgba(6, 182, 212, 0.16) !important;
  border-color: var(--accent-cyan) !important;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.25);
}
.team-member-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.team-member-name {
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.team-member-pct {
  font-size: 0.68rem;
  font-weight: 800;
  color: #38bdf8;
  flex-shrink: 0;
}
.team-member-stats {
  font-size: 0.65rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.team-member-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  width: 100%;
}
.team-member-fill {
  height: 100%;
  background: #10b981;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Live Real-time Indicator Badge */
.live-stream-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.live-stream-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #10b981;
  animation: liveDotPulse 1.5s infinite ease-in-out;
}
@keyframes liveDotPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Dashboard Security & Audit Alerts Stream */
.dash-alerts-stream-panel {
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.08) !important;
}
.audit-alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  transition: all 0.2s ease;
}
.audit-alert-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(6, 182, 212, 0.35);
}
.audit-alert-item.severity-danger {
  border-left: 3px solid #f43f5e;
  background: rgba(244, 63, 94, 0.06);
}
.audit-alert-item.severity-warning {
  border-left: 3px solid #f59e0b;
  background: rgba(245, 158, 11, 0.06);
}
.alert-main-content {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.alert-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.alert-icon-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}
.alert-icon-danger {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
}
.alert-text-group {
  min-width: 0;
  flex: 1;
}
.alert-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-title-text {
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
}
.alert-agent-pill {
  font-size: 0.7rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
}
.alert-desc-text {
  font-size: 0.74rem;
  color: var(--text-dim);
  margin-top: 2px;
  word-break: break-word;
}
.alert-meta-col {
  text-align: right;
  flex-shrink: 0;
}
.alert-time {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.btn-tl-act {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  background: rgba(168, 85, 247, 0.15) !important;
  color: #c084fc !important;
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}
.btn-tl-act:hover {
  background: rgba(168, 85, 247, 0.3) !important;
  border-color: #c084fc !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
}

/* =================== PARALLEL DESKTOP & MOBILE RESPONSIVE LAYOUT FOR BANKS & BATCHES =================== */
.quick-dash-parallel-wrap {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 16px;
  width: 100%;
}
.quick-dash-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 10px 14px;
}
.quick-dash-banks-col {
  border-color: rgba(6, 182, 212, 0.25);
}
.quick-dash-batches-col {
  border-color: rgba(16, 185, 129, 0.25);
}
.dash-batches-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Dashboard Period Filter Bar */
.dash-period-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  margin-bottom: 18px;
  border: 1px solid rgba(6, 182, 212, 0.25);
  background: rgba(15, 23, 42, 0.7);
  flex-wrap: wrap;
}
.dash-period-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dash-period-pills-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dash-period-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.dash-period-pill:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
  color: #fff;
}
.dash-period-pill.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.25), rgba(14, 165, 233, 0.4));
  border-color: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

/* TL Work Comparison Panel */
.tl-comparison-panel {
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
  background: rgba(15, 23, 42, 0.8) !important;
}
.tl-compare-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 8px;
}
.tl-compare-row.tl-self-row {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.35);
}
.tl-compare-user {
  width: 170px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tl-compare-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tl-compare-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.tl-compare-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}
.tl-compare-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.3s ease;
}
.tl-fill-self {
  background: linear-gradient(90deg, #c084fc, #a855f7);
}
.tl-fill-agent {
  background: linear-gradient(90deg, #06b6d4, #10b981);
}
.tl-compare-stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* =================== MOBILE SPECIFIC INTELLIGENCE DASHBOARD & BATCH STRIP =================== */
@media (max-width: 900px) {
  /* Ensure Intelligence Dashboard is fully scrollable and viewable on mobile */
  #dashboard-view-container {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: auto !important;
    min-height: calc(100vh - 60px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 10px 8px 60px 8px !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch;
  }
  #dashboard-view-container.hide {
    display: none !important;
  }
  .dashboard-wrapper {
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    padding-bottom: 40px !important;
  }
  .dash-period-filter-bar {
    padding: 10px 12px !important;
    gap: 8px !important;
  }
  .dash-period-pills-wrap {
    width: 100%;
    justify-content: space-between;
  }
  .dash-period-pill {
    padding: 4px 8px !important;
    font-size: 0.72rem !important;
    flex: 1;
    text-align: center;
    justify-content: center;
  }

  /* Parallel wrap stacks vertically on mobile with Batch Strip right on next line! */
  .quick-dash-parallel-wrap {
    flex-direction: column !important;
    gap: 4px !important;
  }
  .quick-dash-col {
    padding: 4px 6px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    gap: 2px !important;
  }
  .dash-batches-header-row {
    margin-top: 2px;
    gap: 4px !important;
  }
  .dash-bank-batches-strip {
    margin-top: 2px !important;
    padding: 4px 6px !important;
  }
}

.footer-coder-link {
  color: #38bdf8 !important;
  text-decoration: none !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: rgba(6, 182, 212, 0.12) !important;
  border: 1px solid rgba(6, 182, 212, 0.35) !important;
  padding: 3px 9px !important;
  border-radius: 12px !important;
  transition: all 0.2s ease !important;
  margin: 0 4px !important;
}
.footer-coder-link:hover {
  background: rgba(6, 182, 212, 0.25) !important;
  border-color: var(--accent-cyan) !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.35) !important;
  transform: translateY(-1px) !important;
}
.portal-footer-terminal {
  margin-top: 24px !important;
  margin-bottom: 30px !important;
}
@media (max-width: 900px) {
  .portal-footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 16px 12px 30px 12px !important;
    margin-top: 20px !important;
    font-size: 0.72rem !important;
    line-height: 1.6 !important;
  }
}

/* =================== ENHANCED GRAPHICAL BATCHES & BANKS CARDS =================== */
.dash-batch-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 14px;
  min-width: 170px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}
.dash-batch-card:hover {
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(6, 182, 212, 0.15);
}
.dash-batch-card.active {
  /* Controlled dynamically by inline styles per bank color */
}
.dash-batch-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.dash-batch-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.dash-batch-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-batch-card-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  white-space: nowrap;
}
.dash-batch-card-track {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  overflow: hidden;
}
.dash-batch-card-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #06b6d4, #10b981);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.dash-batch-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-dim);
}
.dash-batch-card-stat {
  font-weight: 600;
}
.dash-batch-card-pct {
  color: #38bdf8;
  font-weight: 800;
}
.dash-batch-agent-tag {
  font-size: 0.64rem;
  font-weight: 700;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* =================== DESKTOP ONLY: SPACIOUS CARDS (min-width: 901px) =================== */
@media (min-width: 901px) {
  .bank-card-pill {
    padding: 8px 14px !important;
    border-radius: 10px !important;
    min-width: 170px !important;
    gap: 7px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    flex-shrink: 0 !important;
  }
  .bank-card-chart {
    width: 32px !important;
    height: 32px !important;
  }
  .bank-card-name {
    font-size: 0.85rem !important;
    max-width: 180px !important;
  }
  .bank-card-meta {
    font-size: 0.72rem !important;
    gap: 7px !important;
  }

  /* Left sidebar bank group spacious high-visibility styling */
  .bank-group-item {
    margin-bottom: 16px !important;
    border-radius: 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: rgba(11, 19, 36, 0.95) !important;
  }
  .bank-group-header {
    padding: 16px 18px !important;
    gap: 12px !important;
  }
  .bank-group-title {
    font-size: 0.92rem !important;
    letter-spacing: 0.2px !important;
  }
  .bank-icon-badge {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
  }
  .bank-group-pct-badge {
    font-size: 0.76rem !important;
    padding: 3px 9px !important;
    border-radius: 8px !important;
  }
  .bank-progress-track {
    height: 6px !important;
    border-radius: 3px !important;
  }
  .bank-progress-fill {
    border-radius: 3px !important;
  }

  .bank-batches-sublist {
    padding: 14px 16px !important;
    gap: 12px !important;
  }
  .batch-card {
    padding: 14px 16px !important;
    border-radius: 12px !important;
    gap: 10px !important;
    margin-bottom: 4px !important;
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }
  .batch-card:hover {
    background: rgba(6, 182, 212, 0.12) !important;
    border-color: rgba(6, 182, 212, 0.45) !important;
    transform: translateX(4px) !important;
  }
  .batch-card.active {
    background: rgba(6, 182, 212, 0.2) !important;
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.35) !important;
  }
  .batch-code-title {
    font-size: 0.92rem !important;
  }
  .batch-status-badge {
    font-size: 0.74rem !important;
    padding: 3px 10px !important;
    border-radius: 6px !important;
  }
  .batch-mini-track {
    height: 5px !important;
    border-radius: 3px !important;
  }
  .batch-mini-fill {
    border-radius: 3px !important;
  }
  .batch-counts-text {
    font-size: 0.74rem !important;
  }
}

/* =================== MOBILE SPECIFIC NAV HEADER & BATCH CLUSTER FIXES =================== */
@media (max-width: 900px) {
  /* 1. Header always visible with all buttons & branding properly positioned */
  .top-nav {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 6px 10px !important;
    background: rgba(7, 11, 20, 0.98) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(6, 182, 212, 0.3) !important;
    gap: 6px !important;
    min-height: 48px !important;
  }
  .nav-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }
  .nav-right {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
  }
  /* Show icon buttons clearly in mobile header */
  .nav-right .btn,
  .nav-right .bot-pill {
    padding: 4px 7px !important;
    font-size: 0.72rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 30px !important;
    border-radius: 6px !important;
  }
  .nav-right .btn span,
  .nav-right .bot-pill span {
    display: none !important; /* Hide long button text on mobile to avoid overflow, show icons cleanly */
  }
  .nav-right #btn-open-call-guide span {
    display: inline-block !important; /* Keep 'Help' text compact & clear */
    font-size: 0.72rem !important;
    margin-left: 2px !important;
  }
  .user-pill {
    padding: 3px 6px !important;
    font-size: 0.7rem !important;
    gap: 4px !important;
  }
  .user-pill #nav-role-badge {
    display: none !important;
  }
  .user-pill #nav-tg-pill {
    display: none !important; /* Hide long badge on mobile header to preserve room for logout */
  }
  .user-pill {
    max-width: 90px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  .user-pill #nav-username {
    max-width: 65px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
  #btn-logout {
    height: 30px !important;
    width: 30px !important;
    min-width: 30px !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: auto !important;
  }

  /* 2. Compact, Sleek Batch & Bank Cards on Mobile (No Oversized Blocks) */
  .quick-dash-parallel-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .quick-dash-col {
    padding: 2px 4px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    gap: 1px !important;
  }
  .dash-banks-header-row,
  .dash-batches-header-row {
    padding: 2px 4px !important;
    margin: 0 !important;
    gap: 4px !important;
  }
  .dash-banks-title-wrap {
    font-size: 0.72rem !important;
    gap: 4px !important;
  }
  .dash-banks-title {
    font-size: 0.72rem !important;
  }
  .dash-banks-search-wrap {
    width: 140px !important;
    padding: 2px 6px !important;
    border-radius: 10px !important;
    font-size: 0.7rem !important;
  }
  .bank-search-input {
    font-size: 0.7rem !important;
  }

  /* Bank horizontal carousel: slim, compact pills */
  .bank-card-pill {
    padding: 4px 8px !important;
    font-size: 0.7rem !important;
    min-width: 0 !important;
    gap: 6px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
  }
  .bank-card-chart {
    width: 22px !important;
    height: 22px !important;
  }
  .bank-card-name {
    font-size: 0.74rem !important;
    max-width: 100px !important;
  }
  .bank-card-meta {
    font-size: 0.65rem !important;
    gap: 4px !important;
  }

  /* Batch strip & cards: compact, horizontal touch-scrollable, sleek */
  .dash-bank-batches-strip {
    padding: 3px 4px !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
  }
  .bank-batches-pill-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 6px !important;
    padding: 2px 0 4px 0 !important;
    -webkit-overflow-scrolling: touch;
  }
  .dash-batch-card {
    min-width: 185px !important;
    max-width: 260px !important;
    padding: 4px 8px !important;
    gap: 4px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  .dash-batch-card-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    width: 100% !important;
  }
  .dash-batch-card-title-wrap {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    overflow: hidden !important;
  }
  .dash-batch-card-title {
    font-size: 0.74rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .dash-batch-card-badge {
    font-size: 0.60rem !important;
    padding: 1.5px 5px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
  }
  .dash-batch-card-track {
    height: 3px !important;
  }
  .dash-batch-card-bottom {
    font-size: 0.65rem !important;
  }

  /* Mobile Top Cluster: Natural block flow without height clipping */
  .mobile-sticky-top-cluster {
    position: static !important;
    top: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border-top: none !important;
    z-index: 10 !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

/* Team Leader Member Assignment Modal Styles */
.tl-agents-selection-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tl-modal-agent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.tl-modal-agent-item:hover {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.35);
}
.tl-modal-agent-item.selected {
  background: rgba(168, 85, 247, 0.18);
  border-color: #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}
.tl-modal-agent-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tl-modal-agent-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #a855f7;
  cursor: pointer;
}
.tl-modal-agent-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}
.tl-modal-agent-meta {
  font-size: 0.74rem;
  color: #94a3b8;
  display: flex;
  gap: 6px;
  align-items: center;
}
.tl-current-tag {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.2);
}
.tl-current-tag.this-tl {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.4);
}
.tl-current-tag.other-tl {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border-color: rgba(234, 179, 8, 0.3);
}

/* Help Modal Responsive & Readable Styling (Mobile & PC) */
.modal-help-executive {
  width: 1080px !important;
  max-width: 95vw !important;
  max-height: 92vh !important;
  padding: 16px 20px !important;
  border: 1px solid rgba(6, 182, 212, 0.4) !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.85), 0 0 35px rgba(6, 182, 212, 0.25) !important;
  border-radius: 12px !important;
  display: flex !important;
  flex-direction: column !important;
}

.help-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(6, 182, 212, 0.2);
  gap: 12px;
}

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

.help-header-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(6, 182, 212, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.help-header-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}

.help-header-sub {
  color: #94a3b8;
  font-size: 0.76rem;
  display: block;
  margin-top: 2px;
}

.help-header-close {
  padding: 5px 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  white-space: nowrap;
}

.help-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(92vh - 80px);
  overflow-y: auto;
  padding-right: 6px;
}

/* Telemetry Grid (Supervisor Only) */
.help-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.help-telem-card {
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
}

.telem-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.telem-desc {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.35;
}

/* Telegram Card */
.help-telegram-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
}

.help-telegram-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.help-bot-link {
  font-size: 0.75rem;
  color: #38bdf8;
  text-decoration: none;
  background: rgba(56, 189, 248, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.help-bot-link:hover {
  background: rgba(56, 189, 248, 0.25);
}

.help-telegram-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.tg-feat-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.75rem;
  color: #cbd5e1;
  line-height: 1.35;
}

.tg-feat-item i {
  font-size: 0.95rem;
  margin-top: 2px;
}

/* Section Title */
.help-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 8px;
}

/* Dispositions 3-col on PC, 1-col on Mobile */
.help-dispositions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.help-disp-card {
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.15s ease;
}

.disp-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
}

.disp-pill {
  font-weight: 800;
  font-size: 0.74rem;
  padding: 3px 8px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.3px;
}

.disp-status-note {
  font-size: 0.7rem;
  font-weight: 700;
}

.disp-card-body {
  font-size: 0.75rem;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.disp-when {
  color: #e2e8f0;
}

.disp-effect {
  color: #94a3b8;
  font-size: 0.72rem;
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 2px;
}

.disp-effect i {
  color: var(--accent-cyan);
  font-size: 0.75rem;
  margin-top: 3px;
}

/* Color Varieties */
.disp-card-hot {
  background: rgba(244, 63, 94, 0.09);
  border: 1px solid rgba(244, 63, 94, 0.4);
}
.disp-pill-hot {
  background: rgba(244, 63, 94, 0.25);
  color: #fb7185;
}

.disp-card-good {
  background: rgba(16, 185, 129, 0.09);
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.disp-pill-good {
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
}

.disp-card-callback {
  background: rgba(56, 189, 248, 0.09);
  border: 1px solid rgba(56, 189, 248, 0.4);
}
.disp-pill-callback {
  background: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
}

.disp-card-noanswer {
  background: rgba(245, 158, 11, 0.09);
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.disp-pill-noanswer {
  background: rgba(245, 158, 11, 0.25);
  color: #fbbf24;
}

.disp-card-wrong {
  background: rgba(148, 163, 184, 0.09);
  border: 1px solid rgba(148, 163, 184, 0.4);
}
.disp-pill-wrong {
  background: rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}

.disp-card-hated {
  background: rgba(239, 68, 68, 0.09);
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.disp-pill-hated {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

/* Modal Footer */
.help-modal-footer {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.help-footer-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  color: #cbd5e1;
  line-height: 1.35;
}

.help-footer-info a {
  color: #38bdf8;
  text-decoration: underline;
}

.help-gotit-btn {
  padding: 5px 18px;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 6px;
}

/* MOBILE RESPONSIVE OPTIMIZATIONS (< 768px) */
@media (max-width: 768px) {
  .modal-help-executive {
    width: 96vw !important;
    max-width: 96vw !important;
    max-height: 94vh !important;
    padding: 10px 10px !important;
    margin: auto !important;
    border-radius: 10px !important;
  }
  .help-modal-header {
    margin-bottom: 8px;
    padding-bottom: 6px;
  }
  .help-header-title {
    font-size: 0.95rem;
  }
  .help-header-sub {
    font-size: 0.7rem;
  }
  .help-header-icon {
    width: 32px;
    height: 32px;
    font-size: 1.05rem;
  }
  .help-header-close {
    padding: 4px 10px;
    font-size: 0.75rem;
  }
  .help-modal-body {
    gap: 8px;
    max-height: calc(94vh - 65px);
    padding-right: 3px;
  }
  .help-telemetry-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .help-telegram-features {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .help-dispositions-grid {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }
  .help-disp-card {
    padding: 9px 10px;
  }
  .disp-card-body {
    font-size: 0.73rem;
  }
  .help-modal-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    text-align: left;
  }
  .help-gotit-btn {
    width: 100%;
    justify-content: center;
  }
}

/* =================== COMPACT MOBILE TOP STICKY CLUSTER ENHANCEMENTS =================== */
@media (max-width: 900px) {
  /* Enforce clean fit without vertical ballooning or clipping */
  .mobile-sticky-top-cluster {
    position: static !important;
    top: auto !important;
    z-index: 10 !important;
    max-height: none !important;
    overflow: visible !important;
    border-radius: 0 0 10px 10px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
  }
  
  /* Sidebar Callers at Bottom of Mobile Drawer: Each Person Each Line */
  .sidebar-team-section {
    max-height: 45vh !important;
    overflow-y: auto !important;
    padding: 10px 10px !important;
    border-top: 2px solid rgba(6, 182, 212, 0.35) !important;
    background: rgba(7, 11, 20, 0.98) !important;
  }
  .sidebar-team-cards-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    max-height: 38vh !important;
    padding: 2px 0 6px 0 !important;
  }
  .team-member-card {
    min-width: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 7px 10px !important;
    border-radius: 8px !important;
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
  }
  .team-member-identity {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .team-member-card.active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(15, 23, 42, 0.95)) !important;
    border-color: var(--accent-cyan) !important;
  }

  .mobile-sticky-top-cluster::-webkit-scrollbar {
    display: none !important;
  }

  /* Keep top-dash-banks padding tight and clean */
  .top-dash-banks {
    padding: 2px 4px !important;
    gap: 2px !important;
  }

  /* Bank and Batch headers in 1 tight row */
  .dash-banks-header-row,
  .dash-batches-header-row {
    padding: 2px 4px !important;
    margin-bottom: 2px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .dash-banks-title {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
  }

  /* Compact carousel scroll row */
  .dash-banks-grid-carousel {
    padding: 2px 2px 4px 2px !important;
    gap: 5px !important;
  }

  /* Category tabs in sticky cluster: clean touch grid */
  .batch-category-tabs-bar {
    padding: 3px 6px 4px 6px !important;
    gap: 2px !important;
  }
  .category-tabs-group {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 3px !important;
    width: 100% !important;
  }
  .cat-tab-btn {
    padding: 3px 2px !important;
    font-size: 0.65rem !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .cat-tab-badge {
    font-size: 0.58rem !important;
    padding: 0 4px !important;
  }

  /* Batch title & metadata: fit in single line without overflow */
  .mobile-sticky-top-cluster .view-header.batch-hero-bar {
    padding: 3px 6px 4px 6px !important;
    gap: 2px !important;
  }
  .mobile-sticky-top-cluster .batch-title-area h2 {
    font-size: 0.76rem !important;
    max-width: 55vw !important;
  }

  /* Action buttons: spacious and fully visible in mobile view without being half-cut */
  .mobile-sticky-top-cluster .batch-actions-area {
    margin-top: 2px !important;
    padding-bottom: 2px !important;
    gap: 4px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .mobile-sticky-top-cluster .batch-actions-area .btn {
    height: 32px !important;
    min-height: 32px !important;
    padding: 4px 6px !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    border-radius: 6px !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .mobile-sticky-top-cluster .batch-actions-area .btn i {
    font-size: 0.72rem !important;
    flex-shrink: 0 !important;
  }
  .mobile-sticky-top-cluster .batch-actions-area .btn span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 0.66rem !important;
  }
}

/* ==========================================================================
   TEAM LEADER & ADMIN: WIDER TEAMMATE CARDS & ROTATING SECURITY STREAM
   ========================================================================== */
.top-priv-monitor-cluster {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

@media (min-width: 901px) {
  .top-priv-monitor-cluster,
  body.role-team-leader #top-priv-monitor-cluster,
  body.role-admin #top-priv-monitor-cluster {
    display: grid !important;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) !important;
    gap: 12px !important;
    margin-bottom: 12px !important;
    align-items: stretch !important;
  }

  body.role-team-leader #top-dash-teammates:not(.hide),
  body.role-admin #top-dash-teammates:not(.hide) {
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 0 !important;
    min-width: 0 !important;
  }

  body.role-team-leader #top-dash-security-card:not(.hide),
  body.role-admin #top-dash-security-card:not(.hide) {
    display: flex !important;
    flex-direction: column !important;
    margin-bottom: 0 !important;
    min-width: 0 !important;
  }
}

.top-dash-teammates {
  margin-top: 0;
  margin-bottom: 0;
  padding: 10px 14px;
  background: rgba(11, 19, 36, 0.88);
  border: 1px solid rgba(168, 85, 247, 0.38);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.top-dash-security-card {
  margin-top: 0;
  margin-bottom: 0;
  padding: 10px 14px;
  background: rgba(11, 19, 36, 0.88);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: all 0.3s ease;
}

.top-dash-security-card:hover {
  border-color: rgba(245, 158, 11, 0.65);
}

.top-dash-security-card.has-alerts {
  border-color: rgba(244, 63, 94, 0.75);
  animation: securityAlertBlink 1.4s infinite alternate ease-in-out;
}

/* Parallel 2-Card Layout for Banks and Batches */
.banks-and-batches-parallel-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
  align-items: stretch;
}

.banks-and-batches-parallel-row .dash-distinct-card {
  margin-bottom: 0 !important;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.banks-and-batches-parallel-row .dash-banks-grid-carousel,
.banks-and-batches-parallel-row .bank-batches-pill-row {
  flex: 1 1 auto;
}

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

.teammates-and-alerts-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 12px;
  align-items: stretch;
}

@media (max-width: 1050px) {
  .teammates-and-alerts-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.top-teammates-carousel-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.top-teammates-carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

/* Wider, Richer Teammate Card */
.wider-teammate-card {
  min-width: 250px !important;
  max-width: 290px !important;
  flex-shrink: 0;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  background: rgba(15, 23, 42, 0.75) !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}

.wider-teammate-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(6, 182, 212, 0.2);
}

.wider-card-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 6px 4px 2px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.wider-metric-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.wider-metric-col .w-lbl {
  font-size: 0.62rem;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.wider-metric-col .w-val {
  font-size: 0.76rem;
  font-weight: 700;
  margin-top: 2px;
}

/* Right Column: Compact Separate Card with Stackable Alert Icons & Count Badges */
.top-alerts-pill-card {
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 85px;
  max-width: 270px;
  width: 100%;
  margin-left: auto;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.top-alerts-pill-card.has-alerts {
  border-color: rgba(244, 63, 94, 0.7);
  animation: securityAlertBlink 1.4s infinite alternate ease-in-out;
}

@keyframes securityAlertBlink {
  0% {
    border-color: rgba(244, 63, 94, 0.4);
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.2);
  }
  100% {
    border-color: #f43f5e;
    box-shadow: 0 0 18px rgba(244, 63, 94, 0.6), inset 0 0 12px rgba(244, 63, 94, 0.2);
  }
}

.alerts-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.alerts-card-title {
  font-size: 0.74rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
}

.alerts-icons-stack-viewport {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 2px 2px;
  scrollbar-width: thin;
}

/* Individual Stackable Alert Icon Pill */
.alert-icon-pill-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(30, 41, 59, 0.7);
}

.alert-icon-pill-btn:hover {
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.alert-icon-pill-btn.alert-danger {
  background: rgba(244, 63, 94, 0.18);
  border-color: rgba(244, 63, 94, 0.55);
  color: #fb7185;
}
.alert-icon-pill-btn.alert-danger:hover {
  background: #f43f5e;
  color: #fff;
  box-shadow: 0 0 14px rgba(244, 63, 94, 0.7);
}

.alert-icon-pill-btn.alert-warning {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.55);
  color: #fbbf24;
}
.alert-icon-pill-btn.alert-warning:hover {
  background: #f59e0b;
  color: #111827;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.7);
}

/* Badge Index Count (1, 2, 3...) */
.alert-pill-badge-num {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 10px;
  font-size: 0.62rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 1.5px solid #070b14;
}

.badge-num-danger {
  background: #f43f5e;
  color: #ffffff;
  box-shadow: 0 0 6px rgba(244, 63, 94, 0.8);
}

.badge-num-warning {
  background: #f59e0b;
  color: #111827;
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.8);
}

/* Security Normal Compact Indicator */
.alerts-normal-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 8px;
  font-size: 0.74rem;
  color: #34d399;
  width: 100%;
}

/* Detail Modal Styles */
.security-alert-modal-card {
  max-width: 460px !important;
  width: 90% !important;
  border: 1px solid rgba(6, 182, 212, 0.3) !important;
}

.sec-modal-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.sec-modal-agent-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-bottom: 12px;
}

.sec-modal-desc-box {
  padding: 12px;
  background: rgba(11, 17, 32, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.billboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.billboard-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
}

.billboard-nav-btns {
  display: flex;
  align-items: center;
  gap: 3px;
}

.billboard-nav-btns .btn-icon {
  width: 22px;
  height: 22px;
  font-size: 0.68rem;
  color: #94a3b8;
}

.billboard-nav-btns .btn-icon:hover {
  color: #fff;
}

.billboard-slide-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  margin-top: 6px;
  min-height: 52px;
}

.billboard-slide {
  width: 100%;
}

.billboard-empty-state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
}

.billboard-active-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.08);
  transition: all 0.3s ease;
}

.billboard-active-alert.alert-warning-border {
  border-left: 3px solid #f59e0b;
}

.billboard-active-alert.alert-danger-border {
  background: rgba(244, 63, 94, 0.1);
  border-left: 3px solid #f43f5e;
}

.billboard-alert-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.billboard-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.icon-warning-box {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.icon-danger-box {
  background: rgba(244, 63, 94, 0.2);
  color: #fb7185;
}

.billboard-alert-details {
  min-width: 0;
  flex: 1;
}

.billboard-title-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1.2;
}

.billboard-alert-head {
  font-size: 0.78rem;
  font-weight: 700;
}

.billboard-agent-tag {
  font-size: 0.68rem;
  color: #38bdf8;
  font-weight: 600;
}

.billboard-time-tag {
  font-size: 0.65rem;
  color: #64748b;
  margin-left: auto;
}

.billboard-desc-line {
  font-size: 0.71rem;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.billboard-action-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.billboard-pager {
  font-size: 0.65rem;
  color: #64748b;
  font-weight: 700;
}

.btn-check-pill {
  background: rgba(16, 185, 129, 0.2) !important;
  border: 1px solid rgba(16, 185, 129, 0.5) !important;
  color: #34d399 !important;
  padding: 3px 8px !important;
  font-size: 0.7rem !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-check-pill:hover {
  background: #10b981 !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.audit-alert-item.alert-checked {
  opacity: 0.55;
  border-color: rgba(16, 185, 129, 0.2) !important;
  background: rgba(15, 23, 42, 0.4) !important;
}

/* Hide bottom-left drawer sidebar team section on desktop, since Team Leader has rich cards at the top */
@media (min-width: 901px) {
  .sidebar-team-section {
    display: none !important;
  }
}

/* ==========================================================================
   MOBILE HEADER CLEAN FLEX ROW & ALIGNMENT
   ========================================================================== */
@media (max-width: 900px) {
  /* Enforce Admin-only on Users Directory and Add User buttons */
  body:not(.role-admin) #btn-open-users-admin,
  body:not(.role-admin) #btn-toggle-dash-add-user {
    display: none !important;
  }

  .top-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 6px 10px !important;
    height: auto !important;
    min-height: 48px !important;
    gap: 6px 8px !important;
    background: rgba(7, 11, 20, 0.98) !important;
  }

  .nav-left {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  .nav-right {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
  }

  /* Make header action buttons compact and icon-first on mobile */
  .nav-right .btn,
  .nav-right .bot-pill {
    padding: 4px 8px !important;
    font-size: 0.72rem !important;
    height: 30px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
  }

  .nav-right .btn span,
  .nav-right .bot-pill span {
    display: none !important; /* Hide long button labels so everything stays in 1 compact bar */
  }

  .nav-right #btn-open-call-guide span {
    display: inline-block !important; /* Keep Help readable */
    font-size: 0.72rem !important;
    margin-left: 3px !important;
  }

  .user-pill {
    padding: 2px 7px !important;
    height: 30px !important;
    font-size: 0.7rem !important;
    gap: 4px !important;
    max-width: 95px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .user-pill #nav-role-badge,
  .user-pill #nav-tg-pill {
    display: none !important;
  }

  .user-pill #nav-username {
    max-width: 70px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #btn-logout {
    height: 30px !important;
    width: 30px !important;
    min-width: 30px !important;
    padding: 0 !important;
  }

  /* Layer 2: Calling Terminal button & Search Bar sit cleanly beneath */
  .nav-center {
    order: 3 !important;
    display: flex !important;
    width: 100% !important;
    margin: 2px 0 0 0 !important;
    padding: 0 !important;
    gap: 6px !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .nav-center .nav-tab-group {
    flex-shrink: 0 !important;
    padding: 2px !important;
  }

  .nav-center .nav-tab {
    height: 30px !important;
    padding: 4px 10px !important;
    font-size: 0.74rem !important;
  }

  .nav-center .global-search-bar {
    flex: 1 !important;
    width: auto !important;
    max-width: none !important;
    height: 30px !important;
    padding: 2px 8px !important;
    margin: 0 !important;
  }

  /* Mobile Lead Action Matrix: 2 clean rows of 4 */
  .sec-mob-actions-matrix {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 4px !important;
    width: 100% !important;
    margin-top: 6px !important;
    padding-top: 6px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .sec-mob-actions-matrix .btn-matrix-act {
    height: 28px !important;
    padding: 2px 4px !important;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
  }
}

/* Reset / Not Used button styling for lead focus card */
.btn-dispo-pending {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}
.btn-dispo-pending:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #fff;
}
/* sidebar-team-section display controlled responsively */
/* Strictly hide Users Directory and Add User buttons for all non-admin accounts across ALL screen sizes */
body:not(.role-admin) #btn-open-users-admin,
body:not(.role-admin) #btn-toggle-dash-add-user,
body:not(.role-admin) #dash-create-user-wrap,
body:not(.role-admin) #modal-create-user-card {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  pointer-events: none !important;
}
/* ==========================================================================
   3 DISTINCT STANDALONE CARDS FOR CALLING TERMINAL HEADER
   Card 1: Bank Portfolios (#top-banks-card)
   Card 2: Batches for Selected Bank (#top-batches-card)
   Card 3: Teammates Live Progress & Security Stream (#top-dash-teammates)
   ========================================================================== */
.dash-distinct-card {
  margin-bottom: 12px;
  padding: 12px 16px;
  background: rgba(11, 19, 36, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.card-bank-portfolios {
  border-color: rgba(6, 182, 212, 0.32);
}
.card-bank-portfolios:hover {
  border-color: rgba(6, 182, 212, 0.55);
}

.card-bank-batches {
  border-color: rgba(16, 185, 129, 0.32);
}
.card-bank-batches:hover {
  border-color: rgba(16, 185, 129, 0.55);
}

.card-teammates-monitor {
  border-color: rgba(168, 85, 247, 0.35);
}
.card-teammates-monitor:hover {
  border-color: rgba(168, 85, 247, 0.6);
}

/* On Desktop (> 900px):
   - Show Card 1, Card 2, and Card 3 in main terminal view
   - Hide sidebar team section completely
   - Hide ALL mobile header action rows and buttons completely */
@media (min-width: 901px) {
  .sidebar-team-section,
  #sidebar-team-section,
  .mobile-only,
  .mobile-only-btn,
  .nav-mobile-top-actions,
  .nav-mobile-row-actions,
  #nav-mobile-row-actions,
  #btn-toggle-mobile-sidebar,
  #btn-open-call-guide-mob,
  #btn-logout-mob,
  #mob-bot-pill,
  #btn-open-report-mob,
  #btn-open-request-leads-mob,
  #nav-user-pill-mob,
  .mobile-act-btn {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    pointer-events: none !important;
  }
}

/* Desktop: Hide mobile security alerts bar */
@media (min-width: 901px) {
  #mobile-security-alerts-bar,
  .mobile-alerts-horizontal-card {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
  }
}

/* On Mobile (<= 900px):
   - Move/Show Teammates Live Progress & Security Stream inside 3-line hamburger menu drawer (#main-sidebar)
   - Hide Card 3 from calling terminal header to keep calling screen clean and safe */
@media (max-width: 900px) {
  #top-priv-monitor-cluster,
  .top-priv-monitor-cluster,
  #top-dash-teammates,
  .card-teammates-monitor,
  #top-dash-security-card,
  .card-security-monitor {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
  }

  .banks-and-batches-parallel-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* Show Teammates drawer inside sidebar for TL & Admin as a dedicated scrollable card */
  body.role-team-leader .sidebar-team-section,
  body.role-admin .sidebar-team-section,
  body.role-team-leader #sidebar-team-section,
  body.role-admin #sidebar-team-section {
    display: flex !important;
    visibility: visible !important;
    height: auto !important;
    max-height: 52vh !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    padding: 10px !important;
    margin: 10px 8px 14px 8px !important;
    border-radius: 12px !important;
    background: rgba(11, 19, 36, 0.96) !important;
    border: 1px solid rgba(6, 182, 212, 0.35) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45) !important;
  }

  /* Teammate Cards in Mobile Drawer: smoothly scrollable as more and more agents are added */
  .sidebar-team-cards-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: 38vh !important;
    padding: 4px 2px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
  }

  .sidebar-team-cards-wrap .team-member-card {
    min-width: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 8px 10px !important;
    border-radius: 8px !important;
    margin: 0 !important;
  }

  /* ==========================================================================
     MOBILE HORIZONTAL SECURITY ALERTS STRIP (Top of Bank Portfolios)
     Small & long card rolling from right to left with horizontal scroll & refresh
     ========================================================================== */
  .mobile-alerts-horizontal-card {
    display: flex !important;
    align-items: center !important;
    padding: 4px 8px !important;
    margin: 4px 0 6px 0 !important;
    border-radius: 8px !important;
    background: rgba(11, 19, 36, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35) !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Only privileged users (TL & Admin) see the alerts card */
  body:not(.role-team-leader):not(.role-admin) #mobile-security-alerts-bar {
    display: none !important;
    visibility: hidden !important;
  }

  .mobile-alerts-horizontal-card.has-alerts {
    border-color: rgba(244, 63, 94, 0.75) !important;
    animation: securityAlertBlink 1.4s infinite alternate ease-in-out !important;
  }

  /* Single compact horizontal row: [Alerts badge] [Horizontal scrolling pills] [Refresh icon] */
  .mob-alerts-single-line {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    width: 100% !important;
    min-height: 28px !important;
  }

  .mob-alerts-title-wrap {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
  }

  .mob-alerts-title {
    font-size: 0.70rem !important;
    font-weight: 700 !important;
    color: #f8fafc !important;
    letter-spacing: 0.2px !important;
  }

  .mob-alerts-refresh-btn {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    font-size: 0.65rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 5px !important;
    background: rgba(6, 182, 212, 0.12) !important;
    border: 1px solid rgba(6, 182, 212, 0.35) !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
  }

  .mob-alerts-scroll-viewport {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 2px 2px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    scroll-behavior: smooth !important;
  }
  .mob-alerts-scroll-viewport::-webkit-scrollbar {
    display: none !important;
  }

  /* Compact icon pill buttons on mobile horizontal track: streamlined to 26px to fit in single line */
  .mob-alerts-scroll-viewport .alert-icon-pill-btn {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    border-radius: 6px !important;
    font-size: 0.72rem !important;
    flex-shrink: 0 !important;
    position: relative !important;
  }

  .mob-alerts-scroll-viewport .alert-pill-badge-num {
    top: -3px !important;
    right: -3px !important;
    min-width: 13px !important;
    height: 13px !important;
    font-size: 0.52rem !important;
  }

  .mob-alerts-normal-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    font-size: 0.68rem !important;
    color: #34d399 !important;
    padding: 1px 4px !important;
    white-space: nowrap !important;
  }

  /* Ultra-compact spacing between cards in mobile view only */
  .dash-distinct-card {
    margin-bottom: 2px !important;
    padding: 4px 6px !important;
    border-radius: 6px !important;
  }

  .banks-and-batches-parallel-row {
    grid-template-columns: 1fr !important;
    gap: 3px !important;
    margin-bottom: 3px !important;
  }

  .dash-banks-header-row,
  .dash-batches-header-row {
    padding: 1px 3px !important;
    margin-bottom: 1px !important;
  }

  .dash-banks-grid-carousel {
    padding: 1px 2px 2px 2px !important;
    gap: 4px !important;
  }

  .dash-bank-batches-strip {
    padding: 2px 4px !important;
    margin-top: 2px !important;
  }

  .bank-batches-pill-row {
    padding-bottom: 1px !important;
    gap: 4px !important;
  }

  .batch-category-tabs-bar {
    padding: 2px 4px !important;
    margin-bottom: 2px !important;
  }

  .mobile-sticky-top-cluster {
    max-height: 52vh !important;
  }

  /* Mobile Responsive Styling for Admin / TL Inspecting User Banner */
  .admin-inspecting-banner {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 10px 12px !important;
    margin-bottom: 10px !important;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(2, 132, 199, 0.12)) !important;
    border: 1px solid rgba(56, 189, 248, 0.55) !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45) !important;
  }

  .inspect-banner-info {
    display: flex !important;
    align-items: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .inspect-banner-badge {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    border-radius: 8px !important;
    background: rgba(6, 182, 212, 0.18) !important;
    border: 1px solid rgba(6, 182, 212, 0.4) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 2px !important;
  }

  .inspect-banner-badge i {
    font-size: 0.9rem !important;
  }

  .inspect-banner-text-col {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    min-width: 0 !important;
    flex: 1 !important;
  }

  .inspect-banner-title {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 0.82rem !important;
    color: #e2e8f0 !important;
    line-height: 1.3 !important;
  }

  .inspect-title-prefix {
    font-size: 0.78rem !important;
    color: #94a3b8 !important;
  }

  .inspect-username-highlight {
    color: #38bdf8 !important;
    font-weight: 800 !important;
    font-size: 0.85rem !important;
  }

  #inspecting-user-role {
    font-size: 0.62rem !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
  }

  .inspect-banner-desc {
    font-size: 0.70rem !important;
    color: #94a3b8 !important;
    line-height: 1.25 !important;
    margin-top: 1px !important;
  }

  /* Exit Inspection Button: Full-width, prominent, highly touchable */
  .inspect-exit-btn,
  #btn-exit-inspect-user {
    width: 100% !important;
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    padding: 0 12px !important;
    background: linear-gradient(135deg, #0284c7, #0369a1) !important;
    border: 1px solid rgba(56, 189, 248, 0.6) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35) !important;
  }
}

/* ==========================================================================
   MOBILE HEADER: 3 CLEAN STRUCTURED ROWS (<= 900px)
   Row 1: [☰] [Logo] [CorpLeads.live] -------- [Help] [Logout]
   Row 2: [Telegram Bot] [Report Issue] [User Name] (stretched to fill width)
   Row 3: [ 🔍 Search Company, Contact, Phone... ] (full-width)
   ========================================================================== */
.mobile-only {
  display: none !important;
}

@media (max-width: 900px) {
  .mobile-only {
    display: flex !important;
  }
  .desktop-only {
    display: none !important;
  }

  /* Header Container on Mobile */
  .top-nav {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 6px 10px 8px 10px !important;
    gap: 6px !important;
    height: auto !important;
    min-height: auto !important;
    background: rgba(7, 11, 20, 0.98) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(6, 182, 212, 0.3) !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow: hidden !important;
  }

  /* =========================================================
     MOBILE LANE 1 (TOP LINE):
     Left: [☰ Batches (Callers/TL)] [Logo] [CorpLeads.live Site Name]
     Right: Standalone Red Logout Button
     ========================================================= */
  .nav-mobile-lane-top {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 8px !important;
  }

  .nav-left {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: auto !important;
    flex: 0 0 auto !important;
    min-width: 0 !important;
  }

  .nav-brand {
    display: flex !important;
    align-items: baseline !important;
    white-space: nowrap !important;
    min-width: 0 !important;
  }

  .nav-title {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
    letter-spacing: -0.2px !important;
  }

  .nav-logo {
    width: 22px !important;
    height: 22px !important;
    flex-shrink: 0 !important;
  }

  #btn-toggle-mobile-sidebar {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .nav-mobile-top-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 5px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin-left: auto !important;
  }

  /* Top row Logout button */
  #btn-logout-mob {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 28px !important;
    width: 30px !important;
    min-width: 30px !important;
    padding: 0 !important;
    border-radius: 6px !important;
    font-size: 0.80rem !important;
    flex-shrink: 0 !important;
    background: rgba(239, 68, 68, 0.18) !important;
    border: 1px solid rgba(239, 68, 68, 0.55) !important;
    color: #ef4444 !important;
  }

  /* =========================================================
     MOBILE LANE 2:
     Callers/TLs: [Help] [Bot] [Request] [Report] (Left) + [User Pill] (Right)
     Admin: User Identity Bar with ADMIN badge
     ========================================================= */
  .nav-mobile-lane-second {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .nav-mob-actions-left {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    flex-shrink: 0 !important;
  }

  .mobile-act-btn {
    height: 30px !important;
    font-weight: 700 !important;
    border-radius: 6px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  .mob-compact-btn,
  #btn-open-call-guide-mob,
  #mob-bot-pill,
  #btn-open-request-leads-mob,
  #btn-open-report-mob {
    flex: 0 0 auto !important;
    min-width: 50px !important;
    padding: 0 7px !important;
    font-size: 0.70rem !important;
    gap: 4px !important;
  }

  #btn-open-call-guide-mob {
    background: rgba(6, 182, 212, 0.15) !important;
    border: 1px solid rgba(6, 182, 212, 0.45) !important;
    color: #38bdf8 !important;
  }

  #mob-bot-pill {
    background: rgba(6, 182, 212, 0.14) !important;
    border: 1px solid rgba(6, 182, 212, 0.4) !important;
    color: #38bdf8 !important;
    text-decoration: none !important;
  }

  #btn-open-request-leads-mob {
    background: rgba(6, 182, 212, 0.16) !important;
    border: 1px solid rgba(6, 182, 212, 0.45) !important;
    color: #38bdf8 !important;
  }

  #btn-open-report-mob {
    background: rgba(245, 158, 11, 0.16) !important;
    border: 1px solid rgba(245, 158, 11, 0.45) !important;
    color: #fbbf24 !important;
  }

  /* User profile pill on mobile */
  .mob-profile-btn,
  #nav-user-pill-mob {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    height: 28px !important;
    padding: 0 6px !important;
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 6px !important;
    color: #ffffff !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    flex: 0 1 auto !important;
    max-width: 160px !important;
    min-width: 0 !important;
  }

  #nav-username-mob {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 110px !important;
    min-width: 30px !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    color: #f8fafc !important;
    display: inline-block !important;
  }

  #nav-role-badge-mob {
    flex-shrink: 0 !important;
    font-size: 0.60rem !important;
    padding: 1px 4px !important;
  }

  /* =========================================================
     MOBILE LANE 3: Navigation Tabs (Terminal vs Dashboard)
     MOBILE LANE 4: Global Search Bar
     ========================================================= */
  .nav-center {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    margin: 2px 0 0 0 !important;
    padding: 0 !important;
  }

  .nav-center .nav-tab-group {
    display: flex !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 2px !important;
    box-sizing: border-box !important;
  }

  .nav-center .nav-tab {
    flex: 1 !important;
    text-align: center !important;
    justify-content: center !important;
    font-size: 0.76rem !important;
    padding: 6px 10px !important;
    height: 30px !important;
  }

  .nav-center .global-search-bar {
    width: 100% !important;
    max-width: 100% !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 2px 8px !important;
    box-sizing: border-box !important;
  }

  /* =========================================================
     STRICT ADMIN MOBILE RULES: MULTIPLE DEDICATED FIXED LANES
     Lane 1: Logo & CorpLeads.live Site Name on Left & Standalone Logout Button on Right
     Lane 2: Dedicated Full-Width Admin Profile & Admin Tag
     Lane 3: Full-Width Tabs (Calling Terminal vs Intelligence Dashboard)
     Lane 4: Full-Width Global Search Bar
     ========================================================= */
  body.role-admin #btn-toggle-mobile-sidebar {
    display: none !important;
  }

  body.role-admin #nav-mob-caller-tools {
    display: none !important;
  }

  body.role-admin .nav-mobile-lane-second {
    display: flex !important;
    width: 100% !important;
    margin: 1px 0 !important;
  }

  body.role-admin #nav-user-pill-mob {
    width: 100% !important;
    max-width: 100% !important;
    justify-content: space-between !important;
    height: 34px !important;
    padding: 0 12px !important;
    background: rgba(15, 23, 42, 0.95) !important;
    border: 1px solid rgba(6, 182, 212, 0.4) !important;
    border-radius: 8px !important;
  }

  body.role-admin #nav-role-badge-mob {
    display: inline-block !important;
    background: rgba(239, 68, 68, 0.22) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.5) !important;
    font-size: 0.65rem !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
  }

  /* Completely hide search & tabs for Admin on Mobile */
  body.role-admin .nav-center,
  body.role-admin .nav-center .nav-tab-group,
  body.role-admin .nav-center .global-search-bar,
  body.role-admin #top-search-wrap {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
  }

  /* Admin Intelligence Dashboard Mobile: Reduced card gaps & clean spacing */
  body.role-admin #dashboard-view-container {
    padding: 6px 8px !important;
  }

  body.role-admin .dash-panel,
  body.role-admin .admin-teams-command-panel,
  body.role-admin .user-roster-dash-panel {
    margin-bottom: 10px !important;
    padding: 10px 12px !important;
    border-radius: 10px !important;
  }

  body.role-admin .stats-metric-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 7px !important;
    margin-bottom: 10px !important;
  }

  body.role-admin .stats-metric-grid .metric-card {
    padding: 8px 10px !important;
    min-height: auto !important;
  }

  body.role-admin .stats-metric-grid .metric-card:last-child {
    grid-column: 1 / -1 !important;
  }

  body.role-admin .admin-teams-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  body.role-admin .team-squad-card {
    padding: 11px 12px !important;
    gap: 10px !important;
    border-radius: 10px !important;
  }

  body.role-admin .team-leaders-strip {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
  }

  body.role-admin .team-members-strip-wrap {
    max-height: 200px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
    padding-right: 4px !important;
  }

  body.role-admin .team-members-grid-wrap {
    grid-template-columns: 1fr !important;
  }

  /* Performance & Telemetry Header Bar & Buttons Mobile Sizing */
  body.role-admin #dash-period-filter-bar {
    padding: 9px 11px !important;
    margin-bottom: 10px !important;
    gap: 8px !important;
  }

  body.role-admin .dash-period-title-group {
    width: 100% !important;
    margin-bottom: 2px !important;
  }

  body.role-admin .dash-period-pills-wrap {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    width: 100% !important;
    gap: 4px !important;
    padding: 2px 0 4px 0 !important;
    -webkit-overflow-scrolling: touch !important;
  }

  body.role-admin .dash-period-pill {
    padding: 4px 9px !important;
    font-size: 0.69rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    height: 27px !important;
  }

  body.role-admin #dash-period-filter-bar > div:last-child {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
  }

  body.role-admin .dash-period-actions-row {
    display: flex !important;
    width: 100% !important;
    gap: 6px !important;
    align-items: center !important;
  }

  body.role-admin #btn-download-period-report,
  body.role-admin #btn-toggle-dash-add-user,
  body.role-admin #btn-open-backups-admin {
    flex: 1 1 auto !important;
    height: 30px !important;
    font-size: 0.72rem !important;
    padding: 0 8px !important;
    justify-content: center !important;
    white-space: nowrap !important;
  }

  body.role-admin:not(.admin-inspecting) #terminal-view-container .banks-and-batches-parallel-row,
  body.role-admin:not(.admin-inspecting) #terminal-view-container #mobile-sticky-top-cluster {
    display: none !important;
  }
}

/* Modal for Bank Portfolio Deep Inspection */
.bank-inspect-batches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.bank-inspect-batch-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.bank-inspect-batch-card:hover {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}



/* ==========================================================================
   TELEPHONY TEAMS & SQUAD HUB: LUXURY OBSIDIAN CARDS WITH POLISHED ALIGNMENTS
   - Responsive multi-column grid (fits wide screens & mobile beautifully)
   - Fixed header alignment: Team name remains on single line with subtle glow
   - Polished buttons: Report, Edit, and Delete aligned with crisp borders & icon spacing
   - Compact status pills with distinct colored indicators and glowing eye inspect icon
   - KPI sub-grid with high-contrast glowing values & refined labels
   - Structured Banks & Batches rows with clear progress tags
   - High-contrast alert logs with precise timestamp alignment
   ========================================================================== */
.admin-teams-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
}

.team-squad-card {
  background: radial-gradient(circle at top left, rgba(15, 28, 52, 0.95), rgba(8, 14, 28, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

/* Row 1: Header - Title, Top Team Dashboard Metrics, and Actions in one horizontal line */
.team-squad-top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
}

.team-squad-title-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 0 1 auto;
  min-width: 0;
}

/* Team KPI Sub-Grid (Expanded width across top header) */
.team-kpi-subgrid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  background: rgba(8, 14, 28, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 10px;
  padding: 8px 16px;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
  flex: 1 1 auto;
  max-width: 820px;
  min-width: 0;
  box-sizing: border-box;
}

.team-kpi-subitem {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2px 4px;
}

.team-kpi-subitem .val {
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.3px;
}

.team-kpi-subitem .lbl {
  font-size: 0.65rem;
  font-weight: 700;
  color: #94a3b8;
  margin-top: 3px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.team-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Row 2: Roster Row - Leaders & Member Agents side-by-side */
.team-squad-roster-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.2fr) minmax(340px, 2.2fr);
  gap: 16px;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
}

.team-roster-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.team-members-strip-wrap {
  max-height: 140px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Row 3: Compact Multi-Column Bank Cards Grid (Shows 12+ banks in compact grid) */
.team-squad-banks-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.team-banks-wrap {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
  gap: 8px !important;
  width: 100% !important;
  max-height: 220px !important;
  overflow-y: auto !important;
  padding-right: 4px !important;
}

/* Compact Bank Card (Identical layout to Image 2, compact for 12+ banks view) */
.team-bank-card-luxury {
  padding: 6px 10px !important;
  border-radius: 8px !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(6, 182, 212, 0.3) !important;
  margin-bottom: 0 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
}

.team-bank-card-luxury:hover {
  background: rgba(15, 23, 42, 0.98) !important;
  border-color: rgba(6, 182, 212, 0.75) !important;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.2) !important;
  transform: translateY(-2px) !important;
}

.team-bank-card-luxury .bank-item-top {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  margin-bottom: 0 !important;
}

.team-bank-card-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  color: #fff !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.team-bank-card-luxury .bank-item-progress-track {
  height: 4px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  border-radius: 2px !important;
  overflow: hidden !important;
  margin: 2px 0 !important;
}

.team-bank-card-luxury .bank-item-progress-bar {
  height: 100% !important;
  background: linear-gradient(90deg, #06b6d4, #10b981) !important;
  border-radius: 2px !important;
}

.team-bank-card-luxury .bank-item-meta {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 0.66rem !important;
  margin-top: 1px !important;
}

/* Row 4: Security Alerts Stream - Small Cards Grid */
.team-squad-alerts-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.team-alerts-strip {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 6px !important;
  max-height: 100px !important;
  overflow-y: auto !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  background: rgba(8, 14, 28, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.07) !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.team-alert-item {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 0.7rem !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  background: rgba(245, 158, 11, 0.08) !important;
  border: 1px solid rgba(245, 158, 11, 0.25) !important;
  gap: 6px !important;
  transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.team-alert-item:hover {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
}

/* ==========================================================================
   MOBILE & TABLET VIEWPORT RESPONSIVENESS (< 900px)
   - Stacks sections cleanly without squishing or cutting off
   - Dashboard KPI items in full-width auto grid
   - Roster leaders & agents full-width stacked
   - Banks in clean vertical column
   - Eliminates card-breaking horizontal overflow
   ========================================================================== */
@media (max-width: 900px) {
  .team-squad-card {
    padding: 12px 14px !important;
    gap: 12px !important;
    overflow-x: hidden !important;
  }

  .team-squad-top-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .team-squad-title-block {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
  }

  .team-squad-title {
    font-size: 1.05rem !important;
  }

  .team-squad-actions {
    width: 100% !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    margin-left: 0 !important;
  }

  .team-squad-actions .btn {
    flex: 1 1 auto !important;
    justify-content: center !important;
    min-width: 0 !important;
    height: 32px !important;
    font-size: 0.72rem !important;
  }

  .team-squad-actions .btn-delete-team {
    flex: 0 0 34px !important;
    max-width: 34px !important;
  }

  .team-kpi-subgrid {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 4px !important;
    padding: 6px 8px !important;
    box-sizing: border-box !important;
  }

  .team-kpi-subitem {
    padding: 2px !important;
    min-width: 0 !important;
  }

  .team-kpi-subitem .val {
    font-size: 0.92rem !important;
  }

  .team-kpi-subitem .lbl {
    font-size: 0.55rem !important;
    letter-spacing: 0 !important;
  }

  .team-kpi-subitem .lbl i {
    display: none !important;
  }

  .team-squad-roster-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .team-roster-section {
    width: 100% !important;
  }

  .team-leaders-strip {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .team-members-strip-wrap {
    max-height: 200px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
    padding-right: 4px !important;
  }

  .team-leader-pill,
  .team-member-pill {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .team-banks-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
    max-height: 240px !important;
  }

  .team-bank-card-luxury {
    width: 100% !important;
  }

  .team-alerts-strip {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    width: 100% !important;
  }

  .team-alert-item {
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

.team-squad-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.8), rgba(192, 132, 252, 0.8), transparent);
  opacity: 0.6;
}

.team-squad-card:hover {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 20px rgba(6, 182, 212, 0.2);
  transform: translateY(-2px);
}

.team-squad-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.team-squad-top-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
  flex: 1 1 auto;
}

.team-squad-title {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 1.12rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.2px;
  line-height: 1.3;
  white-space: normal;
  word-break: break-word;
  overflow: visible;
}

.team-squad-title i {
  flex-shrink: 0;
  transform: translateY(-1px);
}

.team-squad-title span {
  white-space: normal;
  word-break: break-word;
}

.team-squad-desc {
  font-size: 0.76rem;
  color: #94a3b8;
  margin-top: 1px;
  line-height: 1.35;
}

.team-squad-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  margin-left: auto;
}

.team-squad-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
  flex-wrap: wrap;
}

.team-squad-actions .btn {
  height: 29px !important;
  padding: 0 9px !important;
  font-size: 0.73rem !important;
  font-weight: 700 !important;
  border-radius: 7px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
  transition: all 0.18s ease !important;
}

.team-squad-actions .btn-squad-settings {
  background: rgba(147, 51, 234, 0.18) !important;
  border-color: rgba(192, 132, 252, 0.5) !important;
  color: #e9d5ff !important;
}

.team-squad-actions .btn-squad-settings:hover {
  background: rgba(147, 51, 234, 0.35) !important;
  border-color: #c084fc !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.4) !important;
}

.team-squad-actions .btn-delete-team {
  width: 30px !important;
  padding: 0 !important;
  justify-content: center !important;
}

/* Team Leaders & Members Flex Wraps */
.team-leaders-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

.team-leader-pill,
.team-member-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  min-height: 36px;
  height: 36px;
}

.team-pill-name-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
}

.team-pill-stats-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.team-leader-pill {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.22), rgba(168, 85, 247, 0.12));
  border: 1px solid rgba(192, 132, 252, 0.45);
  color: #f3e8ff;
}

.team-leader-pill:hover {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.35), rgba(168, 85, 247, 0.22));
  border-color: #c084fc;
  box-shadow: 0 0 12px rgba(192, 132, 252, 0.3);
}

.team-member-pill {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.38);
  color: #e0f2fe;
}

.team-member-pill:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.32), rgba(6, 182, 212, 0.2));
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.team-pill-eye {
  opacity: 0.5;
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-size: 0.72rem;
}

.team-leader-pill:hover .team-pill-eye,
.team-member-pill:hover .team-pill-eye {
  opacity: 1;
  transform: scale(1.15);
}

/* (Cleaned up duplicate team-kpi-subgrid, team-banks-wrap, team-bank-row, and team-alerts-strip) */

/* Admin does not need Calling Terminal section or terminal navigation tabs */
body.role-admin #tab-terminal,
body.role-admin .nav-tab-group,
body.role-admin #top-search-wrap,
body.role-admin .global-search-bar,
body.role-admin .nav-center {
  display: none !important;
}

body.role-admin:not(.admin-inspecting) #terminal-view-container {
  display: none !important;
}


/* Permanently hide bot promotion banner for all users and specifically Admin */
.bot-promo-card,
body.role-admin .bot-promo-card {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* Metric interactive cards & cursor styling */
.metric-interactive-card {
  cursor: pointer !important;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.metric-interactive-card:hover {
  transform: translateY(-2px);
  border-color: #38bdf8 !important;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.15) !important;
}

/* Hide report issue button for non-authorized regular agents */
/* Report button enabled for agents */
/* body.role-agent #btn-open-report,
body.role-agent #btn-open-report-mob,
body.role-user #btn-open-report,
body.role-user #btn-open-report-mob {
  display: none !important;
}


/* ==========================================================================
   SECURITY ALERTS: LIGHT UP / BLINKING & RESOLVED DISAPPEARING ANIMATIONS
   ========================================================================== */

/* Active unread alert cards in dashboard stream */
.audit-alert-item.alert-pulsing-card {
  border-width: 1.5px;
  animation: alertCardLightUp 1.4s infinite alternate ease-in-out;
}

.audit-alert-item.severity-danger.alert-pulsing-card {
  animation: alertDangerCardLightUp 1.2s infinite alternate ease-in-out;
}

@keyframes alertCardLightUp {
  0% {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.2);
  }
  100% {
    border-color: #f59e0b;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.55), inset 0 0 8px rgba(245, 158, 11, 0.15);
  }
}

@keyframes alertDangerCardLightUp {
  0% {
    border-color: rgba(244, 63, 94, 0.45);
    box-shadow: 0 0 8px rgba(244, 63, 94, 0.25);
  }
  100% {
    border-color: #f43f5e;
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.65), inset 0 0 10px rgba(244, 63, 94, 0.2);
  }
}

/* Blinking Alert Icon */
.alert-icon-blinking {
  animation: iconPulseBlink 1s infinite alternate ease-in-out;
}

@keyframes iconPulseBlink {
  0% { transform: scale(0.96); opacity: 0.8; }
  100% { transform: scale(1.08); opacity: 1; filter: drop-shadow(0 0 6px currentColor); }
}

/* Blinking Pill in the Calling Header Billboard & Mobile Strip */
.alert-icon-pill-btn.alert-blinking-pill {
  animation: pillPulseBlink 1.2s infinite alternate ease-in-out;
}

@keyframes pillPulseBlink {
  0% {
    box-shadow: 0 0 4px rgba(245, 158, 11, 0.3);
  }
  100% {
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.8), inset 0 0 6px rgba(245, 158, 11, 0.4);
    border-color: #f59e0b;
  }
}

.alert-icon-pill-btn.alert-danger.alert-blinking-pill {
  animation: pillDangerPulseBlink 1s infinite alternate ease-in-out;
}

@keyframes pillDangerPulseBlink {
  0% {
    box-shadow: 0 0 6px rgba(244, 63, 94, 0.35);
  }
  100% {
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.85), inset 0 0 8px rgba(244, 63, 94, 0.5);
    border-color: #f43f5e;
  }
}

/* Resolving State: Stop blinking immediately, turn steady emerald green */
.alert-checked-resolving {
  animation: none !important;
  border-color: rgba(16, 185, 129, 0.8) !important;
  background: rgba(16, 185, 129, 0.12) !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4) !important;
  transition: all 0.4s ease;
}

.alert-checked-resolving .alert-icon-blinking {
  animation: none !important;
  color: #34d399 !important;
}

.alert-pill-resolving {
  animation: none !important;
  border-color: #10b981 !important;
  background: rgba(16, 185, 129, 0.25) !important;
  color: #34d399 !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5) !important;
  transition: all 0.4s ease;
}

/* Fading out smoothly and collapsing height before total disappearance */
.alert-fade-out {
  opacity: 0 !important;
  transform: translateY(-8px) scale(0.96) !important;
  max-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  overflow: hidden !important;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* Ensure table layout fits and avoids horizontal scroll */
.table-wrap {
  overflow-x: auto;
}
@media (min-width: 1200px) {
  .leads-table-adaptive {
    table-layout: fixed !important;
    width: 100% !important;
  }
}
.leads-table td.cell-actions {
  padding-left: 2px !important;
  padding-right: 2px !important;
}
.sec-buttons-matrix {
  margin: 0 auto;
}

/* Hide Export PDF button for regular agents assigned to a team */
body.role-team-agent #btn-export-pdf {
  display: none !important;
}

/* ==========================================================================
   TOP QUICK DASHBOARD CONTROL STRIP (Scope Switcher & Period Filter Pills)
   ========================================================================== */
.top-dash-control-strip {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  padding: 6px 12px !important;
  margin-bottom: 8px !important;
  background: rgba(11, 19, 36, 0.95) !important;
  border: 1px solid rgba(56, 189, 248, 0.28) !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
}
.top-dash-strip-left {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}
.top-dash-strip-right {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.top-dash-scope-pills,
.top-dash-period-pills {
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  background: rgba(3, 7, 18, 0.85) !important;
  padding: 3px 4px !important;
  border-radius: 7px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-sizing: border-box !important;
}

.quick-scope-pill,
button.quick-scope-pill,
.quick-period-pill,
button.quick-period-pill {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  outline: none !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  background: rgba(15, 23, 42, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #94a3b8 !important;
  font-family: inherit !important;
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  height: 28px !important;
  padding: 0 10px !important;
  border-radius: 5px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  user-select: none !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

.quick-scope-pill:hover,
button.quick-scope-pill:hover,
.quick-period-pill:hover,
button.quick-period-pill:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
}

.quick-scope-pill.active,
button.quick-scope-pill.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.4), rgba(14, 165, 233, 0.5)) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35) !important;
  font-weight: 700 !important;
}

.quick-period-pill.active,
button.quick-period-pill.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.4), rgba(6, 182, 212, 0.4)) !important;
  border-color: #34d399 !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.35) !important;
  font-weight: 700 !important;
}

body.role-agent .top-dash-control-strip {
  display: none !important;
}

/* =========================================================
   TEAM LEADER MOBILE VIEW RESTRUCTURING
   1. Remove 2-line nav center (Calling Terminal tabs & Global Search)
   2. Show clean Dashboard strip for current day with Team & Self toggle on the right
   3. Make KPI metrics horizontal swipeable & tap to open records modal
   ========================================================= */
@media (max-width: 900px) {
  body.role-team-leader .nav-center {
    display: none !important;
  }

  body:not(.role-agent) .top-dash-control-strip,
  body.role-team-leader .top-dash-control-strip,
  body.role-admin .top-dash-control-strip {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    padding: 6px 10px !important;
    margin-bottom: 6px !important;
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid rgba(56, 189, 248, 0.35) !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  /* Left side: Current Day indicator */
  body:not(.role-agent) .top-dash-control-strip > div:first-child,
  body.role-team-leader .top-dash-control-strip > div:first-child,
  body.role-admin .top-dash-control-strip > div:first-child {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
  }

  /* Right side: Team and Self switcher buttons */
  body:not(.role-agent) .top-dash-control-strip > div:last-child,
  body.role-team-leader .top-dash-control-strip > div:last-child,
  body.role-admin .top-dash-control-strip > div:last-child {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }

  /* Hide the desktop period pills on mobile TL view since it defaults to current day */
  body:not(.role-agent) .top-dash-control-strip .top-dash-period-pills,
  body.role-team-leader .top-dash-control-strip .top-dash-period-pills,
  body.role-admin .top-dash-control-strip .top-dash-period-pills {
    display: none !important;
  }

  /* Show Team & Self buttons right-aligned */
  body:not(.role-agent) .top-dash-scope-pills,
  body.role-team-leader .top-dash-scope-pills,
  body.role-admin .top-dash-scope-pills {
    display: inline-flex !important;
    gap: 4px !important;
    background: rgba(3, 7, 18, 0.8) !important;
    padding: 2px !important;
    border-radius: 6px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  body:not(.role-agent) .quick-scope-pill,
  body.role-team-leader .quick-scope-pill,
  body.role-admin .quick-scope-pill {
    padding: 0 8px !important;
    height: 26px !important;
    font-size: 0.72rem !important;
    gap: 4px !important;
    border-radius: 5px !important;
  }

  /* Display the KPI cards on mobile for Team Leader & Admin as horizontal scrollable cards with tap-to-inspect */
  body:not(.role-agent) .top-dash-kpis,
  body.role-team-leader .top-dash-kpis,
  body.role-admin .top-dash-kpis {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 2px 0 6px 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  body:not(.role-agent) .top-dash-kpis::-webkit-scrollbar,
  body.role-team-leader .top-dash-kpis::-webkit-scrollbar,
  body.role-admin .top-dash-kpis::-webkit-scrollbar {
    display: none !important;
  }

  body:not(.role-agent) .mini-kpi-card,
  body.role-team-leader .mini-kpi-card,
  body.role-admin .mini-kpi-card {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 130px !important;
    flex-shrink: 0 !important;
    padding: 5px 8px !important;
    background: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 8px !important;
    cursor: pointer !important;
  }
  body:not(.role-agent) .mini-kpi-card:active,
  body.role-team-leader .mini-kpi-card:active,
  body.role-admin .mini-kpi-card:active {
    background: rgba(6, 182, 212, 0.15) !important;
    border-color: rgba(6, 182, 212, 0.5) !important;
  }

  body:not(.role-agent) .kpi-ring-wrap,
  body.role-team-leader .kpi-ring-wrap,
  body.role-admin .kpi-ring-wrap {
    width: 24px !important;
    height: 24px !important;
  }
  body:not(.role-agent) .kpi-ring,
  body.role-team-leader .kpi-ring,
  body.role-admin .kpi-ring {
    width: 24px !important;
    height: 24px !important;
  }
  body:not(.role-agent) .ring-icon,
  body.role-team-leader .ring-icon,
  body.role-admin .ring-icon {
    font-size: 0.65rem !important;
  }
  body:not(.role-agent) .mini-kpi-num,
  body.role-team-leader .mini-kpi-num,
  body.role-admin .mini-kpi-num {
    font-size: 0.88rem !important;
  }
  body:not(.role-agent) .mini-kpi-lbl,
  body.role-team-leader .mini-kpi-lbl,
  body.role-admin .mini-kpi-lbl {
    font-size: 0.62rem !important;
  }
}


.desktop-only-inline {
  display: inline-flex;
}
@media (max-width: 900px) {
  .desktop-only-inline {
    display: none !important;
  }
}


/* ==========================================================================
   UNIFIED ADMIN VIEW BUTTON SIZES & CARD ALIGNMENT SYSTEM
   ========================================================================== */

/* Standardize card header actions */
.panel-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

/* Ensure all small buttons in dashboard & cards have identical height, padding, font, and alignment */
.btn-sm,
button.btn-sm,
.team-squad-actions .btn,
.admin-teams-command-panel .btn,
.dash-period-filter-bar .btn,
.agent-mob-actions .btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 0 12px !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  border-radius: 6px !important;
  gap: 6px !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

/* Standardize icon in buttons */
.btn-sm i,
button.btn-sm i {
  font-size: 0.8rem !important;
  line-height: 1 !important;
}

/* Unified Team Card Actions Cluster */
.team-squad-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.team-squad-actions .btn {
  min-width: 78px !important;
}

/* Standardize table action cell stack */
.action-cell-stack {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 5px !important;
  width: 100% !important;
}

.action-cell-stack .btn,
.action-cell-stack .btn-open-act,
.action-cell-stack .btn-batches-act,
.action-cell-stack .btn-emerald {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 105px !important;
  min-width: 105px !important;
  max-width: 105px !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding: 0 10px !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  gap: 6px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

/* Unified inner-batch table action buttons */
.inner-batch-table td:last-child {
  white-space: nowrap !important;
}

.inner-batch-table .btn,
.inner-batch-table .btn-xs {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 26px !important;
  min-height: 26px !important;
  padding: 0 8px !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  border-radius: 5px !important;
  gap: 4px !important;
  box-sizing: border-box !important;
}

/* Unified mobile card action buttons */
.agent-mob-actions {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  margin-top: 10px !important;
  width: 100% !important;
}

.agent-mob-actions .btn {
  flex: 1 !important;
  height: 32px !important;
  padding: 0 8px !important;
  font-size: 0.74rem !important;
}

/* Unified period pills */
.dash-period-pill,
.quick-period-pill {
  height: 28px !important;
  padding: 0 10px !important;
  font-size: 0.74rem !important;
  box-sizing: border-box !important;
}


/* ==========================================================================
   METRIC RECORDS EXPLORER MODAL & DESKTOP STYLING ENHANCEMENT
   Luxury Obsidian Glass, Glowing Borders, Precision Typography & Polished Edges
   ========================================================================== */
.metric-modal-window {
  background: radial-gradient(circle at top left, rgba(14, 27, 49, 0.98), rgba(6, 11, 25, 0.99)) !important;
  border: 1px solid rgba(56, 189, 248, 0.32) !important;
  border-radius: 14px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 25px rgba(6, 182, 212, 0.15) !important;
  overflow: hidden !important;
  padding: 18px 24px !important;
}

.metric-modal-filter-ribbon {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(11, 19, 36, 0.95)) !important;
  border: 1px solid rgba(56, 189, 248, 0.22) !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  margin-bottom: 14px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.metric-ribbon-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  min-width: 0 !important;
}

.metric-ribbon-right {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
}

.metric-count-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(6, 182, 212, 0.15) !important;
  border: 1px solid rgba(6, 182, 212, 0.4) !important;
  border-radius: 6px !important;
  color: #38bdf8 !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  white-space: nowrap !important;
}

.metric-modal-period-group {
  display: inline-flex !important;
  align-items: center !important;
  background: rgba(3, 7, 18, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 7px !important;
  padding: 2px !important;
  gap: 2px !important;
}

.metric-period-pill {
  -webkit-appearance: none !important;
  appearance: none !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  color: #94a3b8 !important;
  font-family: inherit !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  padding: 4px 10px !important;
  border-radius: 5px !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  line-height: 1 !important;
}

.metric-period-pill:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.metric-period-pill.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.4), rgba(6, 182, 212, 0.4)) !important;
  border: 1px solid rgba(52, 211, 153, 0.6) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.3) !important;
}

.metric-filter-select-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 6px !important;
  padding: 2px 8px !important;
  transition: border-color 0.18s ease !important;
}

.metric-filter-select-wrap:focus-within {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.25) !important;
}

.metric-filter-select-wrap select {
  background: transparent !important;
  border: none !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  outline: none !important;
  cursor: pointer !important;
  padding: 3px 0 !important;
  max-width: 170px !important;
}

.metric-filter-select-wrap select option {
  background: #0f172a !important;
  color: #f8fafc !important;
}

.metric-search-wrap {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
}

.metric-search-wrap i {
  position: absolute !important;
  left: 9px !important;
  pointer-events: none !important;
  font-size: 0.72rem !important;
}

.metric-search-wrap input {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 6px !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 0.74rem !important;
  padding: 4px 10px 4px 26px !important;
  outline: none !important;
  width: 170px !important;
  transition: all 0.18s ease !important;
}

.metric-search-wrap input:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25) !important;
  width: 210px !important;
}

.metric-table-container {
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 10px !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  background: rgba(7, 11, 20, 0.75) !important;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.4) !important;
}

.metric-table-container .leads-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.metric-table-container .leads-table thead th {
  background: rgba(11, 19, 36, 0.98) !important;
  border-bottom: 2px solid rgba(6, 182, 212, 0.35) !important;
  color: #94a3b8 !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  padding: 10px 12px !important;
}

.metric-table-container .leads-table tbody td {
  padding: 10px 12px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.metric-table-container .leads-table tbody tr {
  transition: background 0.15s ease !important;
}

.metric-table-container .leads-table tbody tr:hover {
  background: rgba(6, 182, 212, 0.09) !important;
}



/* ==========================================================================
   STREAMLINED MOBILE DASHBOARD, KPI COUNTS & COMPACT STICKY CONTROLS
   1. Header + Controls pinned sticky on mobile: Top Bar, Single-Row Dashboard, Portfolios & Batches
   2. Small gap after the Export PDF / Report controls before leads
   3. Only leads run up and scroll underneath the sticky controls
   4. Dashboard displays icon + Team/Self stacked in 2 lines + running KPI cards
   5. People contact, addresses, and dossiers formatted as beautiful multiline text
   ========================================================================== */
@media (max-width: 900px) {
  /* Ensure the workspace content area handles sticky docking smoothly */
  .workspace-layout {
    position: relative !important;
  }

  .content-area {
    padding: 0 6px 16px 6px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: calc(100vh - 50px) !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Pinned Sticky Control Cluster on Mobile: Stays docked at top while only leads scroll */
  .mobile-sticky-top-cluster {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 90 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    margin: 0 0 3px 0 !important;
    padding: 0 !important;
    border: 1px solid rgba(6, 182, 212, 0.35) !important;
    border-top: none !important;
    border-radius: 0 0 10px 10px !important;
    background: rgba(11, 17, 32, 0.98) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75) !important;
    overflow: visible !important;
  }

  /* Parent quick-top-dash container: compact single horizontal block */
  .quick-top-dash,
  #quick-top-dash {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    visibility: visible !important;
    height: auto !important;
    min-height: 44px !important;
    padding: 2px 6px !important;
    margin: 2px 0 !important;
    gap: 6px !important;
    background: rgba(11, 19, 36, 0.95) !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    width: 100% !important;
  }

  /* Dashboard Icon + Stacked Scope Buttons on Mobile */
  .top-dash-control-strip,
  #quick-top-dash-control-strip,
  body.role-team-leader .top-dash-control-strip,
  body.role-admin .top-dash-control-strip,
  body:not(.role-agent) .top-dash-control-strip {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: row !important;
    flex: 0 0 auto !important;
    gap: 5px !important;
    padding: 2px 6px 2px 2px !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    border-right: 1px solid rgba(56, 189, 248, 0.3) !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    width: auto !important;
  }

  /* Show Dashboard Icon & Hide long text on Mobile */
  .top-dash-strip-left,
  body.role-team-leader .top-dash-strip-left,
  body.role-admin .top-dash-strip-left,
  body:not(.role-agent) .top-dash-strip-left {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
  }

  .top-dash-strip-title {
    display: none !important;
  }

  .top-dash-icon-main {
    font-size: 1.05rem !important;
    color: var(--accent-cyan) !important;
    padding: 2px !important;
  }

  .top-dash-control-strip .top-dash-period-pills {
    display: none !important;
  }

  /* Scope Buttons: Stacked in 2 neat lines directly next to icon */
  .top-dash-strip-right {
    display: flex !important;
    align-items: center !important;
  }

  .top-dash-scope-pills,
  body:not(.role-agent) .top-dash-scope-pills,
  body.role-team-leader .top-dash-scope-pills,
  body.role-admin .top-dash-scope-pills {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    padding: 1px !important;
    background: rgba(3, 7, 18, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 5px !important;
    box-sizing: border-box !important;
    min-width: 52px !important;
  }

  .quick-scope-pill,
  button.quick-scope-pill,
  body:not(.role-agent) .quick-scope-pill,
  body.role-team-leader .quick-scope-pill,
  body.role-admin .quick-scope-pill {
    width: 100% !important;
    height: 17px !important;
    min-height: 17px !important;
    font-size: 0.58rem !important;
    font-weight: 700 !important;
    padding: 0 4px !important;
    margin: 0 !important;
    border-radius: 3px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 3px !important;
    line-height: 1 !important;
  }

  .quick-scope-pill i {
    font-size: 0.52rem !important;
  }

  /* Running KPI Cards in same line next to buttons with smooth horizontal scroll */
  .top-dash-kpis,
  body.role-team-leader .top-dash-kpis,
  body.role-admin .top-dash-kpis,
  body:not(.role-agent) .top-dash-kpis {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: 100% !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 5px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 1px 2px !important;
    margin: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    box-sizing: border-box !important;
    align-items: center !important;
  }

  .top-dash-kpis::-webkit-scrollbar {
    display: none !important;
  }

  /* Mini KPI Cards */
  .mini-kpi-card,
  body.role-team-leader .mini-kpi-card,
  body.role-admin .mini-kpi-card,
  body:not(.role-agent) .mini-kpi-card {
    display: inline-flex !important;
    visibility: visible !important;
    align-items: center !important;
    gap: 5px !important;
    min-width: 95px !important;
    flex-shrink: 0 !important;
    padding: 2px 6px !important;
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
  }

  .mini-kpi-card .kpi-ring-wrap {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
  }

  .mini-kpi-card .kpi-ring-wrap .ring-icon {
    font-size: 0.55rem !important;
  }

  .mini-kpi-card .mini-kpi-info {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.05 !important;
  }

  .mini-kpi-card .mini-kpi-num {
    font-size: 0.74rem !important;
    font-weight: 800 !important;
  }

  .mini-kpi-card .mini-kpi-lbl {
    font-size: 0.52rem !important;
    white-space: nowrap !important;
    color: #94a3b8 !important;
  }

  /* Clean Spacing Across Control Cards */
  .mobile-alerts-horizontal-card {
    padding: 2px 6px !important;
    margin: 2px 0 !important;
    min-height: 26px !important;
  }

  .mob-alerts-single-line {
    min-height: 24px !important;
  }

  .dash-distinct-card {
    padding: 3px 5px !important;
    margin-bottom: 2px !important;
  }

  .dash-banks-header-row,
  .dash-batches-header-row {
    padding: 1px 2px !important;
    margin-bottom: 1px !important;
  }

  .bank-search-input {
    padding: 2px 6px !important;
    font-size: 0.70rem !important;
  }

  .batch-category-tabs-bar {
    padding: 2px 4px !important;
    margin: 2px 0 0 0 !important;
  }

  .category-tabs-group {
    gap: 3px !important;
  }

  .cat-tab-btn {
    padding: 3px 6px !important;
    font-size: 0.65rem !important;
  }

  /* Distinct Gap Below Export PDF & Action Controls Before Lead Cards Begin */
  .batch-hero-bar {
    padding: 4px 6px !important;
    margin: 2px 0 0 0 !important;
    border-radius: 0 0 8px 8px !important;
  }

  /* The gap between the sticky control cluster and lead records (reduced to 1/3) */
  .table-wrap,
  #leads-table,
  .leads-table tbody {
    margin-top: 2px !important;
  }

  /* Multiline Formatting for Mobile Leads & Modal Inspection */
  .sec-mobile-card {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .sec-company-name {
    font-size: 0.94rem !important;
    font-weight: 800 !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  .contact-person-entry {
    display: flex !important;
    align-items: flex-start !important;
    gap: 5px !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  .sec-company-addr {
    display: flex !important;
    align-items: flex-start !important;
    gap: 5px !important;
    font-size: 0.72rem !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    word-break: break-word !important;
    color: #94a3b8 !important;
  }

  /* Metric Inspection Modal on Small Screens: Multiline support and clear rows */
  .metric-modal-window {
    width: 98% !important;
    height: 94vh !important;
    max-height: 94vh !important;
    padding: 10px 10px !important;
  }

  .metric-modal-filter-ribbon {
    padding: 6px 8px !important;
    gap: 6px !important;
    margin-bottom: 8px !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .metric-ribbon-left {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .metric-modal-period-group {
    flex-wrap: wrap !important;
    max-width: 100% !important;
  }

  #metric-category-filters {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 4px 6px !important;
  }

  .metric-cat-pill {
    white-space: normal !important;
    font-size: 0.68rem !important;
    padding: 3px 6px !important;
    flex-shrink: 0 !important;
  }

  .metric-filter-select-wrap {
    max-width: 100% !important;
    flex: 1 1 100% !important;
  }

  .metric-filter-select-wrap select {
    width: 100% !important;
    max-width: 100% !important;
  }

  .metric-modal-period-group button {
    padding: 3px 6px !important;
    font-size: 0.66rem !important;
  }

  .metric-search-wrap {
    width: 100% !important;
    max-width: 100% !important;
  }

  .metric-search-wrap input {
    width: 100% !important;
    font-size: 0.70rem !important;
  }

  .metric-table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .metric-table-container .leads-table {
    min-width: 720px !important;
    width: 100% !important;
    table-layout: auto !important;
  }

  .metric-table-container .leads-table thead th {
    padding: 6px 8px !important;
    font-size: 0.68rem !important;
    white-space: nowrap !important;
  }

  .metric-table-container .leads-table tbody td {
    padding: 6px 8px !important;
    font-size: 0.72rem !important;
    vertical-align: top !important;
  }

  .metric-record-company {
    font-weight: 700 !important;
    color: #ffffff !important;
    line-height: 1.3 !important;
    white-space: normal !important;
    word-break: break-word !important;
    max-width: 190px !important;
  }

  .metric-record-addr {
    font-size: 0.68rem !important;
    color: #94a3b8 !important;
    line-height: 1.25 !important;
    margin-top: 3px !important;
    white-space: normal !important;
    word-break: break-word !important;
    max-width: 190px !important;
  }

  .metric-record-contact {
    line-height: 1.3 !important;
    white-space: normal !important;
    word-break: break-word !important;
    max-width: 160px !important;
  }

  /* Regular agents (non-privileged) keep KPI strip hidden on mobile so screen is clean for dialing */
  body.role-agent .top-dash-control-strip,
  body.role-agent .top-dash-kpis,
  body.role-agent #quick-top-dash {
    display: none !important;
  }
}

/* ==========================================================================
   USER DIRECTORY MODAL EXPANDED & REFINED TABLE
   ========================================================================== */
#users-modal .modal-content {
  width: 1380px !important;
  max-width: 97vw !important;
}

#admin-users-table th, #admin-users-table td {
  white-space: nowrap !important;
}

/* ==========================================================================
   TEAM MANAGE MODAL OBSIDIAN POLISH (NO DOUBLE SCROLLBARS)
   ========================================================================== */
#team-manage-modal .modal-content {
  max-width: 660px !important;
  width: 95vw !important;
}

#team-manage-modal .modal-body {
  max-height: 72vh !important;
  overflow-y: auto !important;
  padding: 14px 18px !important;
}

#manage-team-leaders-list,
#manage-team-members-list {
  max-height: 155px !important;
  overflow-y: auto !important;
  padding-right: 4px !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(6, 182, 212, 0.4) transparent !important;
}

#manage-team-leaders-list::-webkit-scrollbar,
#manage-team-members-list::-webkit-scrollbar {
  width: 5px !important;
}

#manage-team-leaders-list::-webkit-scrollbar-thumb,
#manage-team-members-list::-webkit-scrollbar-thumb {
  background: rgba(6, 182, 212, 0.4) !important;
  border-radius: 4px !important;
}

.tl-modal-agent-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 7px 12px !important;
  min-height: 36px !important;
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 7px !important;
  cursor: pointer !important;
  transition: all 0.18s ease !important;
  user-select: none !important;
}

.tl-modal-agent-item:hover {
  background: rgba(168, 85, 247, 0.12) !important;
  border-color: rgba(168, 85, 247, 0.4) !important;
}

.tl-modal-agent-item.selected {
  background: rgba(168, 85, 247, 0.22) !important;
  border-color: #a855f7 !important;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.25) !important;
}

.tl-modal-agent-checkbox {
  width: 16px !important;
  height: 16px !important;
  accent-color: #a855f7 !important;
  cursor: pointer !important;
}

/* ==========================================================================
   ENHANCED 3-TIER DISPOSITION DIALOG WINDOW (MOBILE & PC)
   ========================================================================== */
#custom-dialog-modal .dialog-card {
  width: 540px !important;
  max-width: 95vw !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
}

#custom-dialog-modal .dialog-body-wrap {
  display: flex !important;
  gap: 14px !important;
  align-items: flex-start !important;
  padding: 6px 0 12px 0 !important;
}

#custom-dialog-modal .dialog-input-wrap {
  width: 100% !important;
  box-sizing: border-box !important;
}

#custom-dialog-modal .dialog-input-wrap select,
#custom-dialog-modal .dialog-input-wrap textarea,
#custom-dialog-modal .dialog-input-wrap input {
  width: 100% !important;
  box-sizing: border-box !important;
  border-radius: 8px !important;
}

@media (max-width: 600px) {
  #custom-dialog-modal .dialog-card {
    width: 96vw !important;
    padding: 14px 14px !important;
    max-height: 92vh !important;
  }
  #custom-dialog-modal .dialog-body-wrap {
    flex-direction: column !important;
    gap: 8px !important;
  }
  #custom-dialog-modal .dialog-icon-col {
    display: none !important;
  }
  #custom-dialog-modal .dialog-text-col {
    width: 100% !important;
  }
}


/* Modern Obsidian Outline Buttons */
.btn-outline,
.btn-outline-cyan {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(6, 182, 212, 0.08) !important;
  border: 1px solid rgba(56, 189, 248, 0.38) !important;
  color: #38bdf8 !important;
  padding: 4px 11px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  user-select: none;
}
.btn-outline:hover,
.btn-outline-cyan:hover {
  background: rgba(6, 182, 212, 0.22) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35) !important;
  transform: translateY(-1px);
}
.btn-outline:active,
.btn-outline-cyan:active {
  transform: translateY(0);
  background: rgba(6, 182, 212, 0.3) !important;
}

/* Dedicated Audit Preset Filter Buttons */
.audit-preset-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  background: rgba(15, 23, 42, 0.8) !important;
  border: 1px solid rgba(56, 189, 248, 0.3) !important;
  color: #94a3b8 !important;
  padding: 6px 14px !important;
  border-radius: 6px !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  user-select: none !important;
}
.audit-preset-btn:hover {
  background: rgba(6, 182, 212, 0.15) !important;
  border-color: #38bdf8 !important;
  color: #f1f5f9 !important;
  transform: translateY(-1px) !important;
}
.audit-preset-btn.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.4), rgba(14, 165, 233, 0.5)) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.45) !important;
  font-weight: 700 !important;
}

/* Polished PC & Desktop Styles for Shift Audit Modal */
.shift-audit-card {
  max-width: 600px !important;
  width: 95% !important;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.98), rgba(10, 15, 30, 0.99)) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  border-radius: 14px !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 24px rgba(6, 182, 212, 0.22) !important;
  overflow: hidden !important;
}

.shift-audit-header {
  padding: 18px 22px !important;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2) !important;
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.12), rgba(15, 23, 42, 0.3)) !important;
}

.shift-audit-header-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(6, 182, 212, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 14px rgba(6, 182, 212, 0.3);
}

.shift-audit-section {
  margin-bottom: 18px;
}

.shift-audit-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.shift-audit-btn-group {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 640px) {
  .shift-audit-btn-group {
    grid-template-columns: repeat(2, 1fr);
  }
}

.shift-audit-btn-group .audit-preset-btn {
  padding: 8px 10px !important;
  font-size: 0.77rem !important;
  width: 100% !important;
  text-align: center !important;
}

.shift-audit-custom-fields {
  background: rgba(15, 23, 42, 0.7);
  padding: 14px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  margin-top: 10px;
}

.shift-audit-select {
  width: 100% !important;
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(56, 189, 248, 0.35) !important;
  color: #f1f5f9 !important;
  padding: 9px 12px !important;
  border-radius: 8px !important;
  font-size: 0.82rem !important;
  transition: all 0.2s ease !important;
}

.shift-audit-select:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35) !important;
  outline: none !important;
}

.shift-audit-notice-card {
  padding: 12px 14px;
  background: rgba(6, 182, 212, 0.08);
  border-left: 3px solid #06b6d4;
  border-radius: 8px;
  border-top: 1px solid rgba(6, 182, 212, 0.15);
  border-right: 1px solid rgba(6, 182, 212, 0.15);
  border-bottom: 1px solid rgba(6, 182, 212, 0.15);
}

/* Date Picker Dark Mode & Calendar Icon Support */
input[type="date"],
.date-picker-input {
  color-scheme: dark !important;
  cursor: pointer !important;
}

input[type="date"]::-webkit-calendar-picker-indicator,
.date-picker-input::-webkit-calendar-picker-indicator {
  cursor: pointer !important;
  filter: invert(0.8) sepia(100%) saturate(300%) hue-rotate(150deg) brightness(1.2) !important;
  opacity: 0.9 !important;
  padding: 3px !important;
  transition: transform 0.15s ease !important;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
.date-picker-input::-webkit-calendar-picker-indicator:hover {
  transform: scale(1.15) !important;
  opacity: 1 !important;
}



