/* ==========================================
   DEBT CONNECT - STYLING DESIGN SYSTEM
   Theme: Obsidian Dark & Glowing Neon
   ========================================== */

:root {
  /* Colors */
  --color-bg: #070709;
  --color-surface: #0f0f13;
  --color-container: #16161c;
  --color-outline: rgba(255, 255, 255, 0.08);
  
  --neon-green: #39FF14;
  --neon-green-glow: rgba(57, 255, 20, 0.25);
  
  --neon-red: #ff007f;
  --neon-red-glow: rgba(255, 0, 127, 0.25);
  
  --neon-yellow: #ffea00;
  --neon-yellow-glow: rgba(255, 234, 0, 0.25);
  
  --neon-blue: #00e5ff;
  --neon-blue-glow: rgba(0, 229, 255, 0.25);
  
  --neon-magenta: #ff00ff;
  --neon-magenta-glow: rgba(255, 0, 255, 0.25);
  
  --text-white: #ffffff;
  --text-gray: #8f8f99;
  --text-black: #070709;
  
  /* Fonts */
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  /* Layout Spaces */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--text-white);
  line-height: 1.5;
  overflow-x: hidden;
  height: 100vh;
  width: 100vw;
}

/* Allow text selection for inputs and documents */
input, select, textarea, .data-table, [user-select="text"] {
  user-select: text;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--color-container);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-gray);
}

/* ==========================================
   CORE UTILITIES
   ========================================== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-light { font-weight: 300; }
.font-black { font-weight: 900; }
.neon-green-text { color: var(--neon-green); }
.neon-red-text { color: var(--neon-red); }
.neon-yellow-text { color: var(--neon-yellow); }
.neon-blue-text { color: var(--neon-blue); }
.margin-bottom-sm { margin-bottom: 8px; }
.margin-bottom-md { margin-bottom: 16px; }
.margin-top-sm { margin-top: 8px; }
.margin-top-md { margin-top: 16px; }
.margin-top-lg { margin-top: 32px; }
.flex-row-between { display: flex; justify-content: space-between; align-items: center; }
.flex-row-between-wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.flex-row-align-gap { display: flex; align-items: center; gap: 8px; }
.flex-column-gap { display: flex; flex-direction: column; gap: 12px; }
.overflow-x { overflow-x: auto; }
.scroll-y { overflow-y: auto; }

/* ==========================================
   GLASSMORPHISM COMPONENTS & CARDS
   ========================================== */
.glass-card {
  background: var(--color-surface);
  border: 1px solid var(--color-outline);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

/* Custom Highlight Card */
.highlight-card {
  background: white;
  border: none;
}
.highlight-card .label { color: #555 !important; }
.highlight-card .desc { color: #888 !important; }
.shadow-green { box-shadow: 0 0 20px var(--neon-green-glow) !important; }
.shadow-blue { box-shadow: 0 0 20px var(--neon-blue-glow) !important; }
.text-black-50 { color: rgba(0, 0, 0, 0.6) !important; }

/* Border variations */
.border-red { border-color: rgba(255, 0, 127, 0.2) !important; }
.border-red:hover { border-color: rgba(255, 0, 127, 0.4) !important; }

/* ==========================================
   BUTTONS & CONTROLS
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 20px;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  height: 48px;
}

.btn-primary {
  background-color: var(--neon-green);
  color: var(--text-black);
  box-shadow: 0 4px 14px var(--neon-green-glow);
}
.btn-primary:hover {
  background-color: #4fff30;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(57, 255, 20, 0.4);
}
.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  background-color: var(--color-surface);
  color: var(--text-white);
  border: 1px solid var(--color-outline);
}
.btn-secondary:hover {
  background-color: var(--color-container);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background-color: var(--neon-red);
  color: var(--text-white);
  box-shadow: 0 4px 14px var(--neon-red-glow);
}
.btn-danger:hover {
  background-color: #ff2b94;
  box-shadow: 0 6px 20px rgba(255, 0, 127, 0.4);
}

.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 11px;
  border-radius: 8px;
}
.btn-xs {
  height: 28px;
  padding: 0 10px;
  font-size: 10px;
  border-radius: 6px;
}
.btn-full {
  width: 100%;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-gray);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.btn-icon:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-white);
}

/* ==========================================
   FORM INPUTS
   ========================================== */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  width: 100%;
}

.input-group label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-gray);
  display: flex;
  align-items: center;
  gap: 4px;
}
.input-group label span { font-size: 14px; }

.input-group input, .input-group select, .input-group textarea {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background-color: var(--color-container);
  border: 1px solid var(--color-outline);
  border-radius: 12px;
  color: var(--text-white);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
  border-color: var(--neon-green);
  box-shadow: 0 0 0 1px var(--neon-green-glow);
}

.password-input-wrapper {
  position: relative;
  width: 100%;
}
.password-input-wrapper input {
  padding-right: 48px;
}
.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-gray);
  cursor: pointer;
  height: 24px;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-row {
  display: flex;
  gap: 12px;
}
.form-row.flex-3-1 > div:first-child { flex: 3; }
.form-row.flex-3-1 > div:last-child { flex: 1; }

.form-section {
  border-bottom: 1px solid var(--color-outline);
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.form-section h4 {
  font-family: var(--font-title);
  color: var(--neon-green);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* ==========================================
   LOADING & OVERLAY SCREENS
   ========================================== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: rgba(7, 7, 9, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.neon-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--color-container);
  border-top-color: var(--neon-green);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 10px var(--neon-green-glow);
}

.loading-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-gray);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Passcode Lock */
.passcode-card {
  width: 320px;
  text-align: center;
  padding: 24px;
}
.passcode-card h2 { font-family: var(--font-title); font-weight: 800; font-size: 20px; margin-top: 12px; }
.passcode-card p { font-size: 13px; color: var(--text-gray); margin-bottom: 20px; }
.large { font-size: 36px; }

.passcode-dots {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}
.passcode-dots .dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--color-outline);
  transition: all 0.15s ease;
}
.passcode-dots .dot.filled {
  background-color: var(--neon-green);
  border-color: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
}

.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.numpad button {
  height: 56px;
  background-color: var(--color-container);
  border: 1px solid var(--color-outline);
  color: var(--text-white);
  border-radius: 12px;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
}
.numpad button:active {
  background-color: var(--color-outline);
}
.numpad button.empty {
  visibility: hidden;
}
.numpad button.action-btn {
  background: transparent;
  border: none;
  color: var(--text-gray);
}
.numpad button.action-btn:active { color: white; }

/* ==========================================
   AUTHENTICATION SCREEN (LOGIN)
   ========================================== */
.auth-wrapper {
  position: fixed;
  inset: 0;
  background-color: var(--color-bg);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.auth-wrapper.active {
  opacity: 1;
  pointer-events: auto;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.auth-header {
  text-align: center;
}
.auth-header h1 {
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 900;
  color: var(--neon-green);
  letter-spacing: 2px;
}
.auth-header .subtitle {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-gray);
}

.auth-card h3 {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 4px;
}

.badge-gestor {
  background-color: rgba(57, 255, 20, 0.08);
  border: 1px solid var(--neon-green);
  color: var(--neon-green);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 24px;
}

.error-text {
  color: var(--neon-red);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}
.success-text {
  color: var(--neon-green);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
}

.request-access-link {
  color: var(--neon-green);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  margin-top: 16px;
  display: inline-block;
  transition: opacity 0.2s ease;
}
.request-access-link:hover { opacity: 0.8; }

.btn-server-config {
  background: transparent;
  border: none;
  color: var(--text-gray);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: 8px;
  transition: color 0.2s ease;
}
.btn-server-config:hover { color: white; }

.warning-card {
  background: #2c0a14;
  border: 1px solid var(--neon-red);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.warning-card:hover { background: #3b0e1b; }
.warning-icon { color: var(--neon-red); }
.warning-info h4 { font-size: 12px; font-weight: 700; color: white; }
.warning-info p { font-size: 10px; color: var(--text-gray); }

/* Buttons spinner overlay */
.btn-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0,0,0,0.1);
  border-top-color: var(--text-black);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ==========================================
   MAIN APP ROUTING & LAYOUT (DESKTOP)
   ========================================== */
.app-layout {
  display: flex;
  width: 100vw;
  height: 100vh;
}

/* Desktop Sidebar Hidden on Mobile by default */
.desktop-sidebar {
  display: none;
  width: 280px;
  background-color: var(--color-surface);
  border-right: 1px solid var(--color-outline);
  padding: 24px;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-brand h2 {
  font-family: var(--font-title);
  font-weight: 900;
  letter-spacing: 1px;
}
.sidebar-brand .badge {
  background-color: var(--color-container);
  border: 1px solid var(--color-outline);
  color: var(--text-gray);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 4px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 48px;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  background: transparent;
  border: none;
  color: var(--text-gray);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}
.nav-item span.material-icons { font-size: 20px; }

.nav-item:hover {
  background: rgba(255,255,255,0.02);
  color: white;
}
.nav-item.active {
  background: rgba(57, 255, 20, 0.05);
  color: var(--neon-green);
  border-left: 3px solid var(--neon-green);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--color-outline);
  padding-top: 16px;
  margin-bottom: 16px;
}
.user-profile .avatar { font-size: 36px; color: var(--text-gray); }
.profile-info h4 { font-size: 13px; font-weight: 700; color: white; }
.profile-info p { font-size: 11px; color: var(--text-gray); }

.btn-logout {
  background: transparent;
  border: none;
  color: var(--neon-red);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}
.btn-logout:hover { background-color: rgba(255, 0, 127, 0.05); }

/* Content Viewport */
.content-viewport {
  flex-grow: 1;
  height: 100%;
  overflow-y: auto;
  padding: 24px;
  padding-bottom: 96px; /* spacing for mobile nav */
}

.app-screen {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
}
.app-screen.active {
  display: block;
}

.screen-header {
  margin-bottom: 24px;
}
.screen-header h2 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 22px;
}
.screen-desc {
  font-size: 12px;
  color: var(--text-gray);
}

/* ==========================================
   MOBILE BAR COMPONENTS
   ========================================== */
.mobile-header {
  display: flex;
  height: 60px;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-outline);
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-top: var(--safe-top);
  height: calc(60px + var(--safe-top));
}
.mobile-header .header-logo h3 {
  font-family: var(--font-title);
  font-weight: 900;
  letter-spacing: 0.5px;
}
.header-actions {
  display: flex;
  gap: 8px;
  position: relative;
}

.badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--neon-red);
  box-shadow: 0 0 6px var(--neon-red);
}

/* Bottom Nav bar */
.mobile-navbar {
  display: flex;
  height: 68px;
  background-color: var(--color-bg);
  border-top: 1px solid var(--color-outline);
  align-items: center;
  justify-content: space-around;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-bottom: var(--safe-bottom);
  height: calc(68px + var(--safe-bottom));
}

.nav-tab {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-gray);
  cursor: pointer;
  flex-grow: 1;
  height: 100%;
}
.nav-tab span.material-icons { font-size: 22px; transition: color 0.2s; }
.tab-label { font-size: 9px; font-weight: 700; margin-top: 2px; letter-spacing: 0.3px; }

.nav-tab:hover { color: white; }
.nav-tab.active {
  color: var(--neon-green);
  text-shadow: 0 0 10px rgba(57,255,20,0.1);
  position: relative;
}
.nav-tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 3px;
  background-color: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
  border-radius: 0 0 2px 2px;
}

/* Padding corrections when Mobile header is active */
@media (max-width: 767px) {
  .content-viewport {
    padding-top: calc(76px + var(--safe-top));
  }
}

/* ==========================================
   DASHBOARD PAGES & TABS
   ========================================== */
.dashboard-tabs {
  display: flex;
  background-color: var(--color-container);
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
  margin-top: 12px;
  width: fit-content;
}
.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-gray);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.tab-btn.active {
  background-color: var(--color-bg);
  color: var(--neon-green);
}

.tab-content {
  display: none;
  margin-top: 20px;
}
.tab-content.active {
  display: flex;
  flex-direction: column;
}

/* Alert Banner */
.alert-banner {
  background: rgba(0, 127, 255, 0.08);
  border: 1px solid var(--neon-blue);
  color: white;
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  margin-bottom: 16px;
  animation: pulse-border 2s infinite;
}
.alert-banner span.material-icons { color: var(--neon-blue); }
.alert-banner #pending-loans-text { flex-grow: 1; font-size: 12px; font-weight: 600; }
.alert-banner .arrow { font-size: 18px; color: var(--text-gray); }

@keyframes pulse-border {
  0% { border-color: rgba(0, 127, 255, 0.3); }
  50% { border-color: var(--neon-blue); }
  100% { border-color: rgba(0, 127, 255, 0.3); }
}

/* Cascading Filters */
.filters-container h4 {
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-gray);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.filters-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 576px) {
  .filters-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .filters-grid { grid-template-columns: repeat(4, 1fr); }
}

.filters-grid select {
  height: 40px;
  background-color: var(--color-container);
  border: 1px solid var(--color-outline);
  color: var(--text-white);
  border-radius: 8px;
  padding: 0 10px;
  outline: none;
  font-family: var(--font-body);
  font-size: 13px;
}
.filters-grid select:focus { border-color: var(--neon-green); }

.section-title {
  margin: 16px 0;
  border-bottom: 1px solid var(--color-outline);
  padding-bottom: 8px;
}
.section-title h3 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.5px;
}

/* Expandable Collector Row/Card */
.collector-card {
  overflow: hidden;
}
.collector-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 12px;
}
.collector-info-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-grow: 1;
}
.collector-run-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(57, 255, 20, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-green);
}
.collector-card-details h4 { font-size: 13px; font-weight: 700; color: white; }
.collector-card-details p { font-size: 10.5px; color: var(--text-gray); }

.collector-actions-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}

@media (max-width: 480px) {
  .content-viewport {
    padding-left: 16px;
    padding-right: 16px;
    padding-top: calc(76px + var(--safe-top));
    padding-bottom: 96px;
  }
  .collector-card-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .collector-actions-header {
    margin-left: 0;
    justify-content: flex-end;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 10px;
  }
  .collector-actions-header button {
    flex: 1;
    justify-content: center;
  }
}

.collector-card-content {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.03);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sub-section-title {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.realized-list, .pending-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Inner items in collectors lists */
.inner-visit-card {
  background-color: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  cursor: pointer;
}
.inner-visit-card:hover { border-color: rgba(255,255,255,0.08); }
.visit-status-info {
  display: flex;
  align-items: center;
  gap: 8px;
}
.visit-status-info span.material-icons { font-size: 16px; }
.visit-status-info h5 { font-size: 12px; font-weight: 700; color: white; }
.visit-status-info p { font-size: 10px; color: var(--text-gray); }
.visit-amount { font-family: var(--font-mono); font-weight: 700; font-size: 12px; }

/* Progress bar inside collector cards */
.collector-progress-bar-container {
  width: 100%;
  height: 4px;
  background-color: var(--color-container);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.collector-progress-bar {
  height: 100%;
  background-color: var(--neon-green);
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 0 6px var(--neon-green);
}

/* Panorama Country cards */
.country-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.country-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--color-outline);
  padding-bottom: 8px;
}
.country-flag { font-size: 24px; }
.country-panel-header h3 { font-family: var(--font-title); font-size: 16px; font-weight: 800; }

.panorama-section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) {
  .panorama-section-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1200px) {
  .panorama-section-grid { grid-template-columns: repeat(3, 1fr); }
}

.pano-card {
  background-color: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 12px;
  padding: 14px;
}
.pano-card h4 {
  font-family: var(--font-title);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-gray);
  margin-bottom: 12px;
}

.pano-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 8px;
}
.pano-row:last-child { margin-bottom: 0; }
.pano-row .label { color: var(--text-gray); }
.pano-row .val { font-family: var(--font-mono); font-weight: 700; }

.pano-progress-row {
  margin-top: 12px;
}
.pano-progress-desc {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-gray);
  margin-bottom: 4px;
}

/* ==========================================
   CLIENT DATABASE PAGE (COBRADORES / CARTEIRA)
   ========================================= */
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 16px;
  margin-bottom: 16px;
}
.search-icon { color: var(--text-gray); font-size: 20px; }
.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-family: var(--font-body);
  font-size: 14px;
  flex-grow: 1;
}
.clear-search {
  background: transparent;
  border: none;
  color: var(--text-gray);
  cursor: pointer;
}

/* Client Row details */
.client-database-card-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.client-row-card {
  background-color: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.client-row-card:hover {
  border-color: rgba(57, 255, 20, 0.2);
  background-color: rgba(57, 255, 20, 0.01);
}
.cl-primary-info h4 { font-size: 13.5px; font-weight: 700; color: white; }
.cl-primary-info p { font-size: 11px; color: var(--text-gray); }
.cl-secondary-info {
  text-align: right;
}
.cl-secondary-info .cl-value { font-family: var(--font-mono); font-weight: 700; font-size: 12px; }
.cl-secondary-info .cl-status-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 4px;
}

/* Status badges colors */
.badge-status-pago { background: rgba(57, 255, 20, 0.1); color: var(--neon-green); }
.badge-status-pendente { background: rgba(255, 234, 0, 0.1); color: var(--neon-yellow); }
.badge-status-atrasado { background: rgba(255, 0, 127, 0.1); color: var(--neon-red); }
.badge-status-aprovacao { background: rgba(0, 127, 255, 0.1); color: var(--neon-blue); }

.loan-summary-panel {
  background-color: rgba(0,0,0,0.2);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 12px;
}
.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
}
.summary-line:last-child { margin-bottom: 0; }

/* Subdivisions Header */
.subdivision-header {
  background-color: rgba(255,255,255,0.01);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
}
.subdivision-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
}
.subdivision-title-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.subdivision-title-info span.material-icons { color: var(--neon-green); font-size: 18px; }
.subdivision-title-info h4 { font-family: var(--font-title); font-size: 14px; font-weight: 700; }
.subdivision-title-info p { font-size: 10px; color: var(--text-gray); }

.subdivision-content {
  padding: 12px;
  background-color: rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================================
   CASH FLOW CARD STATS & ARCHIVES TABLE
   ========================================== */
.cash-banner {
  margin-bottom: 20px;
}
.banner-status {
  display: flex;
  align-items: center;
  gap: 12px;
}
.banner-status .lock-icon {
  font-size: 28px;
  color: var(--neon-green);
}
.banner-status h4 { font-size: 14px; font-weight: 700; }
.banner-status p { font-size: 11px; color: var(--text-gray); }

.cash-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 576px) {
  .cash-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .cash-grid { grid-template-columns: repeat(3, 1fr); }
}

.metric-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 120px;
}
.metric-card .label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-gray);
  letter-spacing: 0.5px;
}
.metric-card .value {
  font-family: var(--font-mono);
  font-size: 22px;
  margin: 4px 0;
}
.metric-card .desc {
  font-size: 10px;
  color: var(--text-gray);
}

/* Data Tables */
.table-card {
  padding: 0;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 13px;
  text-align: left;
}
.data-table th, .data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-outline);
}
.data-table th {
  background-color: var(--color-surface);
  font-weight: 700;
  color: var(--text-gray);
}
.data-table td {
  color: white;
}
.data-table tbody tr {
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.data-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ==========================================
   SETTINGS STYLES
   ========================================== */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 992px) {
  .settings-grid { grid-template-columns: 1.2fr 1fr; }
}

.settings-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.settings-card h3 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 16px;
}
.settings-card .desc {
  font-size: 11px;
  color: var(--text-gray);
}

/* Cobrador Setting Item */
.settings-cobrador-item {
  background-color: rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.settings-cob-info h4 { font-size: 13px; font-weight: 700; color: white; }
.settings-cob-info p { font-size: 10px; color: var(--text-gray); }
.settings-cob-actions {
  display: flex;
  gap: 4px;
}

/* ==========================================
   MODAL DIALOGS OVERLAYS
   ========================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 16px;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 500px;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0; /* padding handled inside headers/body */
  overflow: hidden;
}
.modal-overlay.active .modal-card {
  transform: translateY(0);
}

/* Map Dialog Size */
.map-modal-card {
  max-width: 800px;
  height: 80%;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--color-outline);
}
.modal-header h3 {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 18px;
}
.modal-header .desc {
  font-size: 11px;
  color: var(--text-gray);
}

.modal-body {
  padding: 20px;
  flex-grow: 1;
}
.max-height-modal {
  max-height: 450px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--color-outline);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Map Monitor Wrapper */
.map-body {
  padding: 0;
  height: 100%;
}
#leaflet-monitor-map {
  width: 100%;
  height: 100%;
  min-height: 350px;
  background: var(--color-bg);
}

/* Leaflet dark theme fix */
.leaflet-container {
  background: var(--color-bg) !important;
}

/* Pulse collector animation marker */
.collector-pulse {
  background: var(--neon-blue);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.7);
  animation: pulseCobrador 1.6s infinite;
  width: 16px;
  height: 16px;
  border: 2px solid white;
}
@keyframes pulseCobrador {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(0, 229, 255, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 229, 255, 0); }
}

.leaflet-popup-content-wrapper {
  background: var(--color-surface) !important;
  color: var(--text-white) !important;
  border: 1px solid rgba(0, 229, 255, 0.3) !important;
  border-radius: 12px !important;
}
.leaflet-popup-tip {
  background: var(--color-surface) !important;
}
.leaflet-popup-content button {
  background-color: var(--neon-green);
  color: var(--text-black);
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 8px;
  width: 100%;
}

/* Client Details content panel styling */
.details-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.details-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  padding-bottom: 8px;
  font-size: 13px;
}
.details-row .label { color: var(--text-gray); }
.details-row .val { font-weight: 500; text-align: right; }
.details-row .val.mono { font-family: var(--font-mono); }

/* ==========================================
   GLOBAL TOP APP BAR (NeonTopAppBar)
   ========================================== */
.global-top-app-bar {
  width: 100%;
  height: 72px;
  background-color: var(--color-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  padding: 0 16px;
  box-sizing: border-box;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  padding-top: var(--safe-top);
  height: calc(72px + var(--safe-top));
}

.top-bar-content {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.operational-hub-label {
  color: rgba(229, 225, 228, 0.4);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  font-family: var(--font-title);
  text-transform: uppercase;
}

.brand-title {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin: 0;
  line-height: 1;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-status-closed {
  background-color: rgba(255, 0, 255, 0.15);
  border: 1px solid var(--neon-magenta);
  color: var(--neon-magenta);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 100px;
  text-transform: uppercase;
}

/* ==========================================
   RESPONSIVE LAYOUT RESPONSIVENESS (DESKTOP)
   ========================================== */
@media (min-width: 768px) {
  /* Hide Mobile Top Bar & Bottom Bar */
  .mobile-header { display: none; }
  .mobile-navbar { display: none; }
  .global-top-app-bar { display: none; }
  
  /* Show Sidebar */
  .desktop-sidebar { display: flex; }
  
  /* Adjust Content spacing */
  .content-viewport {
    padding-left: 40px;
    padding-right: 40px;
    padding-bottom: 40px;
    padding-top: 24px; /* Reset mobile topbar spacing in desktop */
  }
}

/* ==========================================
   CASH FLOW & CONSOLIDATED HISTORY NEW STYLES
   ========================================== */

.cash-main-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.cash-card-premium {
  background-color: var(--color-surface);
  border: 1px solid rgba(57, 255, 20, 0.08);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  transition: all 0.25s ease;
}
.cash-card-premium.border-green {
  border-color: rgba(57, 255, 20, 0.15);
}
.cash-card-premium.border-green:hover {
  border-color: rgba(57, 255, 20, 0.35);
  box-shadow: 0 4px 25px rgba(57, 255, 20, 0.03);
}

.cash-card-label {
  font-family: var(--font-title);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-gray);
  letter-spacing: 0.5px;
}

.cash-card-value {
  font-family: var(--font-title);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin: 8px 0;
  line-height: 1.1;
}

.cash-card-sub-info {
  font-size: 11px;
  color: var(--text-gray);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.cash-details-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-top: 14px;
}

.details-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}
.details-row .label {
  color: var(--text-gray);
}
.details-row .val {
  font-weight: 700;
  color: var(--text-white);
  font-family: var(--font-mono);
}

.cash-recessed-box {
  background-color: rgba(0, 0, 0, 0.15);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}
.recessed-title {
  font-family: var(--font-title);
  font-size: 10px;
  font-weight: 800;
  color: var(--text-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.recessed-row {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  margin-bottom: 6px;
  color: var(--text-gray);
  font-family: var(--font-mono);
}
.recessed-row:last-child {
  margin-bottom: 0;
}

/* History chips and pills */
.time-chip {
  background-color: #1C1B1D;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-white);
  border-radius: 8px;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.time-chip:hover {
  border-color: var(--neon-green);
}
.time-chip.active {
  background-color: var(--neon-green) !important;
  color: #000 !important;
  border-color: var(--neon-green) !important;
  font-weight: bold;
  box-shadow: 0 0 10px var(--neon-green-glow);
}

.tab-pill {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-gray);
  border-radius: 100px;
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  text-transform: uppercase;
}
.tab-pill:hover {
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}
.tab-pill.active {
  border-color: var(--neon-green) !important;
  color: var(--text-white) !important;
  background-color: rgba(57, 255, 20, 0.05);
  font-weight: bold;
}

/* Client Details sub cards grid */
.client-financial-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.financial-sub-card {
  background-color: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.financial-sub-card .lbl {
  font-size: 10.5px;
  color: var(--text-gray);
}
.financial-sub-card .val {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--text-white);
  font-family: var(--font-mono);
}
.financial-sub-card .val.magenta-text {
  color: var(--neon-magenta);
}

/* Launches styles inside metrics */
.inner-launch-card {
  background-color: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}
.inner-launch-card:hover {
  border-color: rgba(255, 255, 255, 0.08);
}
.launch-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.launch-icon-box.entrada {
  background-color: rgba(57, 255, 20, 0.06);
  color: var(--neon-green);
}
.launch-icon-box.gasto {
  background-color: rgba(255, 0, 255, 0.06);
  color: var(--neon-magenta);
}

/* ==========================================
   CASCADE REGIONAL SELECTOR STYLES
   ========================================== */
.cascade-selector-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--color-surface);
  border: 1px solid rgba(57, 255, 20, 0.3);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.05);
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

.cascade-selector-card:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 15px var(--neon-green-glow);
}

.cascade-selector-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-grow: 1;
}

.cascade-selector-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.cascade-selector-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-gray);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.cascade-selector-value {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-white);
  margin-top: 2px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 170px;
}

@media (min-width: 576px) {
  .cascade-selector-value {
    max-width: none;
  }
}

.cascade-selector-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cascade-action-btn {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.cascade-action-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.cascade-action-btn.list-btn {
  color: var(--neon-green);
}

.cascade-action-btn.clear-btn {
  color: var(--neon-red);
}

.cascade-action-btn.expand-btn {
  color: var(--neon-green);
}

/* Cascade Selector Dialog List */
.cascade-options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.cascade-option-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--color-container);
  border: 1px solid var(--color-outline);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.cascade-option-row:hover {
  border-color: var(--neon-green);
  background-color: rgba(57, 255, 20, 0.02);
}

.cascade-option-row.active {
  border-color: var(--neon-green);
  background-color: rgba(57, 255, 20, 0.05);
}

.cascade-option-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cascade-option-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-white);
}

.cascade-option-subtitle {
  font-size: 10px;
  color: var(--text-gray);
}

/* ==========================================
   COUNTRY SUMMARY GRID (DASHBOARD)
   ========================================== */
.country-resumo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.country-resumo-card {
  background-color: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.country-resumo-card:hover {
  border-color: rgba(57, 255, 20, 0.4);
  background-color: rgba(57, 255, 20, 0.02);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(57, 255, 20, 0.08);
}

.country-resumo-flag {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 10px;
}

.country-resumo-name {
  font-family: var(--font-title);
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-white);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ==========================================
   ROUTE DETAIL PROGRESS SECTION (EXPANDED CARD)
   ========================================== */
.route-detail-progress-section {
  background-color: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.route-detail-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.route-detail-progress-title {
  font-family: var(--font-title);
  font-size: 11px;
  font-weight: 800;
  color: var(--neon-green);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.route-detail-progress-percent {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  color: var(--neon-green);
}

.route-detail-progress-bar-container {
  width: 100%;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.04);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.route-detail-progress-bar {
  height: 100%;
  background-color: var(--neon-green);
  border-radius: 4px;
  box-shadow: 0 0 8px var(--neon-green);
  transition: width 0.4s ease;
}

.route-detail-metrics-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2px;
}

.route-detail-metric-left {
  font-size: 11px;
  color: var(--text-gray);
}

.route-detail-metric-right {
  font-size: 11px;
  font-weight: 700;
  color: var(--neon-green);
  font-family: var(--font-mono);
}

/* ==========================================
   CLIENT ROW ACTION BUTTONS (COLLECTORS TAB)
   ========================================== */
.client-row-card {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  transition: border-color 0.2s;
}

.client-row-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}

.cl-primary-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-grow: 1;
  text-align: left;
}

.cl-secondary-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-right: 12px;
}

.cl-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 480px) {
  .client-row-card {
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
  }
  .cl-primary-info {
    width: 60%;
    flex-grow: 0;
  }
  .cl-secondary-info {
    width: calc(40% - 12px);
    margin-right: 0;
  }
  .cl-actions-group {
    width: 100%;
    justify-content: flex-end;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 8px;
    margin-top: 4px;
  }
}

.cl-action-btn {
  background-color: var(--color-container);
  border: 1px solid var(--color-outline);
  color: var(--text-gray);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cl-action-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-white);
  border-color: rgba(255, 255, 255, 0.2);
}

.cl-action-btn.view-btn:hover {
  color: var(--neon-green);
  border-color: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green-glow);
}

.cl-action-btn.edit-btn:hover {
  color: var(--neon-blue);
  border-color: var(--neon-blue);
  box-shadow: 0 0 8px var(--neon-blue-glow);
}

.cl-action-btn span.material-icons {
  font-size: 16px;
}

/* ==========================================
   SETTINGS SCREEN GRID MENU (JETPACK COMPOSE STYLE)
   ========================================== */
.settings-menu-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.settings-menu-item {
  background-color: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.settings-menu-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background-color: rgba(255, 255, 255, 0.01);
  transform: translateY(-1px);
}

.settings-menu-item:active {
  transform: translateY(1px);
}

.settings-icon-box {
  width: 44px;
  height: 44px;
  background-color: var(--color-container);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-icon-box span.material-icons {
  font-size: 20px;
  color: var(--neon-green);
}

.settings-menu-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
}

.settings-menu-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-white);
}

.settings-menu-desc {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-gray);
}

.settings-menu-arrow {
  color: var(--text-gray);
  font-size: 20px;
  margin-left: auto;
}

/* Profile Info inside dialog */
.profile-dialog-info-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background-color: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 8px;
}

.profile-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.profile-info-row .lbl {
  color: var(--text-gray);
  font-weight: 600;
}

.profile-info-row .val {
  color: var(--text-white);
  font-weight: 700;
}

/* Max Heights */
.max-height-modal-large {
  max-height: calc(100vh - 250px);
  overflow-y: auto;
}

/* Global Header Actions Capsule */
.global-header-actions {
  position: fixed;
  top: calc(15px + var(--safe-top));
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1100;
  background: rgba(20, 20, 20, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 4px 8px;
  border-radius: 100px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 768px) {
  .global-header-actions {
    top: 18px;
    right: 24px;
  }
}

.global-header-actions:hover {
  border-color: rgba(57, 255, 20, 0.15);
  box-shadow: 0 4px 24px rgba(57, 255, 20, 0.05), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.global-action-btn {
  background: transparent;
  border: none;
  color: var(--text-gray);
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  position: relative;
}

.global-action-btn:hover {
  background: rgba(255, 255, 255, 0.04);
}

.global-action-btn .material-icons {
  font-size: 20px;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

/* Hover effects matching the theme colors */
.global-action-btn:hover #btn-notif-icon {
  color: var(--neon-green);
  text-shadow: 0 0 8px var(--neon-green-glow);
}

.global-action-btn:hover #sync-icon {
  color: var(--neon-magenta);
  text-shadow: 0 0 8px var(--neon-magenta-glow);
}

/* Notification badge positioning inside wrapper */
.notif-btn-wrapper {
  position: relative;
  display: inline-block;
}

.notif-btn-wrapper .badge-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 10;
  pointer-events: none;
}

/* Spin animation class */
.spin {
  animation: spin 1.2s linear infinite;
}

/* Actions placeholder for mobile header alignment */
.top-bar-actions-placeholder {
  width: 92px;
  height: 42px;
  flex-shrink: 0;
}

