/* ══════════════════════════════════════════
   DRAINQ CLOUD — Components v2.0 (SA-Design, Welle 2)
   Badges · Buttons · Stat-Cards · Tables
   Forms · Toolbar · Cards · Progress · Timeline · Dialog
   Farben über Tokens (siehe drainq.css §3 / docs/SA-Design-Rollout_Spec.md).

   Bewusste Hex-/rgba-Ausnahmen (kein Token sinnvoll, dokumentiert):
   - rgba(0,0,0,…)  → neutrale Overlays/Schatten (Modal/Dialog/Tab-Shadow), themenneutral.
   - #fff / rgba(255,255,255,…) → universeller Toggle-Knopf + Spinner auf farbiger Fläche.
   - #8E24AA → Purple-Akzent (Stat-Card/Timeline); kein Solid-Purple-Token vorhanden.
   - .tier-badge--* (SCOUT/CORE/PRO/ELITE) → SA-Edition-Farbskala (W3): bewusste
     Produkt-Farbpunkte (#71717A/#0A84FF/--primary/#5E5CE6), kein Theme-Token.
   - .hero-banner → in W3 auf SA-Karte (--surface/--border/--primary-Akzent) umgestellt.
══════════════════════════════════════════ */

/* ── Badges ── */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  padding: 2px 8px;
  white-space: nowrap;
}
.badge.ok     { background: var(--badge-ok-bg);     color: var(--badge-ok-c); }
.badge.warn   { background: var(--badge-warn-bg);   color: var(--badge-warn-c); }
.badge.info   { background: var(--badge-info-bg);   color: var(--badge-info-c); }
.badge.muted  { background: var(--badge-muted-bg);  color: var(--badge-muted-c); }
.badge.danger { background: var(--badge-danger-bg); color: var(--badge-danger-c); }
.badge.purple { background: var(--badge-purple-bg); color: var(--badge-purple-c); }
.badge.teal   { background: var(--primary-container);         color: var(--primary-dark); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius);
  padding: 8px 16px;
  min-height: 40px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  line-height: 1.4;
}
.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.btn-primary  { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover  { background: var(--primary-dark); }

.btn-secondary { background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }

.btn-danger   { background: var(--badge-danger-bg); color: var(--danger); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 22%, transparent); }
:root.dark .btn-danger { background: var(--badge-danger-bg); color: var(--badge-danger-c); }
:root.dark .btn-danger:hover { background: var(--badge-danger-bg); }

.btn-sm   { padding: 5px 10px; min-height: 34px; font-size: 12px; }
.btn-icon { padding: 6px 8px; min-height: 0; }

/* ── Stat Cards ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-grid.three { grid-template-columns: repeat(3, 1fr); }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  transition: box-shadow .15s;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--primary);
}
.stat-card.teal::before   { background: var(--primary); }
.stat-card.ok::before     { background: var(--ok); }
.stat-card.warn::before   { background: var(--warn); }
.stat-card.info::before   { background: var(--info); }
.stat-card.danger::before { background: var(--danger); }
.stat-card.purple::before { background: #8E24AA; }

.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
  margin-bottom: 6px;
}
.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.stat-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── Data Tables ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
.data-table td {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface2); cursor: pointer; }
.data-table .clickable-row { cursor:pointer; transition:background .15s; }
.data-table .clickable-row:hover td { background:var(--surface2); }
.table-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ── Forms ── */
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn .15s ease;
}
.modal-dialog {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .4);
  animation: fadeIn .2s ease;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 6px;
  line-height: 1;
}
.modal-close:hover {
  background: var(--surface2);
  color: var(--text);
}
.modal-body {
  padding: 20px 24px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
}

.form-input,
.form-select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.form-input:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-container);
}
.form-input::placeholder { color: var(--muted); }
.form-select { cursor: pointer; }

/* ── Toolbar ── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.toolbar-left  { display: flex; align-items: center; gap: 8px; flex: 1; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 7px 12px;
  min-width: 180px;
  max-width: 280px;
  transition: border-color .12s, box-shadow .12s;
}
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-container); }
.search-box input {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  outline: none;
  width: 100%;
}
.search-box input::placeholder { color: var(--muted); }
.search-box svg { width: 14px; height: 14px; color: var(--muted); flex-shrink: 0; }

.filter-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  color: var(--muted);
  transition: all .12s;
}
.filter-chip:hover  { border-color: var(--primary); color: var(--text); }
.filter-chip.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}
.card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title { font-size: 14px; font-weight: 600; color: var(--text); }
.card-body  { padding: 16px 18px; }
.card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }

/* ── Progress Bar ── */
.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}
.progress-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--primary);
}
.progress-fill.warn { background: var(--warn); }
.progress-fill.ok   { background: var(--ok); }
.progress-fill.danger { background: var(--danger); }

/* ── License Key ── */
.lic-key {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  background: var(--surface2);
  border-radius: 4px;
  padding: 2px 8px;
  color: var(--primary);
  cursor: pointer;
  transition: background .12s;
  border: 1px solid var(--border);
}
.lic-key:hover { background: var(--primary-container); }

/* ── Timeline ── */
.timeline { padding: 4px 0; }
.timeline-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}
.timeline-dot.ok     { background: var(--ok); }
.timeline-dot.info   { background: var(--info); }
.timeline-dot.warn   { background: var(--warn); }
.timeline-dot.purple { background: #8E24AA; }
.timeline-dot.danger { background: var(--danger); }
.timeline-text { font-size: 13px; color: var(--text); font-weight: 500; }
.timeline-sub  { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── Dialog / Overlay ── */
.dialog-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.dialog {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 520px;
  max-width: 90%;
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
  animation: fadeIn .15s ease;
}
.dialog-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-body   { padding: 20px; }
.dialog-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ── Switch Toggle ── */
.switch-wrap { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }
.switch { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: 20px;
  transition: .2s;
  cursor: pointer;
}
.switch-slider::before {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
}
.switch input:checked + .switch-slider { background: var(--primary); }
.switch input:checked + .switch-slider::before { transform: translateX(16px); }

/* ── Hero Banner ── */
.hero-banner {
  background: linear-gradient(135deg, var(--surface-elevated) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.hero-banner::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}
.hero-text h2 { color: var(--text); font-size: 18px; font-weight: 600; }
.hero-text p  { color: var(--muted); font-size: 13px; margin-top: 4px; }
.hero-stats   { display: flex; gap: 28px; margin-left: auto; }
.hero-stat    { text-align: center; }
.hero-stat .val { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1; }
.hero-stat .lbl { font-size: 10px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .07em; margin-top: 3px; }

/* ── Storage Bar ── */
.storage-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin: 6px 0;
}
.storage-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary), var(--info));
}
.storage-fill.high { background: linear-gradient(90deg, var(--warn), var(--danger)); }

/* ── Empty State ── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--muted);
  text-align: center;
}
.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: .4; }
.empty-state p   { font-size: 13px; }

/* ── Alert ── */
.alert {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-danger { background: var(--badge-danger-bg); color: var(--badge-danger-c); border: 1px solid var(--danger); }
.alert-ok     { background: var(--badge-ok-bg); color: var(--badge-ok-c); border: 1px solid var(--ok); }
.alert-info   { background: var(--badge-info-bg); color: var(--badge-info-c); border: 1px solid var(--info); }

/* ── List Page Layout ── */
.list-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:1.25rem; }
.list-title { font-size:1.35rem; font-weight:700; color:var(--text); margin:0; }
.list-filter-bar { display:flex; gap:.75rem; margin-bottom:1rem; }
.list-filter-input { flex:1; min-width:200px; background:var(--surface); border:1px solid var(--border-strong); border-radius:var(--radius); padding:.45rem .75rem; color:var(--text); font-size:.875rem; outline:none; transition:border-color .12s, box-shadow .12s; }
.list-filter-input:focus { border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-container); }
.list-filter-input::placeholder { color:var(--muted); }

/* ── Table Container ── */
.table-container { overflow-x:auto; border-radius:10px; border:1px solid var(--border); }

/* ── Edition Badge ── */
.edition-badge { font-size:.72rem; font-weight:700; color:var(--primary); text-transform:uppercase; letter-spacing:.05em; }

/* ── Alert Warn ── */
.alert-warn { background:var(--badge-warn-bg); color:var(--badge-warn-c); border:1px solid var(--warn); }

/* ── Stat Strip ── */
.list-stat-strip { display:flex; gap:2rem; padding:1rem 1.25rem; background:var(--surface); border:1px solid var(--border); border-radius:10px; margin-bottom:1rem; flex-wrap:wrap; }
.list-stat { display:flex; flex-direction:column; }
.list-stat-num { font-size:1.5rem; font-weight:700; font-family:'Inter',sans-serif; color:var(--text); }
.list-stat-label { font-size:.72rem; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; margin-top:.1rem; }

/* ── Inline Edit ── */
.inline-edit-input { background:var(--surface2); border:1px solid var(--primary); border-radius:4px; padding:.2rem .4rem; color:var(--text); font-size:.875rem; width:100%; outline:none; }
.icon-btn { background:none; border:none; color:var(--muted); cursor:pointer; padding:.1rem .3rem; font-size:.85rem; opacity:.6; }
.icon-btn:hover { opacity:1; color:var(--primary); }

/* ── Loading Spinner ── */
.loading-spinner { padding:2rem; color:var(--muted); font-size:.875rem; }

/* ── Badge variants (hyphen form, complement to .badge.info etc.) ── */
.badge-info    { display:inline-block; font-size:11px; font-weight:600; border-radius:4px; padding:2px 8px; white-space:nowrap; background:var(--badge-info-bg); color:var(--badge-info-c); }
.badge-neutral { display:inline-block; font-size:11px; font-weight:600; border-radius:4px; padding:2px 8px; white-space:nowrap; background:var(--badge-muted-bg); color:var(--badge-muted-c); }

/* ══════════════════════════════════════════
   HYBRID PREISMODELL — Components v1.0
   Tier-Badges · Pricing Tables · Storage Bar · Pricing Cards
══════════════════════════════════════════ */

/* ── Tier Badges ── */
.tier-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  padding: 2px 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.tier-badge--scout  { background: #71717A; color: #fff; }                /* Grau */
.tier-badge--core   { background: #0A84FF; color: #fff; }                /* Blau */
.tier-badge--pro    { background: var(--primary); color: var(--on-primary); }  /* Amber, dunkler Text */
.tier-badge--elite  { background: #5E5CE6; color: #fff; }                /* Violett */

/* ── Pricing Table ── */
.pricing-table th { font-size: 12px; white-space: nowrap; }
.pricing-table td { vertical-align: middle; }
.text-right       { text-align: right !important; }
.readonly-value   { color: var(--muted); font-style: italic; }
.text-muted       { color: var(--muted); }

/* ── Storage Bar (component) ── */
.storage-bar-wrap    { width: 100%; }
.storage-bar-header  { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
.storage-label       { color: var(--muted); }
.storage-value       { font-weight: 600; }
.storage-bar-track   { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.storage-bar-fill    { height: 100%; border-radius: 4px; transition: width .3s ease; }
.storage-bar-fill.storage-ok     { background: linear-gradient(90deg, var(--primary), var(--ok)); }
.storage-bar-fill.storage-warn   { background: linear-gradient(90deg, var(--warn), #f57c00); }
.storage-bar-fill.storage-danger { background: linear-gradient(90deg, var(--warn), var(--danger)); }
.storage-ok     { color: var(--ok); }
.storage-warn   { color: var(--warn); }
.storage-danger { color: var(--danger); }
.storage-bar-footer { text-align: right; font-size: 11px; margin-top: 2px; }

/* ── Pricing Cards ── */
.pricing-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
}
.pricing-card--highlight {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-container);
}
.pricing-card__header   { display: flex; align-items: center; justify-content: space-between; }
.pricing-card__name     { font-weight: 700; font-size: 16px; }
.pricing-card__badge    { background: var(--primary); color: var(--on-primary); font-size: 10px; border-radius: 4px; padding: 2px 7px; }
.pricing-card__price    { display: flex; align-items: baseline; gap: 4px; margin: 4px 0; }
.pricing-card__amount   { font-size: 28px; font-weight: 700; color: var(--primary); }
.pricing-card__period   { color: var(--muted); font-size: 13px; }
.pricing-card__annual   { font-size: 12px; color: var(--muted); }
.pricing-card__features { list-style: none; padding: 0; margin: 4px 0 0; font-size: 13px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pricing-card__check    { color: var(--ok); font-weight: 700; margin-right: 4px; }
.pricing-card__cta      { width: 100%; justify-content: center; margin-top: 8px; }

/* ── Cockpit Dashboard ── */
.cockpit-metric { display:flex; flex-direction:column; padding:.75rem 0; border-bottom:1px solid var(--border); }
.cockpit-metric:last-child { border-bottom:none; }
.cockpit-metric-label { font-size:.72rem; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; }
.cockpit-metric-value { display:flex; align-items:baseline; gap:.5rem; margin-top:.25rem; }
.cockpit-metric-number { font-size:1.75rem; font-weight:700; color:var(--text); font-family:'Inter',sans-serif; }
.cockpit-trend-up { font-size:.8rem; color:var(--ok); font-weight:600; }
.cockpit-trend-down { font-size:.8rem; color:var(--danger); font-weight:600; }
.cockpit-trend-neutral { font-size:.8rem; color:var(--muted); }
.cockpit-panel { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-card); padding:1.25rem; height:100%; position:relative; }
.cockpit-panel::before {
  content:'';
  position:absolute;
  top:0; left:0; right:0;
  height:2px;
  background:linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-top-left-radius:var(--radius-card);
  border-top-right-radius:var(--radius-card);
  opacity:.55;
  pointer-events:none;
}
/* Featured panel — selective opt-in via 'cockpit-panel featured' class. Used for hero/dashboard widgets. */
.cockpit-panel.featured {
  box-shadow: 0 16px 40px color-mix(in srgb, var(--primary) 15%, transparent);
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
}
.cockpit-panel.featured::before { height:4px; opacity:1; }
.cockpit-panel-title { font-size:.72rem; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; margin-bottom:1rem; }
.cockpit-rank-row { display:flex; align-items:center; gap:.75rem; padding:.4rem 0; border-bottom:1px solid var(--border); font-size:.875rem; }
.cockpit-rank-row:last-child { border-bottom:none; }
.cockpit-rank-num { width:1.5rem; color:var(--muted); font-size:.8rem; }
.cockpit-rank-bar { flex:1; height:4px; background:var(--surface2); border-radius:2px; overflow:hidden; }
.cockpit-rank-bar-fill { height:100%; background:var(--primary); border-radius:2px; }
.cockpit-rank-val { color:var(--muted); font-size:.8rem; min-width:3rem; text-align:right; }
/* Länder-Ampel */
.country-ampel-badge { display:inline-flex; align-items:center; gap:.35rem; padding:.25rem .6rem; border:1px solid; border-radius:6px; font-size:.8rem; font-weight:600; }
.country-ampel-dot { width:8px; height:8px; border-radius:50%; flex-shrink:0; }

/* ── Badge Pill Variants ── */
.badge-ok      { display:inline-flex; align-items:center; padding:.2rem .55rem; border-radius:999px; font-size:.72rem; font-weight:600; letter-spacing:.03em; white-space:nowrap; background:var(--badge-ok-bg);     color:var(--badge-ok-c); }
.badge-info    { display:inline-flex; align-items:center; padding:.2rem .55rem; border-radius:999px; font-size:.72rem; font-weight:600; letter-spacing:.03em; white-space:nowrap; background:var(--badge-info-bg);   color:var(--badge-info-c); }
.badge-warn    { display:inline-flex; align-items:center; padding:.2rem .55rem; border-radius:999px; font-size:.72rem; font-weight:600; letter-spacing:.03em; white-space:nowrap; background:var(--badge-warn-bg);   color:var(--badge-warn-c); }
.badge-danger  { display:inline-flex; align-items:center; padding:.2rem .55rem; border-radius:999px; font-size:.72rem; font-weight:600; letter-spacing:.03em; white-space:nowrap; background:var(--badge-danger-bg); color:var(--badge-danger-c); }
.badge-neutral { display:inline-flex; align-items:center; padding:.2rem .55rem; border-radius:999px; font-size:.72rem; font-weight:600; letter-spacing:.03em; white-space:nowrap; background:var(--badge-muted-bg);  color:var(--badge-muted-c); }

/* ── List Views ── */
.list-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:1.25rem; }
.list-title { font-size:1.35rem; font-weight:700; color:var(--text); margin:0; }
.list-stat-strip { display:flex; gap:2rem; padding:1rem 1.25rem; background:var(--surface); border:1px solid var(--border); border-radius:10px; margin-bottom:1rem; flex-wrap:wrap; }
.list-stat { display:flex; flex-direction:column; }
.list-stat-num { font-size:1.5rem; font-weight:700; font-family:'Inter',sans-serif; color:var(--text); }
.list-stat-label { font-size:.72rem; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; margin-top:.1rem; }
.list-filter-bar { display:flex; gap:.75rem; margin-bottom:1rem; flex-wrap:wrap; }
.list-filter-input { background:var(--surface); border:1px solid var(--border-strong); border-radius:var(--radius); padding:.4rem .75rem; font-family:'Inter',sans-serif; font-size:.875rem; color:var(--text); outline:none; transition:border-color .12s, box-shadow .12s; min-width:200px; }
.list-filter-input:focus { border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-container); }
.list-filter-input::placeholder { color:var(--muted); }
.list-filter-select { background:var(--surface); border:1px solid var(--border-strong); border-radius:var(--radius); padding:.45rem .75rem; color:var(--text); font-size:.875rem; outline:none; cursor:pointer; transition:border-color .12s, box-shadow .12s; }
.list-filter-select:focus { border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-container); }
.table-container { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); }
.edition-badge { font-size:.72rem; font-weight:700; color:var(--primary); text-transform:uppercase; letter-spacing:.05em; }
.icon-btn { background:none; border:none; cursor:pointer; padding:.2rem .3rem; border-radius:4px; font-size:.9rem; line-height:1; transition:background .12s; }
.icon-btn:hover { background:var(--surface2); }

/* ── Tabs + Filter Pills ── */
.tab-bar { display:flex; gap:.25rem; padding:.25rem; background:var(--surface2); border-radius:8px; width:fit-content; margin-bottom:1rem; }
.tab-item { background:none; border:none; padding:.4rem .9rem; border-radius:6px; color:var(--muted); font-size:.875rem; cursor:pointer; transition:all .15s; font-family:'Inter',sans-serif; }
.tab-item:hover { color:var(--text); }
.tab-item.active { background:var(--surface); color:var(--primary); font-weight:600; box-shadow:0 1px 3px rgba(0,0,0,.15); }
.filter-pill { background:none; border:1px solid var(--border); padding:.3rem .7rem; border-radius:999px; color:var(--muted); font-size:.78rem; cursor:pointer; transition:all .15s; font-family:'Inter',sans-serif; }
.filter-pill:hover { border-color:var(--primary); color:var(--text); }
.filter-pill.active { background:color-mix(in srgb, var(--primary) 15%, transparent); border-color:var(--primary); color:var(--primary); font-weight:600; }

/* ── Page Header ── */
.page-header { margin-bottom:1.5rem; }
.back-link { font-size:.85rem; color:var(--muted); text-decoration:none; display:inline-block; margin-bottom:.5rem; }
.back-link:hover { color:var(--primary); }
.page-title { font-size:1.5rem; font-weight:700; color:var(--text); margin:0; }

/* ── Form Sections ── */
.form-section { margin-bottom:1.25rem; }
.form-section-title { font-size:.72rem; font-weight:600; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin-bottom:.75rem; }

/* ── Create License Layout ── */
.create-license-grid { display:grid; grid-template-columns:1fr 1fr; gap:1.25rem; margin-bottom:1.25rem; }
@media (max-width:768px) { .create-license-grid { grid-template-columns:1fr; } }
.create-license-actions { display:flex; justify-content:flex-end; gap:.75rem; padding-top:1rem; border-top:1px solid var(--border); }

/* ── Radio Group ── */
.radio-group { display:flex; flex-direction:column; gap:.5rem; margin-bottom:1rem; }
.radio-option { display:flex; align-items:center; gap:.6rem; padding:.6rem .75rem; border:1px solid var(--border); border-radius:8px; cursor:pointer; font-size:.875rem; transition:all .15s; color:var(--text); }
.radio-option.active { border-color:var(--primary); background:color-mix(in srgb,var(--primary) 8%,transparent); }
.radio-option input[type=radio] { accent-color:var(--primary); flex-shrink:0; }
.new-customer-form { display:flex; flex-direction:column; gap:.5rem; }
.form-row-2 { display:grid; grid-template-columns:1fr 1fr; gap:.5rem; }
.customer-info { font-size:.875rem; color:var(--muted); padding:.4rem .5rem; }
.customer-info-name { font-weight:600; color:var(--text); }

/* ── Catalog Addons ── */
.catalog-addon-section { margin-top:1rem; padding-top:1rem; border-top:1px solid var(--border); }
.catalog-addon-header { font-size:.8rem; font-weight:600; color:var(--text); margin-bottom:.25rem; }
.catalog-addon-hint { font-size:.75rem; color:var(--muted); margin-bottom:.75rem; }
.catalog-addon-list { display:flex; flex-direction:column; gap:.5rem; }
.catalog-addon-item { display:flex; align-items:center; gap:.75rem; padding:.65rem .75rem; border:1px solid var(--border); border-radius:8px; cursor:pointer; transition:all .15s; }
.catalog-addon-item.selected { border-color:var(--primary); background:color-mix(in srgb,var(--primary) 8%,transparent); }
.catalog-addon-item input[type=checkbox] { accent-color:var(--primary); width:16px; height:16px; flex-shrink:0; }
.catalog-addon-info { display:flex; flex-direction:column; }
.catalog-addon-name { font-size:.875rem; font-weight:600; color:var(--text); }
.catalog-addon-price { font-size:.78rem; color:var(--muted); }

/* ── Spinner ── */
.spinner-sm { width:14px; height:14px; border:2px solid rgba(255,255,255,.3); border-top-color:#fff; border-radius:50%; animation:spin .7s linear infinite; display:inline-block; flex-shrink:0; }
@keyframes spin { to { transform:rotate(360deg); } }

/* ── Detail Pages ── */
.license-key-display { display:flex; align-items:center; gap:.75rem; padding:.75rem 1rem; background:var(--surface2); border-radius:8px; margin:.5rem 0; }
.license-key-text { font-family:'JetBrains Mono',monospace; font-size:1rem; color:var(--primary); letter-spacing:.05em; flex:1; word-break:break-all; }
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:1.25rem; margin-bottom:1.25rem; }
@media (max-width:768px) { .detail-grid { grid-template-columns:1fr; } }
.detail-field { display:flex; flex-direction:column; gap:.25rem; margin-bottom:.75rem; }
.detail-field-label { font-size:.72rem; font-weight:600; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); }
.detail-field-value { font-size:.9rem; color:var(--text); }
.catalog-badge-list { display:flex; flex-wrap:wrap; gap:.5rem; margin-top:.5rem; }

/* ── Role Badges ── */
.role-badge-admin   { display:inline-flex; align-items:center; padding:.2rem .55rem; border-radius:999px; font-size:.72rem; font-weight:600; background:color-mix(in srgb,var(--danger) 15%,transparent); color:var(--danger); }
.role-badge-dealer  { display:inline-flex; align-items:center; padding:.2rem .55rem; border-radius:999px; font-size:.72rem; font-weight:600; background:color-mix(in srgb,var(--info) 15%,transparent); color:var(--info); }
.role-badge-customer{ display:inline-flex; align-items:center; padding:.2rem .55rem; border-radius:999px; font-size:.72rem; font-weight:600; background:color-mix(in srgb,var(--muted) 15%,transparent); color:var(--muted); }

/* ── Small Button Variant ── */
.btn-sm { padding:.2rem .55rem; font-size:.78rem; }

/* ── Extension Approvals ── */
.json-preview { font-family:'JetBrains Mono',monospace; font-size:.75rem; color:var(--text); background:var(--surface2); border:1px solid var(--border); border-radius:6px; padding:.75rem 1rem; max-height:200px; overflow-y:auto; white-space:pre-wrap; word-break:break-all; margin:.5rem 0; }
.approval-card { margin-bottom:1rem; }
.approval-card-actions { display:flex; gap:.5rem; margin-top:.75rem; }
.country-tier-badge { display:inline-flex; align-items:center; gap:.4rem; padding:.3rem .7rem; border-radius:6px; font-size:.78rem; font-weight:700; background:color-mix(in srgb,var(--primary) 12%,transparent); color:var(--primary); border:1px solid var(--primary); }

/* ── Profile Grid (2-col cockpit panels) ── */
.profile-grid { display:grid; grid-template-columns:1fr 1fr; gap:1.25rem; margin-bottom:1.25rem; }
@media (max-width:768px) { .profile-grid { grid-template-columns:1fr; } }
.profile-grid .data-table td:first-child { width:40%; color:var(--muted); font-size:.82rem; }

/* ── Catalog Overview Grid ── */
.catalog-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:1.25rem; margin-bottom:1.5rem; }
.catalog-card { display:flex; flex-direction:column; gap:.75rem; }
.catalog-card-header { display:flex; justify-content:space-between; align-items:flex-start; gap:.5rem; }
.catalog-card-meta { display:flex; flex-direction:column; gap:.1rem; }
.catalog-card-sub { font-size:.75rem; color:var(--muted); }
.catalog-card-stats { display:flex; gap:1.25rem; flex-wrap:wrap; }
.catalog-stat-item { display:flex; flex-direction:column; font-size:.78rem; color:var(--muted); }
.catalog-stat-item strong { font-size:1rem; font-weight:700; color:var(--text); }
.catalog-progress-wrap { display:flex; flex-direction:column; gap:.3rem; }
.catalog-progress-label { display:flex; justify-content:space-between; font-size:.78rem; color:var(--muted); }
.catalog-card-actions { display:flex; gap:.5rem; margin-top:.25rem; }

/* ── Translation Cards Grid ── */
.translations-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(520px,1fr)); gap:1.25rem; }
.translation-card { display:flex; flex-direction:column; max-width:820px; }
.translation-card-header { display:flex; justify-content:space-between; align-items:flex-start; gap:.5rem; flex-wrap:wrap; }
.translation-card-name { font-size:1rem; font-weight:700; color:var(--text); margin-right:.35rem; }
.translation-card-code { font-size:.75rem; font-weight:600; color:var(--primary); background:var(--primary-container); border-radius:4px; padding:.1rem .35rem; }
.translation-card-native { font-size:.78rem; color:var(--muted); margin-left:.35rem; }
.translations-scope-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:.6rem; }
.scope-card { background:var(--surface2); border:1px solid var(--border); border-radius:8px; padding:.65rem .75rem; display:flex; flex-direction:column; gap:.4rem; min-width:0; }
.scope-card-header { display:flex; justify-content:space-between; align-items:center; gap:.4rem; flex-wrap:wrap; }
.scope-card-label { font-size:.7rem; font-weight:600; text-transform:uppercase; letter-spacing:.03em; color:var(--muted); white-space:nowrap; }
.scope-card .btn { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ── Cloud Packages Grid ── */
.cloud-packages-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:1rem; }

/* ── MyProducts Editions Grid ── */
.products-editions-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); gap:1.25rem; }
.products-edition-card { background:var(--surface2); border:1px solid var(--border); border-radius:8px; padding:1rem; display:flex; flex-direction:column; }

/* ── MyCountryRequirements Kanban ── */
.my-country-kanban { display:grid; grid-template-columns:repeat(4,1fr); gap:1.25rem; margin-bottom:1.5rem; }
.my-country-kanban-col { display:flex; flex-direction:column; gap:.5rem; }
.my-country-kanban-card { background:var(--surface2); border:1px solid var(--border); border-radius:6px; padding:.6rem .75rem; }
@media (max-width:900px) { .my-country-kanban { grid-template-columns:repeat(2,1fr); } }
@media (max-width:600px) { .my-country-kanban { grid-template-columns:1fr; } }

/* ── Settings Index Grid ── */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-top: .25rem;
}
.settings-tile {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: box-shadow .15s, border-color .15s;
  box-shadow: var(--shadow);
  font-family: 'Inter', sans-serif;
  color: var(--text);
}
.settings-tile:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.settings-tile-icon { width:52px; height:52px; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.settings-tile-icon.teal { background:color-mix(in srgb,var(--primary) 12%,transparent); color:var(--primary); }
.settings-tile-body { flex:1; min-width:0; }
.settings-tile-title { font-size:.925rem; font-weight:700; color:var(--text); margin-bottom:2px; }
.settings-tile-desc { font-size:.78rem; color:var(--muted); line-height:1.4; }
.settings-tile-arrow { color:var(--muted); flex-shrink:0; transition:color .15s; }
.settings-tile:hover .settings-tile-arrow { color:var(--primary); }

/* ── Settings Form Grid ── */
.settings-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:1.25rem; align-items:start; }
@media (max-width:900px) { .settings-form-grid { grid-template-columns:1fr; } }
.settings-field-label { display:block; font-size:.72rem; font-weight:600; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin-bottom:.4rem; }
.settings-info-box { display:flex; align-items:flex-start; gap:.6rem; padding:.65rem .9rem; background:color-mix(in srgb,var(--info) 8%,transparent); border:1px solid color-mix(in srgb,var(--info) 25%,transparent); border-radius:6px; font-size:.825rem; color:var(--text); margin-bottom:1rem; line-height:1.5; }

/* ── Dropzone (Import) ── */
.dropzone { border:2px dashed var(--border); border-radius:10px; padding:2rem 1.5rem; text-align:center; background:var(--surface2); transition:border-color .15s, background .15s; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:.5rem; margin-bottom:1rem; }
.dropzone:hover { border-color:var(--primary); background:color-mix(in srgb,var(--primary) 5%,transparent); }
.dropzone-icon { width:40px; height:40px; color:var(--muted); margin-bottom:.25rem; }
.dropzone-label { font-size:.9rem; font-weight:600; color:var(--text); margin:0; }
.dropzone-hint { font-size:.78rem; color:var(--muted); margin:0; }

/* ── AI Pages ── */

/* CreditManagement */
.ai-credit-balance-row { display:flex; align-items:center; gap:2rem; flex-wrap:wrap; }
.ai-credit-packages { display:grid; grid-template-columns:repeat(auto-fill,minmax(180px,1fr)); gap:1rem; margin-top:.5rem; }
.ai-credit-pkg-card { background:var(--surface2); border:1px solid var(--border); border-radius:8px; padding:1.25rem 1rem; text-align:center; display:flex; flex-direction:column; align-items:center; gap:.25rem; }
.ai-credit-pkg-card:hover { border-color:var(--primary); }
.ai-credit-pkg-amount { font-size:2.25rem; font-weight:700; color:var(--primary); line-height:1; }
.ai-credit-pkg-price { font-size:1.1rem; font-weight:600; color:var(--text); margin-top:.25rem; }

/* AiJobStatus component */
.ai-job-status-panel { padding:.85rem 1rem; }
.ai-job-status-panel--available { border:1px dashed var(--border); }
.ai-job-status-panel--ok { border-color:color-mix(in srgb,var(--ok) 35%,transparent); }
.ai-job-status-panel--error { border-color:color-mix(in srgb,var(--danger) 35%,transparent); }
.ai-job-status-panel--warn { border-color:color-mix(in srgb,var(--warn) 35%,transparent); }
.ai-job-status-panel--running { border-color:color-mix(in srgb,var(--primary) 35%,transparent); }
.ai-job-status-row { display:flex; align-items:center; gap:.75rem; }
.ai-job-status-body { flex:1; min-width:0; }
.ai-job-status-text { font-size:.875rem; color:var(--text); font-weight:500; }
.ai-job-status-sub { font-size:.75rem; color:var(--muted); margin-top:.15rem; }

/* ══ Responsive — 768px ══════════════════════════════════ */
@media (max-width: 768px) {
  .two-col               { grid-template-columns: 1fr; }
  .list-stat-strip       { gap: 1rem; flex-wrap: wrap; }
  .list-stat-num         { font-size: 1.25rem; }
  .cockpit-panel         { padding: 1rem; }
  .data-table th,
  .data-table td         { padding: .5rem .75rem; font-size: .8rem; }
  .page-title            { font-size: 1.25rem; }
  .tab-bar               { width: 100%; overflow-x: auto; }
  .tab-item              { flex: 1; text-align: center; padding: .4rem .5rem; white-space: nowrap; }
  .stat-grid             { grid-template-columns: repeat(2, 1fr); }
  .cockpit-metric-number { font-size: 1.6rem; }
  .translations-grid     { grid-template-columns: 1fr; }
  .catalog-grid          { grid-template-columns: 1fr; }
  .settings-grid         { grid-template-columns: 1fr; }
  .settings-form-grid    { grid-template-columns: 1fr; }
  .my-country-kanban     { grid-template-columns: repeat(2, 1fr); }
  .products-editions-grid { grid-template-columns: 1fr; }
  .ai-credit-packages    { grid-template-columns: repeat(2, 1fr); }
  .cloud-packages-grid   { grid-template-columns: repeat(2, 1fr); }
}

/* ══ Responsive — 480px ══════════════════════════════════ */
@media (max-width: 480px) {
  .list-filter-bar       { flex-direction: column; }
  .list-filter-input,
  .list-filter-select    { width: 100%; min-width: unset; }
  .cockpit-metric-number { font-size: 1.4rem; }
  .create-license-actions { flex-direction: column-reverse; }
  .create-license-actions .btn { width: 100%; justify-content: center; }
  .stat-grid             { grid-template-columns: 1fr; }
  .page-header           { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .list-header           { flex-direction: column; align-items: flex-start; gap: .5rem; }
  .list-header-actions   { width: 100%; }
  .list-header-actions .btn { width: 100%; justify-content: center; }
  .my-country-kanban     { grid-template-columns: 1fr; }
  .translations-scope-grid { grid-template-columns: 1fr; }
  .ai-credit-packages    { grid-template-columns: 1fr; }
  .cloud-packages-grid   { grid-template-columns: 1fr; }
  .table-container       { overflow-x: auto; }
  .data-table            { min-width: 500px; }
}
