/* ==========================================================================
   Core Geotag v2.0 - Premium Design System (Vanilla CSS)
   Sleek Dark Theme, Glassmorphism, Micro-Animations, Enterprise Polish
   ========================================================================== */

:root,
[data-theme="dark"] {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Core Colors - Dark Mode (Default) */
  --bg-app: #090d16;
  --bg-surface: #0f172a;
  --bg-card: #172238;
  --bg-card-hover: #1e2c47;
  --bg-input: #0b1324;
  --bg-subtle: rgba(255, 255, 255, 0.04);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.08);
  --border-focus: #38bdf8;

  /* Brand & Status Accents */
  --primary: #38bdf8;
  --primary-hover: #0ea5e9;
  --primary-glow: rgba(56, 189, 248, 0.25);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --info: #818cf8;
  --info-bg: rgba(129, 140, 248, 0.15);

  /* Typography */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --heading-color: #ffffff;

  /* Surfaces & Headers */
  --header-bg: rgba(15, 23, 42, 0.85);
  --table-th-bg: rgba(11, 19, 36, 0.7);
  --table-hover-bg: rgba(255, 255, 255, 0.03);
  --banner-bg: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
  --banner-border: var(--border-subtle);

  /* Shadows & Radius - Clean, Deliberate Scale (antislop-ui) */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.35), 0 1px 2px -1px rgba(0, 0, 0, 0.25);
  --shadow-glow: none;
  --transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
  /* Core Colors - Light Mode */
  --bg-app: #f1f5f9;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #f8fafc;
  --bg-subtle: rgba(0, 0, 0, 0.03);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-card: #e2e8f0;
  --border-focus: #0284c7;

  /* Brand & Status Accents */
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-glow: rgba(2, 132, 199, 0.15);

  --success: #059669;
  --success-bg: rgba(16, 185, 129, 0.12);
  --warning: #d97706;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --danger: #dc2626;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --info: #4f46e5;
  --info-bg: rgba(79, 70, 229, 0.12);

  /* Typography */
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
  --heading-color: #0f172a;

  /* Surfaces & Headers */
  --header-bg: rgba(255, 255, 255, 0.95);
  --table-th-bg: #f8fafc;
  --table-hover-bg: rgba(0, 0, 0, 0.02);
  --banner-bg: #ffffff;
  --banner-border: #cbd5e1;

  /* Shadows - Subtle & Grounded */
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  --shadow-glow: none;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
  transition: background-color 0.2s ease, color 0.2s ease;
}

[data-theme="light"] body {
  background-image: none;
}

/* ==========================================================================
   Insecure Origin Warning Banner (Clean, High-Contrast, Responsive)
   ========================================================================== */

.insecure-context-banner {
  background: #991b1b;
  color: #ffffff;
  padding: 8px 16px;
  font-size: 0.82rem;
  border-bottom: 2px solid #ef4444;
  position: sticky;
  top: 0;
  z-index: 10000;
}

.insecure-banner-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.insecure-banner-text {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 280px;
}

.insecure-banner-icon {
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
}

.insecure-banner-highlight {
  color: #fef08a;
}

.insecure-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-https-guide {
  background: #ffffff;
  color: #991b1b;
  font-weight: 700;
  border: none;
  padding: 5px 12px;
  font-size: 0.78rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.btn-https-guide:hover {
  background: #fef2f2;
}

.btn-close-banner {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: var(--radius-sm);
}

.btn-close-banner:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.app-header {
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-text-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--heading-color);
  line-height: 1;
  white-space: nowrap;
}

.brand-system-subtitle {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
  line-height: 1.1;
  margin-top: 3px;
  white-space: nowrap;
}

/* Portal Role Switcher Bar */
.role-switcher {
  display: flex;
  background: rgba(11, 19, 36, 0.95);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  gap: 4px;
}

[data-theme="light"] .role-switcher {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.role-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  min-height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  touch-action: manipulation;
}

.role-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .role-tab-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.role-tab-btn.active {
  background: var(--primary);
  color: #090d16;
  font-weight: 700;
}

[data-theme="light"] .role-tab-btn.active {
  background: #0284c7;
  color: #ffffff;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.active-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.btn-icon-ghost {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  position: relative;
}

.btn-icon-ghost:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

/* ==========================================================================
   Profile Menu Dropdown & Actions
   ========================================================================== */
.profile-menu-container {
  position: relative;
  display: inline-flex;
}

.profile-trigger-btn {
  position: relative;
}

.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 280px;
  max-width: 90vw;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  z-index: 1200;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 0.5rem 0;
  overflow: hidden;
  animation: profileMenuPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes profileMenuPop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.85rem 1rem;
}

.profile-avatar-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  font-size: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

.profile-info-text {
  min-width: 0;
  flex: 1;
}

.profile-info-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--heading-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-info-role-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
  padding: 1px 7px;
  border-radius: 999px;
  margin-top: 2px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.profile-info-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-dropdown-divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 0.4rem 0;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
}

.theme-setting-row {
  gap: 10px;
}

.theme-setting-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

[data-theme="light"] .profile-dropdown-menu {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .profile-dropdown-divider {
  background: #f1f5f9;
}

/* CGMS Bar Chart + Arrow Logo Styles */
.cgms-logo-svg .cgms-bar {
  fill: #ffffff;
}
[data-theme="light"] .cgms-logo-svg .cgms-bar {
  fill: #0f172a;
}

/* ==========================================================================
   Main Layout & Container
   ========================================================================== */

.app-main {
  flex: 1;
  padding: 1.5rem;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Analyst, Admin, & SPV: Alur sidebar menempel di sisi kiri langsung di bawah judul CORE GEOTAG */
.app-main:has(#portal-analyst.active),
.app-main:has(#portal-admin.active),
.app-main:has(#portal-spv.active),
body[data-active-portal="ANALYST"] .app-main,
body[data-active-portal="ADMIN"] .app-main,
body[data-active-portal="SPV"] .app-main {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-top: 1rem;
}

.portal-container {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.portal-container.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero / Portal Header */
.portal-header-banner {
  background: var(--banner-bg);
  border: 1px solid var(--banner-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.portal-header-banner h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--heading-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.portal-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* Card System */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(56, 189, 248, 0.3);
}

[data-theme="light"] .card:hover {
  border-color: rgba(2, 132, 199, 0.4);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--heading-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   Metrics & KPI Grid
   ========================================================================== */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

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

.metric-card.warning::before {
  background: var(--warning);
}

.metric-card.success::before {
  background: var(--success);
}

.metric-card.danger::before {
  background: var(--danger);
}

.metric-card.info::before {
  background: var(--info);
}

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

.metric-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--heading-color);
  margin: 0.25rem 0;
}

.metric-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ==========================================================================
   Forms, Inputs & Buttons
   ========================================================================== */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.btn {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.65rem 1.25rem;
  min-height: 38px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  text-decoration: none;
  touch-action: manipulation;
  user-select: none;
}

.btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.btn-primary:hover {
  background: #0369a1;
  border-color: #0369a1;
}

.btn-success {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
}

.btn-success:hover {
  background: #047857;
  border-color: #047857;
}

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

.btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

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

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

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

/* ==========================================================================
   Badges, Status Pills & Tags
   ========================================================================== */

.badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-pending {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid rgba(129, 140, 248, 0.3);
}

.tag-flag {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-right: 4px;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.table th {
  background: var(--table-th-bg);
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

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

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

.coord-cell {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--primary);
  letter-spacing: -0.02em;
}

/* ==========================================================================
   GPS Capture Live Module (SE Portal)
   ========================================================================== */

.gps-radar-box {
  background: radial-gradient(circle, rgba(14, 165, 233, 0.12) 0%, rgba(15, 23, 42, 0.8) 70%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 1.5rem 0;
}

.radar-ping {
  width: 80px;
  height: 80px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.radar-ping::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid var(--primary);
  border-radius: 50%;
  animation: radarPulse 1.8s infinite;
}

@keyframes radarPulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

/* Loading Spinner Modern & Bersih (GPS Calculation & Status) */
.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3.5px solid rgba(56, 189, 248, 0.2);
  border-top-color: var(--primary, #0284c7);
  border-radius: 50%;
  animation: gpsSpin 0.85s linear infinite;
  margin: 0 auto 1rem;
}

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

.gps-status-msg {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.gps-instruction-msg {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
}

/* Camera & Watermark Canvas Preview */
.photo-preview-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  max-width: 500px;
  margin: 1rem auto;
  border: 2px solid var(--border-subtle);
}

.photo-preview-img {
  width: 100%;
  height: auto;
  display: block;
}

.photo-watermark-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85) 30%);
  padding: 1rem 0.75rem 0.5rem;
  font-size: 0.7rem;
  line-height: 1.35;
  color: #fff;
  font-family: monospace;
}

/* ==========================================================================
   Map Container (Leaflet)
   ========================================================================== */

.map-container {
  width: 100%;
  min-height: 320px;
  height: 340px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  margin: 1rem 0;
  position: relative;
  background: #1e293b;
  z-index: 1;
}

.map-container .leaflet-container {
  width: 100% !important;
  height: 100% !important;
  background: #1e293b !important;
}

/* ==========================================================================
   Modal & Drawer
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-backdrop.active {
  display: flex;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Pre / Code Blocks for PDA Preview */
.code-preview-box {
  background: #060913;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  color: #38bdf8;
  max-height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  font-size: 0.85rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: toastSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: 380px;
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

.toast.info {
  border-left: 4px solid var(--primary);
}

@keyframes toastSlide {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ==========================================================================
   Header & Banner Responsive Reflow (antislop-layoutmobile)
   ========================================================================== */
@media (max-width: 860px) {
  .app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 1rem;
    gap: 0.75rem;
  }

  .brand-wrapper {
    min-width: 0;
    gap: 0.6rem;
  }

  .header-right {
    justify-content: flex-end;
    gap: 0.5rem;
  }

  .active-user-badge {
    padding: 4px 10px;
    font-size: 0.75rem;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .role-switcher {
    grid-area: nav;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    display: flex;
    padding: 3px;
    gap: 4px;
    border-radius: var(--radius-md);
  }

  .role-switcher::-webkit-scrollbar {
    display: none;
  }

  .role-tab-btn {
    flex: 1 1 auto;
    white-space: nowrap;
    justify-content: center;
    min-height: 40px;
    padding: 7px 12px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
  }

  .portal-header-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1.15rem 1.25rem;
  }

  .portal-header-banner h1 {
    font-size: clamp(1.15rem, 3.5vw, 1.4rem);
  }
}

/* ==========================================================================
   Searchable Outlet Dropdown & Realtime GPS Processing Coordinates
   ========================================================================== */

.searchable-dropdown-wrapper {
  position: relative;
  width: 100%;
}

.outlet-search-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.outlet-search-input-box input {
  padding-left: 2.75rem;
  padding-right: 2.75rem;
  font-size: 0.95rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  width: 100%;
  color: #fff;
  height: 46px;
}

.outlet-search-input-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
  background: rgba(15, 23, 42, 0.95);
}

.outlet-search-icon {
  position: absolute;
  left: 0.9rem;
  color: var(--text-muted);
  pointer-events: none;
  font-size: 1.1rem;
}

.outlet-clear-btn {
  position: absolute;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 0.85rem;
  border-radius: 4px;
  display: none;
  transition: all 0.15s ease;
}

.outlet-clear-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

.dropdown-results-container {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #0f172a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  max-height: 320px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.7), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  display: none;
}

.dropdown-item-row {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.15s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

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

.dropdown-item-row:hover,
.dropdown-item-row.highlighted {
  background: rgba(56, 189, 248, 0.12);
}

.dropdown-item-row.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(239, 68, 68, 0.05);
}

.selected-outlet-panel {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.85) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
}

/* Coordinates Processing & Final Displays */
.coord-stream-container {
  background: #0b1324;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1rem;
}

.sampling-table-wrapper {
  max-height: 180px;
  overflow-y: auto;
  margin-top: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
}

.sampling-table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.sampling-table-wrapper th,
.sampling-table-wrapper td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sampling-table-wrapper th {
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-muted);
  position: sticky;
  top: 0;
  z-index: 2;
}

.final-coord-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 78, 59, 0.25) 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1.25rem;
}

.pulse-badge {
  animation: pulseGpsBadge 1.6s infinite;
}

@keyframes pulseGpsBadge {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

/* Leaflet Straight Line Distance Tooltip */
.map-distance-tooltip {
  background: rgba(15, 23, 42, 0.95) !important;
  border: 1.5px solid #0284c7 !important;
  color: #38bdf8 !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6) !important;
  white-space: nowrap !important;
}

.map-distance-tooltip::before {
  border-top-color: #0284c7 !important;
}

/* Custom Live GPS Sampling Beacon */
.custom-live-gps-icon {
  background: transparent !important;
  border: none !important;
}

.live-gps-beacon-wrapper {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-gps-beacon-dot {
  width: 14px;
  height: 14px;
  background: #0284c7;
  border: 2.5px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.95);
  z-index: 2;
  position: relative;
}

.live-gps-beacon-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  background: rgba(56, 189, 248, 0.65);
  border-radius: 50%;
  animation: beaconPing 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
  z-index: 1;
}

@keyframes beaconPing {
  0% {
    transform: scale(0.5);
    opacity: 0.95;
  }
  70% {
    transform: scale(2.2);
    opacity: 0.25;
  }
  100% {
    transform: scale(2.7);
    opacity: 0;
  }
}

/* ==========================================================================
   Leaflet Theme Support (Dark & Light Controls & Popups)
   ========================================================================== */

.leaflet-container {
  font-family: var(--font-main) !important;
}

.leaflet-control-layers {
  background: var(--bg-surface) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-card) !important;
  padding: 8px 12px !important;
  font-size: 0.8rem !important;
}

.leaflet-control-layers-base label {
  color: var(--text-main) !important;
  margin-bottom: 4px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  font-weight: 500 !important;
}

.leaflet-control-zoom a {
  background: var(--bg-surface) !important;
  color: var(--text-main) !important;
  border-color: var(--border-subtle) !important;
}

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

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

.leaflet-popup-content {
  color: var(--text-main) !important;
  font-family: var(--font-main) !important;
}

/* ==========================================================================
   Light Mode Overrides & Polish
   ========================================================================== */

[data-theme="light"] .brand-title {
  background: linear-gradient(to right, #0f172a, #334155);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .role-switcher {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

[data-theme="light"] .active-user-badge {
  background: #ffffff;
  border-color: #cbd5e1;
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .btn-icon-ghost {
  color: var(--text-muted);
  border-color: #cbd5e1;
  background: #ffffff;
}

[data-theme="light"] .btn-icon-ghost:hover {
  color: var(--text-main);
  background: #f1f5f9;
  border-color: #94a3b8;
}

[data-theme="light"] .outlet-search-input-box input {
  background: #ffffff;
  border-color: #cbd5e1;
  color: var(--text-main);
}

[data-theme="light"] .outlet-search-input-box input:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

[data-theme="light"] .dropdown-results-container {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .dropdown-item-row {
  border-bottom: 1px solid #f1f5f9;
}

[data-theme="light"] .dropdown-item-row:hover,
[data-theme="light"] .dropdown-item-row.highlighted {
  background: rgba(2, 132, 199, 0.08);
}

[data-theme="light"] .selected-outlet-panel {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-color: rgba(2, 132, 199, 0.35);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.08);
}

[data-theme="light"] .coord-stream-container {
  background: #f8fafc;
  border-color: #cbd5e1;
}

[data-theme="light"] .sampling-table-wrapper {
  border-color: #cbd5e1;
}

[data-theme="light"] .sampling-table-wrapper th {
  background: #e2e8f0;
  color: #334155;
  border-bottom: 1px solid #cbd5e1;
}

[data-theme="light"] .sampling-table-wrapper td {
  border-bottom: 1px solid #f1f5f9;
}

[data-theme="light"] .final-coord-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(240, 253, 244, 0.8) 100%);
  border-color: rgba(16, 185, 129, 0.4);
}

[data-theme="light"] .code-preview-box {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0369a1;
}

[data-theme="light"] .map-distance-tooltip {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: #0284c7 !important;
  color: #0284c7 !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .map-distance-tooltip::before {
  border-top-color: #0284c7 !important;
}

[data-theme="light"] .gps-radar-box {
  background: radial-gradient(circle, rgba(2, 132, 199, 0.08) 0%, rgba(248, 250, 252, 0.95) 70%);
  border-color: rgba(2, 132, 199, 0.25);
}

[data-theme="light"] .gps-status-msg {
  color: var(--heading-color);
}

.gps-quality-alert-box {
  margin: 0.75rem auto 0;
  max-width: 520px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  text-align: left;
  line-height: 1.45;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
}
.gps-quality-alert-box b,
.gps-quality-alert-box strong {
  color: #fef08a;
}

/* Comprehensive fallback for inline dark backgrounds/whites */
[data-theme="light"] [style*="color: #fff"],
[data-theme="light"] [style*="color: #ffffff"],
[data-theme="light"] [style*="color:#fff"],
[data-theme="light"] [style*="color:#ffffff"],
[data-theme="light"] [style*="color: #f8fafc"],
[data-theme="light"] [style*="color:#f8fafc"] {
  color: var(--text-main) !important;
}

[data-theme="light"] [style*="color: #f1f5f9"],
[data-theme="light"] [style*="color:#f1f5f9"],
[data-theme="light"] [style*="color: #e0f2fe"],
[data-theme="light"] [style*="color:#e0f2fe"] {
  color: #0f172a !important;
}

[data-theme="light"] [style*="color: #e2e8f0"],
[data-theme="light"] [style*="color:#e2e8f0"] {
  color: #1e293b !important;
}

[data-theme="light"] [style*="color: #cbd5e1"],
[data-theme="light"] [style*="color:#cbd5e1"] {
  color: #334155 !important;
}

[data-theme="light"] [style*="color: #94a3b8"],
[data-theme="light"] [style*="color:#94a3b8"] {
  color: #475569 !important;
}

[data-theme="light"] [style*="color: #fde68a"],
[data-theme="light"] [style*="color:#fde68a"] {
  color: #92400e !important;
}

[data-theme="light"] [style*="color: #38bdf8"],
[data-theme="light"] [style*="color:#38bdf8"] {
  color: #0284c7 !important;
}

[data-theme="light"] [style*="background: rgba(11, 19, 36"],
[data-theme="light"] [style*="background: rgba(15, 23, 42"],
[data-theme="light"] [style*="background:rgba(11, 19, 36"],
[data-theme="light"] [style*="background:rgba(15, 23, 42"] {
  background: var(--bg-input) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-main) !important;
}

/* Light Mode Warning Alert Boxes (Crystal Clear Contrast) */
[data-theme="light"] .gps-quality-alert-box,
[data-theme="light"] #gps-quality-alert,
[data-theme="light"] #final-warning-box,
[data-theme="light"] [style*="background: rgba(245, 158, 11"],
[data-theme="light"] [style*="background:rgba(245, 158, 11"] {
  background: #fffbeb !important;
  border: 1.5px solid #d97706 !important;
  color: #78350f !important;
  font-weight: 500 !important;
}
[data-theme="light"] .gps-quality-alert-box b,
[data-theme="light"] .gps-quality-alert-box strong,
[data-theme="light"] #gps-quality-alert b,
[data-theme="light"] #gps-quality-alert strong,
[data-theme="light"] #final-warning-box b,
[data-theme="light"] #final-warning-box strong,
[data-theme="light"] [style*="background: rgba(245, 158, 11"] b,
[data-theme="light"] [style*="background: rgba(245, 158, 11"] strong,
[data-theme="light"] [style*="background:rgba(245, 158, 11"] b,
[data-theme="light"] [style*="background:rgba(245, 158, 11"] strong {
  color: #78350f !important;
  font-weight: 700 !important;
}

/* Light Mode Final Coordinates Panel */
[data-theme="light"] #final-lat-val,
[data-theme="light"] #final-lng-val {
  color: #0369a1 !important;
  font-weight: 700 !important;
}

[data-theme="light"] #final-dist-val {
  color: #0284c7 !important;
  font-weight: 800 !important;
}

[data-theme="light"] #final-acc-val {
  color: #047857 !important;
  font-weight: 700 !important;
}

[data-theme="light"] #final-acc-quality {
  color: #334155 !important;
  font-weight: 600 !important;
}

[data-theme="light"] .final-coord-box {
  background: #ffffff !important;
  border: 1.5px solid #10b981 !important;
  box-shadow: 0 4px 20px -2px rgba(16, 185, 129, 0.12) !important;
}

[data-theme="light"] .final-coord-box small {
  color: #334155 !important;
  font-weight: 700 !important;
}

[data-theme="light"] .final-coord-box div[style*="background: rgba(15, 23, 42"] {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

/* Light Mode Reverse Geocode & Address Card Boxes */
[data-theme="light"] #final-geo-addr,
[data-theme="light"] #sum-geo-addr,
[data-theme="light"] #sum-store-addr,
[data-theme="light"] #spv-detail-reverse-geocode,
[data-theme="light"] #spv-detail-address,
[data-theme="light"] #analyst-detail-reverse-geocode,
[data-theme="light"] #analyst-detail-address,
[data-theme="light"] #admin-gtg-detail-geo-addr,
[data-theme="light"] #admin-gtg-detail-store-addr {
  color: #0f172a !important;
  font-weight: 600 !important;
}

[data-theme="light"] [style*="border-left: 3px solid #38bdf8"],
[data-theme="light"] [style*="border-left: 3px solid #0284c7"] {
  background: #f0f9ff !important;
  border-left: 4px solid #0284c7 !important;
  border-top: 1px solid #e0f2fe !important;
  border-right: 1px solid #e0f2fe !important;
  border-bottom: 1px solid #e0f2fe !important;
}

[data-theme="light"] [style*="border-left: 3px solid #38bdf8"] small,
[data-theme="light"] [style*="border-left: 3px solid #0284c7"] small {
  color: #0369a1 !important;
  font-weight: 700 !important;
}

[data-theme="light"] [style*="border-left: 3px solid #94a3b8"] {
  background: #f8fafc !important;
  border-left: 4px solid #64748b !important;
  border-top: 1px solid #e2e8f0 !important;
  border-right: 1px solid #e2e8f0 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] [style*="border-left: 3px solid #94a3b8"] small {
  color: #334155 !important;
  font-weight: 700 !important;
}

/* Light Mode Camera Section in Final Panel */
[data-theme="light"] div[style*="border: 1.5px dashed rgba(56, 189, 248"],
[data-theme="light"] div[style*="border:1.5px dashed rgba(56, 189, 248"] {
  background: #f8fafc !important;
  border: 1.5px dashed #0284c7 !important;
}

[data-theme="light"] div[style*="border: 1.5px dashed rgba(56, 189, 248"] h4,
[data-theme="light"] div[style*="border:1.5px dashed rgba(56, 189, 248"] h4 {
  color: #0f172a !important;
  font-weight: 700 !important;
}

[data-theme="light"] div[style*="border: 1.5px dashed rgba(56, 189, 248"] p,
[data-theme="light"] div[style*="border:1.5px dashed rgba(56, 189, 248"] p {
  color: #475569 !important;
}

/* Light Mode Submit Section & Tracking Details */
[data-theme="light"] #submit-section div[style*="background: rgba(15, 23, 42"],
[data-theme="light"] #submit-section div[style*="background:rgba(15, 23, 42"] {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] #submit-section h4 {
  color: #0f172a !important;
}

[data-theme="light"] #submit-section label {
  color: #334155 !important;
  font-weight: 600 !important;
}

[data-theme="light"] #submit-section [style*="background: rgba(30, 41, 59"],
[data-theme="light"] #submit-section [style*="background:rgba(30, 41, 59"] {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="light"] #submit-section [style*="background: rgba(56, 189, 248, 0.1)"],
[data-theme="light"] #submit-section [style*="background:rgba(56, 189, 248, 0.1)"] {
  background: #f0f9ff !important;
  border-left: 3.5px solid #0284c7 !important;
}

[data-theme="light"] .modal-backdrop {
  background: rgba(15, 23, 42, 0.45);
}

[data-theme="light"] .modal-dialog {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] #se-confirm-modal .modal-dialog {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="light"] #se-confirm-modal .modal-header,
[data-theme="light"] #se-confirm-modal .modal-footer {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] #se-confirm-summary {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: var(--radius-sm);
  padding: 1rem;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
  color: var(--heading-color);
}

[data-theme="light"] strong {
  color: var(--heading-color);
}

[data-theme="light"] .form-label {
  color: var(--text-muted);
}

[data-theme="light"] .form-control {
  background: var(--bg-input);
  border-color: var(--border-subtle);
  color: var(--text-main);
}

[data-theme="light"] .form-control:focus {
  background: #ffffff;
  border-color: var(--border-focus);
}

/* ==========================================================================
   Back to Top Floating Button
   ========================================================================== */
.back-to-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.5);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.2s ease,
              background 0.2s ease;
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top-btn:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 8px 25px rgba(2, 132, 199, 0.7);
  background: linear-gradient(135deg, #0369a1, #0284c7);
}

.back-to-top-btn:active {
  transform: translateY(0) scale(0.95);
}

/* ==========================================================================
   Table Pagination & Parsial Row Controls
   ========================================================================== */
.table-pagination-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: rgba(15, 23, 42, 0.6);
  border-top: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

[data-theme="light"] .table-pagination-wrapper {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.table-pagination-info {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.table-pagination-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.pagination-page-size-selector {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.pagination-page-size-selector select {
  padding: 4px 8px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  cursor: pointer;
  outline: none;
}

.pagination-btn-group {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.pagination-btn {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pagination-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination-page-info {
  font-weight: 600;
  color: #fff;
  padding: 0 6px;
  font-size: 0.8rem;
}

[data-theme="light"] .pagination-page-info {
  color: var(--heading-color);
}

/* ==========================================================================
   Password Visibility Pills & Excel Upload Modal Styles
   ========================================================================== */
.password-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.6);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-family: monospace;
  font-size: 0.85rem;
}

[data-theme="light"] .password-pill {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.password-pill .pwd-text {
  letter-spacing: 1px;
}

.password-pill .btn-pwd-action {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 0.8rem;
  line-height: 1;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.password-pill .btn-pwd-action:hover {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
}

.excel-dropzone {
  border: 2px dashed rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  background: rgba(15, 23, 42, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.excel-dropzone:hover, .excel-dropzone.dragover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

[data-theme="light"] .excel-dropzone {
  background: #f8fafc;
  border-color: #94a3b8;
}

[data-theme="light"] .excel-dropzone:hover {
  background: #f0f9ff;
  border-color: #0284c7;
}

/* ==========================================================================
   Portal Sidebar Layout & Expandable/Collapsible Navigation (Analyst & Admin)
   ========================================================================== */

/* Header Hamburger Button (Khusus Analyst & Super Admin) */
.btn-header-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 0.35rem;
}

.btn-header-hamburger:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
  transform: translateY(-1px);
}

[data-theme="light"] .btn-header-hamburger {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

[data-theme="light"] .btn-header-hamburger:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
}

/* Hanya tampilkan hamburger button untuk role Analyst, Admin, dan SPV pada Desktop */
@media (min-width: 769px) {
  body[data-active-portal="ANALYST"] #btn-header-hamburger,
  body[data-active-portal="ADMIN"] #btn-header-hamburger,
  body[data-active-portal="SPV"] #btn-header-hamburger,
  body:has(#portal-spv.active) #btn-header-hamburger,
  body:has(#portal-analyst.active) #btn-header-hamburger,
  body:has(#portal-admin.active) #btn-header-hamburger {
    display: inline-flex !important;
  }
}

/* Layout Grid untuk Sidebar + Konten */
.portal-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  align-items: start;
  transition: grid-template-columns 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mode Mini Sidebar (Dikecilin / Collapsed) Sesuai Referensi Gambar */
.portal-layout.sidebar-collapsed {
  grid-template-columns: 68px 1fr;
}

.portal-sidebar {
  position: sticky;
  top: 4.5rem;
  width: 240px;
  min-width: 240px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.85rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  backdrop-filter: blur(12px);
  z-index: 20;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.25s cubic-bezier(0.4, 0, 0.2, 1), padding 0.25s ease;
}

.portal-layout.sidebar-collapsed .portal-sidebar {
  width: 68px;
  min-width: 68px;
  padding: 0.75rem 0.4rem;
  align-items: center;
}

[data-theme="light"] .portal-sidebar {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.06);
}

/* Header Title di dalam Sidebar */
.portal-sidebar-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 0.25rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.portal-layout.sidebar-collapsed .portal-sidebar-title {
  justify-content: center;
  padding: 0;
}

.portal-layout.sidebar-collapsed .portal-sidebar-title .sidebar-title-text {
  display: none !important;
}

.btn-sidebar-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s ease;
  line-height: 1;
}

.btn-sidebar-toggle:hover {
  color: #fff;
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
}

[data-theme="light"] .btn-sidebar-toggle {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

[data-theme="light"] .btn-sidebar-toggle:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
}

/* Navigasi List Tombol */
.portal-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
}

.portal-sidebar-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: left;
  position: relative;
}

.portal-sidebar-btn .btn-label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.portal-sidebar-btn .sidebar-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.portal-sidebar-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
  transform: translateX(2px);
}

[data-theme="light"] .portal-sidebar-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

/* Tombol Aktif Saat Expanded (Di-expand) */
.portal-sidebar-btn.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, #0284c7, #2563eb) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
  font-weight: 700;
}

.portal-sidebar-btn .sidebar-count-badge {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.portal-sidebar-btn.active .sidebar-count-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* === TAMPILAN MINI ICON SAAT DIKECILIN (COLLAPSED - PERSIS GAMBAR REFERENSI) === */
.portal-layout.sidebar-collapsed .portal-sidebar-btn {
  justify-content: center;
  padding: 0.65rem 0;
  width: 46px;
  height: 46px;
  margin: 0 auto;
  border-radius: 10px;
  transform: none !important;
}

.portal-layout.sidebar-collapsed .portal-sidebar-btn .btn-label {
  justify-content: center;
  gap: 0;
}

.portal-layout.sidebar-collapsed .portal-sidebar-btn .btn-label-text {
  display: none !important;
}

/* Notifikasi Badge Mini Dot Saat Dikecilin */
.portal-layout.sidebar-collapsed .portal-sidebar-btn .sidebar-count-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 8px;
  width: 8px;
  height: 8px;
  padding: 0;
  font-size: 0;
  border-radius: 50%;
  background: #38bdf8;
  border: 2px solid var(--bg-surface);
}

.portal-layout.sidebar-collapsed .portal-sidebar-btn.active .sidebar-count-badge {
  background: #ffffff;
  border-color: #0284c7;
}

/* Gaya Tombol Aktif Kotak Biru Muda Sesuai Screenshot */
.portal-layout.sidebar-collapsed .portal-sidebar-btn.active {
  background: rgba(56, 189, 248, 0.16) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2) !important;
}

[data-theme="light"] .portal-layout.sidebar-collapsed .portal-sidebar-btn.active {
  background: #e0f2fe !important;
  color: #0284c7 !important;
  border-color: #bae6fd !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15) !important;
}

.portal-layout.sidebar-collapsed .portal-sidebar-footer {
  display: none !important;
}

.portal-sidebar-footer {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.portal-content {
  min-width: 0;
  width: 100%;
}

@media (min-width: 769px) and (max-width: 992px) {
  .portal-layout,
  .portal-layout.sidebar-collapsed {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }

  .portal-sidebar,
  .portal-layout.sidebar-collapsed .portal-sidebar {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    position: static !important;
    flex-direction: column;
    padding: 0.75rem !important;
    align-items: stretch !important;
  }

  .portal-layout.sidebar-collapsed .portal-sidebar-title .sidebar-title-text {
    display: inline !important;
  }

  .portal-sidebar-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.4rem;
    padding-bottom: 2px;
  }

  .portal-sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .portal-sidebar-btn {
    width: auto;
    flex: 0 0 auto;
    min-width: auto;
    white-space: nowrap;
    min-height: 40px;
    padding: 0.55rem 0.85rem;
  }

  .portal-sidebar-btn:hover {
    transform: none;
  }

  .portal-sidebar-footer,
  .portal-layout.sidebar-collapsed .portal-sidebar-footer {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
  }
}

/* ==========================================================================
   Light Mode Palette & Typography Contrast Fixes (Fix Font Clash)
   ========================================================================== */

[data-theme="light"] {
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;
  --bg-subtle: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-card: #e2e8f0;
  --border-focus: #0284c7;

  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;
  --heading-color: #0f172a;

  --header-bg: rgba(255, 255, 255, 0.95);
  --table-th-bg: #f8fafc;
  --table-hover-bg: #f8fafc;
  --banner-bg: #ffffff;
  --banner-border: #e2e8f0;
}

/* Light Mode: Card, Header & Typography */
[data-theme="light"] body {
  color: #0f172a;
}

[data-theme="light"] .card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .card-header {
  border-bottom-color: #f1f5f9;
}

[data-theme="light"] .card-title,
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5 {
  color: #0f172a !important;
}

[data-theme="light"] .portal-header-banner {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .portal-header-banner h1 {
  color: #0f172a !important;
}

[data-theme="light"] .portal-subtitle {
  color: #64748b !important;
}

/* Light Mode: Table Contrast */
[data-theme="light"] .table-responsive {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .table th {
  background: #f8fafc !important;
  color: #475569 !important;
  border-bottom: 2px solid #e2e8f0 !important;
  font-weight: 700;
}

[data-theme="light"] .table td {
  color: #0f172a !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

[data-theme="light"] .table tbody tr:hover {
  background: #f8fafc !important;
}

/* Light Mode: Comprehensive High-Contrast Typography & Colors */
[data-theme="light"] [style*="color: #fff"]:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.badge):not(.tracking-step-circle):not(.btn-pill.active),
[data-theme="light"] [style*="color: #ffffff"]:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.badge):not(.tracking-step-circle):not(.btn-pill.active),
[data-theme="light"] [style*="color:#fff"]:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.badge):not(.tracking-step-circle):not(.btn-pill.active),
[data-theme="light"] [style*="color:#ffffff"]:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.badge):not(.tracking-step-circle):not(.btn-pill.active),
[data-theme="light"] [style*="color: #f8fafc"],
[data-theme="light"] [style*="color:#f8fafc"],
[data-theme="light"] [style*="color: #f1f5f9"],
[data-theme="light"] [style*="color:#f1f5f9"] {
  color: #0f172a !important;
}

/* Secondary & Muted Light Grays -> Darker Slate for High Contrast */
[data-theme="light"] [style*="color: #cbd5e1"],
[data-theme="light"] [style*="color:#cbd5e1"],
[data-theme="light"] [style*="color: #e2e8f0"],
[data-theme="light"] [style*="color:#e2e8f0"] {
  color: #334155 !important;
}

[data-theme="light"] [style*="color: #94a3b8"],
[data-theme="light"] [style*="color:#94a3b8"],
[data-theme="light"] [style*="color: var(--text-dim)"],
[data-theme="light"] [style*="color:var(--text-dim)"],
[data-theme="light"] small[style*="color: var(--text-dim)"],
[data-theme="light"] div[style*="color: var(--text-dim)"],
[data-theme="light"] span[style*="color: var(--text-dim)"] {
  color: #475569 !important;
}

[data-theme="light"] [style*="color: var(--text-muted)"],
[data-theme="light"] [style*="color:var(--text-muted)"] {
  color: #334155 !important;
}

/* Sky/Cyan Accents in Dark Mode -> Deep Blue (#0284c7 / #0369a1) in Light Mode */
[data-theme="light"] [style*="color: #38bdf8"],
[data-theme="light"] [style*="color:#38bdf8"],
[data-theme="light"] [style*="color: #a5f3fc"] {
  color: #0284c7 !important;
}

[data-theme="light"] [style*="color: #e0f2fe"],
[data-theme="light"] [style*="color:#e0f2fe"] {
  color: #0369a1 !important;
  font-weight: 600;
}

/* Neon Green in Dark Mode -> Deep Forest Green in Light Mode */
[data-theme="light"] [style*="color: #4ade80"],
[data-theme="light"] [style*="color:#4ade80"],
[data-theme="light"] [style*="color: #10b981"]:not(.tracking-step-circle),
[data-theme="light"] [style*="color:#10b981"]:not(.tracking-step-circle),
[data-theme="light"] [style*="color: #34d399"] {
  color: #15803d !important;
}

[data-theme="light"] [style*="color: #6ee7b7"],
[data-theme="light"] [style*="color:#6ee7b7"] {
  color: #047857 !important;
}

/* Red / Warnings in Dark Mode -> Crisp Dark Red / Amber in Light Mode */
[data-theme="light"] [style*="color: #f87171"]:not(.tracking-step-circle),
[data-theme="light"] [style*="color:#f87171"]:not(.tracking-step-circle) {
  color: #b91c1c !important;
}

[data-theme="light"] [style*="color: #fca5a5"],
[data-theme="light"] [style*="color:#fca5a5"],
[data-theme="light"] [style*="color: #fecaca"],
[data-theme="light"] [style*="color:#fecaca"] {
  color: #991b1b !important;
}

[data-theme="light"] [style*="color: #fde68a"],
[data-theme="light"] [style*="color:#fde68a"],
[data-theme="light"] [style*="color: #fbbf24"] {
  color: #92400e !important;
}

/* Solid Action Buttons & Active Items Keep Crisp White Text */
[data-theme="light"] .btn-primary,
[data-theme="light"] .btn-primary *,
[data-theme="light"] .btn-success,
[data-theme="light"] .btn-success *,
[data-theme="light"] .btn-danger,
[data-theme="light"] .btn-danger *,
[data-theme="light"] .portal-sidebar-btn.active,
[data-theme="light"] .portal-sidebar-btn.active *,
[data-theme="light"] .btn-pill.active,
[data-theme="light"] .btn-pill.active * {
  color: #ffffff !important;
}

/* Light Mode: Surfaces & Containers with Dark Backgrounds */
[data-theme="light"] [style*="background: rgba(11, 19, 36"],
[data-theme="light"] [style*="background: rgba(15, 23, 42"],
[data-theme="light"] [style*="background: rgba(30, 41, 59"],
[data-theme="light"] [style*="background:rgba(11, 19, 36"],
[data-theme="light"] [style*="background:rgba(15, 23, 42"],
[data-theme="light"] [style*="background:rgba(30, 41, 59"] {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

/* Fixed Dark Modals & Viewfinder Backgrounds */
[data-theme="light"] .modal-dialog,
[data-theme="light"] [style*="background: #0f172a"],
[data-theme="light"] [style*="background: #0b1324"],
[data-theme="light"] [style*="background: #1e293b"],
[data-theme="light"] [style*="background: #111827"] {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .modal-header {
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .modal-header strong {
  color: #0f172a !important;
}

[data-theme="light"] .modal-footer {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
}

/* Tinted Info, Green, Amber & Red Callout Boxes */
[data-theme="light"] [style*="background: rgba(56, 189, 248"] {
  background: #f0f9ff !important;
  border-color: #bae6fd !important;
}

[data-theme="light"] [style*="background: rgba(16, 185, 129"] {
  background: #f0fdf4 !important;
  border-color: #bbf7d0 !important;
}

[data-theme="light"] [style*="background: rgba(245, 158, 11"] {
  background: #fffbeb !important;
  border-color: #fde68a !important;
  color: #92400e !important;
}

[data-theme="light"] [style*="background: rgba(239, 68, 68"] {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
}

/* Light Mode: Form Inputs */
[data-theme="light"] .form-control {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .form-control:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

[data-theme="light"] .form-label {
  color: #1e293b !important;
  font-weight: 600;
}

/* Light Mode: Secondary Button */
[data-theme="light"] .btn-secondary {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #1e293b !important;
}

[data-theme="light"] .btn-secondary:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Light Mode: Status Badges */
[data-theme="light"] .badge-pending {
  background: #fef3c7 !important;
  color: #92400e !important;
  border-color: #fde68a !important;
  font-weight: 700;
}

[data-theme="light"] .badge-success {
  background: #dcfce7 !important;
  color: #15803d !important;
  border-color: #bbf7d0 !important;
  font-weight: 700;
}

[data-theme="light"] .badge-danger {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border-color: #fca5a5 !important;
  font-weight: 700;
}

[data-theme="light"] .badge-info {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border-color: #bae6fd !important;
  font-weight: 700;
}

[data-theme="light"] .badge-secondary {
  background: #f1f5f9 !important;
  color: #475569 !important;
  border-color: #cbd5e1 !important;
  font-weight: 600;
}

[data-theme="light"] .tag-flag {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border-color: #fca5a5 !important;
  font-weight: 700;
}

/* Light Mode: Metrics & KPI Grid */
[data-theme="light"] .metric-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .metric-value {
  color: #0f172a !important;
}

[data-theme="light"] .metric-label {
  color: #475569 !important;
}

/* Light Mode: Code Blocks */
[data-theme="light"] code {
  background: #f1f5f9 !important;
  color: #0284c7 !important;
  border: 1px solid #cbd5e1 !important;
}

/* ==========================================================================
   Password & PIN Display Pill with Eye & Copy Buttons
   ========================================================================== */
.password-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-family: monospace;
  font-size: 0.85rem;
}

[data-theme="light"] .password-pill {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.password-pill .pwd-text {
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 1px;
  cursor: pointer;
  user-select: all;
}

.password-pill .pwd-text.unmasked {
  color: #10b981;
}

.password-pill button,
.password-pill .btn-pwd-toggle,
.password-pill .btn-pwd-copy,
.password-pill .btn-pwd-action {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  font-size: 0.85rem;
  line-height: 1;
  border-radius: 4px;
  color: var(--text-main);
  transition: transform 0.15s ease, background 0.15s ease;
}

.password-pill button:hover,
.password-pill .btn-pwd-toggle:hover,
.password-pill .btn-pwd-copy:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.15);
}

/* ==========================================================================
   Multi-Tier Tracking Stepper & History Components (SE -> SPV -> Analyst)
   ========================================================================== */
.filter-pills {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn-pill {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

[data-theme="light"] .btn-pill {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}

.btn-pill:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--primary);
  color: #fff;
}

[data-theme="light"] .btn-pill:hover {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
}

.btn-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #090d16;
  font-weight: 700;
  box-shadow: 0 0 12px var(--primary-glow);
}

[data-theme="light"] .btn-pill.active {
  color: #ffffff;
}

.btn-pill .pill-badge {
  background: rgba(0, 0, 0, 0.25);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.7rem;
}

.btn-pill.active .pill-badge {
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
}

/* Mini Stepper for Table Rows */
.mini-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.mini-step {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 4px;
  line-height: 1.2;
}

.mini-step.step-completed {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.mini-step.step-pending {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  animation: pulse-step 2s infinite ease-in-out;
}

.mini-step.step-rejected {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #f87171;
}

.mini-step.step-waiting {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
}

.mini-step-arrow {
  color: var(--text-dim);
  font-size: 0.65rem;
}

[data-theme="light"] .mini-step.step-completed {
  background: #dcfce7 !important;
  border-color: #86efac !important;
  color: #15803d !important;
}

[data-theme="light"] .mini-step.step-pending {
  background: #fef3c7 !important;
  border-color: #fde68a !important;
  color: #92400e !important;
}

[data-theme="light"] .mini-step.step-rejected {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #b91c1c !important;
}

[data-theme="light"] .mini-step.step-waiting {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}

[data-theme="light"] .mini-step-arrow {
  color: #94a3b8 !important;
}

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

/* Full Tracking Stepper Component in Modal */
.tracking-stepper-box {
  background: rgba(11, 19, 36, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

[data-theme="light"] .tracking-stepper-box {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.tracking-stepper {
  display: flex;
  align-items: flex-start;
  position: relative;
  justify-content: space-between;
  gap: 1rem;
}

@media (max-width: 680px) {
  .tracking-stepper {
    flex-direction: column;
    gap: 1.25rem;
  }
}

.tracking-step-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.tracking-step-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.tracking-step-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tracking-step-item.step-completed .tracking-step-circle {
  background: #10b981;
  color: #fff;
  border: 3px solid rgba(16, 185, 129, 0.3);
}

.tracking-step-item.step-pending .tracking-step-circle {
  background: #f59e0b;
  color: #fff;
  border: 3px solid rgba(245, 158, 11, 0.35);
  animation: pulse-step 2s infinite;
}

.tracking-step-item.step-rejected .tracking-step-circle {
  background: #ef4444;
  color: #fff;
  border: 3px solid rgba(239, 68, 68, 0.35);
}

.tracking-step-item.step-waiting .tracking-step-circle {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  border: 2px dashed var(--border-subtle);
}

.tracking-step-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
}

[data-theme="light"] .tracking-step-title {
  color: #0f172a;
}

.tracking-step-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  background: rgba(15, 23, 42, 0.6);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  margin-top: 4px;
}

[data-theme="light"] .tracking-step-desc {
  background: #ffffff;
  border-color: #e2e8f0;
}

/* Rejection Callout Box */
.rejection-callout-card {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-left: 4px solid #ef4444;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.rejection-callout-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #f87171;
  margin-bottom: 0.4rem;
}

.rejection-callout-reason {
  display: inline-block;
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.rejection-callout-notes {
  font-size: 0.85rem;
  color: #fecaca;
  line-height: 1.45;
}

.rejection-callout-meta {
  font-size: 0.75rem;
  color: rgba(254, 202, 202, 0.7);
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px dashed rgba(239, 68, 68, 0.25);
}

[data-theme="light"] .rejection-callout-card {
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  border-left: 4px solid #dc2626 !important;
}

[data-theme="light"] .rejection-callout-title {
  color: #b91c1c !important;
}

[data-theme="light"] .rejection-callout-reason {
  background: #fee2e2 !important;
  color: #991b1b !important;
  border: 1px solid #fca5a5 !important;
}

[data-theme="light"] .rejection-callout-notes {
  color: #7f1d1d !important;
}

[data-theme="light"] .rejection-callout-meta {
  color: #991b1b !important;
  border-top: 1px dashed #fca5a5 !important;
}

[data-theme="light"] .portal-sidebar-btn:not(.active) .sidebar-count-badge {
  background: #e2e8f0 !important;
  color: #334155 !important;
}

[data-theme="light"] .dropdown-item-row strong {
  color: #0f172a !important;
}

[data-theme="light"] .dropdown-item-row small,
[data-theme="light"] .dropdown-item-row div[style*="var(--text-dim)"] {
  color: #475569 !important;
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Layout Reflow (antislop-layoutmobile + antislop-ui)
   ========================================================================== */

@media (max-width: 640px) {
  /* Prevent horizontal scroll leaks and eliminate desktop-scale padding */
  .app-main,
  .app-main:has(#portal-analyst.active),
  .app-main:has(#portal-admin.active),
  .app-main:has(#portal-spv.active),
  body[data-active-portal="ANALYST"] .app-main,
  body[data-active-portal="ADMIN"] .app-main,
  body[data-active-portal="SPV"] .app-main {
    padding: 0.75rem 0.6rem !important;
    max-width: 100vw;
  }

  /* Card and Content Hierarchy */
  .card {
    padding: 1rem 0.85rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
  }

  .card-title {
    font-size: 1rem;
  }

  /* Metrics Grid: Clean 2-column mobile dashboard */
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    margin-bottom: 1rem;
  }

  .metric-card {
    padding: 0.85rem 0.75rem;
    border-radius: var(--radius-md);
  }

  .metric-value {
    font-size: 1.45rem;
  }

  .metric-label {
    font-size: 0.7rem;
  }

  .metric-sub {
    font-size: 0.7rem;
  }

  /* Forms & Touch ergonomics: 16px font prevents iOS zoom; 44px min-height for touch */
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .form-control,
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px;
    min-height: 44px;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md);
  }

  .btn {
    min-height: 44px;
    padding: 0.65rem 1.15rem;
    font-size: 0.85rem;
  }

  /* Searchable Dropdown & Results */
  .outlet-search-input-box input {
    height: 48px;
    font-size: 16px;
    padding-left: 2.6rem;
    padding-right: 2.6rem;
  }

  .dropdown-results-container {
    max-height: 260px;
    border-radius: var(--radius-md);
  }

  .dropdown-item-row {
    padding: 0.75rem 0.85rem;
    min-height: 48px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }

  .dropdown-item-row strong {
    font-size: 0.85rem;
  }

  .dropdown-item-row small {
    font-size: 0.75rem;
  }

  /* Filter Pills: Smooth horizontal scroll without wrapping collision */
  .filter-pills {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.4rem;
    padding-bottom: 4px;
    margin-bottom: 0.75rem;
  }

  .filter-pills::-webkit-scrollbar {
    display: none;
  }

  .btn-pill {
    flex-shrink: 0;
    min-height: 38px;
    padding: 6px 12px;
    font-size: 0.78rem;
  }

  /* Tables: Fluid responsive scrolling with touch padding */
  .table-responsive {
    border-radius: var(--radius-md);
    -webkit-overflow-scrolling: touch;
  }

  .table th,
  .table td {
    padding: 0.65rem 0.75rem;
    font-size: 0.8rem;
  }

  .coord-cell {
    font-size: 0.75rem;
  }

  /* Table Pagination: Vertical stack with thumb-friendly controls */
  .table-pagination-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
  }

  .table-pagination-info {
    justify-content: center;
    font-size: 0.8rem;
  }

  .table-pagination-controls {
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
  }

  .pagination-page-size-selector {
    font-size: 0.75rem;
  }

  .pagination-page-size-selector select {
    font-size: 14px;
    padding: 6px 8px;
    min-height: 38px;
  }

  .pagination-btn {
    min-height: 38px;
    min-width: 38px;
    padding: 0.4rem 0.65rem;
  }

  /* Modals: Clean viewport fit without horizontal clipping */
  .modal-backdrop {
    padding: 0.5rem;
  }

  .modal-dialog {
    max-height: 94vh;
    width: 100%;
    border-radius: var(--radius-md);
  }

  .modal-header {
    padding: 0.85rem 1rem;
  }

  .modal-body {
    padding: 1rem;
    -webkit-overflow-scrolling: touch;
  }

  .modal-footer {
    padding: 0.75rem 1rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .modal-footer .btn {
    width: 100%;
    min-height: 44px;
  }

  /* GPS & Leaflet Map Sizing */
  .gps-radar-box {
    padding: 1.25rem 0.85rem;
    margin: 1rem 0;
    border-radius: var(--radius-md);
  }

  .radar-ping {
    width: 60px;
    height: 60px;
    margin-bottom: 0.75rem;
  }

  .gps-status-msg {
    font-size: 1rem;
  }

  .map-container {
    height: 250px;
    min-height: 220px;
    margin: 0.75rem 0;
    border-radius: var(--radius-md);
  }

  .photo-preview-wrapper {
    max-width: 100%;
    margin: 0.75rem 0;
  }

  /* Floating back-to-top button */
  .back-to-top-btn {
    bottom: 4.8rem;
    right: 1rem;
    width: 44px;
    height: 44px;
  }
}

/* ==========================================================================
   Mobile Bottom Navigation Bar & Layout Reflow (antislop-layoutmobile)
   ========================================================================== */
@media (max-width: 768px) {
  /* Header: Clean, Compact, Zero Collisions */
  .app-header {
    padding: 0.55rem 0.85rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
  }

  .brand-wrapper {
    gap: 0.5rem !important;
    min-width: 0 !important;
  }

  .brand-logo-icon {
    width: 32px !important;
    height: 32px !important;
  }

  .brand-title {
    font-size: 1.15rem !important;
    font-weight: 900 !important;
    letter-spacing: -0.01em !important;
    line-height: 1 !important;
  }

  #brand-system-subtitle,
  .brand-badge,
  #header-active-user-badge,
  #btn-theme-toggle,
  #btn-header-hamburger,
  body #btn-header-hamburger {
    display: none !important;
  }

  .header-right {
    gap: 0.5rem !important;
  }

  /* Fixed Docked Bottom Navigation Bar for Portals */
  .portal-layout {
    display: block !important;
    width: 100% !important;
  }

  .portal-sidebar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 100% !important;
    height: 60px !important;
    min-height: 60px !important;
    background: var(--header-bg) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-top: 1px solid var(--border-subtle) !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    border-radius: 0 !important;
    padding: 6px 0 !important;
    margin: 0 !important;
    z-index: 1000 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.28) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .portal-sidebar-footer,
  .portal-sidebar-title,
  .portal-sidebar-divider,
  .portal-sidebar > *:not(.portal-sidebar-nav) {
    display: none !important;
  }

  [data-theme="light"] .portal-sidebar {
    background: rgba(255, 255, 255, 0.95) !important;
    border-top-color: #cbd5e1 !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08) !important;
  }

  .portal-sidebar-nav {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
  }

  .portal-sidebar-nav::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  /* Minimized Icon-Only Navigation Buttons: Pas 5 ikon per lebar layar (20vw) dan bisa di-slide */
  .portal-sidebar-btn {
    flex: 0 0 20% !important;
    width: 20% !important;
    max-width: 20% !important;
    min-width: 20% !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    position: relative !important;
    transform: none !important;
    box-sizing: border-box !important;
  }

  /* Khusus SPV & portal dengan <= 2 tombol agar merata di tengah (space-evenly) */
  #portal-spv .portal-sidebar-nav,
  #spv-sidebar .portal-sidebar-nav,
  .portal-sidebar-nav:has(> button:nth-last-child(-n+2):first-child) {
    justify-content: space-evenly !important;
  }

  #portal-spv .portal-sidebar-btn,
  #spv-sidebar .portal-sidebar-btn,
  .portal-sidebar-nav:has(> button:nth-last-child(-n+2):first-child) > .portal-sidebar-btn {
    flex: 0 1 110px !important;
    width: 110px !important;
    max-width: 120px !important;
    min-width: 64px !important;
  }

  .portal-sidebar-btn .btn-label {
    justify-content: center !important;
    gap: 0 !important;
  }

  .portal-sidebar-btn .btn-label-text {
    display: none !important;
  }

  .portal-sidebar-btn .sidebar-icon {
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
  }

  .portal-sidebar-btn.active {
    background: rgba(56, 189, 248, 0.16) !important;
    color: #38bdf8 !important;
    border-color: rgba(56, 189, 248, 0.4) !important;
    box-shadow: 0 2px 10px rgba(56, 189, 248, 0.25) !important;
  }

  [data-theme="light"] .portal-sidebar-btn.active {
    background: #e0f2fe !important;
    color: #0284c7 !important;
    border-color: #bae6fd !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15) !important;
  }

  /* Dot Badge for Bottom Bar */
  .portal-sidebar-btn .sidebar-count-badge {
    position: absolute !important;
    top: 5px !important;
    right: 5px !important;
    min-width: 8px !important;
    width: 8px !important;
    height: 8px !important;
    padding: 0 !important;
    font-size: 0 !important;
    border-radius: 50% !important;
    background: #38bdf8 !important;
    border: 2px solid var(--bg-surface) !important;
  }

  /* Main Container & Content Padding so nothing is hidden behind bottom bar */
  .app-main,
  .portal-content,
  #se-workspace {
    padding-bottom: 76px !important;
  }

  /* Floating Back to Top button sits above bottom bar */
  .back-to-top-btn {
    bottom: 4.8rem !important;
    right: 1rem !important;
  }
}

@media (max-width: 420px) {
  /* Narrow phone optimizations (360px - 414px) */
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  #brand-system-subtitle {
    display: none;
  }

  .brand-badge {
    display: none;
  }

  .brand-title {
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .active-user-badge {
    padding: 4px 8px;
    font-size: 0.72rem;
    max-width: 140px;
  }

  .btn-icon-ghost {
    width: 38px;
    height: 38px;
  }

  .role-tab-btn {
    padding: 6px 10px;
    font-size: 0.76rem;
  }
}
