/* ══════════════════════════════════════════════
   AK DESIGN SYSTEM — Basis-Reset + Komponentenklassen
   Bewusst getrennt von tokens.css: tokens.css wird beim Deploy per
   Build-Time-Sync von S3 überschrieben und darf deshalb NUR Variablen
   enthalten. Diese Datei bleibt lokal/stabil (analog ak-cockpit
   frontend/src/theme/components.css).
══════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  transition: background 0.35s ease, color 0.35s ease;
}

body.ak-noise::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background-image:
    radial-gradient(ellipse 80% 60% at 15% 10%, var(--noise-1) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 80%, var(--noise-2) 0%, transparent 55%);
  pointer-events: none;
}

#root { position: relative; z-index: 1; }

/* ══════ BUTTONS ══════ */
.ak-btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.55rem 1.3rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  letter-spacing: 0.02em;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.ak-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.ak-btn-primary { background: var(--brand-primary); color: #fff; box-shadow: var(--glow); }
.ak-btn-primary:hover:not(:disabled) { filter: brightness(0.92); transform: translateY(-1px); }
.ak-btn-secondary { background: transparent; color: var(--brand-primary); border: 1px solid var(--border); }
.ak-btn-secondary:hover:not(:disabled) { border-color: var(--brand-primary); background: var(--accent-dim); }
.ak-btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); }
.ak-btn-ghost:hover:not(:disabled) { color: var(--text-primary); border-color: var(--border-hover); }
.ak-btn-danger { background: var(--red); color: #fff; }
.ak-btn-danger:hover:not(:disabled) { filter: brightness(0.92); }
.ak-btn-sm { padding: 0.25rem 0.7rem; font-size: 0.72rem; border-radius: 8px; }

/* ══════ TABLE ══════ */
.ak-table { width: 100%; border-collapse: collapse; font-size: 12px; color: var(--text-primary); }
.ak-table th, .ak-table td {
  padding: 7px 10px; text-align: left;
  border-bottom: 1px solid var(--border); border-right: 1px solid var(--border);
}
.ak-table th:last-child, .ak-table td:last-child { border-right: none; }
.ak-table thead tr { background: var(--bg-surface); }
.ak-table thead th {
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--text-muted); text-transform: uppercase;
}
.ak-table tbody tr { cursor: pointer; }
.ak-table tbody tr:hover { background: var(--accent-dim); }

/* ══════ CARD / INPUT ══════ */
.ak-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); }

.ak-input {
  padding: 8px 10px; font-size: 14px; border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; background: var(--bg-card); color: var(--text-primary);
  box-sizing: border-box; transition: border-color 0.2s;
}
.ak-input:focus { outline: none; border-color: var(--brand-primary); }

.ak-label {
  display: block; font-size: 0.78rem; font-weight: 500; color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

/* ══════ STATUS PILLS ══════ */
.ak-pill {
  display: inline-flex; padding: 0.2rem 0.65rem; border-radius: 100px;
  font-size: 0.7rem; font-weight: 500;
}
.ak-pill-active    { background: var(--accent-dim); color: var(--accent); }
.ak-pill-pending   { background: var(--orange-dim); color: var(--orange); }
.ak-pill-done      { background: var(--green-dim);  color: var(--green); }
.ak-pill-cancelled { background: var(--red-dim);    color: var(--red); }
.ak-pill-neutral   { background: var(--bg-overlay); color: var(--text-muted); }

/* ══════ TOPBAR / NAV ══════ */
.ak-topbar {
  background: var(--bg-card); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.5rem; padding: 0 20px; height: 56px;
  flex-shrink: 0; transition: background 0.35s, border-color 0.35s;
}
.ak-nav-item {
  font-family: var(--font-display); font-size: 0.76rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 0.35rem 0.85rem; border-radius: 8px; border: none; background: transparent;
  color: var(--text-secondary); cursor: pointer; text-decoration: none; transition: all 0.2s;
  white-space: nowrap;
}
.ak-nav-item:hover { color: var(--text-primary); background: var(--bg-overlay); }
.ak-nav-item.active { background: var(--accent-dim); color: var(--brand-primary); }

/* ══════ SECTION / STAT ══════ */
.ak-section-title { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; color: var(--text-primary); margin: 0; }
.ak-stat-label { font-size: 0.68rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }
.ak-stat-val { font-family: 'DM Sans', sans-serif; font-variant-numeric: tabular-nums; font-size: 2rem; font-weight: 800; color: var(--text-primary); }
