﻿/* Swizz-IT Panel - Erweiterungen und Verbesserungen */

/* ── Stats / Metric Cards ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-card__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin: 0;
}

.stat-card__value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
  margin: 0;
}

.stat-card__sub {
  font-size: 0.8rem;
  color: var(--ink-muted);
  margin: 0;
}

.stat-card--brand {
  border-color: rgba(42,157,143,0.3);
  background: var(--brand-soft);
}

.stat-card--brand .stat-card__value {
  color: var(--brand-strong);
}

/* ── Status-Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge--green  { background: #dcfce7; color: #15803d; }
.badge--yellow { background: #fef9c3; color: #a16207; }
.badge--red    { background: #fee2e2; color: #b91c1c; }
.badge--blue   { background: #dbeafe; color: #1d4ed8; }
.badge--gray   { background: var(--surface-soft); color: var(--ink-muted); }

.badge--dot::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ── Progress Bar ── */
.progress-bar {
  height: 8px;
  background: var(--surface-soft);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: var(--brand);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.progress-bar__fill--warn { background: #f59e0b; }
.progress-bar__fill--danger { background: #ef4444; }

/* ── Info List (Key/Value Pairs) ── */
.info-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.info-list__row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}

.info-list__row:last-child { border-bottom: none; }

.info-list__label {
  color: var(--ink-muted);
  min-width: 140px;
  flex-shrink: 0;
  padding-top: 1px;
}

.info-list__value {
  color: var(--ink);
  font-weight: 500;
  word-break: break-all;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.empty-state__icon {
  width: 48px; height: 48px;
  margin: 0 auto 16px;
  color: var(--ink-faint);
}

.empty-state__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 8px;
}

/* ── Page Header ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.page-header__title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 4px;
  line-height: 1.2;
}

.page-header__sub {
  font-size: 0.9rem;
  color: var(--ink-muted);
  margin: 0;
}

.page-header__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ── Alert / Notice Varianten ── */
.notice {
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  border: 1px solid transparent;
}

.notice--success { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.notice--error   { background: #fff5f5; border-color: #fecaca; color: #b91c1c; }
.notice--warn    { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.notice--info    { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

/* ── Table improvements ── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--line);
  background: var(--surface-soft);
  white-space: nowrap;
}

.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: middle;
}

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

.table tbody tr:hover td {
  background: var(--surface-soft);
}

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ── Card Varianten ── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.card--soft {
  background: var(--surface-soft);
}

.card--brand {
  border-color: rgba(42,157,143,0.3);
  background: var(--brand-soft);
}

.card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
}

.card__subtitle {
  font-size: 0.875rem;
  color: var(--ink-muted);
  margin: 0;
  line-height: 1.5;
}

/* ── Grid Helpers ── */
.grid {
  display: grid;
  gap: 16px;
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ── Form Fields ── */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}

.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(42,157,143,0.12);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin: 0;
}

/* ── Buttons ── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  white-space: nowrap;
  background: var(--brand);
  color: white;
}

.button:hover {
  background: var(--brand-strong);
  transform: translateY(-1px);
}

.button:active { transform: none; }

.button--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.button--ghost:hover {
  background: var(--surface-soft);
  border-color: var(--ink-faint);
}

.button--danger {
  background: #dc2626;
  color: white;
}

.button--danger:hover { background: #b91c1c; }

.button--sm {
  padding: 6px 14px;
  font-size: 0.82rem;
  border-radius: 8px;
}

/* ── Abo-Auswahl (Auftrag K) ── */
.abo-auswahl {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.abo-auswahl__form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0;
}

.abo-auswahl__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.abo-auswahl__name { color: var(--ink); }

.abo-auswahl__feld {
  width: auto;
  min-width: 260px;
  max-width: 100%;
  padding: 8px 12px;
}

.abo-auswahl__zusatz {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

/* Kacheln der Abonnements in der Übersicht (Hosting-Kachel ist ein Knopf). */
.abo-kachel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.abo-kachel--gewaehlt { border-color: var(--brand); }

.abo-kachel:hover { border-color: var(--brand); }

/* ── Responsive Panel Grid ── */
@media (max-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .page-header { flex-direction: column; align-items: stretch; }
  .page-header__actions { justify-content: stretch; }
  .page-header__actions .button { flex: 1; justify-content: center; }
  .table th, .table td { padding: 8px 10px; font-size: 0.82rem; }
  .info-list__label { min-width: 110px; }
  .abo-auswahl__feld { min-width: 0; width: 100%; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
}
