: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;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.badge-sm { padding: 2px 7px; font-size: 0.65rem; }
.badge-outline { border: 1px solid var(--border-glass); color: var(--text-muted); background: rgba(255, 255, 255, 0.03); }
.badge-accent { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); border: 1px solid rgba(6, 182, 212, 0.35); }
.badge-cyan { background: rgba(6, 182, 212, 0.2); color: #22d3ee; }
.badge-info { background: rgba(56, 189, 248, 0.18); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.badge-success { background: rgba(16, 185, 129, 0.18); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.18); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger { background: rgba(244, 63, 94, 0.18); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.3); }

/* 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: 12px; background: transparent; border: none; color: var(--text-dim); cursor: pointer; padding: 6px; font-size: 0.95rem;
}
.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 */
#app-screen { display: flex; flex-direction: column; height: 100vh; }
.top-nav {
  height: 56px;
  background: rgba(11, 17, 32, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}
.nav-left { display: flex; align-items: center; gap: 14px; }
.nav-logo { width: 30px; height: 30px; }
.nav-title { font-size: 1.15rem; font-weight: 800; }
.nav-title .highlight { color: var(--accent-cyan); }
.nav-sub { font-size: 0.72rem; color: var(--text-dim); margin-left: 6px; text-transform: uppercase; letter-spacing: 0.5px; }

.nav-center { flex: 1; display: flex; align-items: center; justify-content: center; gap: 16px; margin: 0 20px; }
.nav-tab-group {
  display: flex;
  background: rgba(0, 0, 0, 0.5);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border-glass);
}
.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.nav-tab.active {
  background: rgba(6, 182, 212, 0.18);
  color: #fff;
  border: 1px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.25);
}
.nav-tab:hover:not(.active) { color: #fff; background: rgba(255, 255, 255, 0.05); }

.global-search-bar {
  display: flex;
  align-items: center;
  background: rgba(2, 6, 23, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: 20px;
  padding: 5px 14px;
  gap: 10px;
  width: 320px;
}
.global-search-bar:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.25);
}
.global-search-bar input {
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 0.82rem;
  width: 100%;
}

.nav-right { display: flex; align-items: center; gap: 10px; }
.bot-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: #38bdf8;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}
.bot-pill:hover {
  background: var(--accent-cyan);
  color: #fff;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.4);
}
.user-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-glass);
  font-size: 0.82rem;
  font-weight: 600;
}

/* Sidebar & Workspace */
.workspace-layout { display: flex; flex: 1; overflow: hidden; }
.sidebar {
  width: 300px;
  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: 10px;
  background: rgba(11, 17, 32, 0.85);
  border: 1px solid var(--border-glass);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
}
.bank-group-item:hover {
  border-color: rgba(6, 182, 212, 0.45);
}
.bank-group-item.bank-active {
  border-color: rgba(6, 182, 212, 0.6);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.15);
}
.bank-group-header {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  background: rgba(15, 23, 42, 0.7);
  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: 8px 10px;
  background: rgba(7, 11, 20, 0.75);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0 0 9px 9px;
}
.bank-group-item.open .bank-batches-sublist {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* Individual Batch Card Inside Bank Group */
.batch-card {
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-glass);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.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;
}
.batch-code-col {
  display: flex;
  align-items: center;
  gap: 6px;
}
.batch-folder-icon {
  font-size: 0.76rem;
  color: var(--accent-cyan);
}
.batch-code-title {
  font-size: 0.82rem;
  color: #fff;
  letter-spacing: 0.3px;
}
.batch-status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}
.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.25);
  color: #fff;
  border: 1px solid var(--accent-cyan);
  box-shadow: 0 0 6px 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;
  justify-content: space-between;
  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: hidden;
  padding: 16px 20px;
}
#terminal-view-container { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.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; }
.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 {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.22), rgba(15, 23, 42, 0.95));
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.35);
}
.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; }

.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;
  transition: all 0.15s;
}
.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: 4px;
  width: 100%;
  max-width: 220px;
}

.btn-matrix-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 6px;
  border-radius: 6px;
  font-size: 0.72rem;
  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: 10px 12px;
  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: 9px 12px;
  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-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); }

/* 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.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}
.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: 820px; }
.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-only-btn {
  display: none;
}

@media (max-width: 900px) {
  .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 */
  .top-nav {
    padding: 0 10px;
    height: auto;
    min-height: 54px;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 6px;
    padding-bottom: 6px;
  }
  .nav-left {
    gap: 8px;
  }
  .nav-center {
    order: 3;
    width: 100%;
    margin: 4px 0 0 0;
    justify-content: space-between;
    gap: 8px;
  }
  .nav-tab-group {
    flex: 1;
    justify-content: center;
  }
  .global-search-bar {
    flex: 1;
    width: auto;
    max-width: 220px;
  }
  .nav-tab {
    padding: 5px 8px;
    font-size: 0.74rem;
  }
  .nav-right {
    margin-left: auto;
    gap: 6px;
  }
  .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;
  }
  .user-pill {
    padding: 4px 8px;
  }
  .user-pill #nav-username {
    display: none;
  }

  /* Drawer Sidebar on Mobile */
  .workspace-layout {
    position: relative;
  }
  .sidebar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 280px;
    z-index: 99;
    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.7);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .content-area {
    padding: 10px 8px;
    overflow-y: auto;
  }

  /* Quick Top Mini-Dashboard on Mobile */
  .quick-top-dash {
    padding: 10px 12px;
    margin-bottom: 10px;
    gap: 8px;
  }
  .top-dash-kpis {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-top: 2px;
  }
  .mini-kpi-card {
    padding: 6px 8px;
    gap: 6px;
  }
  .kpi-ring-wrap {
    width: 32px;
    height: 32px;
  }
  .mini-kpi-num {
    font-size: 1rem;
  }
  .mini-kpi-lbl {
    font-size: 0.65rem;
  }

  /* Bank Portfolio Strip on Mobile */
  .top-dash-banks {
    gap: 8px;
    padding-top: 6px;
  }
  .dash-banks-title {
    font-size: 0.68rem;
  }
  .dash-banks-grid-carousel {
    display: grid;
    grid-template-rows: repeat(2, auto);
    grid-auto-flow: column;
    grid-auto-columns: minmax(160px, max-content);
    gap: 8px 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }
  .bank-circle-pill {
    padding: 3px 8px;
    gap: 6px;
  }
  .bank-pill-name {
    font-size: 0.7rem;
  }
  .bank-pill-pct {
    font-size: 0.68rem;
  }
  .bank-pill-rem {
    font-size: 0.65rem;
  }
  .view-header.batch-hero-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
  }
  .batch-actions-area {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }
  .batch-actions-area .btn {
    flex: 1;
    min-width: 100px;
    justify-content: center;
    font-size: 0.75rem;
    padding: 6px 8px;
  }

  /* Top Dashboard KPI Grid on Mobile */
  .top-dash-kpis {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  .mini-kpi-card {
    padding: 6px 8px;
    gap: 6px;
  }
  .kpi-ring-wrap {
    width: 32px;
    height: 32px;
  }
  .mini-kpi-num {
    font-size: 1rem;
  }
  .mini-kpi-lbl {
    font-size: 0.65rem;
  }

  /* Category Tabs Bar - 2x2 Clean Grid on Mobile */
  .batch-category-tabs-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 10px;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;
  }
  .category-tabs-group {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
    width: 100% !important;
    overflow-x: visible !important;
    padding-bottom: 0 !important;
    flex-wrap: wrap !important;
  }
  .cat-tab-btn {
    width: 100% !important;
    justify-content: space-between !important;
    padding: 6px 8px !important;
    font-size: 0.72rem !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
  }
  .cat-tab-badge {
    padding: 1px 5px !important;
    font-size: 0.66rem !important;
    margin-left: 4px !important;
  }
  .category-filter-search {
    width: 100%;
    min-width: 0;
  }

  /* Data Table on Mobile - Switches to 3-Section Unified Dossier View */
  .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; }

  .leads-table th {
    padding: 8px 6px;
    font-size: 0.7rem;
    white-space: nowrap;
  }
  .leads-table td {
    padding: 8px 6px;
    vertical-align: middle;
  }
  .cell-chk { width: 36px !important; }
  .cell-company { min-width: 130px; }
  .cell-contact { min-width: 110px; }
  .cell-actions { min-width: 155px; }

  .sec-company-name {
    font-size: 0.82rem;
    font-weight: 700;
  }
  .sec-rev-badge {
    font-size: 0.68rem;
    padding: 1px 5px;
  }
  .sec-company-addr {
    font-size: 0.68rem;
    line-height: 1.2;
    display: flex !important;
  }
  .sec-contact-name {
    font-size: 0.76rem;
    font-weight: 600;
  }
  .sec-phone-pill {
    font-size: 0.72rem;
    padding: 3px 6px;
  }

  /* 6-Button Matrix Touch Sizing on Mobile */
  .sec-buttons-matrix {
    max-width: 160px;
    gap: 3px;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
  }
  .btn-matrix-act {
    padding: 4px 2px;
    font-size: 0.65rem;
    border-radius: 4px;
    gap: 2px;
  }
}
