@charset "UTF-8";
:root {
  --bg-color: #f1f5f9;
  --bg-card: #ffffff;
  --bg-nav: rgba(255, 255, 255, 0.85);
  --bg-hover: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --border-subtle: rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05), 0 1px 4px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
  --modal-overlay: rgba(15, 23, 42, 0.5);
  --glass-border: rgba(255, 255, 255, 0.6);
  --table-header: #f8fafc;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

[data-theme=dark] {
  --bg-color: #0f172a;
  --bg-card: #1e293b;
  --bg-nav: rgba(30, 41, 59, 0.85);
  --bg-hover: #334155;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5), 0 8px 16px rgba(0, 0, 0, 0.4);
  --modal-overlay: rgba(0, 0, 0, 0.75);
  --glass-border: rgba(255, 255, 255, 0.08);
  --table-header: #334155;
}

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

body,
html {
  height: 100%;
  width: 100%;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  overflow: hidden;
  color: var(--text-main);
  background-color: var(--bg-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

#app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Fixed Sidebar */
.dashboard-sidebar {
  width: 280px;
  background: var(--bg-card);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 20;
  box-shadow: var(--shadow-md);
  transition: width 0.35s cubic-bezier(0.2, 0, 0, 1), transform 0.35s ease;
  overflow: hidden;
  white-space: nowrap;
}
.dashboard-sidebar.collapsed {
  width: 0;
  border-right: none;
}
.dashboard-sidebar .sidebar-header {
  padding: 24px 24px;
  background: linear-gradient(135deg, #5c2c91 0%, #703baf 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.dashboard-sidebar .sidebar-header h2 {
  font-size: 1.35rem;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: -0.2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.dashboard-sidebar .sidebar-nav {
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dashboard-sidebar .sidebar-nav a {
  text-decoration: none;
  color: var(--text-muted);
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
}
.dashboard-sidebar .sidebar-nav a svg {
  opacity: 0.7;
  transition: opacity 0.25s, transform 0.25s cubic-bezier(0.2, 0, 0, 1);
}
.dashboard-sidebar .sidebar-nav a:hover {
  background: rgba(92, 45, 145, 0.05);
  color: #5c2c91;
  transform: translateX(4px);
}
.dashboard-sidebar .sidebar-nav a:hover svg {
  opacity: 1;
  transform: scale(1.1);
}
.dashboard-sidebar .sidebar-nav a.active {
  background: rgba(92, 45, 145, 0.08);
  color: #5c2c91;
  font-weight: 600;
}
.dashboard-sidebar .sidebar-nav a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 4px;
  background: #9c2799;
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 8px rgba(156, 39, 153, 0.4);
}
.dashboard-sidebar .sidebar-nav a.active svg {
  opacity: 1;
  color: #5c2c91;
}

/* Main Content Area */
.dashboard-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* Important for flex-child overflow */
}

.top-navbar {
  height: 80px;
  min-height: 80px;
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 36px;
  z-index: 10;
  box-shadow: var(--shadow-sm);
}
.top-navbar .nav-left {
  display: flex;
  align-items: center;
  gap: 24px;
}
.top-navbar .nav-left .btn-burger {
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}
.top-navbar .nav-left .btn-burger:hover {
  background: var(--border-color);
  color: #5c2c91;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.top-navbar .nav-left h1 {
  font-size: 1.15rem;
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.3px;
}
.top-navbar .nav-left p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 500;
}
.top-navbar .nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Global Buttons */
.btn-primary {
  padding: 12px 24px;
  background: linear-gradient(135deg, #9c2799 0%, #b538b2 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: "Inter", sans-serif;
  transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(156, 39, 153, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(156, 39, 153, 0.4);
  filter: brightness(1.05);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(156, 39, 153, 0.3);
}

.btn-signout {
  padding: 8px 16px;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  font-family: "Inter", sans-serif;
  transition: all 0.2s;
}
.btn-signout:hover {
  background: var(--bg-hover);
  color: #EF4444;
  border-color: #EF4444;
}

.map-wrapper {
  flex-grow: 1;
  display: flex;
  position: relative;
  overflow: hidden;
}
.map-wrapper #map {
  flex: 1;
  position: relative;
  height: 100%;
  z-index: 1;
}

/* Custom Leaflet Popup */
.leaflet-popup-content-wrapper {
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
}
.leaflet-popup-content-wrapper .leaflet-popup-content {
  margin: 16px 20px;
}
.leaflet-popup-content-wrapper .leaflet-popup-content h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
  color: var(--text-main);
  font-weight: 600;
  letter-spacing: -0.2px;
}
.leaflet-popup-content-wrapper .leaflet-popup-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.leaflet-popup-tip {
  background: var(--bg-nav);
}

/* Custom Attribution override */
.leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.7) !important;
  color: transparent !important;
  font-size: 11px !important;
  padding: 2px 6px !important;
}
.leaflet-control-attribution a {
  display: none !important;
}
.leaflet-control-attribution::after {
  content: "© Local Enterprise Server | Telecom Egypt";
  color: #333;
  display: inline-block;
  font-weight: 500;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--modal-overlay);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  padding: 40px;
  border-radius: var(--radius-lg);
  width: 520px;
  max-width: 90%;
  box-shadow: var(--shadow-lg);
  animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.modal-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #5c2c91, #9c2799);
}
.modal-content h2 {
  margin-bottom: 24px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

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

.form-group {
  margin-bottom: 15px;
  flex: 1;
}
.form-group label {
  display: block;
  font-size: 0.8rem;
  color: #444;
  margin-bottom: 4px;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
  transition: all 0.25s ease;
}
.form-group input:focus,
.form-group select:focus {
  border-color: #5c2c91;
  background: var(--bg-card);
  box-shadow: 0 0 0 4px rgba(92, 45, 145, 0.15);
}
.form-group input[readonly],
.form-group select[readonly] {
  background: var(--bg-color);
  color: var(--text-muted);
  cursor: not-allowed;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}
.modal-actions button {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  font-family: "Inter", sans-serif;
  transition: all 0.25s cubic-bezier(0.2, 0, 0, 1);
}
.modal-actions button:hover {
  transform: translateY(-2px);
}
.modal-actions button:active {
  transform: translateY(0);
}
.modal-actions .btn-cancel {
  background: var(--bg-hover);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}
.modal-actions .btn-cancel:hover {
  background: var(--border-color);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}
.modal-actions .btn-save {
  background: linear-gradient(135deg, #5c2c91 0%, #703baf 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(92, 45, 145, 0.25);
}
.modal-actions .btn-save:hover {
  box-shadow: 0 8px 20px rgba(92, 45, 145, 0.35);
  filter: brightness(1.05);
}

/* Action Buttons for Tables */
.btn-action-edit,
.btn-action-del {
  padding: 6px 12px;
  margin-right: 6px;
  cursor: pointer;
  background: white;
  border-radius: 6px;
  font-family: "Inter", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.btn-action-edit {
  color: #5c2c91;
  border-color: rgba(92, 45, 145, 0.15);
  background: rgba(92, 45, 145, 0.03);
}
.btn-action-edit:hover {
  background: rgba(92, 45, 145, 0.08);
  border-color: rgba(92, 45, 145, 0.4);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-action-del {
  color: #e74c3c;
  border-color: rgba(231, 76, 60, 0.15);
  background: rgba(231, 76, 60, 0.03);
}
.btn-action-del:hover {
  background: rgba(231, 76, 60, 0.08);
  border-color: rgba(231, 76, 60, 0.4);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* DataTables Overrides for Unified UI */
.datatable-wrapper {
  font-family: "Inter", sans-serif;
  color: var(--text-main);
}

.datatable-top,
.datatable-bottom {
  padding: 16px 0;
}

.datatable-selector {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  padding: 8px 12px;
  outline: none;
  font-family: "Inter", sans-serif;
  color: var(--text-main);
  cursor: pointer;
  transition: border-color 0.2s;
}
.datatable-selector:focus {
  border-color: #5c2c91;
}

.datatable-input {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  padding: 10px 16px;
  outline: none;
  font-family: "Inter", sans-serif;
  color: var(--text-main);
  transition: all 0.25s;
}
.datatable-input:focus {
  border-color: #5c2c91;
  box-shadow: 0 0 0 3px rgba(92, 45, 145, 0.15);
}

.datatable-pagination a {
  border-radius: 6px;
  padding: 6px 12px;
  margin: 0 2px;
  color: var(--text-muted);
  transition: all 0.2s;
}
.datatable-pagination a:hover {
  background: rgba(92, 45, 145, 0.08);
  color: #5c2c91;
}

.datatable-pagination .active a,
.datatable-pagination .active a:focus,
.datatable-pagination .active a:hover {
  background: #5c2c91;
  color: white;
  box-shadow: 0 4px 8px rgba(92, 45, 145, 0.2);
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
}
.modern-table th {
  padding: 16px 20px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--table-header);
  border-bottom: 2px solid var(--border-color);
  text-align: left;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}
.modern-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  color: var(--text-main);
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}
.modern-table tr {
  transition: transform 0.2s, box-shadow 0.2s;
}
.modern-table tr:hover td {
  background: var(--bg-hover);
}

/* Saved Locations Panel (Sidebar) */
.floating-locations-panel {
  position: relative;
  width: 360px;
  min-width: 360px;
  background: var(--bg-card);
  border-left: 1px solid var(--border-subtle);
  box-shadow: -4px 0 15px rgba(0, 0, 0, 0.05);
  z-index: 10;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.floating-locations-panel.collapsed {
  width: 0;
  min-width: 0;
  border: none;
  box-shadow: none;
  overflow: visible;
}
.floating-locations-panel.collapsed .panel-header {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--bg-card);
  border-radius: 25%;
  width: 48px;
  height: 48px;
  padding: 0;
  justify-content: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-subtle);
  z-index: 1001;
}
.floating-locations-panel.collapsed .panel-header h3 {
  display: none;
}
.floating-locations-panel.collapsed .panel-header .btn-icon {
  border: none;
  background: transparent;
}
.floating-locations-panel.collapsed .panel-content {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.floating-locations-panel .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.02);
}
.floating-locations-panel .panel-header h3 {
  font-size: 1.1rem;
  color: var(--text-main);
  margin: 0;
  display: flex;
  align-items: center;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.floating-locations-panel .panel-header .btn-icon {
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}
.floating-locations-panel .panel-header .btn-icon:hover {
  background: var(--border-color);
  color: #5c2c91;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.floating-locations-panel .panel-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  overflow: hidden;
  transition: opacity 0.3s ease;
}
.floating-locations-panel .sidebar-filters {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}
.floating-locations-panel .sidebar-filters .input-group {
  position: relative;
  display: flex;
  align-items: center;
}
.floating-locations-panel .sidebar-filters .input-group svg {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
}
.floating-locations-panel .sidebar-filters .input-group input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-hover);
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s;
}
.floating-locations-panel .sidebar-filters .input-group input:focus {
  border-color: #5c2c91;
  background: var(--bg-card);
  box-shadow: 0 0 0 3px rgba(92, 45, 145, 0.15);
}
.floating-locations-panel .sidebar-filters .modern-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-hover);
  color: var(--text-main);
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.2s;
}
.floating-locations-panel .sidebar-filters .modern-select:focus {
  border-color: #5c2c91;
  background: var(--bg-card);
}
.floating-locations-panel .sidebar-filters .btn-toggle-map {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border-radius: 6px;
  border: none;
  background: #5c2c91;
  color: white;
  cursor: pointer;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  transition: all 0.2s;
  box-shadow: 0 4px 6px rgba(92, 45, 145, 0.2);
}
.floating-locations-panel .sidebar-filters .btn-toggle-map:hover {
  background: #4a2475;
  transform: translateY(-1px);
  box-shadow: 0 6px 10px rgba(92, 45, 145, 0.3);
}
.floating-locations-panel .location-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 16px 20px;
}
.floating-locations-panel .location-list::-webkit-scrollbar {
  width: 6px;
}
.floating-locations-panel .location-list::-webkit-scrollbar-track {
  background: transparent;
}
.floating-locations-panel .location-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}
.floating-locations-panel .location-list .loading-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 20px;
}
.floating-locations-panel .location-list .location-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.floating-locations-panel .location-list .location-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: transparent;
  transition: background 0.3s cubic-bezier(0.2, 0, 0, 1);
}
.floating-locations-panel .location-list .location-card:hover {
  border-color: rgba(92, 45, 145, 0.2);
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-md);
}
.floating-locations-panel .location-list .location-card:hover::before {
  background: linear-gradient(180deg, #5c2c91, #9c2799);
}
.floating-locations-panel .location-list .location-card h3 {
  font-size: 1.05rem;
  color: var(--text-main);
  margin-bottom: 6px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.floating-locations-panel .location-list .location-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Skeleton Loading Animation */
@keyframes shimmer {
  0% {
    background-position: -468px 0;
  }
  100% {
    background-position: 468px 0;
  }
}
.skeleton {
  background: var(--bg-hover);
  background-image: linear-gradient(to right, var(--bg-hover) 0%, var(--border-subtle) 20%, var(--bg-hover) 40%, var(--bg-hover) 100%);
  background-repeat: no-repeat;
  background-size: 800px 104px;
  animation: shimmer 1.5s linear infinite forwards;
  border-radius: 4px;
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
  width: 100%;
}

.skeleton-button {
  height: 32px;
  width: 80px;
  border-radius: 6px;
}

.skeleton-card {
  height: 80px;
  margin-bottom: 12px;
  border-radius: 10px;
}

/* --- Custom Leaflet Control Styles --- */
.leaflet-bar a,
.leaflet-control-custom,
.leaflet-control-geocoder-icon,
.leaflet-control-layers-toggle {
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.leaflet-bar a,
.leaflet-control-custom,
.leaflet-control-geocoder-icon,
.leaflet-control-layers:not(.leaflet-control-layers-expanded) .leaflet-control-layers-toggle {
  display: flex !important;
}

/* Make layers control expand nicely */
.leaflet-control-layers {
  border-radius: 8px !important;
  overflow: hidden;
  transition: max-width 0.3s ease, max-height 0.3s ease, padding 0.3s ease;
  max-width: 36px;
  max-height: 36px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15) !important;
}

.leaflet-control-layers-expanded {
  max-width: 250px;
  max-height: 300px;
  padding: 10px 14px !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
  font-family: "Inter", sans-serif;
  color: var(--text-main);
  font-size: 0.9rem;
}
.leaflet-control-layers-expanded .leaflet-control-layers-list label {
  cursor: pointer;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.leaflet-control-layers-expanded .leaflet-control-layers-list label:hover {
  color: #531482;
}

/* Style Leaflet Draw Actions (Sub-buttons) */
.leaflet-draw-actions a {
  background-color: white !important;
  color: #333 !important;
  border: 1px solid var(--border-color) !important;
  border-left: none !important;
}

.leaflet-draw-actions li:first-child a {
  border-left: 1px solid var(--border-color) !important;
}

.leaflet-draw-actions a:hover {
  background-color: #f8fafc !important;
}

/* Custom Draw Icons Override */
.leaflet-draw-toolbar .leaflet-draw-draw-polygon {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6'%3E%3C/polygon%3E%3C/svg%3E") no-repeat center !important;
  background-size: 18px !important;
  background-color: #531482 !important;
}

.leaflet-draw-toolbar .leaflet-draw-draw-marker {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'%3E%3C/path%3E%3Ccircle cx='12' cy='10' r='3'%3E%3C/circle%3E%3C/svg%3E") no-repeat center !important;
  background-size: 18px !important;
  background-color: #531482 !important;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
  .floating-locations-panel {
    position: absolute;
    right: 0;
    width: 100%;
    min-width: 100%;
    z-index: 1000;
  }
}
