:root {
  --bg-dark: #0f172a;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: rgba(226, 232, 240, 0.8);
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --accent: #f59e0b;
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --success: #10b981;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

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

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-primary);
  background-color: #e2e8f0;
}

/* Fullscreen Map */
#map {
  width: 100vw;
  height: 100vh;
  z-index: 1;
}

/* Glassmorphic Top Navigation */
.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: var(--shadow-lg);
}

.nav-bar {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  border-radius: var(--radius-lg);
  max-width: 1200px;
  margin: 0 auto;
}

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

.brand-icon {
  font-size: 1.6rem;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

.nav-stats {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(241, 245, 249, 0.85);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--success);
  display: inline-block;
}

.stat-pill.stat-car {
  border-color: rgba(2, 132, 199, 0.35);
  color: #0369a1;
  font-weight: 600;
}

.stat-pill.stat-hiking {
  border-color: rgba(217, 119, 6, 0.35);
  color: #b45309;
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Location Picker Floating Banner */
.picker-banner {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: #0f172a;
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
  line-height: 1.25;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

.btn-xs {
  padding: 3px 8px;
  font-size: 0.75rem;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

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

.btn-secondary {
  background-color: #f1f5f9;
  color: var(--text-primary);
  border: 1px solid #cbd5e1;
}

.btn-secondary:hover {
  background-color: #e2e8f0;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-outline:hover {
  background-color: rgba(2, 132, 199, 0.08);
}

.btn-danger {
  background-color: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: var(--danger-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(0, 0, 0, 0.05);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 24px;
  animation: popIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-card {
  max-width: 680px;
}

@keyframes popIn {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
}

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

.modal-header {
  margin-bottom: 18px;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

.modal-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Entry View Details */
.entry-date {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.entry-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  color: #0f172a;
}

.entry-coords {
  font-size: 0.78rem;
  font-family: monospace;
  color: var(--text-muted);
  margin-top: 4px;
}

.entry-gallery {
  margin-bottom: 20px;
}

.entry-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.gallery-item-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: var(--radius-md);
  pointer-events: none;
}

.gallery-item-wrapper:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-overlay-icon {
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1rem;
  box-shadow: var(--shadow-md);
  transform: scale(0.9);
  transition: transform 0.2s ease;
}

.gallery-item-wrapper:hover .gallery-overlay-icon {
  transform: scale(1);
}

.gallery-expand-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  z-index: 2;
}

.gallery-expand-btn:hover {
  background: rgba(15, 23, 42, 0.95);
  transform: scale(1.08);
}

.gallery-item {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 0.2s;
  display: block;
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-video {
  width: 100%;
  border-radius: var(--radius-md);
  max-height: 300px;
  background: #000;
  display: block;
}

.gallery-media-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  width: 100%;
}

.raw-media-link {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  transition: all 0.15s ease;
}

.raw-media-link:hover {
  color: var(--color-primary);
  background: #e2e8f0;
  text-decoration: none;
}

/* Diashow / Fullscreen Lightbox */
.diashow-backdrop {
  position: fixed;
  inset: 0;
  height: 100%;
  height: 100dvh;
  z-index: 9999;
  background: rgba(10, 15, 25, 0.96);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
  touch-action: none;
  transition: opacity 0.2s ease;
}

.diashow-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
  z-index: 10;
}

.diashow-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.diashow-counter {
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.diashow-title {
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
  max-width: 45vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diashow-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.diashow-btn-raw {
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.diashow-btn-raw:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  text-decoration: none;
}

.diashow-btn-close {
  background: none;
  border: none;
  color: #cbd5e1;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  border-radius: 50%;
  transition: color 0.15s ease, transform 0.15s ease;
}

.diashow-btn-close:hover {
  color: #fff;
  transform: scale(1.15);
}

.diashow-stage {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: calc(100dvh - 145px);
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}

.diashow-media-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 92vw;
  max-height: 80vh;
  pointer-events: auto;
}

.diashow-media-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 76vh;
}

.diashow-img {
  max-width: 90vw;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  touch-action: pan-y pinch-zoom;
}

.diashow-video {
  max-width: 90vw;
  max-height: 76vh;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
  background: #000;
  display: block;
}

.diashow-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 30;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  opacity: 0.85;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.diashow-nav-btn:hover {
  background: rgba(15, 23, 42, 0.95);
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}

.diashow-nav-prev {
  left: 14px;
}

.diashow-nav-next {
  right: 14px;
}

.diashow-strip {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  padding: 10px 16px;
  padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100vw;
  min-height: 64px;
  z-index: 10;
}

.diashow-strip-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.5;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.diashow-strip-thumb:hover {
  opacity: 0.85;
  transform: scale(1.05);
}

.diashow-strip-thumb.active {
  opacity: 1;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.6);
  transform: scale(1.12);
}

@media (max-width: 768px) {
  .diashow-topbar {
    padding: 8px 12px;
  }
  .diashow-title {
    display: none;
  }
  .diashow-nav-btn {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }
  .diashow-nav-prev {
    left: 8px;
  }
  .diashow-nav-next {
    right: 8px;
  }
  .diashow-strip-thumb {
    width: 42px;
    height: 42px;
  }
}

/* Markdown Rendering */
.markdown-body {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #334155;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
  margin-top: 1.2em;
  margin-bottom: 0.5em;
  color: #0f172a;
}

.markdown-body p {
  margin-bottom: 1em;
}

.markdown-body ul, .markdown-body ol {
  padding-left: 20px;
  margin-bottom: 1em;
}

.markdown-body blockquote {
  border-left: 3px solid var(--primary);
  padding-left: 12px;
  color: var(--text-secondary);
  font-style: italic;
  margin: 1em 0;
}

/* Forms */
.entry-form, .login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.form-control {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.9rem;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

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

.modal-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
}

/* Dropzones */
.dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  background-color: #f8fafc;
  transition: all 0.2s ease;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background-color: rgba(2, 132, 199, 0.05);
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.dropzone-icon {
  font-size: 1.8rem;
}

.dropzone-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.dropzone-text .browse-link {
  color: var(--primary);
  font-weight: 600;
}

.dropzone-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.file-hidden {
  display: none;
}

.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.file-chip {
  background: #e2e8f0;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Location Controls */
.location-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.coords-inputs {
  display: flex;
  gap: 10px;
}

.input-col {
  flex: 1;
}

.input-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.exif-notice {
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  margin-bottom: 4px;
}

/* Alerts & Toasts */
.form-error {
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 500;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: slideUp 0.25s ease-out;
}

.toast.toast-error {
  background: var(--danger);
}

.toast.toast-success {
  background: var(--success);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Custom Marker Styles */
.custom-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #0284c7;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.custom-pin:hover {
  transform: scale(1.18);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.45);
}

.custom-pin.temp-pin {
  border-color: #f59e0b;
  background: #fef3c7;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.hidden {
  display: none !important;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .nav-bar {
    top: 8px;
    left: 8px;
    right: 8px;
    padding: 8px 12px;
  }
  .brand-subtitle {
    display: none;
  }
  .modal-card {
    padding: 16px;
    max-height: 95vh;
  }
  .coords-inputs {
    flex-direction: column;
  }
}

/* Leaflet Controls Styling */
.leaflet-control-layers {
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-md) !important;
  font-family: inherit !important;
  font-size: 0.85rem !important;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(8px);
}

.leaflet-control-layers-expanded {
  padding: 10px 14px !important;
  color: var(--text-primary);
  line-height: 1.6;
}

.leaflet-control-zoom {
  border-radius: var(--radius-md) !important;
  border: 1px solid var(--border-color) !important;
  overflow: hidden;
  box-shadow: var(--shadow-md) !important;
}

/* Manage Entries Modal & Table */
.manage-card {
  max-width: 1080px;
  width: 95vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.manage-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.manage-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-input {
  min-width: 220px;
}

.form-control-sm {
  padding: 6px 10px;
  font-size: 0.85rem;
}

.table-container {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  margin-top: 12px;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  background: #ffffff;
}

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

.entries-table thead {
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 2;
  border-bottom: 1px solid #cbd5e1;
}

.entries-table th {
  padding: 10px 14px;
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.entries-table th.sortable-th {
  cursor: pointer;
  user-select: none;
  color: var(--primary);
  transition: background-color 0.15s;
}

.entries-table th.sortable-th:hover {
  background-color: #f1f5f9;
}

.entries-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.entries-table tbody tr {
  transition: background-color 0.15s;
}

.entries-table tbody tr:hover {
  background-color: #f8fafc;
}

.table-thumb-wrapper {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 44px;
}

.table-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid #cbd5e1;
  background-color: #f1f5f9;
}

.table-thumb-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: var(--bg-dark);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
}

.table-video-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  font-size: 0.75rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.table-date {
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 600;
}

.table-date-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
}

.table-title {
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
}

.table-title:hover {
  text-decoration: underline;
}

.table-coords {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.table-snippet {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.btn-icon {
  padding: 5px 8px;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.manage-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.manage-counter {
  font-size: 0.85rem;
  color: var(--text-secondary);
}
