/* ═══════════════════════════════════════════════════════════════════
   ActionTracker Pro — App Styles
   Extends style.css (shared design system tokens).
   ═══════════════════════════════════════════════════════════════════ */

/* ═══ SCREEN LAYOUT ════════════════════════════════════════════════ */
.screen {
  min-height: 100vh;
}

.screen[hidden] {
  display: none !important;
}

.screen--centered {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: var(--bg);
}

/* ═══ LOGIN ═════════════════════════════════════════════════════════ */
.login-box {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-10) var(--space-9);
  box-shadow: var(--shadow-card);
}

.login-logo {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: var(--space-7);
  letter-spacing: -0.5px;
}

.login-headline {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: var(--space-2);
}

.login-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--space-7);
}

.login-success {
  text-align: center;
  padding: var(--space-7) 0;
}

.login-success-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-4);
}

.login-success p {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.login-success-hint {
  font-size: 0.82rem;
  color: var(--text-muted) !important;
}

.login-back {
  display: block;
  margin-top: var(--space-6);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  transition: color 0.15s;
}
.login-back:hover { color: var(--text); }

/* ═══ FORMS ═════════════════════════════════════════════════════════ */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.form-hint {
  font-weight: 400;
  font-size: 0.78rem;
}

.form-error {
  font-size: 0.82rem;
  color: var(--prio-hoch);
  margin-top: var(--space-2);
}

.required {
  color: var(--prio-hoch);
}

.input--sm {
  font-size: 0.85rem;
  padding: var(--space-2) var(--space-3);
  flex: 1;
}

.btn-sm {
  font-size: 0.82rem;
  padding: var(--space-2) var(--space-4);
}

/* ═══ WIZARD ════════════════════════════════════════════════════════ */
.wizard-box {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-9);
  box-shadow: var(--shadow-card);
}

.wizard-progress {
  margin-bottom: var(--space-8);
}

.wizard-step-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}

.wizard-progress-track {
  height: 4px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
}

.wizard-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.wizard-headline {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: var(--space-2);
}

.wizard-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--space-7);
}

.wizard-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
  margin-top: var(--space-7);
}

.wizard-summary {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.summary-label { color: var(--text-muted); }
.summary-value { font-weight: 700; }

/* Stammdaten / Checkboxes */
.stamm-fieldset {
  border: none;
  padding: 0;
  margin-bottom: var(--space-6);
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--text);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.checkbox-label:hover { background: var(--surface2); }
.checkbox-label input[type="checkbox"] { accent-color: var(--accent); }

.add-row {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-3);
}

.tag-input-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-height: 36px;
  margin-bottom: var(--space-3);
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--surface2);
  border: 1px solid var(--border-accent);
  border-radius: 99px;
  padding: 3px var(--space-3);
  font-size: 0.82rem;
}

.tag-chip-remove {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  transition: color 0.15s;
}
.tag-chip-remove:hover { color: var(--prio-hoch); }

/* Kunden-Modul Toggle */
.toggle-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border);
  margin-top: var(--space-4);
}

.toggle-label {
  font-size: 0.9rem;
  flex: 1;
}

.toggle-btn {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--surface2);
  border: 1px solid var(--border-accent);
  border-radius: 99px;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle-btn[aria-checked="true"] {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.toggle-btn[aria-checked="true"] .toggle-thumb {
  transform: translateX(20px);
}

/* Color input */
.color-input-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.color-input {
  width: 44px;
  height: 36px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface2);
  cursor: pointer;
}

.color-hex {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Logo preview */
.logo-preview-wrap {
  margin-top: var(--space-3);
}

.logo-preview-img {
  max-height: 48px;
  max-width: 200px;
  border-radius: var(--radius-sm);
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ═══ TRIAL BANNER ══════════════════════════════════════════════════ */
.trial-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-6);
  background: rgba(234, 179, 8, 0.12);
  border-bottom: 1px solid rgba(234, 179, 8, 0.3);
  font-size: 0.85rem;
  color: #eab308;
  flex-wrap: wrap;
}

.trial-banner--warning {
  background: rgba(239, 68, 68, 0.1);
  border-bottom-color: rgba(239, 68, 68, 0.3);
  color: var(--prio-hoch);
}

.trial-banner-cta {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.trial-banner-cta:hover { opacity: 0.8; }

/* ═══ APP HEADER ════════════════════════════════════════════════════ */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: 56px;
  padding-inline: var(--space-6);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.app-header-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.header-logo {
  height: 28px;
  width: auto;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.header-firma {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-sep {
  color: var(--border-accent);
}

.header-app {
  font-size: 0.85rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.app-header-right {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

/* View toggle */
.view-toggle {
  display: flex;
  gap: 2px;
  background: var(--surface2);
  border-radius: var(--radius);
  padding: 3px;
}

.view-btn {
  padding: var(--space-1) var(--space-4);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: calc(var(--radius) - 2px);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.view-btn:hover { color: var(--text); }
.view-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

/* Overdue badge */
.overdue-badge {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  background: rgba(239,68,68,0.15);
  color: var(--prio-hoch);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.overdue-badge:hover { background: rgba(239,68,68,0.25); }

@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
  70%  { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}
.overdue-pulse { animation: pulse-ring 2s ease-out infinite; }

/* User badge */
.user-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.85rem;
}

.role-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px var(--space-2);
  border-radius: 99px;
}
.role-tag--admin       { background: rgba(239,68,68,0.15);  color: var(--prio-hoch); }
.role-tag--teamleiter  { background: rgba(59,130,246,0.15); color: var(--accent); }
.role-tag--mitarbeiter { background: rgba(107,114,128,0.15);color: var(--text-muted); }

/* Icon button */
.icon-btn {
  font-size: 1.1rem;
  color: var(--text-muted);
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.icon-btn:hover {
  color: var(--text);
  background: var(--surface2);
}

/* ═══ APP CONTENT ═══════════════════════════════════════════════════ */
.app-content {
  flex: 1;
  min-height: calc(100vh - 56px - 40px);
  padding: var(--space-6);
}

.view {
  width: 100%;
}

/* ═══ APP FOOTER ════════════════════════════════════════════════════ */
.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 40px;
  padding-inline: var(--space-6);
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ═══ PAYWALL ═══════════════════════════════════════════════════════ */
.paywall-box {
  width: 100%;
  max-width: 960px;
  text-align: center;
}

.paywall-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-7);
}

.paywall-firma {
  font-size: 1rem;
  font-weight: 700;
}

.paywall-headline {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: var(--space-3);
}

.paywall-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: var(--space-10);
}

.paywall-logout {
  margin-top: var(--space-8);
  opacity: 0.6;
}
.paywall-logout:hover { opacity: 1; }

/* ═══ RESPONSIVE ════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .app-header {
    flex-wrap: wrap;
    height: auto;
    padding-block: var(--space-3);
    gap: var(--space-3);
  }

  .view-toggle {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .app-header-left  { flex: 1; }
  .app-header-right { flex-shrink: 0; }

  .header-sep,
  .header-app { display: none; }

  .user-badge { display: none; }

  .paywall-box { padding: var(--space-4); }
  .paywall-headline { font-size: 1.4rem; }

  .wizard-box { padding: var(--space-6); }
  .checkbox-grid { grid-template-columns: 1fr; }
}

/* ═══ BUTTON VARIANTS ═══════════════════════════════════════════════ */
.btn-danger {
  background: var(--prio-hoch);
  color: #fff;
  border-color: var(--prio-hoch);
}
.btn-danger:hover { background: #dc2626; border-color: #dc2626; }

.btn-xs {
  font-size: 0.75rem;
  padding: 2px var(--space-2);
}

.select--xs {
  font-size: 0.8rem;
  padding: var(--space-1) var(--space-2);
  height: auto;
}

/* ═══ MODAL OVERLAY ═════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-6);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay[hidden] { display: none !important; }
.modal-overlay--visible { opacity: 1; pointer-events: auto; }

.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  margin: auto;
  max-height: calc(100vh - var(--space-12));
}

.modal-box--large { max-width: 780px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.modal-close-btn {
  font-size: 1.4rem;
  line-height: 1;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}
.modal-close-btn:hover { background: var(--surface2); color: var(--text); }

.modal-body {
  overflow-y: auto;
  padding: var(--space-5) var(--space-6);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-footer-left,
.modal-footer-right {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.modal-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.modal-section {
  margin-bottom: var(--space-6);
}
.modal-section:last-child { margin-bottom: 0; }

.modal-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

.modal-empty-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ═══ FOTO GRID ══════════════════════════════════════════════════════ */
.foto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.foto-thumb-wrap {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface2);
}

.foto-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  transition: opacity 0.15s;
}
.foto-thumb:hover { opacity: 0.85; }

.foto-delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.foto-thumb-wrap:hover .foto-delete-btn { opacity: 1; }

.foto-upload-area {
  border: 2px dashed var(--border-accent);
  border-radius: var(--radius);
  padding: var(--space-5);
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.foto-upload-area.foto-drop-active {
  border-color: var(--accent);
  background: rgba(59,130,246,0.06);
}

.foto-drop-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.foto-progress-bar {
  height: 4px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
  margin-top: var(--space-3);
}

.foto-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.3s ease;
}

/* ═══ KOMMENTARE ═════════════════════════════════════════════════════ */
.komm-list {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--space-3);
}

.komm-item {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
}
.komm-item:last-child { border-bottom: none; }

.komm-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}

.komm-time {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.komm-text {
  font-size: 0.88rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.komm-textarea {
  width: 100%;
  resize: vertical;
}

.komm-input-row {
  display: flex;
  gap: var(--space-3);
  align-items: flex-end;
}

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

/* ═══ ÄNDERUNGSHISTORIE ══════════════════════════════════════════════ */
.hist-accordion-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}
.hist-accordion-btn:hover { color: var(--text); }

.hist-caret {
  font-size: 0.7rem;
  transition: transform 0.2s;
}

.hist-body {
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 200px;
  overflow-y: auto;
}

.hist-item {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hist-item:nth-child(even) { background: var(--surface2); }

.hist-empty {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ═══ LIGHTBOX ═══════════════════════════════════════════════════════ */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.lightbox-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  max-width: 100%;
  max-height: 100%;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-close {
  position: fixed;
  top: var(--space-5);
  right: var(--space-5);
  font-size: 2rem;
  color: rgba(255,255,255,0.8);
  line-height: 1;
  transition: color 0.15s;
  z-index: 501;
}
.lightbox-close:hover { color: #fff; }

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  color: rgba(255,255,255,0.7);
  padding: var(--space-4);
  transition: color 0.15s;
  z-index: 501;
  line-height: 1;
}
.lightbox-prev { left: var(--space-4); }
.lightbox-next { right: var(--space-4); }
.lightbox-prev:hover,
.lightbox-next:hover { color: #fff; }

.lightbox-caption {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  text-align: center;
}

/* ═══ TOAST ══════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 340px;
  word-break: break-word;
}
.toast--visible {
  opacity: 1;
  transform: translateY(0);
}
.toast--success {
  background: #166534;
  color: #dcfce7;
  border: 1px solid #15803d;
}
.toast--error {
  background: #7f1d1d;
  color: #fee2e2;
  border: 1px solid #991b1b;
}

/* ═══ EINSTELLUNGEN TABS ════════════════════════════════════════════ */
.settings-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 var(--space-6);
  flex-shrink: 0;
}

.settings-tab-btn {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: var(--space-3) var(--space-4);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.settings-tab-btn:hover { color: var(--text); }
.settings-tab-btn.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.settings-loading {
  padding: var(--space-6) 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.settings-nutzer-info {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.settings-table-wrap {
  overflow-x: auto;
  margin-bottom: var(--space-4);
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.settings-table th {
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
}
.settings-table td {
  padding: var(--space-2) var(--space-3);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.settings-table tr:last-child td { border-bottom: none; }
.settings-table tr:hover td { background: var(--surface2); }

/* ═══ STAMMDATEN ════════════════════════════════════════════════════ */
.stamm-section {
  margin-bottom: var(--space-7);
}
.stamm-section:last-child { margin-bottom: 0; }

.stamm-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
}

.stamm-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-top: var(--space-3);
}

.quelle-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ═══ ABO ════════════════════════════════════════════════════════════ */
.billing-info {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.billing-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.billing-row strong { color: var(--text); }

.billing-trial-hint {
  font-size: 0.85rem;
  color: #eab308;
  margin-bottom: var(--space-4);
}

.billing-plans {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

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

/* ═══ MODAL RESPONSIVE ══════════════════════════════════════════════ */
@media (max-width: 600px) {
  .modal-overlay { padding: var(--space-3) var(--space-2); align-items: flex-end; }
  .modal-box { max-height: 95vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; margin: 0; }
  .modal-form-row { grid-template-columns: 1fr; gap: 0; }
  .lightbox-prev { left: var(--space-2); }
  .lightbox-next { right: var(--space-2); }
  .toast-container { bottom: var(--space-3); right: var(--space-3); left: var(--space-3); }
  .toast { max-width: 100%; }
}
