/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #0b0f19;
  color: #f3f4f6;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* App Header Navigation */
.app-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(13, 20, 38, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1010;
  padding: 8px 16px;
  gap: 10px;
  height: 50px;
}

.nav-tab {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  color: #ffffff;
  background: #6366f1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Tab Containers */
.tab-content {
  display: none;
  width: 100%;
}

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

/* Specific view adjustments */
#map-view.tab-content {
  height: 100vh;
  margin-top: 0;
  position: relative;
}

#analytics-view.tab-content,
#developers-view.tab-content {
  height: calc(100vh - 50px);
  margin-top: 50px;
  overflow-y: auto;
  padding: 20px;
  background: #0b0f19;
  -webkit-overflow-scrolling: touch;
}

/* Map Styling */
#map {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  background: #0d1117;
}

/* Override Leaflet Dark Theme Adjustments */
.leaflet-container {
  background: #0d1117 !important;
}

.leaflet-tile-container {
  filter: none;
}

/* Floating Action Button (FAB) */
.fab-btn {
  position: absolute;
  top: 65px; /* Offset to sit below nav tab bar */
  right: 15px;
  z-index: 1000;
  background: rgba(18, 26, 47, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  color: #6366f1;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab-btn:hover {
  background: #6366f1;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
}

.theme-btn {
  top: 125px;
}

/* Sidebar Styling (Glassmorphism Dark Theme) */
.sidebar {
  position: absolute;
  top: 65px; /* Offset below nav bar */
  left: 15px;
  bottom: 15px;
  width: 320px;
  background: rgba(13, 20, 38, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  z-index: 1000;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.hidden {
  transform: translateX(-110%);
}

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

.sidebar-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: #6366f1;
  display: flex;
  align-items: center;
  gap: 8px;
}

.close-btn {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.close-btn:hover {
  color: #f3f4f6;
}

.sidebar-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

/* Filter inputs */
.filter-group {
  margin-bottom: 24px;
}

.filter-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #9ca3af;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group input[type="text"],
.filter-group select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #f3f4f6;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.3s;
}

.filter-group input[type="text"]:focus,
.filter-group select:focus {
  border-color: #6366f1;
}

.filter-group select option {
  background-color: #111827;
  color: #f3f4f6;
}

/* Checkbox group styling */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.checkbox-container {
  display: block;
  position: relative;
  padding-left: 30px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
  color: #d1d5db;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 18px;
  width: 18px;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  transition: all 0.2s;
}

.checkbox-container:hover input ~ .checkmark {
  background-color: rgba(255, 255, 255, 0.1);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: #6366f1;
  border-color: #6366f1;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 6px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Stats summary card */
.stats-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 16px;
  border-radius: 12px;
  margin-top: 10px;
}

.stats-title {
  font-size: 12px;
  text-transform: uppercase;
  color: #a5b4fc;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stats-value {
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
}

/* Details Panel (Bottom Sheet) */
.details-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(13, 20, 38, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  z-index: 1005;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
  padding: 20px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 600px;
  margin: 0 auto;
  max-height: 80vh;
  overflow-y: auto;
}

.details-sheet.active {
  transform: translateY(0);
}

.sheet-drag-bar {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: -10px auto 15px auto;
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.sheet-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  padding-right: 15px;
}

.details-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.badge {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-accent {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

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

.info-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  align-items: flex-start;
}

.info-row i {
  color: #6366f1;
  font-size: 16px;
  margin-top: 3px;
  width: 16px;
  text-align: center;
}

.info-row div {
  font-size: 14px;
  line-height: 1.5;
  color: #d1d5db;
}

.info-row strong {
  display: block;
  font-size: 12px;
  color: #9ca3af;
  text-transform: uppercase;
}

code {
  font-family: monospace;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  color: #f43f5e;
  word-break: break-all;
}

/* Suspicious Warning Card inside Details */
.warning-card {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.warning-card i {
  color: #fbbf24;
  font-size: 18px;
  margin-top: 2px;
}

.warning-card div {
  font-size: 13px;
  line-height: 1.4;
  color: #fef3c7;
}

.warning-card strong {
  display: block;
  color: #fbbf24;
  font-size: 14px;
  margin-bottom: 3px;
}

.details-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.action-btn {
  background: #6366f1;
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.action-btn:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}

.action-btn.pdf-btn {
  background: #ef4444;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.action-btn.pdf-btn:hover {
  background: #dc2626;
}

/* Custom Marker Styling */
.marker-pin {
  width: 30px;
  height: 30px;
  border-radius: 50% 50% 50% 0;
  background: #34d399;
  position: absolute;
  transform: rotate(-45deg);
  left: 50%;
  top: 50%;
  margin: -15px 0 0 -15px;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.marker-pin::after {
  content: '';
  width: 14px;
  height: 14px;
  margin: 6px 0 0 6px;
  background: #0f172a;
  position: absolute;
  border-radius: 50%;
}

.marker-pin.blue {
  background: #60a5fa;
}

.marker-pin.orange-warn {
  background: #fbbf24;
}

/* Analytics Tab styling */
.analytics-header, .developers-header {
  margin-bottom: 25px;
  text-align: center;
}

.analytics-header h2, .developers-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.analytics-header p, .developers-header p {
  font-size: 13px;
  color: #9ca3af;
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.chart-card {
  background: rgba(18, 26, 47, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.chart-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: #a5b4fc;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-container {
  position: relative;
  height: 350px;
  width: 100%;
}

/* Developers Directory styling */
.search-box {
  position: relative;
  max-width: 500px;
  margin: 15px auto 0 auto;
}

.search-box .fa-magnifying-glass {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 16px;
}

.search-box input {
  width: 100%;
  padding: 12px 40px 12px 45px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #f3f4f6;
  font-size: 15px;
  outline: none;
  transition: all 0.3s;
}

.search-box input:focus {
  border-color: #6366f1;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

.search-clear-btn {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.search-clear-btn:hover {
  color: #f3f4f6;
}

body.light-theme .search-clear-btn:hover {
  color: #1f2937;
}

.search-clear-btn.hidden {
  display: none;
}

.developers-list-container {
  max-width: 1100px;
  margin: 20px auto 0 auto;
}

.developers-table-wrapper {
  background: rgba(18, 26, 47, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow-x: auto;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.developers-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
  min-width: 600px;
}

.developers-table th, .developers-table td {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.developers-table th {
  background: rgba(99, 102, 241, 0.1);
  font-weight: 600;
  color: #a5b4fc;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.developers-table tbody tr {
  cursor: pointer;
  transition: all 0.2s;
}

.developers-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.developers-table tbody tr:last-child td {
  border-bottom: none;
}

.developers-table td .company-name {
  font-weight: 500;
  color: #ffffff;
  display: block;
  margin-bottom: 4px;
}

.developers-table td .company-roles {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.role-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.role-tag.client {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.role-tag.contractor {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.role-tag.designer {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.role-tag.other {
  background: rgba(107, 114, 128, 0.15);
  color: #9ca3af;
  border: 1px solid rgba(107, 114, 128, 0.2);
}

/* Analytics Period Filter Buttons */
.analytics-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 auto 24px auto;
  max-width: 700px;
}

.period-btn {
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
  flex: 1 1 120px;
  text-align: center;
}

.period-btn:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
}

.period-btn.active {
  background: #6366f1;
  border-color: #6366f1;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

/* Stat Cards Row */
.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto 24px auto;
}

.stat-card {
  background: rgba(18, 26, 47, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  backdrop-filter: blur(12px);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.stat-card-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-card-label {
  font-size: 11px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.stat-card-value {
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

/* Authorities Table Section */
.authorities-section {
  max-width: 1100px;
  margin: 24px auto 0 auto;
}

.authorities-title {
  font-size: 14px;
  font-weight: 600;
  color: #a5b4fc;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.authorities-table {
  min-width: 1100px;
}

.authorities-table th, .authorities-table td {
  padding: 10px 12px;
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.authorities-table th:first-child, .authorities-table td:first-child {
  text-align: left;
  padding-left: 16px;
}

/* Thicker right borders to separate column groups */
.authorities-table td:nth-child(1),
.authorities-table td:nth-child(2),
.authorities-table td:nth-child(3n+2),
.authorities-table thead tr:last-child th:nth-child(3n) {
  border-right: 2px solid rgba(255, 255, 255, 0.18);
}

.authorities-table thead tr:first-child th:not(:last-child) {
  border-right: 2px solid rgba(255, 255, 255, 0.18);
}

.authorities-table td:last-child,
.authorities-table th:last-child {
  border-right: none;
}

/* Totals Row Style */
.table-totals-row {
  background: rgba(99, 102, 241, 0.12) !important;
  font-weight: bold;
}

.table-totals-row td {
  border-top: 2px solid rgba(255, 255, 255, 0.15) !important;
  border-bottom: none !important;
}

/* Light theme overrides for authorities table borders */
body.light-theme .authorities-table th, 
body.light-theme .authorities-table td {
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .authorities-table td:nth-child(1),
body.light-theme .authorities-table td:nth-child(2),
body.light-theme .authorities-table td:nth-child(3n+2),
body.light-theme .authorities-table thead tr:last-child th:nth-child(3n) {
  border-right: 2px solid rgba(0, 0, 0, 0.12);
}

body.light-theme .authorities-table thead tr:first-child th:not(:last-child) {
  border-right: 2px solid rgba(0, 0, 0, 0.12);
}

body.light-theme .table-totals-row {
  background: rgba(99, 102, 241, 0.06) !important;
}

body.light-theme .table-totals-row td {
  border-top: 2px solid rgba(0, 0, 0, 0.12) !important;
}

/* Light theme overrides for new analytics components */

body.light-theme {
  background-color: #f3f4f6;
  color: #1f2937;
}

body.light-theme #map {
  background: #e5e7eb;
}

body.light-theme .leaflet-container {
  background: #e5e7eb !important;
}

body.light-theme .app-nav {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .nav-tab {
  color: #4b5563;
}

body.light-theme .nav-tab:hover {
  color: #111827;
  background: rgba(0, 0, 0, 0.04);
}

body.light-theme .nav-tab.active {
  color: #ffffff;
  background: #6366f1;
}

body.light-theme #analytics-view.tab-content,
body.light-theme #developers-view.tab-content {
  background: #f3f4f6;
}

body.light-theme .analytics-header h2, body.light-theme .developers-header h2 {
  color: #111827;
}

body.light-theme .analytics-header p, body.light-theme .developers-header p {
  color: #4b5563;
}

body.light-theme .chart-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body.light-theme .chart-card h3 {
  color: #4f46e5;
}

body.light-theme .search-box input {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #111827;
}

body.light-theme .search-box input:focus {
  background: #ffffff;
  border-color: #6366f1;
}

body.light-theme .search-box .fa-magnifying-glass {
  color: #6b7280;
}

body.light-theme .developers-table-wrapper {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

body.light-theme .developers-table th {
  background: rgba(99, 102, 241, 0.05);
  color: #4f46e5;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

body.light-theme .developers-table td {
  color: #374151;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

body.light-theme .developers-table td .company-name {
  color: #111827;
}

body.light-theme .developers-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.02);
}

body.light-theme .warning-card {
  background: #fffbef;
  border: 1px solid #fde68a;
}

body.light-theme .warning-card div {
  color: #92400e;
}

body.light-theme .fab-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #6366f1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body.light-theme .fab-btn:hover {
  background: #6366f1;
  color: #ffffff;
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.3);
}

body.light-theme .sidebar {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

body.light-theme .sidebar-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-theme .sidebar-header h2 {
  color: #6366f1;
}

body.light-theme .close-btn {
  color: #6b7280;
}

body.light-theme .close-btn:hover {
  color: #111827;
}

body.light-theme .filter-group label {
  color: #6b7280;
}

body.light-theme .filter-group input[type="text"],
body.light-theme .filter-group select {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #1f2937;
}

body.light-theme .filter-group select option {
  background-color: #ffffff;
  color: #1f2937;
}

body.light-theme .checkbox-container {
  color: #374151;
}

body.light-theme .checkmark {
  background-color: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.12);
}

body.light-theme .checkbox-container:hover input ~ .checkmark {
  background-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .checkbox-container input:checked ~ .checkmark {
  background-color: #6366f1;
  border-color: #6366f1;
}

body.light-theme .stats-card {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.03));
  border: 1px solid rgba(99, 102, 241, 0.12);
}

body.light-theme .stats-title {
  color: #6366f1;
}

body.light-theme .stats-value {
  color: #111827;
}

body.light-theme .details-sheet {
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.12);
}

body.light-theme .sheet-drag-bar {
  background: rgba(0, 0, 0, 0.15);
}

body.light-theme .sheet-header h3 {
  color: #111827;
}

body.light-theme .info-row div {
  color: #374151;
}

body.light-theme .info-row strong {
  color: #6b7280;
}

body.light-theme code {
  background: rgba(0, 0, 0, 0.05);
  color: #dc2626;
}

body.light-theme .details-actions .action-btn {
  background: #6366f1;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}

body.light-theme .details-actions .action-btn:hover {
  background: #4f46e5;
}

/* Responsive adjustments */
@media(max-width: 480px) {
  .sidebar {
    left: 0;
    top: 50px;
    bottom: 0;
    width: 100%;
    border-radius: 0;
    border: none;
  }
  
  .details-sheet {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
  }
  
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .chart-container {
    height: 250px;
  }
  
  .app-nav {
    padding: 6px 8px;
    gap: 5px;
  }
  
  .nav-tab {
    padding: 6px 10px;
    font-size: 12px;
  }
}

.hidden {
  display: none !important;
}

/* Floating Developer Filter Active Banner */
#dev-filter-banner {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(99, 102, 241, 0.95);
  padding: 8px 16px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
#dev-filter-banner span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 250px;
}
#dev-filter-banner button {
  background: #ffffff;
  border: none;
  color: #6366f1;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  transition: background 0.2s;
}
#dev-filter-banner button:hover {
  background: #f3f4f6;
}

body.light-theme #dev-filter-banner {
  background: #6366f1;
  color: #ffffff;
}
