.tbxa-wrap {
  --tbxa-bg: #0c111b;
  --tbxa-card: #121826;
  --tbxa-text: #e6eef8;
  --tbxa-muted: #9aa4b2;
  --tbxa-border: #1f2a3a;
  color: var(--tbxa-text);
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.6fr;
  grid-template-rows: auto auto;
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 920px) {
  .tbxa-wrap {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
}

.tbxa-card {
  background: var(--tbxa-card);
  border: 1px solid var(--tbxa-border);
  border-radius: 16px;
  padding: 12px;
}

.tbxa-starmap-card {
  height: 281px;
  max-height: 281px;
}

.tbxa-col-starmap {
  grid-row: 1 / span 2;
}

.tbxa-col-gauge {
  align-self: start;
  height: 100%;
}

.tbxa-col-right {
  align-self: start;
  height: 100%;
}
.tbxa-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tbxa-disclaimer-inline {
  font-size: 11px;
  color: var(--tbxa-muted);
}

.tbxa-no-starmap {
  grid-template-columns: 1fr 1.4fr;
}

/* ── Single-Section Modus (Dashboard-Panels) ─────────────────── */
/* Wenn nur eine Sektion sichtbar ist: kein Grid, card füllt Panel */
.tbxa-single-section {
  display: flex;
  flex-direction: column;
}

.tbxa-single-section > .tbxa-card {
  flex: 1;
  height: 100%;
  min-height: 0;
}

/* Star Map im Einzelmodus: height auto, Karte füllt verfügbaren Platz */
.tbxa-single-section > .tbxa-starmap-card {
  height: auto;
  max-height: none;
}

.tbxa-single-section > .tbxa-starmap-card .tbxa-starmap-canvas {
  min-height: 180px;
  height: 100%;
}

/* Gauge im Einzelmodus: zentriert, Karte füllt Panel */
.tbxa-single-section > .tbxa-gauge-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Calendar im Einzelmodus: vollen Platz nutzen */
.tbxa-single-section > .tbxa-col-right {
  overflow-y: auto;
}

/* Star Map im Einzelmodus: kein grid-row span nötig */
.tbxa-single-section > .tbxa-col-starmap {
  grid-row: auto;
}

@media (max-width: 920px) {
  .tbxa-col-starmap {
    grid-column: auto;
    grid-row: auto;
  }
}

.tbxa-starmap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--tbxa-muted);
}

.tbxa-starmap-tabs {
  display: none;
  gap: 6px;
}

.tbxa-tab {
  background: transparent;
  border: 1px solid var(--tbxa-border);
  color: var(--tbxa-muted);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
}

.tbxa-tab.is-active {
  color: var(--tbxa-text);
  border-color: #f0b90b;
}

.tbxa-starmap-canvas {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 210px;
  margin-top: -47px;
}

.tbxa-starmap-svg {
  width: 100%;
  max-width: 285px;
  height: auto;
}

.tbxa-ring {
  fill: none;
  stroke: var(--tbxa-border);
  stroke-width: 1;
}

.tbxa-zodiac-line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.tbxa-zodiac-label {
  fill: var(--tbxa-muted);
  font-size: 9px;
  opacity: 0.6;
}

.tbxa-moon-phase-icon {
  fill: #f0b90b;
  font-size: 22px;
  opacity: 0.9;
}

.tbxa-moon-phase-text {
  fill: #cbd5f5;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tbxa-marker circle {
  fill: #8ab4ff;
}

.tbxa-marker text {
  fill: var(--tbxa-muted);
  font-size: 9px;
}

.tbxa-marker-sun circle { fill: #f0b90b; }
.tbxa-marker-moon circle { fill: #e6eef8; }
.tbxa-marker-mercury circle { fill: #9aa4b2; }
.tbxa-marker-venus circle { fill: #7ee081; }
.tbxa-marker-mars circle { fill: #ff7a7a; }
.tbxa-marker-jupiter circle { fill: #6dd3fb; }
.tbxa-marker-saturn circle { fill: #c0c0ff; }
.tbxa-marker-uranus circle { fill: #7be0d3; }
.tbxa-marker-neptune circle { fill: #6ea8fe; }
.tbxa-marker-pluto circle { fill: #b28dff; }

.tbxa-aspect {
  stroke: rgba(255, 255, 255, 0.25);
  stroke-dasharray: 4 4;
}

.tbxa-aspect-square,
.tbxa-aspect-opposition {
  stroke: rgba(255, 122, 122, 0.35);
}

.tbxa-aspect-trine,
.tbxa-aspect-sextile {
  stroke: rgba(57, 217, 138, 0.35);
}

.tbxa-title {
  margin: 0;
  font-size: 16px;
}

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

.tbxa-status {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--tbxa-border);
  background: rgba(255, 255, 255, 0.04);
}

.tbxa-status-risk-on {
  color: #39d98a;
}

.tbxa-status-neutral {
  color: #f5b93a;
}

.tbxa-status-risk-off {
  color: #ff7a7a;
}

.tbxa-gauge {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

.tbxa-gauge-svg {
  width: 120px;
  height: 120px;
}

.tbxa-gauge-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  align-items: center;
}

.tbxa-gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 10;
}

.tbxa-gauge-fg {
  fill: none;
  stroke: #f0b90b;
  stroke-width: 10;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.tbxa-gauge-value {
  fill: var(--tbxa-text);
  font-size: 22px;
  font-weight: 700;
}

.tbxa-gauge-label {
  fill: var(--tbxa-muted);
  font-size: 10px;
  letter-spacing: 1px;
}

.tbxa-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 0;
}

.tbxa-kpi {
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--tbxa-border);
}

.tbxa-kpi .label {
  color: var(--tbxa-muted);
  font-size: 12px;
}

.tbxa-kpi .value {
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
}

.tbxa-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tbxa-badge {
  font-size: 11px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--tbxa-border);
  color: var(--tbxa-text);
  background: rgba(255, 255, 255, 0.02);
}

.tbxa-gauge-card {
  min-height: 0;
}

.tbxa-section {
  margin-top: 8px;
}

.tbxa-section h4 {
  margin: 0 0 4px 0;
  font-size: 12px;
}

.tbxa-section ul {
  margin: 0;
  padding-left: 16px;
}

.tbxa-section li {
  margin-bottom: 4px;
  line-height: 1.3;
  font-size: 12px;
}

.tbxa-sections-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 920px) {
  .tbxa-sections-grid {
    grid-template-columns: 1fr;
  }
}

.tbxa-muted {
  color: var(--tbxa-muted);
}

.tbxa-updated {
  margin-top: 8px;
  font-size: 11px;
  color: var(--tbxa-muted);
}

.tbxa-disclaimer {
  margin-top: 8px;
  font-size: 11px;
  color: var(--tbxa-muted);
  border-top: 1px dashed var(--tbxa-border);
  padding-top: 8px;
}
