/* Modern Glassmorphic CSS System for GPS Track Photo Mapper */

/* Localized Google Font: Outfit */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/outfit-300.ttf') format('truetype');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/outfit-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/outfit-500.ttf') format('truetype');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/outfit-600.ttf') format('truetype');
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/outfit-700.ttf') format('truetype');
}

/* Color Variables & Styling Tokens */
:root {
  --bg-dark: #0b0f19;
  --panel-bg: rgba(13, 20, 35, 0.78);
  --panel-border: rgba(255, 255, 255, 0.07);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --accent-cyan: #00f2fe;
  --accent-blue: #3b82f6;
  --accent-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  
  --color-success: #10b981;
  --color-error: #ef4444;
  --color-info: #3b82f6;
  --color-warn: #f59e0b;
  
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.05);
  
  --shadow-main: 0 8px 32px 0 rgba(0, 0, 0, 0.45);
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition-fast: all 0.2s ease;
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-primary);
}

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

/* Leaflet UI Overrides */
.leaflet-bar {
  border: 1px solid var(--panel-border) !important;
  box-shadow: var(--shadow-main) !important;
  border-radius: 8px !important;
  overflow: hidden;
}
.leaflet-bar a {
  background-color: var(--panel-bg) !important;
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--panel-border) !important;
  backdrop-filter: blur(10px);
  transition: var(--transition-fast);
}
.leaflet-bar a:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: var(--accent-cyan) !important;
}

/* ----------------------------------------------------
   Left Sidebar (Glassmorphic Dashboard)
   ---------------------------------------------------- */
.left-sidebar {
  position: absolute;
  top: 20px;
  left: 20px;
  bottom: 20px;
  width: 420px;
  z-index: 10;
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  box-shadow: var(--shadow-main);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--transition-normal);
}

/* Header */
.sidebar-header {
  padding: 24px 20px 16px 20px;
  border-bottom: 1px solid var(--panel-border);
}
.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.logo-icon {
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
}
.sidebar-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sidebar-header .subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Tabs */
.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.15);
}
.tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 14px 0;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
}
.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}
.tab-btn.active {
  color: var(--accent-cyan);
  font-weight: 600;
}
.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15%;
  width: 70%;
  height: 2px;
  background: var(--accent-gradient);
  box-shadow: 0 0 8px var(--accent-cyan);
}

/* Scrollable Panels */
.sidebar-panels {
  flex: 1;
  overflow: hidden;
  position: relative;
}
.panel-content {
  display: none;
  height: 100%;
  overflow-y: auto;
  padding: 20px;
  padding-bottom: 120px; /* Padding for bottom action bar space */
}
.panel-content.active {
  display: block;
}

/* Custom Panel Scrollbars */
.panel-content::-webkit-scrollbar {
  width: 6px;
}
.panel-content::-webkit-scrollbar-track {
  background: transparent;
}
.panel-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}
.panel-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Cards */
.section-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
  transition: var(--transition-fast);
}
.section-card:hover {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.04);
}
.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Drag-Drop Zones */
.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
  background: rgba(0, 0, 0, 0.1);
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.04);
  box-shadow: inset 0 0 10px rgba(0, 242, 254, 0.05);
}
.drop-icon {
  color: var(--text-secondary);
  margin-bottom: 8px;
  transition: var(--transition-fast);
}
.dropzone:hover .drop-icon {
  color: var(--accent-cyan);
  transform: translateY(-2px);
}
.drop-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* Info Boxes */
.info-box {
  margin-top: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border-left: 3px solid var(--accent-cyan);
}
.info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 6px;
}
.info-row:last-child {
  margin-bottom: 0;
}
.info-label {
  color: var(--text-secondary);
}
.info-value {
  font-weight: 500;
  max-width: 60%;
}
.text-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.info-warn {
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--color-warn);
  line-height: 1.3;
}

/* Buttons */
.btn-group {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.action-btn {
  border: none;
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}
.action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.primary-btn {
  background: var(--accent-gradient);
  color: var(--bg-dark);
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.2);
}
.primary-btn:hover:not(:disabled) {
  opacity: 0.95;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.35);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid var(--panel-border);
}
.secondary-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

.outline-btn {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.outline-btn:hover:not(:disabled) {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.success-btn {
  background: var(--color-success);
  color: var(--text-primary);
}
.success-btn:hover:not(:disabled) {
  filter: brightness(1.1);
}

.info-btn {
  background: var(--color-info);
  color: var(--text-primary);
}
.info-btn:hover:not(:disabled) {
  filter: brightness(1.1);
}

.block-btn {
  width: 100%;
  padding: 12px;
}
.text-btn {
  background: transparent;
  color: var(--accent-cyan);
  text-decoration: underline;
  padding: 0;
}

/* Control Inputs */
.control-row {
  margin-bottom: 16px;
}
.control-row:last-child {
  margin-bottom: 0;
}
.control-label-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.control-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.badge {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--accent-cyan);
}
.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--color-success); }
.badge-info { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.badge-error { background: rgba(239, 68, 68, 0.15); color: var(--color-error); }

.range-slider {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-cyan);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-cyan);
  transition: var(--transition-fast);
}
.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.input-unit {
  position: relative;
  display: flex;
  align-items: center;
}
.input-unit input {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 40px 10px 12px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition-fast);
}
.input-unit input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.1);
}
.input-unit .unit {
  position: absolute;
  right: 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.control-help {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Checkbox and Radios */
.checkbox-label, .radio-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
  margin-bottom: 12px;
}
.checkbox-label input, .radio-label input {
  display: none;
}
.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  margin-top: 2px;
  position: relative;
  transition: var(--transition-fast);
}
.checkbox-label input:checked + .checkbox-custom {
  background-color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
}
.checkbox-custom::after {
  content: '';
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid var(--bg-dark);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checkbox-label input:checked + .checkbox-custom::after {
  display: block;
}

.radio-custom {
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  margin-top: 2px;
  position: relative;
  transition: var(--transition-fast);
}
.radio-label input:checked + .radio-custom {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(0, 242, 254, 0.3);
}
.radio-custom::after {
  content: '';
  position: absolute;
  display: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan);
  top: 2.5px;
  left: 2.5px;
}
.radio-label input:checked + .radio-custom::after {
  display: block;
}
.radio-text-wrapper {
  display: flex;
  flex-direction: column;
}
.radio-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-primary);
}
.radio-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Settings Form Input Text overrides */
#custom-tile-url {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.8rem;
  outline: none;
  transition: var(--transition-fast);
}
#custom-tile-url:focus:not(:disabled) {
  border-color: var(--accent-cyan);
}
#custom-tile-url:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ----------------------------------------------------
   Scroll List (Photo Item Row)
   ---------------------------------------------------- */
.list-card {
  padding-bottom: 8px;
}
.scroll-list {
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}
.scroll-list::-webkit-scrollbar {
  width: 4px;
}
.scroll-list::-webkit-scrollbar-track {
  background: transparent;
}
.scroll-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}
.empty-state {
  text-align: center;
  padding: 30px 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.photo-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition-fast);
}
.photo-list-row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}
.row-thumbnail {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
.row-info {
  flex: 1;
  min-width: 0;
}
.row-name {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-time {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.coord-val {
  font-size: 0.68rem;
  color: var(--accent-cyan);
  margin-top: 2px;
  font-family: monospace;
}
.error-text {
  color: var(--color-error);
}
.gap-val {
  font-size: 0.65rem;
  color: var(--text-muted);
}
.row-status {
  flex-shrink: 0;
}

/* ----------------------------------------------------
   Bottom Action Pane (Write tab)
   ---------------------------------------------------- */
.summary-fixed-pane {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(13, 20, 35, 0.95);
  backdrop-filter: blur(10px);
  padding: 16px 20px;
  border-top: 1px solid var(--panel-border);
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
  z-index: 5;
}
.summary-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-align: center;
}

/* Action bottom bar (Read/Settings panels) */
.action-bottom-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 20px;
  background: rgba(13, 20, 35, 0.95);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--panel-border);
}

/* ----------------------------------------------------
   Table CSS (Tab 2: Read GPS)
   ---------------------------------------------------- */
.table-card {
  padding: 12px;
}
.table-container {
  max-height: 480px;
  overflow-y: auto;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  background: rgba(0, 0, 0, 0.2);
}
.table-container::-webkit-scrollbar {
  width: 4px;
}
.table-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  text-align: left;
}
.data-table th, .data-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--card-border);
}
.data-table th {
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-secondary);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 2;
}
.data-table tbody tr {
  cursor: pointer;
  transition: var(--transition-fast);
}
.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}
.table-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0 !important;
}
.table-cell-thumb {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.dim-text {
  color: var(--text-muted);
}

/* ----------------------------------------------------
   Image Lightbox Modal Overlay
   ---------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 7, 12, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-normal);
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-fast);
  z-index: 102;
}
.modal-close-btn:hover {
  color: var(--accent-cyan);
}
.modal-content {
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 101;
}
.modal-image-wrapper {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.modal-image-wrapper img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}
.modal-caption-area {
  margin-top: 20px;
  background: rgba(13, 20, 35, 0.9);
  padding: 16px 24px;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  max-width: 500px;
  text-align: center;
  color: var(--text-primary);
}
.modal-caption-area h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--accent-cyan);
}
.modal-caption-area p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.modal-caption-area p:last-child {
  margin-bottom: 0;
}

/* ----------------------------------------------------
   Full Screen Progress Loader Spinner
   ---------------------------------------------------- */
.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 7, 12, 0.8);
  backdrop-filter: blur(5px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-fast);
}
.loader-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.loader-content {
  text-align: center;
}
.loader-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: spin 1s infinite linear;
  margin: 0 auto 16px auto;
}
#loading-text {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

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

/* ----------------------------------------------------
   Interactive Map Photo Markers (DivIcon)
   ---------------------------------------------------- */
.photo-marker-wrapper {
  background: transparent !important;
  border: none !important;
}

.custom-photo-marker {
  position: relative;
  width: 44px;
  height: 44px;
  transition: var(--transition-fast);
}
.marker-thumbnail {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  position: absolute;
  top: 0;
  left: 2px;
  z-index: 2;
}
.marker-pin {
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 12px solid #ffffff;
  position: absolute;
  bottom: -4px;
  left: 14px;
  z-index: 1;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
}

/* Hover transitions */
.photo-marker-wrapper:hover .custom-photo-marker {
  transform: scale(1.15) translateY(-4px);
  z-index: 1000 !important;
}
.photo-marker-wrapper:hover .marker-thumbnail {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan);
}
.photo-marker-wrapper:hover .marker-pin {
  border-top-color: var(--accent-cyan);
}

/* Map Tooltip styling */
.photo-marker-tooltip {
  background: rgba(13, 20, 35, 0.9) !important;
  border: 1px solid var(--panel-border) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-main) !important;
  font-size: 0.72rem !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  box-shadow: var(--shadow-main) !important;
}

/* Track endpoints */
.endpoint-circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.start-circle { background-color: var(--color-success); }
.end-circle { background-color: var(--color-error); }

/* ----------------------------------------------------
   Mobile Toggle and Responsive Rules
   ---------------------------------------------------- */
.sidebar-toggle-btn {
  display: none;
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 20;
  background: var(--panel-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--panel-border);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-main);
  transition: var(--transition-fast);
}
.sidebar-toggle-btn:hover {
  color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
  .sidebar-toggle-btn {
    display: flex;
  }
  
  .left-sidebar {
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    border-radius: 0;
    border: none;
    border-right: 1px solid var(--panel-border);
    transform: translateX(-100%);
    box-shadow: none;
  }
  
  .left-sidebar.mobile-expanded {
    transform: translateX(0);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
  }
  
  .panel-content {
    padding: 16px;
  }
  
  .table-container {
    max-height: 350px;
  }
}

/* Stacked photo marker styling */
.marker-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--color-error);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  border: 1.5px solid white;
  z-index: 10;
}

.stacked-marker::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 5px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.2);
  z-index: -1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.stacked-marker::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
  z-index: -2;
}
