/* Design Tokens & Theme Setup */
:root {
  --font-primary: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;

  /* Color Palette */
  --bg-app: #09090b;
  --bg-surface: #121216;
  --bg-card: #181820;
  --bg-card-hover: #1f1f29;
  --bg-input: #1a1a24;
  --bg-sidebar: #0f0f13;
  --bg-topbar: #0d0d11;

  --color-text: #f4f4f5;
  --color-text-muted: #C0C0C0;
  --color-text-dark: #000000;

  --primary: #CC0000;
  --primary-hover: #FF9900;
  --primary-glow: rgba(204, 0, 0, 0.15);
  
  --accent-cyan: #00CCFF;
  --accent-cyan-hover: #0099FF;
  --accent-cyan-glow: rgba(0, 204, 255, 0.15);
  
  --secondary: #272730;
  --secondary-hover: #353542;
  
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.15);
  --error: #ef4444;
  --warning: #f59e0b;
  --info: #00CCFF;

  /* Borders & Shadows */
  --border-color: #272732;
  --border-color-focus: #ffb700;
  --border-radius-sm: 8px;
  --border-radius-md: 12px;
  --border-radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(255, 183, 0, 0.2);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

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

html, body {
  width: 100%;
  height: 100%;
  font-family: var(--font-primary);
  background-color: var(--bg-app);
  color: var(--color-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: var(--primary-hover);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* Loader Screen */
.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-app);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-container.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.loader-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-icon {
  width: 30px;
  height: 30px;
  color: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary));
  animation: pulse 1.5s ease-in-out infinite;
}

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

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
}

/* Utility Classes */
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.pt-2 { padding-top: 0.5rem; }
.flex-1 { flex: 1; }
.flex-row { display: flex; align-items: center; justify-content: space-between; }
.hidden { display: none !important; }
.text-yellow { color: var(--primary) !important; }
.text-blue { color: var(--info) !important; }
.text-green { color: var(--success) !important; }
.text-purple { color: #a855f7 !important; }
.text-red { color: var(--error) !important; }
.text-muted { color: var(--color-text-muted); }
.text-right { text-align: right; }
.border-top { border-top: 1px solid var(--border-color); }
.no-padding { padding: 0 !important; }
.relative { position: relative; }

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 30px;
  background: var(--border-color);
  color: var(--color-text);
  gap: 6px;
}

.badge-success {
  background: var(--success-glow);
  color: var(--success);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
}

.badge-soft {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-neutral {
  background: rgba(142, 142, 159, 0.15);
  color: var(--color-text-muted);
}

.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
  display: inline-block;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  display: inline-block;
  animation: pulse-dot-anim 1.5s infinite;
}

.pulse-dot.inline {
  margin-right: 4px;
}

@keyframes pulse-dot-anim {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Icons styling */
svg {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.inline-icon {
  margin-right: 4px;
  display: inline-block;
}

/* Active and Section view handling */
.view-section {
  display: none;
  width: 100%;
  min-height: 100vh;
}

.view-section.active {
  display: block;
}

/* ================= LANDING PAGE & NAVBAR ================= */
#view-landing {
  background: radial-gradient(circle at top right, rgba(255, 183, 0, 0.08), transparent 60%),
              radial-gradient(circle at bottom left, rgba(249, 115, 22, 0.08), transparent 50%),
              var(--bg-app);
}

.navbar {
  height: 80px;
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
}

.nav-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.logo-icon {
  width: 28px;
  height: 28px;
  color: var(--primary);
  filter: drop-shadow(0 0 6px var(--primary));
}

.logo-image {
  height: 36px;
  width: auto;
  border-radius: 6px;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  color: var(--primary);
}

.yellow-text {
  color: var(--primary);
}

.cyan-text {
  color: #C0C0C0;
}

/* Hero Section Layout */
.hero-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 140px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 60px;
  padding: 40px 0;
}

.hero-content {
  display: flex;
  flex-direction: column;
}

.hero-tagline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3.2rem;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: 40px;
  max-width: 520px;
}

.hero-pillars {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 14px;
  border-top: 1px solid var(--border-color);
  padding-top: 28px;
}

.pillar-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 142px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.pillar-card strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
}

.pillar-card span:not(.pillar-kicker) {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

.pillar-kicker {
  width: fit-content;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Interactive Login Card */
.hero-login-wrapper {
  display: flex;
  justify-content: flex-end;
}

.login-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition-normal);
}

.login-card:hover {
  border-color: rgba(255, 0, 170, 0.3);
}

.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent-cyan) 100%);
}

.login-header h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  margin-bottom: 8px;
}

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

/* Tabs style */
.login-tabs {
  display: flex;
  background: var(--bg-input);
  border-radius: var(--border-radius-md);
  padding: 4px;
  margin: 24px 0;
  border: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-text-muted);
  padding: 10px 4px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--color-text);
}

.tab-btn.active {
  background-color: var(--bg-card);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Forms style */
.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

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

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.forgot-password {
  font-size: 0.8rem;
  color: var(--primary);
  text-decoration: none;
}

.forgot-password:hover {
  text-decoration: underline;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--color-text);
  padding: 14px 14px 14px 44px;
  border-radius: var(--border-radius-md);
  font-size: 0.95rem;
  font-family: var(--font-primary);
  transition: all var(--transition-fast);
  outline: none;
}

.input-wrapper select {
  appearance: none;
}

.input-wrapper input:focus,
.input-wrapper select:focus,
.input-wrapper textarea:focus {
  border-color: var(--primary);
  background-color: var(--bg-card);
  box-shadow: var(--primary-glow) 0 0 0 3px;
}

.input-prefix {
  position: absolute;
  left: 16px;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* Custom Textarea / Select overrides */
textarea {
  min-height: 80px;
  resize: vertical;
}

select {
  cursor: pointer;
}

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

.remember-me {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.remember-me input {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* Button UI */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--border-radius-md);
  padding: 14px 28px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--color-text-dark);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-glow);
}

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

.btn-secondary:hover {
  background-color: var(--secondary-hover);
}

.btn-danger {
  background-color: #ef4444;
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #dc2626;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.btn-icon-round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

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

.btn-icon-round.bg-dark:hover {
  background-color: var(--secondary-hover);
}

.mt-3 { margin-top: 12px; }

.landing-footer {
  text-align: center;
  padding: 30px 20px;
  border-top: 1px solid var(--border-color);
  color: var(--color-text-muted);
  font-size: 0.85rem;
}


/* ================= DASHBOARD LAYOUT ================= */
.dashboard-layout {
  display: none;
  min-height: 100vh;
  width: 100vw;
  background-color: var(--bg-app);
}

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

/* Sidebar Styling */
.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-header {
  margin-bottom: 32px;
}

.sidebar-role {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-glow);
  padding: 4px 10px;
  border-radius: 30px;
  margin-top: 8px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

.nav-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  opacity: 0.7;
  padding: 12px 16px 4px 16px;
  margin-top: 6px;
}

.nav-accordion {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.nav-accordion-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.accordion-chevron {
  width: 16px;
  height: 16px;
  margin-left: auto;
  transition: transform var(--transition-fast);
}

.nav-accordion.open .accordion-chevron {
  transform: rotate(180deg);
}

.nav-accordion-content {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding-left: 16px;
  margin-top: 4px;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
}

.nav-accordion.open .nav-accordion-content {
  display: flex;
}

.nav-sub-item {
  font-size: 0.9rem;
  padding: 10px 14px;
}

/* Financial Status Badges */
.badge-status-ok {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

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

.badge-status-blocked {
  background: rgba(147, 51, 234, 0.15);
  color: #a855f7;
  border: 1px solid rgba(147, 51, 234, 0.3);
}

/* Clickable Table Rows */
.clickable-row {
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.clickable-row:hover {
  background-color: rgba(255, 255, 255, 0.04) !important;
}

/* Side Drawer Component */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

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

.drawer-panel {
  width: 100%;
  max-width: 480px;
  height: 100%;
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
}

.drawer-backdrop.active .drawer-panel {
  transform: translateX(0);
}

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

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

.drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--border-radius-sm);
  transition: color var(--transition-fast);
}

.drawer-close-btn:hover {
  color: var(--color-text);
}

.drawer-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-field label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  font-weight: 600;
}

.drawer-field span {
  font-size: 0.95rem;
  color: var(--color-text);
  font-weight: 500;
}

/* Pagination Controls */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Financial Ledger Entries */
.financial-debit {
  color: #ef4444;
  font-weight: 600;
}

.financial-credit {
  color: #10b981;
  font-weight: 600;
}

.metrics-grid-7 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--border-radius-md);
  color: var(--color-text-muted);
  font-family: var(--font-primary);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-item i {
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.nav-item:hover {
  color: var(--color-text);
  background-color: rgba(255, 210, 0, 0.04);
}

.nav-item.active {
  background-color: var(--primary-glow) !important;
  color: var(--primary) !important;
  font-weight: 600;
}

.nav-item.active i {
  color: var(--primary) !important;
}

.nav-item:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.sidebar-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clickable-profile {
  cursor: pointer;
  border-radius: var(--border-radius-md);
  padding: 6px;
  margin: -6px;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.clickable-profile:hover {
  background-color: var(--bg-card-hover);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.user-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
}

.user-info p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--color-text-muted);
  padding: 10px;
  border-radius: var(--border-radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.btn-logout:hover {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border-color: rgba(239, 68, 68, 0.2);
}

/* Dashboard Main Content Area */
.dashboard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background-color: var(--bg-app);
}

.topbar {
  height: 88px;
  border-bottom: 1px solid var(--border-color);
  padding: 0 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-topbar);
  flex-shrink: 0;
}

.topbar-left h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
}

.topbar-left p {
  font-size: 0.85rem;
  margin-top: 2px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.current-time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  background-color: var(--bg-card);
  padding: 8px 16px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
}

.notification-bell {
  position: relative;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.notification-bell:hover {
  color: var(--color-text);
}

.bell-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: var(--primary);
  color: var(--color-text-dark);
  font-size: 0.7rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.dashboard-tab-content {
  display: none;
  animation: fadeIn var(--transition-normal) forwards;
}

.dashboard-tab-content.active {
  display: block;
}

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

/* Cards & Layout Grids */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.metric-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-color-focus);
}

.metric-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.metric-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
}

.growth-text {
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.growth-text.up { color: var(--success); }
.growth-text.down { color: var(--error); }
.growth-text.neutral { color: var(--color-text-muted); }

/* Owner production overview */
.ops-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  min-height: 260px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 183, 0, 0.12), transparent 36%),
    radial-gradient(circle at 88% 12%, rgba(249, 115, 22, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015)),
    var(--bg-card);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.08);
  overflow: hidden;
  position: relative;
}

.ops-hero::after {
  content: '';
  position: absolute;
  right: -110px;
  bottom: -150px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 1px solid rgba(255, 183, 0, 0.14);
  background: radial-gradient(circle, rgba(255,183,0,0.08), transparent 64%);
  pointer-events: none;
}

.ops-hero-content {
  max-width: 720px;
  position: relative;
  z-index: 1;
}

.ops-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ops-hero-title {
  max-width: 640px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  color: var(--color-text);
}

.ops-hero-text {
  max-width: 680px;
  margin-top: 22px;
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.ops-status-chip {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--success);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.18);
  font-size: 0.82rem;
  font-weight: 700;
}

.ops-actions-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 18px;
  margin-top: 22px;
}

.ops-card {
  min-height: 190px;
  text-align: left;
  color: inherit;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  padding: 22px;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.055);
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.ops-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,183,0,0.36);
  background: linear-gradient(180deg, rgba(255,183,0,0.08), rgba(255,255,255,0.02));
}

.ops-card:active {
  transform: translateY(0);
}

.ops-card-large {
  grid-row: span 2;
  min-height: 398px;
  background:
    radial-gradient(circle at 82% 18%, rgba(255,183,0,0.18), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
}

.ops-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary);
  background: rgba(255,183,0,0.1);
  border: 1px solid rgba(255,183,0,0.16);
}

.ops-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.ops-card p {
  color: var(--color-text-muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.ops-panel {
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015)), var(--bg-card);
}

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

.ops-panel-header h3 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 750;
}

.ops-flow-list {
  display: flex;
  flex-direction: column;
}

.ops-flow-item {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.ops-flow-item:first-child {
  padding-top: 0;
}

.ops-flow-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.ops-flow-marker {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(255,183,0,0.08);
}

.ops-flow-item strong {
  display: block;
  margin-bottom: 5px;
  color: var(--color-text);
  font-weight: 700;
}

.ops-flow-item p {
  color: var(--color-text-muted);
  line-height: 1.5;
  font-size: 0.9rem;
}

.ops-flow-list.compact .ops-flow-item {
  padding: 20px 0;
}

.partner-hero {
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.12), transparent 36%),
    radial-gradient(circle at 88% 12%, rgba(255, 183, 0, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015)),
    var(--bg-card);
}

.partner-actions {
  grid-template-columns: 1.25fr 1fr 1fr;
}

.empty-state-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  padding: 24px;
  border-radius: 18px;
  border: 1px dashed rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.025);
}

.empty-state-card svg {
  width: 34px;
  height: 34px;
  color: var(--primary);
}

.empty-state-card h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--color-text);
}

.empty-state-card p {
  max-width: 420px;
  color: var(--color-text-muted);
  line-height: 1.55;
  font-size: 0.9rem;
}

/* Double Column Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: start;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

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

.card-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
}

.card-body {
  padding: 24px;
}

.view-all-link {
  font-size: 0.8rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.view-all-link:hover {
  text-decoration: underline;
}

/* Charts container scaling */
.chart-container {
  position: relative;
  width: 100%;
  height: 280px;
}

/* Tables styling */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.table th, .table td {
  padding: 16px 24px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: rgba(255, 210, 0, 0.02);
}

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

.table tbody tr:hover {
  background-color: var(--bg-card-hover);
}

.table td strong {
  color: var(--color-text);
  font-weight: 600;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-indicator.status-success {
  background-color: var(--success-glow);
  color: var(--success);
}

.status-indicator.status-progress {
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--info);
}

.status-indicator.status-warning {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

/* List element inside Card */
.list-container {
  display: flex;
  flex-direction: column;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.list-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.list-item:first-child {
  padding-top: 0;
}

.item-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.item-icon-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-sm);
  display: flex;
  justify-content: center;
  align-items: center;
}

.item-icon-avatar.bg-yellow {
  background-color: var(--primary-glow);
  color: var(--primary);
  border: 1px solid rgba(255, 0, 170, 0.2);
}

.item-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
}

.item-action strong {
  display: block;
  font-size: 0.95rem;
}


/* ================= SOLICITAR ENTREGA ================= */
.request-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 24px;
  align-items: start;
}

.request-form-card {
  border: 1px solid var(--border-color);
}

.form-row {
  display: flex;
  gap: 16px;
}

/* Estimate Box detail */
.estimate-box {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeIn var(--transition-fast) forwards;
}

.estimate-detail {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

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

.estimate-price-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
}

.estimate-price-row span {
  font-weight: 600;
}

.estimate-price-row strong {
  font-size: 1.3rem;
  font-weight: 800;
}

/* Sidebar Info Card */
.bg-gradient-yellow {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-cyan) 100%);
  position: relative;
  overflow: hidden;
}

.bg-gradient-yellow h3 {
  font-family: var(--font-display);
  font-weight: 700;
}

.card-decor-icon {
  position: absolute;
  right: -10px;
  bottom: -15px;
  opacity: 0.08;
  transform: rotate(-15deg);
}

.card-decor-icon svg {
  width: 120px;
  height: 120px;
}

.tariffs-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tariffs-list li {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  border-bottom: 1px dashed var(--border-color);
  padding-bottom: 10px;
}

.tariffs-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

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


/* ================= RASTREAMENTO EXPRESS ================= */
.tracking-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: start;
}

/* Stepper Timeline UI */
.stepper-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
  padding-left: 20px;
  margin-top: 10px;
}

.stepper-timeline::before {
  content: '';
  position: absolute;
  left: 35px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background-color: var(--border-color);
  z-index: 1;
}

.step-node {
  display: flex;
  gap: 24px;
  padding-bottom: 40px;
  position: relative;
  z-index: 2;
}

.step-node:last-child {
  padding-bottom: 0;
}

.step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  color: var(--color-text-muted);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all var(--transition-normal);
  flex-shrink: 0;
}

.step-icon svg {
  width: 14px;
  height: 14px;
}

.step-detail h4 {
  font-size: 0.95rem;
  font-weight: 600;
  transition: color var(--transition-normal);
}

.step-detail p {
  font-size: 0.8rem;
  margin-top: 4px;
}

/* Active states for stepper node */
.step-node.active .step-icon {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--color-text-dark);
  box-shadow: 0 0 10px var(--primary-glow);
}

.step-node.active .step-detail h4 {
  color: var(--primary);
}

.step-node.completed .step-icon {
  background-color: var(--success-glow);
  border-color: var(--success);
  color: var(--success);
}

.step-node.completed .step-detail h4 {
  color: var(--success);
}

/* Courier Profile in Tracker */
.courier-card-tracker {
  display: flex;
  align-items: center;
  gap: 16px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px;
  animation: fadeIn var(--transition-normal) forwards;
}

.courier-avatar-wrapper {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-color);
  flex-shrink: 0;
}

.courier-avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.courier-info-tracker {
  flex: 1;
}

.courier-info-tracker h4 {
  font-size: 0.95rem;
  font-weight: 600;
}

.courier-info-tracker p {
  font-size: 0.8rem;
}

.courier-rating {
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-weight: 600;
}

.courier-rating svg {
  width: 12px;
  height: 12px;
}

.fill-yellow {
  fill: var(--primary);
}

/* Simulated Map UI styling */
.map-tracker-card {
  height: 480px;
  display: flex;
  flex-direction: column;
}

.map-tracker-card .card-body {
  flex: 1;
}

.simulated-map {
  width: 100%;
  height: 100%;
  background-color: #1a1a24;
  position: relative;
  overflow: hidden;
}

/* Map Grid Design */
.map-grid-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: 20px 20px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
}

.map-street {
  position: absolute;
  background-color: #2e2e3f;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
  border: 1px solid #3d3d54;
}

.street-h {
  height: 32px;
  left: 0;
  right: 0;
}

.street-v {
  width: 32px;
  top: 0;
  bottom: 0;
}

/* Map Pins */
.map-pin {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translate(-50%, -50%);
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.pin-pickup {
  background-color: var(--primary);
  color: var(--color-text-dark);
}

.pin-delivery {
  background-color: var(--error);
  color: white;
}

.pin-tooltip {
  position: absolute;
  top: -30px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--color-text);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.map-pin:hover .pin-tooltip {
  opacity: 1;
}

/* Motoboy moving pin */
.map-moto-avatar {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #3b82f6;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  transform: translate(-50%, -50%);
  z-index: 20;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.6);
  transition: top 1.5s ease-in-out, left 1.5s ease-in-out;
}

.moto-icon {
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.4));
}

.moto-wave {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #3b82f6;
  animation: moto-wave-pulse 1.5s infinite;
  pointer-events: none;
}

@keyframes moto-wave-pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Lancheria custom components */
.perf-bar-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.perf-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
}

.perf-bar {
  height: 8px;
  background-color: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.perf-bar-fill {
  height: 100%;
  border-radius: 4px;
}

.perf-bar-fill.bg-green { background-color: var(--success); }
.perf-bar-fill.bg-yellow { background-color: var(--primary); }
.perf-bar-fill.bg-blue { background-color: var(--info); }

.promo-box {
  background-color: rgba(255, 0, 170, 0.03);
  border: 1px solid rgba(255, 0, 170, 0.1);
  border-radius: var(--border-radius-md);
  padding: 16px;
}

.promo-box-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.promo-box-title h4 {
  font-size: 0.95rem;
  font-weight: 600;
}


/* ================= RESPONSIVE DESIGN ================= */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999;
}
.sidebar-overlay.active {
  display: block;
}

.topbar-logo {
  display: none !important;
}
.topbar-title-wrapper {
  display: block;
}

@media (max-width: 768px) {
  .sidebar-toggle-btn {
    display: inline-flex !important;
  }
  .topbar-logo {
    display: flex !important;
  }
  .topbar-title-wrapper {
    display: none !important;
  }
}

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 20px 0;
  }
  
  .hero-content {
    text-align: center;
    align-items: center;
  }
  
  .hero-pillars {
    grid-template-columns: 1fr;
    width: 100%;
  }
  
  .hero-login-wrapper {
    justify-content: center;
  }

  .ops-hero {
    flex-direction: column;
    min-height: auto;
  }

  .ops-actions-grid {
    grid-template-columns: 1fr;
  }

  .ops-card-large {
    grid-row: auto;
    min-height: 190px;
  }

  .dashboard-grid, .request-layout, .tracking-layout {
    grid-template-columns: 1fr;
  }
  
  .request-info-sidebar {
    order: -1; /* Place info above on tablet/mobile */
  }
}

@media (max-width: 768px) {
  .dashboard-layout {
    flex-direction: column;
  }
  
  .sidebar {
    position: fixed;
    top: 0;
    left: -280px; /* Hidden drawer by default */
    width: 280px;
    height: 100vh;
    z-index: 1000;
    transition: left var(--transition-normal);
    border-right: 1px solid var(--border-color);
    border-bottom: none;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--bg-sidebar);
    padding: 24px;
  }
  
  .sidebar.open {
    left: 0; /* Slide in drawer */
  }
  
  .sidebar-header {
    margin-bottom: 32px;
  }
  
  .sidebar-nav {
    flex-direction: column;
    overflow-x: visible;
    gap: 24px;
  }
  
  .nav-group {
    flex-direction: column;
    gap: 6px;
  }
  
  .nav-item {
    padding: 12px 16px;
    font-size: 0.95rem;
    white-space: normal;
    width: 100%;
  }
  
  .sidebar-footer {
    display: flex; /* Show profile & logout button in mobile drawer */
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    flex-direction: column;
    gap: 16px;
  }

  .topbar {
    padding: 0 20px;
    height: 70px;
  }
  
  .topbar-left h2 {
    font-size: 1.2rem;
  }
  
  .topbar-left p {
    display: none;
  }
  
  .current-time {
    display: none;
  }

  .dashboard-content {
    padding: 16px;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .login-card {
    padding: 24px;
  }
}

/* Custom Leaflet Map Markers & Overrides */
.custom-div-icon {
  background: transparent;
  border: none;
}

.custom-map-marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.marker-pulse {
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border: 2px solid;
  border-radius: 50%;
  animation: marker-pulse-anim 1.8s infinite ease-out;
  opacity: 0;
  pointer-events: none;
}

@keyframes marker-pulse-anim {
  0% { transform: scale(0.5); opacity: 0; }
  50% { opacity: 0.8; }
  100% { transform: scale(2.0); opacity: 0; }
}

.map-popup-card {
  min-width: 300px;
  padding: 4px;
}

.map-popup-card h4 {
  color: var(--color-text);
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-weight: 700;
}

.map-popup-card p {
  margin: 0 0 8px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.map-popup-dispatch {
  margin-top: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

.map-popup-dispatch label {
  display: block;
  margin-bottom: 6px;
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.map-popup-select {
  width: 100%;
  height: 34px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--color-text);
  border-radius: 6px;
  padding: 0 10px;
  font-size: 0.78rem;
  outline: none;
}

.map-popup-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
}

.map-popup-send-btn,
.map-popup-remove-btn,
.map-popup-settings-btn {
  height: 34px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.map-popup-send-btn {
  grid-column: 1 / -1;
  background-color: var(--primary);
  border: none;
  color: var(--color-text-dark);
}

.map-popup-remove-btn {
  background-color: var(--secondary);
  border: 1px solid var(--border-color);
  color: var(--color-text);
  padding: 0 12px;
}

.map-popup-settings-btn {
  width: 38px;
  background-color: var(--secondary);
  border: 1px solid var(--border-color);
  color: var(--color-text);
  padding: 0;
}

.map-popup-empty-actions {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  text-align: left;
}

.map-popup-empty-actions .map-popup-actions {
  grid-template-columns: 1fr auto;
}

.leaflet-container {
  background-color: var(--bg-app) !important;
}

.leaflet-popup-content-wrapper {
  background-color: var(--bg-card) !important;
  color: var(--color-text) !important;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md) !important;
  box-shadow: var(--shadow-md) !important;
  padding: 8px !important;
}

.leaflet-popup-content {
  margin: 6px 10px !important;
  line-height: 1.4 !important;
}

.leaflet-popup-tip {
  background-color: var(--bg-card) !important;
  border-left: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

/* Mapbox GL Popup dark theme styling */
.mapboxgl-popup-content {
  background-color: var(--bg-card) !important;
  color: var(--color-text) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--border-radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 16px 20px 14px 16px !important;
  font-family: var(--font-primary), sans-serif !important;
}

.mapboxgl-popup-tip {
  border-top-color: var(--bg-card) !important;
  border-bottom-color: var(--bg-card) !important;
  border-left-color: var(--bg-card) !important;
  border-right-color: var(--bg-card) !important;
}

/* Tip border coloring based on anchor direction */
.mapboxgl-popup-anchor-top .mapboxgl-popup-tip { border-bottom-color: var(--bg-card) !important; }
.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip { border-top-color: var(--bg-card) !important; }
.mapboxgl-popup-anchor-left .mapboxgl-popup-tip { border-right-color: var(--bg-card) !important; }
.mapboxgl-popup-anchor-right .mapboxgl-popup-tip { border-left-color: var(--bg-card) !important; }
.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip { border-bottom-color: var(--bg-card) !important; }
.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip { border-bottom-color: var(--bg-card) !important; }
.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip { border-top-color: var(--bg-card) !important; }
.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip { border-top-color: var(--bg-card) !important; }

.mapboxgl-popup-close-button {
  color: var(--color-text-muted) !important;
  font-size: 16px !important;
  padding: 4px 8px !important;
  outline: none !important;
  border-radius: 0 var(--border-radius-md) 0 0 !important;
}

.mapboxgl-popup-close-button:hover {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: var(--color-text) !important;
}

/* Floating Dispatch Panel */
.fleet-dispatch-panel {
  position: absolute;
  width: 320px;
  max-width: calc(100% - 32px);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 10;
  padding: 16px 20px;
  max-height: calc(100% - 32px);
  overflow-y: auto;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

.fleet-dispatch-panel.hidden {
  display: none !important;
}

/* Panel Header */
.fleet-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.fleet-panel-header h4 {
  margin: 0;
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.fleet-panel-close-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.fleet-panel-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--color-text);
}

.fleet-panel-close-btn svg {
  width: 16px;
  height: 16px;
}

.fleet-panel-subtitle {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0 0 10px 0;
}

/* Mobile drawer behavior */
@media (max-width: 576px) {
  .fleet-dispatch-panel {
    top: auto !important;
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 60% !important;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
    border-bottom: none !important;
    padding: 20px 20px 24px !important;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5) !important;
  }
}


.leaflet-bar a {
  background-color: var(--bg-card) !important;
  color: var(--color-text) !important;
  border-bottom: 1px solid var(--border-color) !important;
}

.leaflet-bar a:hover {
  background-color: var(--bg-card-hover) !important;
  color: var(--primary) !important;
}

.leaflet-bar {
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-sm) !important;
}

/* Pending Teles Dispatch Grid & Cards */
.pending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  min-height: 120px;
}

.pending-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.pending-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 0, 170, 0.3);
  box-shadow: var(--shadow-md);
}

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

.pending-card-header strong {
  font-size: 1.1rem;
  color: var(--color-text);
}

.pending-card-body {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text);
  flex-grow: 1;
}

.pending-card-body p {
  margin-bottom: 4px;
}

.pending-card-body p strong {
  color: var(--color-text-muted);
}

.pending-card-footer select {
  padding-right: 28px !important; /* Make room for arrow dropdown icon */
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e9f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
}

/* Toast animations */
@keyframes toast-in {
  from {
    transform: translateY(30px) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes toast-out {
  from {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateY(30px) scale(0.9);
    opacity: 0;
  }
}

/* Active Deliveries Grid & Cards */
.active-deliveries-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  min-height: 120px;
}

.tele-state-card {
  grid-column: 1 / -1;
  min-height: 120px;
  background-color: var(--bg-card);
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius-md);
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
}

.tele-state-card p {
  color: var(--color-text);
  font-weight: 600;
}

.tele-state-card svg {
  color: var(--warning);
  width: 30px;
  height: 30px;
}

.tele-state-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary);
  animation: spin 0.9s linear infinite;
}

.tele-state-error {
  border-color: rgba(239, 68, 68, 0.35);
  background-color: rgba(239, 68, 68, 0.06);
}

.active-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--border-radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.active-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 174, 239, 0.3);
  box-shadow: var(--shadow-md);
}

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

.active-card-header strong {
  font-size: 1.1rem;
  color: var(--color-text);
}

.active-card-body {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text);
  flex-grow: 1;
}

.active-card-body p {
  margin-bottom: 4px;
}

.active-card-body p strong {
  color: var(--color-text-muted);
}

/* ================= NOTIFICATION PANEL ================= */
.notification-bell {
  position: relative;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  overflow: hidden;
}

.notification-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}

.notification-panel-header h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}

.notif-clear-btn {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-family: var(--font-primary);
}

.notif-clear-btn:hover {
  color: var(--primary-hover);
}

.notification-list {
  max-height: 280px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-fast);
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item.unread {
  background-color: rgba(255, 0, 170, 0.04);
}

.notif-item:hover {
  background-color: var(--bg-card-hover);
}

.notif-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-icon svg {
  width: 16px;
  height: 16px;
}

.notif-icon.bg-primary {
  background-color: var(--primary-glow);
  color: var(--primary);
}

.notif-icon.bg-yellow {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.notif-icon.bg-cyan {
  background-color: var(--accent-cyan-glow);
  color: var(--accent-cyan);
}

.notif-content p {
  font-size: 0.82rem;
  color: var(--color-text);
  line-height: 1.4;
}

.notif-time {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-top: 4px;
  display: block;
}

/* ================= MODAL ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 540px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

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

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}

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

.modal-body {
  padding: 24px;
}

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

.form-error-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--border-radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--error);
  margin-top: 16px;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background-color: rgba(255, 0, 170, 0.05);
}

.rider-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.icon-action-btn {
  width: 34px;
  height: 34px;
  padding: 0 !important;
  justify-content: center;
  border-radius: var(--border-radius-sm);
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 96px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  color: var(--color-text);
  font-family: var(--font-primary);
  padding: 12px 14px;
  outline: none;
}

textarea:focus {
  border-color: var(--border-color-focus);
}

.profile-modal-card {
  max-width: 760px;
}

.profile-settings-form .modal-body {
  padding: 0;
}

.profile-settings-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0;
}

.profile-preview-panel {
  background:
    radial-gradient(circle at top, rgba(255, 0, 170, 0.16), transparent 58%),
    var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 360px;
}

.profile-avatar-preview {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 0, 170, 0.55);
  box-shadow: 0 0 0 8px rgba(255, 0, 170, 0.08);
  background-color: var(--bg-input);
}

.profile-preview-panel strong {
  margin-top: 18px;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.profile-preview-panel > span {
  margin-top: 4px;
  color: var(--color-text-muted);
  font-size: 0.86rem;
}

.profile-partner-note {
  margin-top: auto;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  text-align: left;
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.profile-partner-note svg {
  color: var(--primary);
  flex-shrink: 0;
}

.profile-fields-panel {
  padding: 28px;
}

.profile-fields-panel .form-group {
  margin-bottom: 18px;
}

.profile-fields-panel .form-group:last-child {
  margin-bottom: 0;
}

.profile-fields-panel .input-wrapper input {
  height: 46px;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--color-text);
  border-radius: var(--border-radius-md);
  padding: 12px 14px 12px 44px;
}

.profile-fields-panel .input-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 0, 170, 0.12);
}

@media (max-width: 720px) {
  .profile-settings-layout {
    grid-template-columns: 1fr;
  }

  .profile-preview-panel {
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .profile-fields-panel {
    padding: 22px;
  }
}

/* Topbar positioning fix for notification dropdown */
.topbar-right {
  position: relative;
}

/* ================= CREDENTIAL CARD ================= */
.credential-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  margin-bottom: 20px;
}

.cred-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
}

.cred-row:last-child {
  border-bottom: none;
}

.cred-label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}

.cred-value {
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--color-text);
  word-break: break-all;
}

.btn-pin-toggle {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  flex-shrink: 0;
}

.btn-pin-toggle:hover {
  color: var(--color-text);
  border-color: var(--color-text-muted);
}

.btn-pin-toggle svg {
  width: 15px;
  height: 15px;
}

.cred-actions {
  display: flex;
  gap: 10px;
}

/* Autocomplete Dropdown Styles */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 220px;
  overflow-y: auto;
  z-index: 10000;
  margin-top: 4px;
}
.autocomplete-item {
  padding: 12px 16px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--color-text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background var(--transition-fast), color var(--transition-fast);
  text-align: left;
}
.autocomplete-item:hover {
  background: rgba(255, 0, 170, 0.1);
  color: #ffffff;
}
.autocomplete-item:last-child {
  border-bottom: none;
}

/* Toggle Switch Styles */
.switch-container {
  display: flex;
  align-items: center;
  gap: 12px;
}
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-color);
  transition: .3s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: #ffffff;
  transition: .3s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--primary);
}
input:checked + .slider:before {
  transform: translateX(20px);
}
.switch-label-text {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Accordion & Settings improvements */
#geofencing-accordion .accordion-header,
#simultaneous-deliveries-accordion .accordion-header {
  border-radius: var(--border-radius-sm);
}
#geofencing-accordion .accordion-header:hover,
#simultaneous-deliveries-accordion .accordion-header:hover {
  background: rgba(255, 255, 255, 0.04) !important;
}
.accordion-header-summary span {
  display: inline-flex;
  align-items: center;
}
.accordion-header-summary strong {
  margin-left: 4px;
}
#rider-search-input:focus {
  border-color: var(--primary) !important;
}
.table-scroll-container table tbody tr {
  transition: background 0.2s ease;
}
.table-scroll-container table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02) !important;
}
.table-scroll-container table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.01);
}
/* Custom Scrollbar for premium dark theme */
.table-scroll-container::-webkit-scrollbar {
  width: 6px;
}
.table-scroll-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
.table-scroll-container::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
.table-scroll-container::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* =====================================================================
   MIGRATION: UNIFIED TELES VIEW STYLES
   ===================================================================== */

/* View Mode Toggler Styles */
.view-toggle button {
  background: transparent;
  color: var(--color-text-muted);
  border: none;
  transition: all 0.2s ease;
}
.view-toggle button.active {
  background: var(--bg-card) !important;
  color: var(--color-text) !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Status Filter Pill Styles */
.filter-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--color-text-muted);
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.filter-pill:hover, .filter-pill.active {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--color-text);
}
.filter-pill.active {
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Compact Table Layout (Production-Grade High Density) */
.compact-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
}
.compact-table th {
  background-color: rgba(255, 255, 255, 0.02);
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 6px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}
.compact-table td {
  padding: 6px 12px;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--color-text);
  vertical-align: middle;
}
.compact-table tbody tr {
  transition: background-color 0.15s ease;
}
.compact-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}
.compact-table tbody tr:last-child td {
  border-bottom: none;
}
.compact-table select.inline-select {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--color-text);
  border-radius: var(--border-radius-sm);
  padding: 4px 8px;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
  max-width: 180px;
  transition: border-color 0.15s ease;
}
.compact-table select.inline-select:focus {
  border-color: var(--primary);
}

/* Action Icons inside Table */
.table-action-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, transform 0.1s ease;
}
.table-action-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
  transform: scale(1.15);
}
.table-action-btn.btn-success:hover {
  color: var(--success);
}
.table-action-btn.btn-warning:hover {
  color: var(--warning);
}
.table-action-btn.btn-danger:hover {
  color: #ef4444;
}

/* Google Maps InfoWindow dark theme styling */
.gm-style-iw-c {
  background-color: #1e1e24 !important;
  color: var(--color-text) !important;
  border: 1px solid rgba(255, 185, 0, 0.3) !important;
  border-radius: var(--border-radius-md) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 0 !important;
}

.gm-style-iw-d {
  overflow: hidden !important;
  max-height: none !important;
  padding: 0 !important;
}

.gm-style-iw-t::after {
  background: #1e1e24 !important;
  box-shadow: -1px 1px 0 0 rgba(255, 185, 0, 0.3) !important;
}

.gm-ui-hover-effect {
  top: 8px !important;
  right: 8px !important;
  opacity: 0.7 !important;
  transition: opacity 0.2s !important;
}
.gm-ui-hover-effect:hover {
  opacity: 1 !important;
}
.gm-ui-hover-effect span {
  background-color: var(--color-text-muted) !important;
  margin: 4px !important;
}

/* Google Autocomplete dark theme dropdown */
.pac-container {
  background-color: #121216 !important;
  border: 1px solid rgba(255, 185, 0, 0.3) !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
  font-family: inherit !important;
  margin-top: 4px !important;
  z-index: 99999 !important;
}

.pac-item {
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  color: #8e8e9f !important;
  cursor: pointer !important;
  padding: 8px 12px !important;
  font-size: 0.85rem !important;
  line-height: 1.5 !important;
}

.pac-item:first-of-type {
  border-top: none !important;
}

.pac-item:hover {
  background-color: rgba(255, 185, 0, 0.08) !important;
  color: #fff !important;
}

.pac-item-query {
  color: #fff !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
}

.pac-matched {
  color: #ffb700 !important;
}

.pac-logo::after {
  display: none !important;
}

/* Floating Action Button (FAB) - Chamar Tele Manual */
.fab-btn {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, var(--primary), #c2410c) !important;
  border: none !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4) !important;
  cursor: pointer !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
  z-index: 9999 !important; /* z-index ultra-alto para persistência sobre tabelas */
}

.fab-btn:hover {
  transform: scale(1.08) !important;
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.6) !important;
}

.fab-btn-fixed {
  position: fixed !important;
  bottom: 25px !important;
  right: 25px !important;
  width: 60px !important;
  height: 60px !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, var(--primary), #c2410c) !important;
  border: none !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 8px 32px rgba(245, 158, 11, 0.4) !important;
  cursor: pointer !important;
  z-index: 99999 !important; /* Camada ultra-alta isolada sobre qualquer tabela */
  transition: transform 0.2s, box-shadow 0.2s !important;
}

.fab-btn-fixed:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 12px 36px rgba(245, 158, 11, 0.6) !important;
}

/* Password Eye Toggle Styling */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.password-wrapper input {
  padding-right: 42px !important;
}
#toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  transition: color 0.2s ease;
  z-index: 2;
}
#toggle-password:hover {
  color: var(--primary);
}

/* =====================================================================
   CENTRO DE OPERAÇÕES (CONTROL TOWER & REALTIME KANBAN)
   ===================================================================== */
.op-control-center-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: calc(100vh - 110px);
}

.op-topbar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.kanban-board-container {
  display: grid;
  grid-template-columns: repeat(6, minmax(260px, 1fr));
  gap: 12px;
  flex: 1;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
}

.kanban-column {
  background: rgba(22, 24, 29, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  display: flex;
  flex-direction: column;
  max-height: 100%;
  overflow: hidden;
}

.kanban-column-header {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-column-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text);
}

.kanban-column-count {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}

.kanban-cards-list {
  padding: 10px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tele-card-op {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.tele-card-op:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

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

.tele-card-code {
  font-family: monospace;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

/* Badges SLA */
.sla-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

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

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

.sla-badge-critical {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.5);
  animation: pulseCritical 1.5s infinite;
}

@keyframes pulseCritical {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.sla-estimated-tag {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-left: 4px;
}

.diagnostic-badge-unknown {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px dashed #ef4444;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
}

/* Fleet Bar & Rider Pill Cards */
.op-fleet-bar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 12px 16px;
}

.op-fleet-riders-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.op-rider-pill-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 8px 12px;
  min-width: 170px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
  user-select: none;
}

.op-rider-pill-card:hover {
  border-color: var(--primary);
  background: rgba(255, 183, 0, 0.05);
}

.op-rider-pill-card.drag-over {
  border: 2px dashed var(--primary) !important;
  background: rgba(255, 183, 0, 0.15) !important;
  transform: scale(1.04);
}

.op-rider-pill-card.capacity-full {
  opacity: 0.7;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.05);
}

.op-rider-pill-card.unavailable {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.01);
}

.rider-capacity-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

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

.capacity-full-badge {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

/* ===================================================================== */
/* Google Places Autocomplete (New) Dark Theme Styling & Dropdown Support */
/* ===================================================================== */
gmp-place-autocomplete {
  display: block;
  width: 100%;
  box-sizing: border-box;
  --gmp-place-autocomplete-background-color: var(--bg-input, #1a1a24);
  --gmp-place-autocomplete-border-color: var(--border-color, rgba(255, 255, 255, 0.12));
  --gmp-place-autocomplete-color: var(--color-text, #ffffff);
  --gmp-place-autocomplete-placeholder-color: var(--color-text-muted, #8e8e9f);
  --gmp-place-autocomplete-focus-border-color: var(--primary, #ff3b30);
  --gmp-place-autocomplete-border-radius: 8px;
  --gmp-place-autocomplete-font-size: 0.9rem;
  --gmp-place-autocomplete-height: 44px;
}

gmp-place-autocomplete::part(input) {
  background-color: var(--bg-input, #1a1a24) !important;
  color: var(--color-text, #ffffff) !important;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12)) !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-family: inherit !important;
  font-size: 0.9rem !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

gmp-place-autocomplete::part(input):focus {
  border-color: var(--primary, #ff3b30) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(255, 59, 48, 0.25) !important;
}

#modal-request-delivery .modal-body,
.modal-body {
  overflow: visible !important;
}

/* =====================================================================
   FASE 2: Quick Action Drawer & Timeline Styles
   ===================================================================== */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  z-index: 9998;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.drawer-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.quick-action-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 500px;
  max-width: 100vw;
  height: 100vh;
  background: var(--bg-surface, #121216);
  border-left: 1px solid var(--border-color, #272732);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.quick-action-drawer.hidden {
  transform: translateX(100%);
  pointer-events: none;
}

.drawer-header {
  padding: 20px 24px;
  background: var(--bg-topbar, #0d0d11);
  border-bottom: 1px solid var(--border-color, #272732);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.drawer-tele-code {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text, #f4f4f5);
  margin: 0;
}
.drawer-client-name {
  font-size: 0.85rem;
  color: var(--color-text-muted, #a1a1aa);
}
.drawer-close-btn {
  background: transparent;
  border: 1px solid var(--border-color, #272732);
  color: var(--color-text, #f4f4f5);
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-sm, 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.drawer-close-btn:hover {
  background: var(--secondary, #272730);
  border-color: var(--color-text, #f4f4f5);
}

.drawer-tabs {
  display: flex;
  background: var(--bg-app, #09090b);
  border-bottom: 1px solid var(--border-color, #272732);
}
.drawer-tab-btn {
  flex: 1;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--color-text-muted, #a1a1aa);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.drawer-tab-btn.active {
  color: var(--accent-cyan, #00CCFF);
  border-bottom-color: var(--accent-cyan, #00CCFF);
  background: rgba(0, 204, 255, 0.05);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  position: relative;
}

.drawer-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: var(--color-text-muted, #a1a1aa);
}
.drawer-loading.hidden { display: none; }

.drawer-tab-content { display: none; }
.drawer-tab-content.active { display: block; }

.drawer-section {
  margin-bottom: 24px;
}
.drawer-section h3 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted, #a1a1aa);
  margin-bottom: 12px;
  font-weight: 700;
}
.drawer-section-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted, #888);
  margin-bottom: 16px;
}

.drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.drawer-cell {
  background: var(--bg-card, #181820);
  border: 1px solid var(--border-color, #272732);
  border-radius: var(--border-radius-sm, 8px);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.drawer-cell .label {
  font-size: 0.75rem;
  color: var(--color-text-muted, #a1a1aa);
}
.drawer-cell .value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text, #f4f4f5);
}

.drawer-card {
  background: var(--bg-card, #181820);
  border: 1px solid var(--border-color, #272732);
  border-radius: var(--border-radius-sm, 8px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.drawer-address-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.drawer-address-row svg {
  margin-top: 2px;
  flex-shrink: 0;
}
.drawer-address-row .icon-pickup { color: var(--warning, #f59e0b); }
.drawer-address-row .icon-delivery { color: var(--success, #10b981); }

.drawer-notice {
  padding: 12px 16px;
  border-radius: var(--border-radius-sm, 8px);
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 16px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}
.drawer-notice.hidden { display: none; }

.drawer-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Timeline Styles */
.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  padding-left: 20px;
}
.timeline-container::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border-color, #272732);
}
.timeline-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-card, #181820);
  border: 1px solid var(--border-color, #272732);
  border-radius: var(--border-radius-sm, 8px);
  padding: 12px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 16px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan, #00CCFF);
  border: 2px solid var(--bg-surface, #121216);
}
.timeline-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.timeline-event-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-text, #f4f4f5);
}
.timeline-event-time {
  font-size: 0.75rem;
  color: var(--color-text-muted, #a1a1aa);
}
.timeline-event-actor {
  font-size: 0.8rem;
  color: var(--accent-cyan, #00CCFF);
}
.timeline-event-reason {
  font-size: 0.8rem;
  font-style: italic;
  color: #fbbf24;
  margin-top: 4px;
}

/* Riders Selection List */
.riders-selection-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rider-select-card {
  background: var(--bg-card, #181820);
  border: 1px solid var(--border-color, #272732);
  border-radius: var(--border-radius-sm, 8px);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}
.rider-select-card:hover {
  border-color: var(--accent-cyan, #00CCFF);
  background: var(--bg-card-hover, #1f1f29);
}
.rider-select-card.disabled {
  opacity: 0.5;
  pointer-events: none;
}
.rider-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rider-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text, #f4f4f5);
}
.rider-stats {
  font-size: 0.75rem;
  color: var(--color-text-muted, #a1a1aa);
}

/* Modais Internos Sobrepostos */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 10005;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.hidden { display: none; }
.modal-card {
  background: var(--bg-surface, #121216);
  border: 1px solid var(--border-color, #272732);
  border-radius: var(--border-radius-md, 12px);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal-header {
  padding: 16px 20px;
  background: var(--bg-topbar, #0d0d11);
  border-bottom: 1px solid var(--border-color, #272732);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--color-text, #f4f4f5);
}
.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted, #aaa);
  font-size: 1.4rem;
  cursor: pointer;
}
.modal-body {
  padding: 20px;
}
.modal-hint {
  font-size: 0.85rem;
  color: var(--color-text-muted, #aaa);
  margin-bottom: 12px;
}
.modal-footer {
  padding: 14px 20px;
  background: var(--bg-topbar, #0d0d11);
  border-top: 1px solid var(--border-color, #272732);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* =====================================================================
   Fase 3B.2A.1 — Weekly Settlement Admin Drawer & Responsive Styles
   ===================================================================== */
body.drawer-open {
  overflow: hidden !important;
}

.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
  z-index: 999;
  transition: opacity 0.2s ease-in-out;
}

.drawer-backdrop.hidden {
  display: none !important;
}

#rider-settlement-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 720px;
  max-width: 95vw;
  height: 100vh;
  background-color: var(--bg-card, #13131a);
  border-left: 1px solid var(--border-color, #272732);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

#rider-settlement-drawer.hidden {
  transform: translateX(100%);
  pointer-events: none;
  display: none !important;
}

.rider-drawer-header {
  padding: 20px 24px;
  background-color: var(--bg-topbar, #0d0d11);
  border-bottom: 1px solid var(--border-color, #272732);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.rider-drawer-title-area h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text, #f4f4f5);
}

.rider-drawer-subtitle {
  font-size: 0.82rem;
  color: var(--color-text-muted, #94a3b8);
  margin-top: 4px;
}

.rider-drawer-close-btn {
  background: transparent;
  border: 1px solid var(--border-color, #272732);
  border-radius: var(--border-radius-sm, 6px);
  color: var(--color-text-muted, #94a3b8);
  font-size: 1.4rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s, color 0.15s;
}

.rider-drawer-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-text, #f4f4f5);
}

.rider-drawer-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.rider-drawer-section {
  background: var(--bg-input, rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border-color, #272732);
  border-radius: var(--border-radius-md, 8px);
  padding: 18px;
}

.rider-drawer-section-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text, #f4f4f5);
  margin: 0 0 14px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px dashed var(--border-color, #272732);
  padding-bottom: 8px;
}

.integrity-alert-banner {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid #f59e0b;
  border-radius: 6px;
  padding: 10px 14px;
  color: #f59e0b;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.summary-grid-2col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.summary-item-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(0, 0, 0, 0.2);
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.summary-item-label {
  font-size: 0.76rem;
  color: var(--color-text-muted, #94a3b8);
  font-weight: 500;
}

.summary-item-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text, #f4f4f5);
}

.badge-not-calculated {
  background-color: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

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

.badge-calculated {
  background-color: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

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

.badge-partially-blocked {
  background-color: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

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






