/* ============================================================
   Akbulut Geçiş — Basis-Designsystem (Akbulut BizOps DNA)
   ============================================================ */
:root {
  --bg: #09090b;
  --bg-2: #0d0d10;
  --card: #121215;
  --card-2: #17171c;
  --border: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.14);
  --gold: #d4a52a;
  --gold-h: #e3b63b;
  --gold-soft: rgba(212, 165, 42, 0.12);
  --green: #10b981;
  --green-soft: rgba(16, 185, 129, 0.12);
  --red: #ef4444;
  --red-soft: rgba(239, 68, 68, 0.12);
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.12);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.12);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --muted-2: #71717a;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.65);
  --maxw: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video, canvas { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 16px; color: var(--text); }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(212, 165, 42, 0.35); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Header-Pattern mit iOS Safe-Area (KRITISCH) ---------- */
.app-header, .uye-header, .landing-header {
  padding-top: max(env(safe-area-inset-top, 0px), 16px);
}
@media all and (display-mode: standalone) {
  .app-header, .uye-header {
    padding-top: max(env(safe-area-inset-top, 0px), 48px) !important;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 15px; line-height: 1;
  padding: 13px 20px; border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, color 0.15s ease;
  white-space: nowrap; user-select: none;
}
.btn:active { transform: scale(0.985); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary { background: var(--gold); color: #141005; }
.btn-primary:hover { background: var(--gold-h); }
.btn-ghost { background: transparent; border-color: var(--border-2); color: var(--text); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.04); }
.btn-green { background: var(--green); color: #04140d; }
.btn-green:hover { background: #34d399; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #f87171; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: #60a5fa; }
.btn-sm { padding: 8px 13px; font-size: 13.5px; border-radius: 9px; }
.btn-sm svg { width: 15px; height: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em;
  padding: 4px 10px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap;
}
.badge svg { width: 13px; height: 13px; }
.badge-green { background: var(--green-soft); color: #34d399; border-color: rgba(16, 185, 129, 0.25); }
.badge-red { background: var(--red-soft); color: #f87171; border-color: rgba(239, 68, 68, 0.25); }
.badge-blue { background: var(--blue-soft); color: #60a5fa; border-color: rgba(59, 130, 246, 0.25); }
.badge-amber { background: var(--amber-soft); color: #fbbf24; border-color: rgba(245, 158, 11, 0.25); }
.badge-gold { background: var(--gold-soft); color: var(--gold-h); border-color: rgba(212, 165, 42, 0.3); }
.badge-gray { background: rgba(255, 255, 255, 0.06); color: var(--muted); border-color: var(--border); }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.field input, .field select {
  background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 15px; outline: none; width: 100%;
  transition: border-color 0.15s ease;
  appearance: none; -webkit-appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 38px; }
.field input:focus, .field select:focus { border-color: var(--gold); }
.field input::placeholder { color: var(--muted-2); }
.field small { color: var(--muted-2); font-size: 12.5px; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center; z-index: 900;
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease;
  padding: 0;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--card); border: 1px solid var(--border-2); border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  width: min(620px, 100%); max-height: calc(88vh - env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column;
  transform: translateY(28px); transition: transform 0.22s ease;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.modal-backdrop.open .modal { transform: translateY(0); }
@media (min-width: 700px) {
  .modal-backdrop { align-items: center; padding: 24px; }
  .modal { border-radius: var(--radius-lg); border-bottom: 1px solid var(--border-2); }
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px 22px 0; }
.modal-head h3 { font-size: 18.5px; font-weight: 700; letter-spacing: -0.01em; }
.modal-close { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: var(--muted); border: 1px solid var(--border); flex: none; }
.modal-close:hover { color: var(--text); border-color: var(--border-2); }
.modal-close svg { width: 16px; height: 16px; }
.modal-body { padding: 18px 22px 26px; overflow-y: auto; }

/* ---------- Sonstiges ---------- */
.divider { height: 1px; background: var(--border); border: none; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.mono { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
.hide { display: none !important; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: var(--gold);
  animation: spin 0.7s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }
.toast-wrap { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 950; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 32px)); }
.toast {
  background: #1c1c22; border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  padding: 12px 16px; font-size: 14px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 10px; animation: toastIn 0.2s ease;
}
.toast svg { width: 16px; height: 16px; flex: none; }
.toast.ok svg { color: var(--green); }
.toast.err svg { color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
