/* ================================================================
   Astro Planner v2 — results.css (Improved Design v2.1)
   Design: Modernes, tiefes Design mit Lila-Blau-Akzenten,
   weichen Schatten, Glows und eleganten Animationen
   Font: Outfit (schmal, lesbar, technisch neutral)
   ================================================================ */

/* ── Variablen ──────────────────────────────────────────────── */
.mbastro-v2-results {
  --c-panel:    linear-gradient(135deg, #1e2836 0%, #2a3547 100%);
  --c-panel2:   #1a2332;
  --c-field-bg: linear-gradient(135deg, #2d3d52 0%, #344355 100%);
  --c-field-bd: #4a5d78;
  --c-accent:   linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --c-accent-solid: #667eea;
  --c-accent-h: linear-gradient(135deg, #7c93f5 0%, #8b5db8 100%);
  --c-green:    #4ade80;
  --c-text:     #f1f5f9;
  --c-label:    #94a3b8;
  --c-muted:    #64748b;
  --c-dark-text:#1e293b;
  --c-card-bd:  #e2e8f0;
  --r:          8px;
  --r-lg:       12px;
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.15);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.2);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.25);
  --glow-accent: 0 0 20px rgba(102, 126, 234, 0.3);

  font-family: var(--font);
  max-width: 1240px;
  margin: 0;
  padding: 0;
  color: var(--c-dark-text);
  background: transparent;
  border: none;
}

/* ================================================================
   FILTER-PANEL
   ================================================================ */
.ap-filter-panel {
  background: var(--c-panel);
  border-radius: var(--r-lg);
  padding: 0;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.1);
  position: relative;
}

.ap-filter-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--c-accent);
  opacity: 0.8;
}

.ap-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  padding: 26px 0 24px;
  overflow: hidden;
}

.ap-filter-col {
  padding: 0 24px;
  border-right: 1px solid rgba(255,255,255,0.05);
  overflow: visible;
}
.ap-filter-col:first-child { padding-left: 24px; }
.ap-filter-col:last-child  { border-right: none; padding-right: 24px; }

/* Spalten-Titel */
.ap-col-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-label);
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ap-col-label::before {
  content: '';
  width: 3px;
  height: 12px;
  background: var(--c-accent);
  border-radius: 2px;
  opacity: 0.7;
}

/* Feld */
.ap-field { margin-bottom: 14px; }
.ap-field:last-child { margin-bottom: 0; }

.ap-field-label {
  font-weight: 500;
  color: var(--c-text);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

/* ── Inputs ─────────────────────────────────────────────────── */
.ap-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--c-field-bg);
  border: 1px solid var(--c-field-bd);
  border-radius: var(--r);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 12px;
  outline: none;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
	background: var(--global-palette9);
}
.ap-input:hover  { 
  border-color: #6a7e99; 
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.15);
}
.ap-input.ap-select:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f1f5f9' 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 12px center;
}
.ap-input:focus  { 
  border-color: var(--c-accent-solid);
  background: linear-gradient(135deg, #344355 0%, #3d4f66 100%);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2), var(--glow-accent);
  transform: translateY(-1px);
}
.ap-input.ap-select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f1f5f9' 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 12px center;
}
.ap-input::placeholder { color: #607d99; }

.ap-input[type="date"]::-webkit-calendar-picker-indicator,
.ap-input[type="time"]::-webkit-calendar-picker-indicator { 
  filter: invert(0.7) brightness(1.2); 
  cursor: pointer;
  transition: filter 0.2s;
}
.ap-input[type="date"]:hover::-webkit-calendar-picker-indicator,
.ap-input[type="time"]:hover::-webkit-calendar-picker-indicator {
  filter: invert(0.8) brightness(1.4);
}
.ap-input[type="number"]::-webkit-inner-spin-button { opacity: 0.4; }

.ap-select { 
  cursor: pointer;
  position: relative;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23f1f5f9' 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 12px center;
  background-size: 16px;
  font-weight: 500;
}
.ap-select option { 
  background: #2d3748; 
  color: var(--c-text);
  background-image: none;
  padding-right: 12px;
}

/* Paar nebeneinander */
.ap-input-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.ap-input-pair .ap-field { margin-bottom: 0; }

/* Suffix ° */
.ap-input-suffix { position: relative; }
.ap-input-suffix .ap-input { padding-right: 28px; }
.ap-suffix {
  position: absolute; right: 10px; top: 50%;
  transform: translateY(-50%);
  color: #94a3b8; font-size: 13px; pointer-events: none;
  font-weight: 600;
}

/* ── Zeitreihe ──────────────────────────────────────────────── */
.ap-time-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ap-input-time { flex: 1; min-width: 0; }
.ap-time-sep { 
  color: var(--c-label); 
  font-size: 16px; 
  flex-shrink: 0;
  font-weight: 600;
}

/* ── Himmelsrichtungs-Buttons ───────────────────────────────── */
.ap-dir-group { display: flex; gap: 8px; }

.ap-dir-btn {
  flex: 1;
  padding: 9px 8px;
  border-radius: var(--r);
  border: 1px solid var(--c-field-bd);
  background: var(--c-field-bg);
  color: var(--c-label);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
}

.ap-dir-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.2s;
}

.ap-dir-btn:hover { 
  border-color: #6a7e99; 
  color: var(--c-text);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.ap-dir-btn:hover::before {
  opacity: 1;
}

.ap-dir-btn.is-on {
  background: var(--c-accent);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--glow-accent), var(--shadow-sm);
}
.ap-dir-btn.is-on::before {
  opacity: 0;
}

/* JS-Kompatibilität */
.mbastro-v2-dir-group { display: flex; gap: 8px; }

/* ── Multiselect Katalog ────────────────────────────────────── */
.ap-multiselect { position: relative; }

.ap-ms-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  position: relative;
}
.ap-ms-label { 
  flex: 1; 
  overflow: hidden; 
  text-overflow: ellipsis; 
  white-space: nowrap;
  font-weight: 500;
}
.ap-ms-chevron { 
  flex-shrink: 0; 
  opacity: 0.6; 
  transition: all 0.25s ease;
}
.ap-multiselect.is-open .ap-ms-chevron { 
  transform: rotate(180deg);
  opacity: 0.9;
}

.ap-ms-dropdown {
  position: fixed;
  top: 0;
  left: 0;
  background: linear-gradient(135deg, #2d3d52 0%, #344355 100%);
  border: 1px solid rgba(102, 126, 234, 0.3);
  border-radius: var(--r);
  z-index: 300;
  overflow-y: auto;
  max-height: 400px;
  box-shadow: var(--shadow-lg), var(--glow-accent);
  animation: slideDown 0.2s ease;
  /* Position wird dynamisch per JavaScript gesetzt */
  min-width: 200px;
}
.ap-ms-dropdown[hidden] { display: none; }

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ap-ms-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--c-text);
  transition: all 0.15s ease;
  user-select: none;
  font-weight: 500;
}
.ap-ms-option:hover { 
  background: rgba(102, 126, 234, 0.15);
  padding-left: 16px;
}
.ap-ms-option input[type="checkbox"] { 
  accent-color: var(--c-accent-solid);
  width: 16px; 
  height: 16px; 
  flex-shrink: 0; 
  cursor: pointer; 
  margin: 0;
}

/* "Alle" Option hervorheben */
.ap-ms-option-all {
  font-weight: 600;
  border-bottom: 1px solid rgba(102, 126, 234, 0.2);
  padding-bottom: 12px;
  margin-bottom: 4px;
}
.ap-ms-option-all:hover {
  background: rgba(102, 126, 234, 0.2);
}

/* ── Geo-Button ─────────────────────────────────────────────── */
.ap-btn-geo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid var(--c-field-bd);
  border-radius: var(--r);
  color: var(--c-label);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 6px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.ap-btn-geo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.2s;
}

.ap-btn-geo:hover { 
  border-color: var(--c-accent-solid);
  color: var(--c-text);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}
.ap-btn-geo:hover::before {
  opacity: 1;
}

/* ── Primär-Button ──────────────────────────────────────────── */
.ap-btn-primary {
  width: 100%;
  margin-top: 10px;
  padding: 12px 18px;
  background: var(--c-accent);
  border: none;
  border-radius: var(--r);
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-transform: uppercase;
  font-size: 13px;
}

.ap-btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  opacity: 0;
  transition: opacity 0.2s;
}

.ap-btn-primary:hover  { 
  background: var(--c-accent-h);
  transform: translateY(-2px);
  box-shadow: var(--glow-accent), var(--shadow-md);
}
.ap-btn-primary:hover::before {
  opacity: 1;
}
.ap-btn-primary:active { 
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* ── Suchzeile ──────────────────────────────────────────────── */
.ap-search-row {
  display: flex;
  align-items: center;
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.05);
  background: var(--c-panel2);
  padding: 0;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}
.ap-search-icon {
  margin: 0 4px 0 18px;
  flex-shrink: 0;
  opacity: 0.5;
  color: var(--c-text);
  transition: opacity 0.2s;
}
.ap-search-row:focus-within .ap-search-icon {
  opacity: 0.8;
}
.ap-search-input {
  flex: 1;
  padding: 14px 12px;
  background: transparent;
  border: none;
  color: var(--c-text);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  font-weight: 500;
}
.ap-search-input::placeholder { color: #607d99; }
.ap-search-btn {
  padding: 14px 24px;
  background: var(--c-accent);
  border: none;
  color: #fff;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  border-radius: 0 0 var(--r-lg) 0;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}
.ap-search-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  opacity: 0;
  transition: opacity 0.2s;
}
.ap-search-btn:hover { 
  background: var(--c-accent-h);
  box-shadow: -4px 0 12px rgba(102, 126, 234, 0.3);
}
.ap-search-btn:hover::before {
  opacity: 1;
}

/* ================================================================
   STATUS & VERWALTUNG
   ================================================================ */
.mbastro-v2-results-status {
  margin: 16px 0 8px;
  color: var(--c-text);
  min-height: 18px;
  font-weight: 500;
}

.mbastro-v2-manage { margin-top: 12px; }
.mbastro-v2-manage-toggle {
  font-size: 12px; 
  color: var(--c-muted);
  background: transparent; 
  border: 1px solid #cbd5e1;
  border-radius: var(--r); 
  padding: 6px 12px; 
  cursor: pointer;
  font-family: var(--font);
  font-weight: 600;
  transition: all 0.2s ease;
}
.mbastro-v2-manage-toggle:hover {
  border-color: var(--c-accent-solid);
  color: var(--c-accent-solid);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}
.mbastro-v2-manage-panel {
  margin-top: 12px; 
  padding: 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.mbastro-v2-manage-section + .mbastro-v2-manage-section { margin-top: 18px; }
.mbastro-v2-manage-title { 
  font-weight: 700; 
  font-size: 13px; 
  margin-bottom: 12px; 
  color: var(--c-dark-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.mbastro-v2-newloc-name, .mbastro-v2-newloc-lat, .mbastro-v2-newloc-lon,
.mbastro-v2-newloc-tz, .mbastro-v2-newhz-name, .mbastro-v2-newhz-points {
  padding: 9px 12px; 
  border: 1px solid #cbd5e1; 
  border-radius: var(--r);
  font-size: 13px; 
  width: 100%; 
  box-sizing: border-box; 
  margin-top: 8px;
  font-family: var(--font); 
  color: var(--c-dark-text);
  transition: all 0.2s ease;
  background: #fff;
}
.mbastro-v2-newloc-name:focus, .mbastro-v2-newloc-lat:focus, .mbastro-v2-newloc-lon:focus,
.mbastro-v2-newloc-tz:focus, .mbastro-v2-newhz-name:focus, .mbastro-v2-newhz-points:focus {
  border-color: var(--c-accent-solid);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}
.mbastro-v2-newhz-points { min-height: 90px; }
.mbastro-v2-manage-status { 
  margin-left: 10px; 
  font-size: 12px; 
  color: var(--c-muted);
  font-weight: 500;
}
.mbastro-v2-btn {
  padding: 8px 14px; 
  border-radius: var(--r); 
  border: 1px solid #cbd5e1;
  cursor: pointer; 
  font-size: 13px; 
  background: #fff;
  font-family: var(--font); 
  color: var(--c-dark-text); 
  transition: all 0.2s ease;
  font-weight: 600;
}
.mbastro-v2-btn:hover { 
  background: #f1f5f9;
  border-color: var(--c-accent-solid);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ================================================================
   ERGEBNISLISTE
   ================================================================ */
.mbastro-v2-results-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

/* ================================================================
   KARTE — 3 gleich große Spalten, dunkles Design
   ================================================================ */
.mbastro-v2-card {
  background: var(--c-panel);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.mbastro-v2-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--c-accent);
  opacity: 0.6;
}

.mbastro-v2-card:hover { 
  box-shadow: var(--shadow-lg), var(--glow-accent);
  transform: translateY(-2px);
  border-color: rgba(102, 126, 234, 0.3);
}

/* Header: Object Key + Name + Alt Catalogs */
.mbastro-v2-card-header {
  padding: 14px 18px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
}

.mbastro-v2-card-title {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--c-accent-solid);
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.mbastro-v2-card-title-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.2s ease;
  margin-bottom: 0;
}

.mbastro-v2-card-title-link:hover .mbastro-v2-card-title {
  color: #7c93f5;
  text-decoration: underline;
  text-decoration-color: rgba(102, 126, 234, 0.5);
  text-underline-offset: 3px;
}

.mbastro-v2-card-name {
  font-weight: 400;
}

.mbastro-v2-card-alt-catalog {
  color: var(--c-card-bd);
  font-weight: 500;
  font-family: monospace;
  letter-spacing: 0.02em;
  opacity: 0.7;
  margin-top: -10px;
  margin-bottom: -6px;
}

/* 3-Spalten Body */
.mbastro-v2-card-body {
  display: grid;
  grid-template-columns: 1.5fr 2fr 2fr;
  gap: 0;
  min-height: 140px;
}

/* Spalte 1: Objektinformationen + Buttons */
.mbastro-v2-card-col1 {
  padding: 16px 18px 14px;
  border-right: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mbastro-v2-card-info-row {
  color: var(--c-text);
  display: flex;
  gap: 8px;
  line-height: 1.4;
}

.mbastro-v2-card-label {
  color: var(--c-label);
  min-width: 70px;
  flex-shrink: 0;
}

/* Buttons am Ende von Spalte 1 */
.mbastro-v2-card-actions { 
  display: flex; 
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}

.mbastro-v2-btn-note {
  padding: 7px 12px;
  border-radius: var(--r);
  border: 1px solid var(--c-field-bd);
  background: var(--c-field-bg);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--c-label);
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.mbastro-v2-btn-note::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.2s;
}

.mbastro-v2-btn-note:hover { 
  border-color: #6a7e99;
  color: var(--c-text);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.mbastro-v2-btn-note:hover::before {
  opacity: 1;
}

/* Diagramm-Button ausblenden */
.mbastro-v2-btn-diagram { display: none !important; }

/* Spalte 2: Bild + Credits */
.mbastro-v2-card-col2 {
  padding: 16px 18px 14px;
  border-right: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.01) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.mbastro-v2-card-image-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mbastro-v2-card-image {
  width: auto;
  max-width: 85%;
  height: auto;
  margin: 0 auto;
  border-radius: var(--r);
  object-fit: cover;
  max-height: 200px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}

.mbastro-v2-card-image-link {
  display: block;
  text-align: center;
}

.mbastro-v2-card-image-link:hover .mbastro-v2-card-image {
  transform: scale(1.02);
}

.mbastro-v2-card-image:hover {
  transform: scale(1.02);
}

.mbastro-v2-card-credits {
  font-size: 11px;
  color: var(--c-label);
  font-style: italic;
  text-align: center;
  line-height: 1.3;
  opacity: 0.9;
}

/* Spalte 3: Diagramm + Watchlist */
.mbastro-v2-card-col3 {
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 12px;
}

/* Watchlist Dropdown Container */
.mbastro-v2-watchlist-dropdown {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

/* Watchlist Stern-Button */
.mbastro-v2-btn-watchlist-star {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--c-field-bd);
  background: var(--c-field-bg);
  color: var(--c-label);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.mbastro-v2-btn-watchlist-star:hover {
  border-color: #6a7e99;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  filter: brightness(1.2);
}

.mbastro-v2-btn-watchlist-star.is-active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #667eea;
  color: #fff;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.mbastro-v2-btn-watchlist-star.is-active:hover {
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

/* Watchlist Dropdown Menu */
.mbastro-v2-watchlist-menu {
  position: fixed;
  top: 0;
  right: 0;
  background: var(--c-panel);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  max-width: 280px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 10000;
  padding: 8px;
  /* Position wird dynamisch per JavaScript gesetzt */
}

.mbastro-v2-watchlist-menu[hidden] {
  display: none;
}

/* Watchlist Option (Checkbox + Label) */
.mbastro-v2-watchlist-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r);
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--c-text);
  font-size: 14px;
  font-weight: 500;
  user-select: none;
}

.mbastro-v2-watchlist-option:hover {
  background: rgba(255,255,255,0.05);
}

.mbastro-v2-watchlist-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--c-accent-solid);
  flex-shrink: 0;
}

/* Loading/Empty States */
.mbastro-v2-watchlist-loading,
.mbastro-v2-watchlist-empty {
  padding: 16px;
  text-align: center;
  color: var(--c-muted);
  font-size: 13px;
  font-weight: 500;
}

.mbastro-v2-card-diagram {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Trennlinie unter dem Objektkey/Name */
.mbastro-v2-card-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(148, 163, 184, 0.2) 0%, rgba(148, 163, 184, 0.1) 50%, rgba(148, 163, 184, 0.2) 100%);
}

.mbastro-v2-diagram-loading,
.mbastro-v2-diagram-error {
  font-size: 12px;
  color: var(--c-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70px;
  text-align: center;
  font-weight: 500;
}
.mbastro-v2-diagram-vis {
  font-size: 11px; 
  font-weight: 700; 
  color: var(--c-green);
  margin-bottom: 4px; 
  white-space: nowrap;
  overflow: hidden; 
  text-overflow: ellipsis;
  text-shadow: 0 0 8px rgba(74, 222, 128, 0.2);
}
.mbastro-v2-diagram-chart { 
  width: 100%;
}
.mbastro-v2-diagram-chart svg { width: 100%; height: auto; display: block; }
.mbastro-v2-diagram-caption {
  font-size: 10px; 
  color: var(--c-muted); 
  margin-top: 3px;
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis;
  font-weight: 500;
}

/* Verhindere Emoji-Rendering bei Richtungspfeilen (↗↘↖↙) im Diagramm */
.mbastro-v2-direction-arrow {
  font-variant-emoji: text;
  -webkit-text-stroke: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Notiz */
.mbastro-v2-note-wrap {
  padding: 12px 18px 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.01) 100%);
}
.mbastro-v2-note-text {
  width: 100%; 
  box-sizing: border-box;
  padding: 10px 12px; 
  border: 1px solid var(--c-field-bd);
  border-radius: var(--r); 
  font-family: var(--font);
  font-size: 13px; 
  resize: vertical; 
  color: var(--c-text);
  transition: all 0.2s ease;
  background: var(--c-field-bg);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}
.mbastro-v2-note-text:focus {
  border-color: var(--c-accent-solid);
  background: linear-gradient(135deg, #344355 0%, #3d4f66 100%);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2), var(--glow-accent);
  transform: translateY(-1px);
}
.mbastro-v2-note-text::placeholder { color: #607d99; }
.mbastro-v2-note-actions { 
  margin-top: 8px; 
  display: flex; 
  gap: 10px; 
  align-items: center; 
}
.mbastro-v2-note-status { 
  font-size: 12px; 
  color: var(--c-muted);
  font-weight: 500;
}

/* ================================================================
   PAGINATION
   ================================================================ */
.mbastro-v2-pagination { margin: 12px 0; }
.mbastro-v2-page-nav { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 6px; 
  align-items: center; 
}
.mbastro-v2-page-btn {
  padding: 6px 12px; 
  border-radius: 6px;
  border: 1px solid #cbd5e1; 
  cursor: pointer;
  font-size: 13px; 
  font-family: var(--font);
  background: #fff; 
  color: var(--c-dark-text);
  min-width: 36px; 
  text-align: center; 
  transition: all 0.2s ease;
  font-weight: 600;
}
.mbastro-v2-page-btn:hover:not(:disabled):not(.mbastro-v2-page-btn--active) { 
  background: #f1f5f9;
  border-color: var(--c-accent-solid);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.mbastro-v2-page-btn--active { 
  background: var(--c-accent);
  border-color: transparent;
  color: #fff; 
  cursor: default;
  box-shadow: var(--shadow-sm);
}
.mbastro-v2-page-btn:disabled { opacity: 0.3; cursor: default; }
.mbastro-v2-page-ellipsis { 
  font-size: 13px; 
  padding: 0 4px; 
  opacity: 0.4;
  font-weight: 600;
}
.mbastro-v2-page-info { 
  color: var(--c-text); 
  margin-left: 6px;
  font-weight: 500;
}

.mbastro-v2-results-more-wrap { margin-top: 12px; }
.mbastro-v2-results-more {
  padding: 10px 20px; 
  border-radius: var(--r);
  border: 1px solid #cbd5e1; 
  cursor: pointer;
  font-family: var(--font); 
  font-size: 13px; 
  background: #fff;
  font-weight: 600;
  transition: all 0.2s ease;
}
.mbastro-v2-results-more:hover {
  background: #f1f5f9;
  border-color: var(--c-accent-solid);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}


/* ── Sortierungs-Dropdown (Single-Select, ohne Checkboxen) ──── */
.ap-sort-select .ap-ms-dropdown {
  z-index: 400; /* Höher als andere Dropdowns */
}
.ap-sort-select .ap-ms-option {
  padding: 12px 16px;
}
.ap-sort-select .ap-ms-option:hover {
  background: rgba(102, 126, 234, 0.15);
  padding-left: 18px;
}
.ap-sort-select .ap-ms-option span {
  font-weight: 500;
}

/* ================================================================
   JS-COMPAT — Alte Klassen, die im HTML noch existieren
   ================================================================ */
.mbastro-v2-filter-check   { display: none !important; }
.mbastro-v2-hidden-selects { display: none !important; }

/* ================================================================
   RESPONSIVE DESIGN - Mobile & Tablet Optimierungen
   ================================================================ */

/* Tablet: 900px - 1024px */
@media (max-width: 1024px) {
  .mbastro-v2-results {
    max-width: 100%;
  }
  
  /* Filter-Grid bleibt bei 3 Spalten, aber mit weniger Padding */
  .ap-filter-col {
    padding: 0 18px;
  }
  .ap-filter-col:first-child { padding-left: 18px; }
  .ap-filter-col:last-child { padding-right: 18px; }
}

/* Tablet: 768px - 900px */
@media (max-width: 900px) {
  .mbastro-v2-results {
    padding: 0;
  }
  
  /* Filter-Grid auf 2 Spalten reduzieren */
  .ap-filter-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 22px 18px 20px;
  }
  
  .ap-filter-col {
    padding: 0;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 16px;
  }
  
  .ap-filter-col:first-child,
  .ap-filter-col:last-child {
    padding: 0;
    padding-bottom: 16px;
  }
  
  /* Letzte Spalte über volle Breite */
  .ap-filter-col:last-child {
    grid-column: 1 / -1;
    border-bottom: none;
    padding-bottom: 0;
  }
  
  /* Search Row */
  .ap-search-row {
    padding: 14px 18px;
  }
  
  .ap-search-input {
    font-size: 13px;
    padding: 10px 12px 10px 36px;
  }
  
  .ap-search-btn {
    padding: 10px 14px;
    font-size: 12px;
  }
  
  /* Result Cards Body - 2 Spalten nebeneinander, dritte darunter */
  .mbastro-v2-card-body {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  
  .mbastro-v2-card-col1 {
    grid-column: 1;
    grid-row: 1;
  }
  
  .mbastro-v2-card-col2 {
    grid-column: 2;
    grid-row: 1;
  }
  
  .mbastro-v2-card-col3 {
    grid-column: 1 / -1;
    grid-row: 2;
    border-right: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
  }
  
  .mbastro-v2-card-diagram {
    flex: 1;
    min-width: 200px;
  }
}

/* Tablet Portrait: 600px - 768px */
@media (max-width: 768px) {
  /* Filter-Panel auf 1 Spalte */
  .ap-filter-panel {
    padding: 0;
  }
  
  .ap-filter-grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 20px 16px 18px;
  }
  
  .ap-filter-col {
    padding: 0 0 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 14px;
  }
  
  .ap-filter-col:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }
  
  /* Input Pairs - weiterhin nebeneinander */
  .ap-input-pair {
    gap: 8px;
  }
  
  /* Time Row - bleibt horizontal */
  .ap-time-row {
    gap: 8px;
  }
  
  /* Search Row */
  .ap-search-row {
    padding: 12px 16px;
    gap: 10px;
  }
  
  .ap-search-icon {
    width: 14px;
    height: 14px;
    left: 12px;
  }
  
  .ap-search-input {
    padding: 9px 10px 9px 34px;
  }
  
  .ap-search-btn {
    padding: 9px 12px;
  }
  
  /* Multiselect Dropdowns - volle Breite auf kleineren Screens */
  .ap-ms-dropdown {
    left: 0;
    right: 0;
  }
  
  /* Result Cards - vollständig gestapelt */
  .mbastro-v2-card-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  
  .mbastro-v2-card-col1 {
    grid-column: 1;
    grid-row: 1;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: relative;
    padding: 16px 18px 14px;
    padding-right: 56px; /* Platz für Watchlist-Button */
  }
  
  .mbastro-v2-card-col2 {
    grid-column: 1;
    grid-row: 2;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 16px;
  }
  
  .mbastro-v2-card-image {
    width: 100%;
    max-width: 300px;
    max-height: 250px;
  }
  
  .mbastro-v2-card-col3 {
    grid-column: 1;
    grid-row: 3;
    border-top: none;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 0;
    background: transparent;
  }
  
  /* Button-Styling wenn in col3 (mobile) */
  .mbastro-v2-card-col3 .mbastro-v2-card-actions {
    padding: 12px 18px;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin: 0;
  }
  
  .mbastro-v2-card-diagram {
    width: 100%;
    padding: 12px 18px;
  }
  
  /* Watchlist-Button (Stern oder Mülleimer) oben rechts positionieren */
  .mbastro-v2-watchlist-dropdown,
  .mbastro-v2-watchlist-remove-wrap {
    position: absolute;
    top: 16px;
    right: 18px;
    z-index: 10;
  }
  
  .mbastro-v2-card-diagram {
    width: 100%;
    padding: 12px 18px;
  }
  
  /* Pagination */
  .mbastro-v2-page-nav {
    gap: 4px;
  }
  
  .mbastro-v2-page-btn {
    padding: 5px 10px;
    font-size: 12px;
    min-width: 32px;
  }
  
  /* Watchlist Menu - breiter auf Tablets und größeren Mobiles */
  .mbastro-v2-watchlist-menu {
    max-width: none;
  }
}

/* Mobile: 480px - 600px */
@media (max-width: 600px) {
  /* Filter-Panel */
  .ap-filter-grid {
    padding: 18px 14px 16px;
  }
  
  .ap-col-label {
    font-size: 10px;
    margin-bottom: 12px;
  }
  
  .ap-field {
    margin-bottom: 12px;
  }
  
  .ap-field-label {
    font-size: 13px;
    margin-bottom: 5px;
  }
  
  .ap-input {
    font-size: 16px;
    padding: 9px 10px;
  }
  
  .ap-select {
    padding-right: 32px;
  }
  
  /* Input Pairs - immer noch nebeneinander, aber kompakter */
  .ap-input-pair {
    gap: 6px;
  }
  
  /* Time Row */
  .ap-time-row {
    gap: 6px;
  }
  
  /* Direction Buttons */
  .ap-dir-btn {
    padding: 8px 6px;
    font-size: 12px;
  }
  
  /* Search Row - stapeln */
  .ap-search-row {
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px;
    align-items: stretch;
  }
  
  .ap-search-icon {
    display: none; /* Icon verstecken bei gestapeltem Layout */
  }
  
  .ap-search-input {
    padding: 9px 12px;
    width: 100%;
  }
  
  .ap-search-btn {
    width: 100%;
    padding: 10px 14px;
  }
  
  /* Result Cards */
  .mbastro-v2-card {
    border-radius: 10px;
  }
  
  .mbastro-v2-card-col1 {
    padding: 12px;
    padding-right: 50px;
  }
  
  .mbastro-v2-card-col2 {
    padding: 12px;
  }
  
  .mbastro-v2-card-image {
    max-width: 250px;
    max-height: 200px;
  }
  
  .mbastro-v2-card-title {
    font-size: 1.05rem;
  }
  
  .mbastro-v2-card-info-row {
    font-size: 13px;
  }
  
  .mbastro-v2-card-label {
    min-width: 65px;
    font-size: 13px;
  }
  
  .mbastro-v2-card-col3 {
    padding: 0; /* Kein Padding, da Button absolut positioniert ist */
  }
  
  .mbastro-v2-btn-watchlist-star {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  
  /* Watchlist-Button Position anpassen */
  .mbastro-v2-watchlist-dropdown,
  .mbastro-v2-watchlist-remove-wrap {
    top: 12px;
    right: 12px;
  }
  
  .mbastro-v2-card-diagram {
    padding: 10px 12px;
  }
  
  /* Button-Container */
  .mbastro-v2-card-actions {
    padding: 10px 12px;
  }
  
  /* Note */
  .mbastro-v2-note-wrap {
    padding: 10px 12px 12px;
  }
  
  .mbastro-v2-note-text {
    font-size: 12px;
    padding: 9px 10px;
  }
  
  /* Pagination */
  .mbastro-v2-pagination {
    margin: 10px 0;
  }
  
  .mbastro-v2-page-nav {
    justify-content: center;
  }
  
  .mbastro-v2-page-btn {
    padding: 5px 9px;
    font-size: 11px;
    min-width: 28px;
  }
  
  .mbastro-v2-page-info {
    font-size: 11px;
    margin-left: 4px;
  }
  
  /* Manage Panel */
  .mbastro-v2-manage {
    margin: 10px 0;
  }
  
  .mbastro-v2-manage-panel {
    padding: 12px;
  }
  
  .mbastro-v2-manage-section {
    padding: 10px;
  }
  
  .mbastro-v2-manage-title {
    font-size: 13px;
    margin-bottom: 10px;
  }
}

/* Kleine Mobile Geräte: unter 480px */
@media (max-width: 480px) {
  /* Filter-Panel noch kompakter */
  .ap-filter-panel {
    border-radius: 10px;
  }
  
  .ap-filter-grid {
    padding: 16px 12px 14px;
  }
  
  .ap-filter-col {
    padding: 0 0 12px 0;
    margin-bottom: 12px;
  }
  
  .ap-col-label {
    font-size: 9px;
    margin-bottom: 10px;
  }
  
  .ap-field {
    margin-bottom: 10px;
  }
  
  .ap-field-label {
    font-size: 16px;
  }
  
  .ap-input {
    font-size: 16px;
    padding: 8px 9px;
  }
  
  /* Input Pairs - bleiben auch bei sehr kleinen Screens nebeneinander */
  .ap-input-pair {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  
  /* Time Row - kompakter aber horizontal bleiben */
  .ap-time-row {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }
  
  .ap-time-row .ap-field-label {
    font-size: 11px;
  }
  
  .ap-time-sep {
    font-size: 14px;
  }
  
  .ap-input-time {
    width: auto;
    flex: 1;
    min-width: 80px;
  }
  
  /* Direction Buttons - kleiner */
  .ap-dir-group {
    gap: 6px;
  }
  
  .ap-dir-btn {
    padding: 7px 5px;
    font-size: 11px;
  }
  
  /* Search Row */
  .ap-search-row {
    padding: 10px 12px;
    gap: 8px;
  }
  
  .ap-search-input {
    font-size: 12px;
    padding: 8px 10px;
  }
  
  .ap-search-btn {
    font-size: 11px;
    padding: 8px 12px;
  }
  
  /* Result Cards */
  .mbastro-v2-card {
    border-radius: 8px;
  }
  
  .mbastro-v2-card-col1 {
    padding: 10px;
    padding-right: 46px; /* Platz für den kleineren absolut positionierten Button */
  }
  
  .mbastro-v2-card-col2 {
    padding: 10px;
  }
  
  .mbastro-v2-card-image {
    max-width: 200px;
    max-height: 180px;
  }
  
  .mbastro-v2-card-title {
    font-size: 1.2rem;
  }
  
  .mbastro-v2-card-alt-catalog {
    font-size: 1rem;
  }
  
  .mbastro-v2-card-info-row {
    font-size: 12px;
    gap: 6px;
  }
  
  .mbastro-v2-card-label {
    min-width: 60px;
    font-size: 12px;
  }
  
  .mbastro-v2-card-actions {
    gap: 5px;
  }
  
  .mbastro-v2-btn-note {
    padding: 6px 10px;
    font-size: 11px;
  }
  
  .mbastro-v2-card-col3 {
    padding: 0; /* Kein Padding, da Button absolut positioniert ist */
    gap: 10px;
  }
  
  .mbastro-v2-btn-watchlist-star {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  
  /* Watchlist Menu - bessere Touch-Targets */
  .mbastro-v2-watchlist-option {
    padding: 12px 14px;
    font-size: 15px;
  }
  
  .mbastro-v2-watchlist-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }
  
  /* Watchlist-Button Position anpassen */
  .mbastro-v2-watchlist-dropdown,
  .mbastro-v2-watchlist-remove-wrap {
    top: 10px;
    right: 10px;
  }
  
  .mbastro-v2-card-diagram {
    padding: 8px 10px;
  }
  
  .mbastro-v2-card-credits {
    font-size: 10px;
  }
  
  .mbastro-v2-diagram-vis {
    font-size: 10px;
  }
  
  .mbastro-v2-diagram-caption {
    font-size: 9px;
  }
  
  /* Note */
  .mbastro-v2-note-wrap {
    padding: 8px 10px 10px;
  }
  
  .mbastro-v2-note-text {
    font-size: 11px;
    padding: 8px 9px;
  }
  
  /* Pagination - kompakter */
  .mbastro-v2-page-btn {
    padding: 4px 8px;
    font-size: 10px;
    min-width: 24px;
  }
  
  .mbastro-v2-page-ellipsis {
    font-size: 10px;
  }
  
  .mbastro-v2-page-info {
    font-size: 10px;
  }
  
  /* Multiselect - mehr Platz */
  .ap-ms-dropdown {
    left: -8px;
    right: -8px;
  }
  
  .ap-ms-option {
    padding: 10px 12px;
    font-size: 12px;
  }
  
  /* Manage Panel */
  .mbastro-v2-manage-toggle {
    font-size: 12px;
    padding: 8px 12px;
  }
  
  .mbastro-v2-manage-panel {
    padding: 10px;
  }
  
  .mbastro-v2-manage-section {
    padding: 8px;
  }
}

/* ================================================================
   Diagram Tooltip Mobile Anpassung
   ================================================================ */
@media (max-width: 599px) {
  .mbastro-v2-diagram-tooltip {
    font-size: 11px !important;
    white-space: normal !important;
    max-width: 180px !important;
    line-height: 1.3 !important;
    padding: 3px 6px !important;
  }
}
