/* ================================================================
   Shoreline Delineation Studio — Premium Dark Ocean Theme
   ================================================================ */

/* ─── CSS Custom Properties ─────────────────────────────────── */
:root {
  --bg-deep: #060b18;
  --bg-surface: #0d1528;
  --bg-elevated: #131d35;
  --bg-hover: #1a2744;
  --primary: #00b4d8;
  --primary-light: #48cae4;
  --primary-dark: #0096b7;
  --accent: #00e5a0;
  --accent-dark: #00c285;
  --warning: #f4a261;
  --error: #ef476f;
  --success: #06d6a0;
  --text-primary: #e8edf5;
  --text-secondary: #8899b5;
  --text-muted: #5a6a85;
  --border: rgba(72, 202, 228, 0.12);
  --border-glow: rgba(0, 180, 216, 0.3);
  --glass-bg: rgba(13, 21, 40, 0.85);
  --glass-border: rgba(72, 202, 228, 0.15);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(0, 180, 216, 0.15);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 16px;
  --transition: 0.3s ease;
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100vh;
  overflow: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--primary-dark);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-dark) transparent;
}

/* ─── App Layout ────────────────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* ─── Navbar ────────────────────────────────────────────────── */
.navbar {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  position: relative;
  flex-shrink: 0;
}

.navbar::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary-light), var(--primary));
  background-size: 300% 100%;
  animation: shimmer 4s linear infinite;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-brand h1 {
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

.logo-icon {
  font-size: 1.5rem;
  animation: float 3s ease-in-out infinite;
  display: inline-block;
}

.navbar-status {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.navbar-meta {
  margin-left: 20px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all var(--transition);
}

.status-dot.connected {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse 2s infinite;
}

.status-dot.error {
  background: var(--error);
  box-shadow: 0 0 8px var(--error);
}

.demo-badge {
  border-color: rgba(244, 162, 97, 0.3);
  color: var(--warning);
}

/* ─── Main Content ──────────────────────────────────────────── */
.main-content {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* ─── Sidebars ──────────────────────────────────────────────── */
.sidebar {
  width: 320px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
  flex-shrink: 0;
}

.left-sidebar {
  border-right: 1px solid var(--border);
}

.right-sidebar {
  border-left: 1px solid var(--border);
}

/* ─── Glass Panel ───────────────────────────────────────────── */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

/* ─── Panel Header & Body ───────────────────────────────────── */
.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.panel-header h2 {
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

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

/* ─── Map Container ─────────────────────────────────────────── */
.map-container {
  flex: 1;
  position: relative;
  min-width: 0;
}

#map {
  width: 100%;
  height: 100%;
}

/* ─── Form Elements ─────────────────────────────────────────── */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  transition: all var(--transition);
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
}

.form-input::placeholder {
  color: var(--text-muted);
}

select.form-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238899b5' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

select.form-input option {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

/* Slider */
.form-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-deep);
  outline: none;
  transition: background var(--transition);
}

.form-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 180, 216, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
}

.form-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 14px rgba(0, 180, 216, 0.6);
}

.form-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(0, 180, 216, 0.4);
  border: none;
}

/* Date Range */
.date-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-range .form-input {
  flex: 1;
}

.date-sep {
  color: var(--text-muted);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* EPSG Row */
.epsg-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ─── Satellite Cards ───────────────────────────────────────── */
.sat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.sat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.sat-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sat-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 180, 216, 0.1);
}

.sat-card.active {
  border-color: var(--primary);
  background: rgba(0, 180, 216, 0.08);
  box-shadow: 0 0 12px rgba(0, 180, 216, 0.15);
}

.sat-card.active .sat-icon {
  filter: drop-shadow(0 0 6px rgba(0, 180, 216, 0.5));
}

.sat-icon {
  font-size: 1.4rem;
  transition: filter var(--transition);
}

.sat-name {
  font-size: 0.6rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.sat-code {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary-light);
}

/* ─── Sand Color Cards ──────────────────────────────────────── */
.sand-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.sand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.sand-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

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

.sand-card.active {
  border-color: var(--primary);
  background: rgba(0, 180, 216, 0.08);
  box-shadow: 0 0 12px rgba(0, 180, 216, 0.15);
  color: var(--text-primary);
}

.sand-preview {
  width: 40px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ─── Collapsible ───────────────────────────────────────────── */
.collapsible {
  margin-bottom: 16px;
}

.collapsible-header {
  width: 100%;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  transition: all var(--transition);
}

.collapsible-header:hover {
  border-color: var(--primary);
  color: var(--text-primary);
}

.chevron {
  transition: transform var(--transition);
  font-size: 0.65rem;
}

.collapsible.open .chevron {
  transform: rotate(90deg);
}

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.collapsible.open .collapsible-content {
  max-height: 800px;
}

/* ─── ROI Status ────────────────────────────────────────────── */
.roi-status {
  padding: 12px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
  border: 1px dashed var(--border);
  margin-bottom: 16px;
  transition: all var(--transition);
}

.roi-status.valid {
  border-color: var(--success);
  color: var(--success);
  border-style: solid;
  background: rgba(6, 214, 160, 0.05);
}

.roi-icon {
  margin-right: 4px;
}

/* ─── Submit Button ─────────────────────────────────────────── */
.btn-start {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--bg-deep);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-start:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 180, 216, 0.4);
}

.btn-start:active:not(:disabled) {
  transform: translateY(0);
}

.btn-start:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.btn-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer-btn 3s infinite;
}

.btn-start:disabled .btn-shimmer {
  display: none;
}

.btn-start.loading .btn-text {
  opacity: 0;
}

.btn-start.loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid rgba(6, 11, 24, 0.3);
  border-top-color: var(--bg-deep);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  position: absolute;
}

/* ─── General Buttons ───────────────────────────────────────── */
.btn-primary {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--bg-deep);
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
}

.btn-secondary {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}

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

.btn-danger {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--error);
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  border: 1px solid var(--error);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-danger:hover {
  background: rgba(239, 71, 111, 0.1);
}

/* ─── Job Cards ─────────────────────────────────────────────── */
.job-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
  border-left: 4px solid var(--text-muted);
  transition: all var(--transition);
  cursor: pointer;
  animation: fadeIn 0.3s ease;
}

.job-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.job-card.status-queued    { border-left-color: var(--warning); }
.job-card.status-downloading { border-left-color: var(--primary); }
.job-card.status-extracting  { border-left-color: var(--primary-light); }
.job-card.status-analyzing   { border-left-color: var(--accent); }
.job-card.status-completed   { border-left-color: var(--success); }
.job-card.status-failed      { border-left-color: var(--error); }

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

.job-title {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.job-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 0.7rem;
  color: var(--text-muted);
  align-items: center;
}

.job-sat-badge {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-deep);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--primary-light);
  display: inline-block;
}

.job-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.job-actions button {
  padding: 6px 10px;
  font-size: 0.7rem;
  border-radius: 6px;
}

/* ─── Progress Bar ──────────────────────────────────────────── */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-deep);
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  background-size: 200% 100%;
  transition: width 0.5s ease;
  animation: progress-shimmer 2s linear infinite;
}

/* ─── Log Viewer ────────────────────────────────────────────── */
.log-viewer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.log-viewer.open {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 8px;
}

.log-viewer pre {
  margin: 0;
  padding: 10px;
  background: var(--bg-deep);
  border-radius: var(--radius-sm);
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-all;
}

/* ─── Bottom Panel ──────────────────────────────────────────── */
.bottom-panel {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 40px;
  overflow: hidden;
  flex-shrink: 0;
}

.bottom-panel.expanded {
  max-height: 380px;
}

.bottom-toggle {
  width: 100%;
  background: none;
  border: none;
  padding: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  transition: color var(--transition);
}

.bottom-toggle:hover {
  color: var(--primary);
}

.chevron-up {
  display: inline-block;
  transition: transform var(--transition);
  font-size: 0.7rem;
}

.bottom-panel.expanded .chevron-up {
  transform: rotate(180deg);
}

.bottom-content {
  padding: 0 20px 20px;
}

.bottom-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 8px 16px;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  position: relative;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

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

.tab-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.tab-panel {
  animation: fadeIn 0.3s ease;
}

#panel-timeseries {
  height: 220px;
  position: relative;
}

#timeseries-canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ─── Results Summary ───────────────────────────────────────── */
.results-summary {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.summary-stat {
  background: var(--bg-elevated);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  min-width: 120px;
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
}

.stat-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ─── Data Table ────────────────────────────────────────────── */
.table-wrapper {
  max-height: 220px;
  overflow-y: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.data-table th {
  text-align: left;
  padding: 8px 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.7rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 1;
}

.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(72, 202, 228, 0.06);
  color: var(--text-primary);
}

.data-table tr:hover td {
  background: var(--bg-elevated);
}

/* ─── Toast Notifications ───────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 70px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease;
  backdrop-filter: blur(10px);
  min-width: 280px;
  max-width: 400px;
  pointer-events: auto;
}

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

.toast.hiding {
  animation: slideOut 0.3s ease forwards;
}

.toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 4px;
  transition: color var(--transition);
}

.toast-close:hover {
  color: var(--text-primary);
}

/* ─── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 11, 24, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease;
}

.modal {
  width: 480px;
  max-width: 90%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  animation: modalIn 0.3s ease;
}

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

.modal-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 1.1rem;
  margin: 0;
  color: var(--text-primary);
}

.modal-body {
  padding: 20px;
  font-size: 0.85rem;
  line-height: 1.6;
  max-height: 400px;
  overflow-y: auto;
}

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

.config-summary {
  list-style: none;
  padding: 0;
  margin: 0;
}

.config-summary li {
  padding: 6px 0;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(72, 202, 228, 0.06);
}

.config-summary li:last-child { border-bottom: none; }

.config-summary .label {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.config-summary .value {
  font-weight: 600;
  color: var(--primary-light);
  font-size: 0.8rem;
}

/* ─── Timeline Control ──────────────────────────────────────── */
.timeline-control {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 16px;
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--glass-border) !important;
  min-width: 280px;
  box-shadow: var(--shadow) !important;
}

.timeline-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--primary-light);
  font-weight: 700;
  text-align: center;
  margin-top: 6px;
  font-family: 'Inter', sans-serif;
}

.timeline-slider {
  width: 100%;
}

/* ─── No Jobs Placeholder ───────────────────────────────────── */
.no-jobs {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.no-jobs-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 12px;
  opacity: 0.5;
}

.no-jobs p {
  margin: 4px 0;
  font-size: 0.85rem;
}

/* ─── Footer ────────────────────────────────────────────────── */
.footer {
  padding: 6px 20px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ─── Skeleton Loading ──────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated), var(--bg-hover), var(--bg-elevated));
  background-size: 200% 100%;
  animation: skeleton 1.5s ease infinite;
  border-radius: var(--radius-sm);
}

/* ─── Coord Display (map overlay) ───────────────────────────── */
.coord-display {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace !important;
}

/* ─── Leaflet Overrides ─────────────────────────────────────── */
.leaflet-control-layers,
.leaflet-bar {
  background: var(--glass-bg) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border: 1px solid var(--glass-border) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow) !important;
  overflow: hidden;
}

.leaflet-bar a,
.leaflet-bar a:hover {
  color: var(--text-primary) !important;
  background: transparent !important;
  border-bottom-color: var(--border) !important;
  width: 34px;
  height: 34px;
  line-height: 34px;
}

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

.leaflet-control-layers-expanded {
  padding: 8px 12px;
}

.leaflet-control-layers-list label {
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
}

.leaflet-control-layers-separator {
  border-top-color: var(--border);
}

.leaflet-popup-content-wrapper {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-lg) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
}

.leaflet-popup-tip {
  background: var(--bg-elevated) !important;
}

.leaflet-popup-close-button {
  color: var(--text-muted) !important;
}

.leaflet-popup-close-button:hover {
  color: var(--text-primary) !important;
}

/* Draw toolbar overrides */
.leaflet-draw-toolbar a {
  background-color: transparent !important;
}

.leaflet-draw-actions {
  background: var(--bg-elevated) !important;
  border-radius: var(--radius-sm) !important;
}

.leaflet-draw-actions a {
  background: var(--bg-elevated) !important;
  color: var(--text-primary) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.75rem !important;
  border-left-color: var(--border) !important;
}

.leaflet-draw-actions a:hover {
  background: var(--bg-hover) !important;
}

/* Scale control */
.leaflet-control-scale-line {
  background: var(--glass-bg) !important;
  color: var(--text-secondary) !important;
  border-color: var(--primary-dark) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.7rem !important;
  backdrop-filter: blur(8px);
  border-radius: 4px !important;
}

/* ─── Keyframes ─────────────────────────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

@keyframes shimmer-btn {
  0% { left: -100%; }
  100% { left: 200%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes progress-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes skeleton {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

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

/* ─── Utility Classes ───────────────────────────────────────── */
.text-secondary  { color: var(--text-secondary); }
.text-primary-c  { color: var(--primary); }
.text-accent     { color: var(--accent); }
.text-error      { color: var(--error); }
.text-success    { color: var(--success); }
.text-warning    { color: var(--warning); }
.hidden          { display: none !important; }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .sidebar {
    width: 280px;
  }
  .sat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .sidebar {
    position: absolute;
    top: 0;
    height: 100%;
    width: 300px;
    z-index: 500;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .left-sidebar {
    left: 0;
    transform: translateX(-100%);
  }

  .left-sidebar.open {
    transform: translateX(0);
  }

  .right-sidebar {
    right: 0;
    transform: translateX(100%);
  }

  .right-sidebar.open {
    transform: translateX(0);
  }

  .bottom-panel.expanded {
    max-height: 320px;
  }
}
