/* Tab Management */
.tab-content-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 24px 24px 24px; /* Reduced top padding for tighter, cleaner look */
  flex: 1;
  width: 100%;
}

.tab-pane {
  display: none;
  animation: fadeIn var(--transition-normal) forwards;
}

.tab-pane.active-tab {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* TAB 1: STARTSEITE STYLES */

/* Hero Banner */
.hero-banner {
  height: 240px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background-image: url('../assets/hero.png');
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(26, 30, 36, 0.85) 0%, rgba(26, 30, 36, 0.4) 100%);
  z-index: 1;
}

.hero-container {
  position: relative;
  z-index: 2;
  padding: 0 40px;
  color: #ffffff;
}

.hero-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-family-serif);
  font-style: italic;
}

/* Intro Text Card & Weather Widget */
.intro-section {
  /* Layout is now handled via inline grid in HTML */
}

.intro-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}

.intro-text {
  font-size: 1.08rem;
  color: var(--text-main);
  line-height: 1.6;
}

/* Weather Card */
.weather-card {
  background: linear-gradient(135deg, rgba(26, 30, 36, 0.7), rgba(15, 18, 25, 0.8));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.weather-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.spinner {
  width: 16px;
  height: 16px;
  animation: spin 2s linear infinite;
}
@keyframes spin { 100% { transform: rotate(360deg); } }

.weather-header {
  margin-bottom: 12px;
}

.weather-location {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.weather-icon {
  width: 42px;
  height: 42px;
  color: var(--primary);
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.weather-temp {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -1px;
}

.weather-desc {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Accordions */
.accordion-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.accordion-item {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
}

.accordion-item:hover {
  border-color: var(--border-hover);
}

.accordion-header {
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
  transition: background-color var(--transition-fast);
}

.accordion-header:hover {
  background-color: rgba(0,0,0,0.01);
}

.accordion-title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-family-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-heading);
}

.acc-icon {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.chevron-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  transition: transform var(--transition-normal);
}

.accordion-header[aria-expanded="true"] .chevron-icon {
  transform: rotate(180deg);
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal) ease-out;
}

.accordion-content {
  padding: 0 20px 20px 20px;
  border-top: 1px solid rgba(0,0,0,0.03);
}

.accordion-content h3 {
  font-size: 1.05rem;
  margin: 12px 0 6px 0;
  color: var(--secondary);
}

.accordion-content p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.template-grid-list ol {
  padding-left: 20px;
  margin-bottom: 12px;
  font-size: 0.92rem;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Nomenclatur ID Cards Grid */
.nomenclatur-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.nomenclatur-card {
  background-color: rgba(0,0,0,0.015);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.nomenclatur-badge {
  padding: 4px 8px;
  font-weight: 800;
  font-size: 0.78rem;
  border-radius: 4px;
  color: #fff;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}

.nomenclatur-card h4 {
  font-size: 0.9rem;
  margin-bottom: 2px;
  font-family: var(--font-family-sans);
}

.nomenclatur-card p {
  font-size: 0.8rem;
  margin: 0;
  line-height: 1.35;
}

/* Alert Box */
.alert-info-box {
  background-color: var(--primary-glow);
  border-left: 4px solid var(--primary);
  padding: 12px 14px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 12px;
}

.alert-info-icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.alert-info-box p {
  margin: 0;
  font-size: 0.85rem;
  color: #3b424e;
}

/* Latest Discoveries Section */
.latest-discoveries {
  margin-top: 24px;
}

.section-title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid var(--primary);
  padding-bottom: 6px;
  margin-bottom: 16px;
}

.section-title-svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

.section-title-wrapper h3 {
  font-size: 1.25rem;
  color: var(--primary);
}

.gallery-action-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

/* TAB 2: DATABASE VIEW STYLES */
.database-title-block {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  flex-wrap: wrap;
  gap: 16px;
}

.database-title-block h1 {
  font-size: 1.6rem;
  line-height: 1.2;
}

.database-title-block p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.database-actions {
  display: flex;
  gap: 10px;
}

/* Dashboard statistics */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.dashboard-stats .span-two {
  grid-column: span 1;
}

@media (min-width: 900px) {
  .dashboard-stats .span-two {
    grid-column: span 2;
  }
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.015);
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s, transform var(--transition-normal);
}

[data-theme="dark"] .stat-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(107, 29, 36, 0.08);
}

[data-theme="dark"] .stat-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.stat-value {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.1;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-normal);
}

.stat-card:hover .stat-icon {
  transform: scale(1.1);
}

.stat-icon svg {
  width: 20px;
  height: 20px;
}

.icon-navy {
  background-color: rgba(41, 62, 82, 0.06);
  color: var(--secondary);
}

.icon-teal {
  background-color: rgba(49, 151, 149, 0.06);
  color: var(--teal);
}

.icon-burgundy {
  background-color: var(--primary-glow);
  color: var(--primary);
}

/* Control Bar (Filters and Search) */
.db-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

.search-box {
  flex: 1;
  min-width: 260px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  background-color: rgba(0,0,0,0.015);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-family-sans);
  font-size: 0.88rem;
  transition: all var(--transition-fast);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 6px var(--primary-glow);
  background-color: #ffffff;
}

.filter-group {
  display: flex;
  gap: 8px;
}

.filter-group select {
  padding: 8px 30px 8px 12px;
  background-color: rgba(0,0,0,0.015);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-family-sans);
  font-size: 0.88rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='rgba(90, 100, 110, 0.8)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  transition: all var(--transition-fast);
}

.filter-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 6px var(--primary-glow);
}

/* Sightings Section */
.sightings-section {
  min-height: 400px;
}

.sightings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Sightings Card */
.sighting-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-normal);
  position: relative;
}

.sighting-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: 0 10px 25px var(--primary-glow), 0 3px 10px rgba(0, 0, 0, 0.04);
}

.card-image-box {
  width: 100%;
  height: 175px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.card-image-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.sighting-card:hover .card-image-box img {
  transform: scale(1.03);
}

.image-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background-color: var(--bg-surface);
  gap: 8px;
}

.image-fallback svg {
  width: 32px;
  height: 32px;
  opacity: 0.25;
  color: var(--text-muted);
}

.card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.badge {
  padding: 3px 8px;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background-color: var(--secondary);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: inline-block;
  align-self: flex-start;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Category Badges with premium HSL shades */
.badge-category.cat-saeugetier { background-color: hsl(28, 55%, 38%); }
.badge-category.cat-vogel { background-color: hsl(195, 60%, 35%); }
.badge-category.cat-reptil-amphibie { background-color: hsl(165, 55%, 32%); }
.badge-category.cat-insekt { background-color: hsl(42, 60%, 38%); }
.badge-category.cat-pflanze { background-color: hsl(135, 45%, 30%); }
.badge-category.cat-pilz { background-color: hsl(270, 40%, 42%); }
.badge-category.cat-sonstige { background-color: hsl(210, 16%, 38%); }

/* Rarity Badges */
.badge-rarity.rar-sehr-haeufig { background-color: hsl(140, 35%, 38%); }
.badge-rarity.rar-haeufig { background-color: hsl(175, 45%, 35%); }
.badge-rarity.rar-selten { background-color: hsl(28, 65%, 45%); }
.badge-rarity.rar-extrem-selten { 
  background-color: hsl(353, 60%, 38%); 
  box-shadow: 0 0 8px rgba(180, 70, 80, 0.4);
  animation: glow 2s infinite ease-in-out; 
}

.card-body {
  padding: 16px 18px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-title-block {
  min-height: auto;
}

.card-fund-id {
  font-family: monospace;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin-bottom: 2px;
  letter-spacing: 0.5px;
}

.card-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 2px;
  cursor: pointer;
  line-height: 1.3;
  transition: color var(--transition-fast);
}

.card-title:hover {
  color: var(--primary);
}

.card-subtitle {
  font-family: var(--font-family-serif);
  font-size: 0.82rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
  flex-wrap: wrap;
}

.card-meta-separator {
  opacity: 0.4;
  font-size: 0.7rem;
}

.card-meta-location {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.card-notes {
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  line-height: 1.5;
}

.card-footer {
  padding: 10px 18px;
  border-top: 1px solid var(--border-color);
  background-color: rgba(0, 0, 0, 0.005);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.card-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.card-btn svg {
  width: 14px;
  height: 14px;
}

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

.card-btn-delete:hover {
  background-color: rgba(197, 48, 48, 0.08);
  color: var(--danger);
}


/* --- BUTTONS REFINEMENT (SLIMMER & ELEGANT) --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font-family-sans);
  letter-spacing: 0.1px;
}

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

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(107, 29, 36, 0.15);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background-color: rgba(0,0,0,0.015);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

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

.btn-danger:hover {
  background-color: var(--danger-hover);
  transform: translateY(-1px);
}

.btn-icon-only {
  padding: 6px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.btn-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  transition: color var(--transition-fast);
}

.btn-close:hover {
  color: var(--text-main);
}

.loading-state,
.empty-state {
  padding: 50px 20px;
  border-radius: var(--radius-md);
  gap: 12px;
}

.empty-state svg {
  width: 36px;
  height: 36px;
}

.empty-state h3 {
  font-size: 1.05rem;
}

.spinner {
  width: 28px;
  height: 28px;
}

.app-footer {
  padding: 16px;
}

.footer-container p {
  font-size: 0.82rem;
}

.footer-container span {
  font-size: 0.7rem;
  margin-top: 2px;
}

.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999999;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-family-sans);
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 280px;
  max-width: 380px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border-color);
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.3s ease;
  background-color: var(--bg-card);
  color: var(--text-main);
  pointer-events: auto;
}

.toast-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Toast Color Themes & Glowing Left Borders */
.toast-success {
  border-left: 4px solid #2e7d32;
  background-color: rgba(46, 125, 50, 0.03);
}

.toast-error {
  border-left: 4px solid #c62828;
  background-color: rgba(198, 40, 40, 0.03);
}

.toast-info {
  border-left: 4px solid #1565c0;
  background-color: rgba(21, 101, 192, 0.03);
}

[data-theme="dark"] .toast-success {
  background-color: rgba(76, 175, 80, 0.08);
  border-left-color: #81c784;
}

[data-theme="dark"] .toast-error {
  background-color: rgba(229, 57, 53, 0.08);
  border-left-color: #e57373;
}

[data-theme="dark"] .toast-info {
  background-color: rgba(30, 136, 229, 0.08);
  border-left-color: #64b5f6;
}

.toast-success .toast-icon { color: #2e7d32; }
.toast-error .toast-icon { color: #c62828; }
.toast-info .toast-icon { color: #1565c0; }

[data-theme="dark"] .toast-success .toast-icon { color: #81c784; }
[data-theme="dark"] .toast-error .toast-icon { color: #e57373; }
[data-theme="dark"] .toast-info .toast-icon { color: #64b5f6; }

/* Entry & Exit Keyframe Animations */
@keyframes toastSlideIn {
  from {
    transform: translateX(120%) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateX(120%) scale(0.95);
    opacity: 0;
  }
}

.toast.toast-exit {
  animation: toastSlideOut 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.db-alert-banner {
  background-color: rgba(197, 48, 48, 0.05);
  border: 1px solid rgba(197, 48, 48, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.db-alert-banner-icon {
  width: 20px;
  height: 20px;
  color: var(--danger);
}

.db-alert-banner-text h4 {
  font-size: 0.9rem;
}

.db-alert-banner-text p {
  font-size: 0.82rem;
  line-height: 1.35;
}

/* --- PDF PRINT OVERRIDES --- */
body.printing-pdf-active * {
  letter-spacing: normal !important;
  text-transform: none !important;
}

.printing-pdf {
  width: 100% !important;
  max-width: 800px !important;
  height: auto !important;
  max-height: none !important;
  box-shadow: none !important;
  border: none !important;
  background: #ffffff !important;
  padding: 10px !important;
  font-family: Arial, Helvetica, sans-serif !important;
}

.printing-pdf * {
  letter-spacing: normal !important;
}

.printing-pdf h1, 
.printing-pdf h2, 
.printing-pdf h3, 
.printing-pdf h4,
.printing-pdf .conclusion-text,
.printing-pdf .report-text-block {
  font-family: Georgia, "Times New Roman", serif !important;
}

.printing-pdf .modal-header-dossier {
  border-bottom: 2px solid #2b3038 !important;
  padding: 15px 10px !important;
}

.printing-pdf .detail-body {
  height: auto !important;
  max-height: none !important;
  flex-direction: column !important;
  overflow: visible !important;
  display: flex !important;
}

.printing-pdf .detail-left-pane {
  width: 100% !important;
  border-right: none !important;
  border-bottom: 1.5px solid rgba(0,0,0,0.08) !important;
  background-color: transparent !important;
  overflow: visible !important;
  padding: 10px 0 20px 0 !important;
  height: auto !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 24px !important;
}

.printing-pdf .detail-right-pane {
  width: 100% !important;
  overflow: visible !important;
  padding: 20px 0 10px 0 !important;
  height: auto !important;
}

.printing-pdf .detail-left-pane::after,
.printing-pdf .detail-right-pane::after {
  display: none !important;
}

.printing-pdf .btn-close-dossier,
.printing-pdf .dossier-footer-actions {
  display: none !important;
}

.printing-pdf .polaroid-wrapper {
  transform: none !important;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
  margin: 0 !important;
  max-width: 190px !important;
}

.printing-pdf .detail-left-pane .detail-section-box {
  flex: 1 !important;
}

.printing-pdf .conclusion-highlight-box {
  border-style: solid !important;
  background-color: rgba(107, 29, 36, 0.01) !important;
  page-break-inside: avoid !important;
}

/* --- LEAFLET CUSTOM MARKERS & LEGEND --- */
.custom-div-icon {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.custom-map-pin {
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.3));
  transition: transform var(--transition-fast) ease-in-out;
}

.custom-map-pin:hover {
  transform: scale(1.18);
}

.map-legend {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-family-sans);
  font-size: 0.76rem;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
  min-width: 155px;
}

.map-legend-title {
  font-weight: 700;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  font-size: 0.72rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 3px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  flex-shrink: 0;
}

/* Stats Dashboard Panel (class-based, no inline) */
.stats-dashboard-panel {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.stats-panel-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.chart-card {
  background: var(--chart-bg);
  border: 1px solid var(--chart-border);
  padding: 16px;
  border-radius: var(--radius-sm);
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.chart-card-centered {
  align-items: center;
}

.chart-card h4 {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-family-sans);
}

.chart-wrapper {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-wrapper-sm {
  max-width: 220px;
}

/* Sortier-Kontrollleiste */
.sort-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.sort-controls label {
  font-weight: 600;
  white-space: nowrap;
}

.sort-controls select {
  padding: 6px 28px 6px 10px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-family: var(--font-family-sans);
  font-size: 0.82rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='rgba(90, 100, 110, 0.8)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 12px;
}

/* ============================================= */
/* ======= DARK MODE OVERRIDES (DASHBOARD) ===== */
/* ============================================= */

[data-theme="dark"] .intro-text {
  color: var(--text-main);
}

[data-theme="dark"] .accordion-title-wrapper {
  color: var(--text-heading);
}

[data-theme="dark"] .accordion-content {
  border-top-color: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .accordion-header:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .nomenclatur-card {
  background-color: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .template-grid-list ol {
  color: var(--text-main);
}

[data-theme="dark"] .alert-info-box p {
  color: var(--text-main);
}

[data-theme="dark"] .stat-value {
  color: var(--text-heading);
}

[data-theme="dark"] .card-image-box {
  background-color: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .card-title {
  color: var(--text-heading);
}

[data-theme="dark"] .card-notes {
  border-top-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .card-footer {
  background-color: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .search-box input {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

[data-theme="dark"] .search-box input:focus {
  background-color: var(--bg-surface);
}

[data-theme="dark"] .filter-group select {
  background-color: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

[data-theme="dark"] .btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-main);
}

[data-theme="dark"] .btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .sighting-card:hover {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .map-legend {
  background: rgba(30, 34, 42, 0.95);
}

[data-theme="dark"] .app-footer {
  color: var(--text-muted);
}

[data-theme="dark"] .icon-navy {
  background-color: rgba(100, 140, 180, 0.1);
}

[data-theme="dark"] .icon-teal {
  background-color: rgba(49, 151, 149, 0.1);
}

[data-theme="dark"] .icon-burgundy {
  background-color: rgba(180, 70, 80, 0.1);
}

[data-theme="dark"] .db-alert-banner {
  background-color: rgba(197, 48, 48, 0.1);
  border-color: rgba(197, 48, 48, 0.3);
}

/* --- HOMEPAGE UPGRADES STYLING --- */

/* Hero Slideshow */
.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  z-index: 1;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide-info {
  position: absolute;
  bottom: 16px;
  left: 24px;
  background-color: rgba(26, 26, 32, 0.88); /* FiveM-safe high opacity instead of blur */
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #ffffff;
  font-family: var(--font-family-sans);
  font-size: 0.76rem;
  max-width: 320px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-fast);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-slide-info:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

/* Hero Banner Veredelungen */
.hero-title {
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  letter-spacing: -0.5px;
}

.hero-subtitle {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.5px;
  font-weight: 500;
  opacity: 0.95;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.mouse-icon {
  width: 22px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 12px;
  position: relative;
  display: flex;
  justify-content: center;
}

.mouse-icon .wheel {
  width: 3px;
  height: 7px;
  background-color: #ffffff;
  border-radius: 2px;
  position: absolute;
  top: 5px;
  animation: scrollMouseWheel 1.6s infinite ease-in-out;
}

@keyframes scrollMouseWheel {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  20% {
    opacity: 1;
  }
  60% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 0;
  }
}

/* Info Grid Veredelungen */
.home-info-grid {
  margin: 0 auto 24px auto;
  max-width: var(--max-width);
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
}

.info-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.015);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s, transform var(--transition-normal);
}

[data-theme="dark"] .info-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.info-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.info-card-title {
  font-family: var(--font-family-sans);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card-icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

.info-card-desc {
  font-size: 0.86rem;
  color: var(--text-main);
  line-height: 1.5;
}

/* Nomenclature Badges */
.nomenclature-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.nomenclature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background-color: rgba(0, 0, 0, 0.01);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

[data-theme="dark"] .nomenclature-item {
  background-color: rgba(255, 255, 255, 0.015);
}

.nomenclature-item:hover {
  background-color: var(--primary-glow);
  border-color: var(--border-hover);
}

.nomenclature-badge {
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.badge-primary {
  background-color: var(--primary);
  box-shadow: 0 4px 10px rgba(107, 29, 36, 0.25);
}

.badge-secondary {
  background-color: var(--secondary);
  box-shadow: 0 4px 10px rgba(41, 62, 82, 0.25);
}

.badge-gold {
  background-color: var(--gold);
  box-shadow: 0 4px 10px rgba(180, 140, 30, 0.25);
}

.nomenclature-text {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-main);
}

/* Dossier Steps */
.dossier-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dossier-step {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
  transition: all var(--transition-fast);
}

.dossier-step:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dossier-step:hover {
  transform: translateX(4px);
}

.dossier-step-number {
  background-color: var(--primary-glow);
  color: var(--primary);
  border: 1px solid rgba(107, 29, 36, 0.15);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  flex-shrink: 0;
}

.dossier-step-text {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-main);
}

/* Activity Log Chronicle - Timeline Design */
#home-activity-log {
  position: relative;
  padding-left: 14px;
}

#home-activity-log::before {
  content: '';
  position: absolute;
  left: 23px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background-color: var(--border-color);
  z-index: 1;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 6px 0;
  border-bottom: none;
  transition: all var(--transition-normal);
  position: relative;
  z-index: 2;
}

.activity-item:hover {
  background-color: transparent;
  transform: translateX(4px);
}

.activity-item-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  flex-shrink: 0;
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 2px var(--border-color);
  background-color: var(--bg-card);
  z-index: 3;
  transition: all var(--transition-normal);
}

.activity-item:hover .activity-item-icon {
  transform: scale(1.2);
  box-shadow: 0 0 0 2px var(--primary);
}

/* Action Icons Color themes */
.activity-icon-create {
  background-color: rgba(46, 125, 50, 0.1);
  color: #2e7d32;
  border-color: rgba(46, 125, 50, 0.2);
}

.activity-icon-update {
  background-color: rgba(239, 108, 0, 0.1);
  color: #ef6c00;
  border-color: rgba(239, 108, 0, 0.2);
}

.activity-icon-delete {
  background-color: rgba(198, 40, 40, 0.1);
  color: #c62828;
  border-color: rgba(198, 40, 40, 0.2);
}

.activity-icon-auth {
  background-color: rgba(21, 101, 192, 0.1);
  color: #1565c0;
  border-color: rgba(21, 101, 192, 0.2);
}

[data-theme="dark"] .activity-icon-create {
  background-color: rgba(76, 175, 80, 0.15);
  color: #81c784;
}

[data-theme="dark"] .activity-icon-update {
  background-color: rgba(255, 152, 0, 0.15);
  color: #ffb74d;
}

[data-theme="dark"] .activity-icon-delete {
  background-color: rgba(229, 57, 53, 0.15);
  color: #e57373;
}

[data-theme="dark"] .activity-icon-auth {
  background-color: rgba(30, 136, 229, 0.15);
  color: #64b5f6;
}

.activity-item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
  font-size: 0.8rem;
  color: var(--text-main);
  line-height: 1.4;
}

.activity-item-user {
  font-weight: 700;
  color: var(--text-heading);
}

.activity-item-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  align-self: center;
  white-space: nowrap;
}

/* --- SIGHTINGS DUAL/SPLIT-VIEW LAYOUT --- */
.sightings-section.split-mode {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: stretch;
  margin-top: 16px;
}

.sightings-section.split-mode #map-container {
  display: block !important;
  flex: 1.3;
  min-width: 450px;
  height: 580px !important;
  position: sticky;
  top: 90px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.sightings-section.split-mode #sightings-grid {
  display: grid !important;
  flex: 1;
  min-width: 350px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  height: 580px;
  overflow-y: auto;
  padding-right: 8px;
  align-content: start;
}

/* Custom compact scrollbar for Grid in split view */
.sightings-section.split-mode #sightings-grid::-webkit-scrollbar {
  width: 6px;
}

.sightings-section.split-mode #sightings-grid::-webkit-scrollbar-track {
  background: transparent;
}

.sightings-section.split-mode #sightings-grid::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.sightings-section.split-mode #sightings-grid::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Fullscreen Map Mode overrides */
.sightings-section.map-mode #map-container {
  height: 580px !important;
  width: 100%;
}

/* --- PREMIUM CARD REFINE HOVER EFFECT --- */
.sighting-card {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.25s ease, 
              box-shadow 0.25s ease !important;
  border-top: 3px solid transparent !important; /* Top accent band */
}

/* Glow effects matching categories */
.sighting-card.cat-saeugetier { border-top-color: hsl(28, 55%, 38%) !important; }
.sighting-card.cat-vogel { border-top-color: hsl(195, 60%, 35%) !important; }
.sighting-card.cat-reptil-amphibie { border-top-color: hsl(165, 55%, 32%) !important; }
.sighting-card.cat-insekt { border-top-color: hsl(42, 60%, 38%) !important; }
.sighting-card.cat-pflanze { border-top-color: hsl(135, 45%, 30%) !important; }
.sighting-card.cat-pilz { border-top-color: hsl(270, 40%, 42%) !important; }
.sighting-card.cat-sonstige { border-top-color: hsl(210, 16%, 38%) !important; }

/* Glowing borders and shadows on Hover */
.sighting-card.cat-saeugetier:hover {
  border-color: hsl(28, 55%, 45%) !important;
  box-shadow: 0 10px 25px rgba(239, 108, 0, 0.12), var(--shadow-md) !important;
}
.sighting-card.cat-vogel:hover {
  border-color: hsl(195, 60%, 40%) !important;
  box-shadow: 0 10px 25px rgba(21, 101, 192, 0.12), var(--shadow-md) !important;
}
.sighting-card.cat-reptil-amphibie:hover {
  border-color: hsl(165, 55%, 38%) !important;
  box-shadow: 0 10px 25px rgba(49, 151, 149, 0.12), var(--shadow-md) !important;
}
.sighting-card.cat-insekt:hover {
  border-color: hsl(42, 60%, 42%) !important;
  box-shadow: 0 10px 25px rgba(255, 152, 0, 0.12), var(--shadow-md) !important;
}
.sighting-card.cat-pflanze:hover {
  border-color: hsl(135, 45%, 35%) !important;
  box-shadow: 0 10px 25px rgba(46, 125, 50, 0.12), var(--shadow-md) !important;
}
.sighting-card.cat-pilz:hover {
  border-color: hsl(270, 40%, 48%) !important;
  box-shadow: 0 10px 25px rgba(123, 31, 162, 0.12), var(--shadow-md) !important;
}
.sighting-card.cat-sonstige:hover {
  border-color: hsl(210, 16%, 45%) !important;
  box-shadow: 0 10px 25px rgba(90, 100, 110, 0.12), var(--shadow-md) !important;
}

/* --- DETAILED TOTFUND CARD OVERRIDES --- */
.sighting-card.is-dead-card {
  border-top-color: var(--danger) !important;
  border-left: 1px solid rgba(197, 48, 48, 0.3) !important;
  border-right: 1px solid rgba(197, 48, 48, 0.3) !important;
  border-bottom: 1px solid rgba(197, 48, 48, 0.3) !important;
  background-color: rgba(197, 48, 48, 0.015);
}

.sighting-card.is-dead-card:hover {
  border-color: var(--danger-hover) !important;
  box-shadow: 0 10px 25px rgba(197, 48, 48, 0.15), var(--shadow-md) !important;
}

.sighting-card.is-dead-card .card-image-box {
  background-color: rgba(197, 48, 48, 0.05);
}

.sighting-card.is-dead-card .card-image-box img {
  filter: grayscale(20%) sepia(5%);
}

.badge-dead {
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 0 8px rgba(197, 48, 48, 0.4) !important;
}

/* Card Button Glow Refinement */
.card-footer {
  gap: 6px;
  background-color: rgba(0, 0, 0, 0.01);
}

.card-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  transition: all var(--transition-fast) ease-in-out;
}

.card-btn:hover {
  background-color: var(--primary-glow);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(107, 29, 36, 0.1);
}

.card-btn-delete:hover {
  background-color: rgba(197, 48, 48, 0.08);
  border-color: var(--danger);
  color: var(--danger);
  box-shadow: 0 2px 5px rgba(197, 48, 48, 0.15);
}

.card-btn-map:hover {
  background-color: rgba(49, 151, 149, 0.08);
  border-color: hsl(175, 45%, 35%);
  color: hsl(175, 45%, 35%);
}

/* Glassmorphism Refinements for Controls */
.db-controls {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-color);
  backdrop-filter: none !important; /* FiveM-safe high opacity fallback */
}

[data-theme="dark"] .db-controls {
  background: rgba(30, 34, 42, 0.92);
}

/* Responsive adjustment for Mobile viewports */
@media (max-width: 900px) {
  .sightings-section.split-mode {
    flex-direction: column;
  }
  .sightings-section.split-mode #map-container {
    width: 100%;
    min-width: 100%;
    position: static;
    height: 400px !important;
  }
  .sightings-section.split-mode #sightings-grid {
    height: auto;
    max-height: none;
    overflow-y: visible;
  }
}

/* Equipment Tab Styles */
.equipment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.equipment-card {
  transition: transform var(--transition-fast) ease, border-color var(--transition-fast) ease, box-shadow var(--transition-fast) ease !important;
}

.equipment-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary) !important;
  box-shadow: var(--shadow-md) !important;
}

.eq-item-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-main);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast) ease, color var(--transition-fast) ease;
}

.eq-item-label:hover {
  background-color: var(--bg-main) !important;
}

.eq-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0 !important;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  outline: none;
  background-color: var(--bg-surface) !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background-color var(--transition-fast) ease, border-color var(--transition-fast) ease;
}

.eq-checkbox:hover {
  border-color: var(--primary) !important;
}

.eq-checkbox:checked {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

.eq-checkbox:checked::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  position: absolute;
  top: 1px;
}

.eq-checkbox:focus-visible {
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.eq-item-label:has(.eq-checkbox:checked) {
  color: var(--text-muted) !important;
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.25) !important;
}

[data-theme="light"] .eq-item-label:has(.eq-checkbox:checked) {
  text-decoration-color: rgba(0, 0, 0, 0.15) !important;
}

.module-progress-badge {
  transition: all var(--transition-fast) ease;
}

.equipment-card:hover .module-progress-badge {
  background-color: var(--primary) !important;
  color: #ffffff !important;
}

/* SOP Tab Styles */
.sop-section {
  animation: fadeIn var(--transition-normal) forwards;
}

.sop-list-item {
  transition: border-color var(--transition-fast) ease, background-color var(--transition-fast) ease, box-shadow var(--transition-fast) ease;
}

.sop-list-item:hover {
  border-color: var(--primary) !important;
  background-color: var(--bg-main) !important;
}

.sop-list-item.selected-row {
  border-color: var(--primary) !important;
  background-color: var(--primary-glow) !important;
  border-left: 4px solid var(--primary) !important;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.sop-header-table td {
  border: 1px solid var(--text-main) !important;
}

[data-theme="dark"] .sop-header-table td {
  border-color: var(--border-color) !important;
}

.sop-document-body {
  font-family: var(--font-family-serif);
  line-height: 1.6;
}

.sop-section-header {
  border-bottom: 1.5px solid var(--primary) !important;
}

.sop-signature-badge {
  font-family: 'Courier New', Courier, monospace;
}

/* Custom Scrollbar for SOP List & Body */
#sop-list::-webkit-scrollbar,
.sop-document-body::-webkit-scrollbar {
  width: 6px;
}

#sop-list::-webkit-scrollbar-track,
.sop-document-body::-webkit-scrollbar-track {
  background: transparent;
}

#sop-list::-webkit-scrollbar-thumb,
.sop-document-body::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

#sop-list::-webkit-scrollbar-thumb:hover,
.sop-document-body::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============================================= */
/* ======= LABOR-HUB STYLES ==================== */
/* ============================================= */

.subtab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-normal);
}

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

.subtab-btn.active {
  background: linear-gradient(135deg, var(--primary) 0%, HSL(353, 50%, 35%) 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(107, 29, 36, 0.18) !important;
}

/* Journal Cards */
.journal-card {
  transition: border-color var(--transition-fast) ease, box-shadow var(--transition-fast) ease, transform var(--transition-fast) ease;
  border: 1px solid var(--border-color);
  border-left: 4.5px solid var(--primary) !important;
  background-color: var(--bg-card);
  position: relative;
}

.journal-card:hover {
  border-color: var(--primary) !important;
  box-shadow: var(--shadow-lg) !important;
  transform: translateY(-3px);
}

.journal-card h3 {
  transition: color var(--transition-fast) ease;
}

.journal-card:hover h3 {
  color: var(--primary-hover) !important;
}

/* Chemical Inventory Table */
#inventory-table-body tr {
  transition: background-color var(--transition-fast) ease;
  border-bottom: 1px solid var(--border-color);
}

#inventory-table-body tr:hover {
  background-color: var(--primary-glow) !important;
}

#inventory-table-body td {
  padding: 14px 16px;
  transition: color var(--transition-fast) ease;
}

#inventory-table-body tr:hover td {
  color: var(--text-heading);
}

/* GHS Badges */
.ghs-badge {
  background: linear-gradient(135deg, var(--danger) 0%, #b82c37 100%) !important;
  color: #ffffff !important;
  font-family: monospace;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.25);
  display: inline-block;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 1px rgba(0,0,0,0.25);
  transition: transform var(--transition-fast) ease, box-shadow var(--transition-fast) ease;
}

.ghs-badge:hover {
  transform: scale(1.08);
  box-shadow: 0 3px 8px rgba(220, 53, 69, 0.4);
}

/* Incident Cards */
.incident-card {
  background-color: var(--bg-card);
  transition: border-color var(--transition-fast) ease, box-shadow var(--transition-fast) ease, transform var(--transition-fast) ease;
  position: relative;
}

.incident-card:hover {
  box-shadow: var(--shadow-lg) !important;
  transform: translateY(-3px);
}

.incident-card h3 {
  transition: color var(--transition-fast) ease;
}

.incident-card:hover h3 {
  color: var(--text-heading) !important;
}

.incident-card::after {
  content: '⚠️';
  position: absolute;
  bottom: 15px;
  right: 20px;
  font-size: 1.2rem;
  opacity: 0.05;
  transition: opacity var(--transition-fast) ease, transform var(--transition-fast) ease;
}

.incident-card:hover::after {
  opacity: 0.18;
  transform: scale(1.12) rotate(8deg);
}

.ghs-selector-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-main);
  padding: 10px 14px;
  background-color: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color var(--transition-fast) ease, background-color var(--transition-fast) ease, color var(--transition-fast) ease, box-shadow var(--transition-fast) ease;
  white-space: nowrap;
  user-select: none;
  width: fit-content;
}

.ghs-selector-item:hover {
  border-color: var(--primary);
  background-color: var(--primary-glow);
}

.ghs-selector-item:has(.eq-checkbox:checked) {
  border-color: var(--primary);
  background-color: var(--primary-glow);
  color: var(--primary) !important;
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* Hazard Row Coloring and Left Indicators */
#inventory-table-body tr.hazard-high {
  background-color: rgba(220, 53, 69, 0.035) !important;
}
#inventory-table-body tr.hazard-high td:first-child {
  border-left: 4px solid var(--danger) !important;
}
#inventory-table-body tr.hazard-high:hover {
  background-color: rgba(220, 53, 69, 0.07) !important;
}

#inventory-table-body tr.hazard-medium {
  background-color: rgba(253, 126, 20, 0.035) !important;
}
#inventory-table-body tr.hazard-medium td:first-child {
  border-left: 4px solid #fd7e14 !important;
}
#inventory-table-body tr.hazard-medium:hover {
  background-color: rgba(253, 126, 20, 0.07) !important;
}

#inventory-table-body tr.hazard-oxidizing {
  background-color: rgba(197, 160, 89, 0.035) !important;
}
#inventory-table-body tr.hazard-oxidizing td:first-child {
  border-left: 4px solid var(--gold) !important;
}
#inventory-table-body tr.hazard-oxidizing:hover {
  background-color: rgba(197, 160, 89, 0.07) !important;
}

#inventory-table-body tr.hazard-environmental {
  background-color: rgba(32, 115, 99, 0.035) !important;
}
#inventory-table-body tr.hazard-environmental td:first-child {
  border-left: 4px solid var(--teal) !important;
}
#inventory-table-body tr.hazard-environmental:hover {
  background-color: rgba(32, 115, 99, 0.07) !important;
}

/* ============================================= */
/* ======= EXPEDITIONS-PLANER STYLES ============ */
/* ============================================= */

.expedition-list-item {
  transition: border-color var(--transition-fast) ease, background-color var(--transition-fast) ease, box-shadow var(--transition-fast) ease;
  border-left: 3px solid transparent !important;
}

.expedition-list-item:hover {
  border-color: var(--primary) !important;
  background-color: var(--bg-main) !important;
}

.expedition-list-item.selected-row {
  border-color: var(--primary) !important;
  background-color: var(--primary-glow) !important;
  border-left: 3px solid var(--primary) !important;
  box-shadow: 0 2px 8px var(--primary-glow);
}

#map-expedition {
  border-radius: var(--radius-md);
  z-index: 1;
}

#expeditions-list::-webkit-scrollbar {
  width: 6px;
}

#expeditions-list::-webkit-scrollbar-track {
  background: transparent;
}

#expeditions-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

#expeditions-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============================================= */
/* ======= HOME LAYOUT & SIDEBAR STYLES ======== */
/* ============================================= */
.home-main-layout {
  margin: 0 auto 40px auto;
  max-width: var(--max-width);
  padding: 0 24px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.latest-discoveries-wrapper {
  flex: 2;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.gallery-action-wrapper {
  margin-top: 6px;
  text-align: left;
}

.home-sidebar {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Sidebar & Spotlight Cards styling */
.home-sidebar-card,
.home-spotlight-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.015);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s, transform var(--transition-normal);
}

[data-theme="dark"] .home-sidebar-card,
[data-theme="dark"] .home-spotlight-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.home-sidebar-card:hover,
.home-spotlight-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.home-sidebar-title,
.home-spotlight-title {
  font-family: var(--font-family-sans);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-sidebar-icon,
.home-spotlight-title-icon {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

/* Lab Status Widget specific elements */
.lab-status-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lab-status-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: rgba(0, 0, 0, 0.005);
}

[data-theme="dark"] .lab-status-indicator {
  background-color: rgba(255, 255, 255, 0.015);
}

.lab-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
  display: inline-block;
  margin-right: 6px;
}

.lab-status-dot.warning {
  background-color: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

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

.lab-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lab-alert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  line-height: 1.4;
  border-left: 4px solid var(--primary);
  background-color: rgba(0, 0, 0, 0.01);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .lab-alert-item {
  background-color: rgba(255, 255, 255, 0.015);
}

.lab-alert-item.alert-warning {
  border-left-color: var(--gold);
}

.lab-alert-item.alert-danger {
  border-left-color: var(--danger);
}

.lab-alert-icon {
  font-size: 1rem;
}

/* Spotlight Species widget specific elements */
.spotlight-content {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.spotlight-image {
  width: 130px;
  height: 130px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.spotlight-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 200px;
}

.spotlight-name h4 {
  font-family: var(--font-family-serif);
  font-size: 1.25rem;
  color: var(--text-heading);
  margin: 0;
}

.spotlight-scientific {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.spotlight-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 0.78rem;
  color: var(--text-main);
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  margin-top: 4px;
}

.spotlight-meta span strong {
  color: var(--text-heading);
}

.spotlight-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  background-color: rgba(180, 140, 30, 0.1);
  color: var(--gold);
  border: 1px solid var(--gold);
}

.spotlight-badge.rare-high {
  background-color: var(--primary-glow);
  color: var(--primary);
  border-color: var(--primary);
}

/* Symmetrisches Layout & Trennlinie */
@media (min-width: 992px) {
  .latest-discoveries-wrapper {
    border-right: 1px solid var(--border-color);
    padding-right: 32px;
  }
  .home-main-layout {
    gap: 32px;
  }
}

/* Vereinheitlichtes Widget-Titel-System */
.home-sidebar-title,
.home-spotlight-title {
  font-family: var(--font-family-sans) !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  color: var(--text-muted) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
  border-bottom: 1px solid var(--border-color) !important;
  padding-bottom: 8px !important;
  margin-bottom: 12px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
}

/* Skeleton Loading Screens */
@keyframes skeletonPulse {
  0% {
    background-color: var(--skeleton-bg);
  }
  50% {
    background-color: var(--skeleton-pulse);
  }
  100% {
    background-color: var(--skeleton-bg);
  }
}

.skeleton-card,
.skeleton-spotlight,
.skeleton-lab-status,
.skeleton-timeline-item {
  animation: skeletonPulse 1.5s infinite ease-in-out;
  position: relative;
  overflow: hidden;
}

.skeleton-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  width: 100%;
}

.skeleton-card {
  height: 280px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.skeleton-spotlight {
  height: 142px;
  width: 100%;
  border-radius: var(--radius-lg);
}

.skeleton-lab-status {
  height: 124px;
  width: 100%;
  border-radius: var(--radius-lg);
}

.skeleton-timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  position: relative;
}

.skeleton-timeline-item {
  height: 38px;
  width: 100%;
  border-radius: var(--radius-md);
}

/* Modern Datatable for Species Register */
.table-scroll-container {
  overflow-x: hidden;
  border-radius: var(--radius-md);
}

.directory-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.84rem;
  table-layout: fixed;
}

.directory-table thead tr {
  border-bottom: 2px solid var(--border-color) !important;
  background-color: var(--nav-menu-bg) !important;
}

.directory-table th {
  padding: 12px 8px !important;
  font-family: var(--font-family-sans);
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.6px;
  border: none !important;
}

.directory-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  background-color: transparent;
  transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.directory-table tbody tr:hover {
  background-color: var(--primary-glow) !important;
  transform: translateX(4px);
}

.directory-table tbody tr.selected-row {
  background-color: var(--primary-glow) !important;
  transform: translateX(4px);
}

.directory-table tbody tr.selected-row td:first-child {
  box-shadow: inset 4px 0 0 var(--primary) !important;
}

.directory-table td {
  padding: 12px 8px !important;
  vertical-align: middle !important;
  color: var(--text-main);
  border: none !important;
}

/* Column Specific Widths & Layout Controls */
.col-photo {
  width: 50px !important;
  text-align: center;
}

.col-name {
  width: 23%;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-scientific {
  width: 23%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-category {
  width: 16%;
}

.col-redlist {
  width: 21%;
}

.col-count {
  width: 12%;
  text-align: center;
}

.col-link {
  width: 44px !important;
  text-align: center;
}

.directory-thumbnail {
  width: 36px;
  height: 36px;
  border-radius: 50% !important;
  object-fit: cover;
  border: 1px solid var(--border-color);
  display: block;
}

.directory-thumbnail-fallback {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background-color: var(--nav-menu-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.directory-common-name {
  font-weight: 600;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.directory-scientific-name {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.directory-count-badge {
  background-color: var(--nav-menu-bg);
  color: var(--text-heading);
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.74rem;
  border: 1px solid var(--border-color);
}

.directory-btn-search {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.directory-btn-search:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-glow);
  transform: scale(1.08);
}

.directory-btn-search svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}

/* Rote Liste Status Badges */
.badge-red-list {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2px;
}

.badge-red-list.rl-threatened {
  background-color: rgba(229, 57, 53, 0.1);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.badge-red-list.rl-safe {
  background-color: rgba(76, 175, 80, 0.1);
  color: var(--emerald);
  border: 1px solid var(--emerald);
}

/* Custom Checkboxes for Equipment */
.eq-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all var(--transition-fast);
  background-color: var(--bg-card);
  flex-shrink: 0;
  margin-top: 1px;
}

.eq-checkbox:hover {
  border-color: var(--primary);
  background-color: var(--primary-glow);
}

.eq-checkbox:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.eq-checkbox:checked::before {
  content: '✓';
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
}

.eq-item-label {
  display: flex;
  align-items: center;
  gap: 10px !important;
  font-size: 0.84rem !important;
  font-weight: 500 !important;
  color: var(--text-main);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  width: 100%;
}

.eq-item-label:hover {
  background-color: var(--nav-menu-bg);
}

.eq-item-label:has(.eq-checkbox:checked) {
  color: var(--text-muted) !important;
  text-decoration: line-through;
  opacity: 0.7;
}

/* Scientific Species Directory Premium Components */

.dir-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  aspect-ratio: 1.6;
  background-color: #0d0d12;
  border: 1px solid var(--border-color);
  transition: border-color var(--transition-fast) ease, box-shadow var(--transition-fast) ease;
}

.dir-carousel:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.dir-carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.dir-carousel:hover .dir-carousel-img {
  transform: scale(1.05);
}

.dir-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(26, 26, 32, 0.78) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.85;
  transition: background var(--transition-fast), transform var(--transition-fast), opacity var(--transition-fast);
}

.dir-carousel-btn:hover {
  background: var(--primary) !important;
  border-color: var(--primary-glow) !important;
  transform: translateY(-50%) scale(1.1);
  opacity: 1;
}

.dir-carousel-btn.prev {
  left: 10px;
}

.dir-carousel-btn.next {
  right: 10px;
}

.dir-carousel-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(13, 13, 18, 0.95) 0%, rgba(13, 13, 18, 0.7) 60%, transparent 100%);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  color: #fff;
  z-index: 5;
}

.dir-carousel-overlay-text {
  font-size: 0.76rem;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 75%;
}

.dir-carousel-overlay-counter {
  font-size: 0.72rem;
  font-family: monospace;
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
}

/* Chronology / Timeline Visuals */

.dir-chronology-list::-webkit-scrollbar {
  width: 6px;
}

.dir-chronology-list::-webkit-scrollbar-track {
  background: transparent;
}

.dir-chronology-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.dir-chronology-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.dir-chronology-item {
  position: relative;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), color var(--transition-fast);
  margin-bottom: 4px;
}

.dir-chronology-item:hover {
  background-color: var(--bg-main);
}

.dir-chronology-item::before {
  content: '';
  position: absolute;
  left: -23.5px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--border-color);
  border: 2px solid var(--bg-card);
  z-index: 10;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.dir-chronology-item:hover::before {
  background-color: var(--secondary);
  transform: translateY(-50%) scale(1.2);
}

.dir-chronology-item.active {
  color: var(--primary);
  background-color: var(--primary-glow);
}

.dir-chronology-item.active .dir-chronology-date {
  color: var(--primary) !important;
}

.dir-chronology-item.active::before {
  background-color: var(--primary);
  border-color: var(--primary-glow);
  transform: translateY(-50%) scale(1.3);
}

.dir-chronology-item.active .dir-chronology-location {
  font-weight: 700;
}

.directory-layout {
  display: flex;
  gap: 24px;
  width: 100%;
  min-height: 500px;
  flex-wrap: wrap;
  align-items: start;
}

.directory-table-wrapper {
  flex: 1;
  min-width: 650px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.directory-sidebar {
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.directory-map-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.directory-detail-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 992px) {
  .directory-table-wrapper {
    width: 100% !important;
  }
  .directory-sidebar {
    width: 100% !important;
  }
}





