/* Yönetim paneli — kendi tasarım dili.
   Müşteri sitesinin "festival" görünümünden BİLİNÇLİ olarak ayrı: burada iş
   yoğunluk, okunabilirlik ve hız. Sahne ışıkları, degrade başlıklar, animasyon yok.
   Ortak olan tek şey Inter ve mor vurgu — aynı markanın aracı olduğu belli olsun. */

:root {
  --p-bg: #0b0b0e;
  --p-surface: #131318;
  --p-surface-2: #1a1a21;
  --p-line: #26262f;
  --p-line-soft: #1e1e26;
  --p-text: #e8e8ee;
  --p-muted: #9a97a8;
  --p-faint: #6b6879;
  --p-accent: #8a60ff;
  --p-accent-soft: rgb(138 96 255 / 0.14);
  --p-ok: #34d399;
  --p-warn: #fbbf24;
  --p-danger: #fb7185;
  --p-sidebar-w: 232px;
  --p-topbar-h: 56px;
}

body.panel {
  background: var(--p-bg);
  color: var(--p-text);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  min-height: 100vh;
}

/* ── Kabuk ─────────────────────────────────────────────────────── */
.p-shell { display: flex; min-height: 100vh; }

.p-sidebar {
  width: var(--p-sidebar-w);
  flex: 0 0 var(--p-sidebar-w);
  background: var(--p-surface);
  border-right: 1px solid var(--p-line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.p-sidebar__brand {
  height: var(--p-topbar-h);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--p-line);
  flex: 0 0 auto;
}
.p-sidebar__mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, #ff3cb4, var(--p-accent));
  display: grid; place-items: center;
  font-size: 0.7rem; font-weight: 700; color: #fff;
  flex: 0 0 auto;
}
.p-sidebar__title { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.01em; }
.p-sidebar__sub { font-size: 0.63rem; color: var(--p-faint); text-transform: uppercase; letter-spacing: 0.14em; }

.p-nav { padding: 0.75rem 0.5rem; overflow-y: auto; flex: 1 1 auto; }
.p-nav__group {
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.15em;
  color: var(--p-faint); padding: 0.9rem 0.6rem 0.35rem;
}
.p-nav__item {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  color: var(--p-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: background-color 0.12s, color 0.12s;
}
.p-nav__item i { width: 1rem; text-align: center; font-size: 0.85rem; opacity: 0.9; }
.p-nav__item:hover { background: var(--p-surface-2); color: var(--p-text); }
.p-nav__item--active { background: var(--p-accent-soft); color: #fff; }
.p-nav__item--active i { color: var(--p-accent); opacity: 1; }
.p-nav__badge {
  margin-left: auto;
  font-size: 0.65rem; font-weight: 600;
  padding: 0.05rem 0.4rem; border-radius: 999px;
  background: var(--p-danger); color: #1a0a10;
}

.p-sidebar__foot { border-top: 1px solid var(--p-line); padding: 0.75rem; flex: 0 0 auto; }

.p-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.p-topbar {
  height: var(--p-topbar-h);
  border-bottom: 1px solid var(--p-line);
  background: color-mix(in srgb, var(--p-bg) 88%, transparent);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 1.25rem;
  position: sticky; top: 0; z-index: 20;
}
.p-topbar__title { font-size: 0.95rem; font-weight: 600; }
.p-topbar__crumb { font-size: 0.72rem; color: var(--p-faint); }
.p-topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }

.p-content { padding: 1.25rem; flex: 1 1 auto; }
.p-content--wide { max-width: none; }

/* ── Kartlar ───────────────────────────────────────────────────── */
.p-card {
  background: var(--p-surface);
  border: 1px solid var(--p-line);
  border-radius: 12px;
}
.p-card__head {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--p-line-soft);
}
.p-card__title { font-size: 0.85rem; font-weight: 600; }
.p-card__body { padding: 1rem; }

.p-stat { padding: 1rem; }
.p-stat__label {
  font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.13em;
  color: var(--p-faint);
}
.p-stat__value { font-size: 1.6rem; font-weight: 650; margin-top: 0.3rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.p-stat__hint { font-size: 0.72rem; color: var(--p-muted); margin-top: 0.25rem; }
.p-stat--alert { border-color: rgb(251 113 133 / 0.45); background: rgb(251 113 133 / 0.07); }
.p-stat--alert .p-stat__value { color: var(--p-danger); }
.p-stat--warn { border-color: rgb(251 191 36 / 0.4); background: rgb(251 191 36 / 0.06); }
.p-stat--warn .p-stat__value { color: var(--p-warn); }

/* ── Tablolar — yoğun, taranabilir ─────────────────────────────── */
.p-table-wrap { overflow-x: auto; }
.p-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.p-table th {
  text-align: left;
  font-size: 0.63rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--p-faint); font-weight: 600;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--p-line);
  white-space: nowrap;
  position: sticky; top: 0; background: var(--p-surface);
}
.p-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--p-line-soft);
  vertical-align: middle;
}
.p-table tbody tr:hover td { background: var(--p-surface-2); }
.p-table tbody tr:last-child td { border-bottom: 0; }
.p-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.p-table .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.78rem; letter-spacing: 0.02em; }
.p-table a { color: inherit; text-decoration: none; }
.p-table a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ── Rozetler ──────────────────────────────────────────────────── */
.p-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  border-radius: 999px; border: 1px solid;
  padding: 0.12rem 0.55rem;
  font-size: 0.68rem; font-weight: 500; white-space: nowrap;
}
.p-pill::before { content: ""; width: 5px; height: 5px; border-radius: 999px; background: currentColor; }
.p-pill--positive { border-color: rgb(52 211 153 / 0.4); background: rgb(52 211 153 / 0.1); color: #6ee7b7; }
.p-pill--pending  { border-color: rgb(251 191 36 / 0.4); background: rgb(251 191 36 / 0.1); color: #fcd34d; }
.p-pill--danger   { border-color: rgb(251 113 133 / 0.4); background: rgb(251 113 133 / 0.1); color: #fda4af; }
.p-pill--muted    { border-color: var(--p-line); background: var(--p-surface-2); color: var(--p-muted); }

/* ── Düğmeler ──────────────────────────────────────────────────── */
.p-btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  border-radius: 8px; border: 1px solid var(--p-line);
  background: var(--p-surface-2); color: var(--p-text);
  padding: 0.4rem 0.8rem; font-size: 0.8rem; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: border-color 0.12s, background-color 0.12s;
}
.p-btn:hover { border-color: #3a3a46; background: #212129; }
.p-btn--primary { background: var(--p-accent); border-color: var(--p-accent); color: #fff; }
.p-btn--primary:hover { background: #7a4dff; border-color: #7a4dff; }
.p-btn--danger { background: transparent; border-color: rgb(251 113 133 / 0.45); color: #fda4af; }
.p-btn--danger:hover { background: rgb(251 113 133 / 0.12); border-color: var(--p-danger); }
.p-btn--sm { padding: 0.25rem 0.55rem; font-size: 0.72rem; }

/* ── Formlar ───────────────────────────────────────────────────── */
.p-field { display: block; }
.p-field__label {
  display: block;
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--p-muted); margin-bottom: 0.3rem;
}
.p-input, .p-select, .p-textarea {
  width: 100%;
  background: var(--p-bg);
  border: 1px solid var(--p-line);
  border-radius: 8px;
  color: var(--p-text);
  padding: 0.5rem 0.7rem;
  font-size: 0.85rem;
  font-family: inherit;
}
.p-input:focus, .p-select:focus, .p-textarea:focus {
  outline: none;
  border-color: var(--p-accent);
  box-shadow: 0 0 0 3px var(--p-accent-soft);
}
.p-help { font-size: 0.7rem; color: var(--p-faint); margin-top: 0.3rem; }
.p-error { font-size: 0.72rem; color: #fda4af; margin-top: 0.3rem; }

/* ── Boş durum ─────────────────────────────────────────────────── */
.p-empty { padding: 2.5rem 1rem; text-align: center; color: var(--p-muted); font-size: 0.85rem; }
.p-empty i { display: block; font-size: 1.5rem; color: var(--p-faint); margin-bottom: 0.6rem; }

/* ── Giriş ekranı ──────────────────────────────────────────────── */
.p-auth {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgb(138 96 255 / 0.15), transparent 65%),
    var(--p-bg);
}
.p-auth__card {
  width: 100%; max-width: 22rem;
  background: var(--p-surface);
  border: 1px solid var(--p-line);
  border-radius: 14px;
  padding: 1.75rem;
}

/* ── Küçük ekran: kenar çubuğu üstte yatay şeride döner ─────────── */
@media (max-width: 860px) {
  .p-shell { flex-direction: column; }
  .p-sidebar { width: auto; flex: 0 0 auto; height: auto; position: static; border-right: 0; border-bottom: 1px solid var(--p-line); }
  .p-nav { display: flex; gap: 0.25rem; overflow-x: auto; padding: 0.5rem; }
  .p-nav__group { display: none; }
  .p-nav__item { white-space: nowrap; }
  .p-sidebar__foot { display: none; }
}

/* ══════════════════════════════════════════════════════════════════
   Operasyon bileşenleri
   Tasarım incelemesinden çıkan kurallar:
   · Renk YALNIZ bir şey bozukken görünür. "Her şey yolunda" için yeşil
     banner YOK — ona körleşilir ve o körlük gerçek uyarıyı da yutar.
   · Boş hücre "sorun yok" gibi okunur. Eksik zorunlu alan boş BIRAKILMAZ,
     kırmızı "eksik" rozetiyle işaretlenir.
   · Yıkıcı işlemin sonucu tıklamadan ÖNCE, satır ve sterlin cinsinden yazılır.
   ══════════════════════════════════════════════════════════════════ */

/* ── Sonuç kutusu: yıkıcı işlem öncesi ─────────────────────────── */
.p-consequence {
  border: 1px solid rgb(251 113 133 / 0.4);
  background: rgb(251 113 133 / 0.06);
  border-radius: 10px;
  padding: 1rem;
}
.p-consequence__title {
  font-size: 0.82rem; font-weight: 650; color: #fda4af;
  display: flex; align-items: center; gap: 0.5rem;
}
.p-consequence__list { margin: 0.75rem 0 0; padding: 0; list-style: none; font-size: 0.82rem; }
.p-consequence__list li { display: flex; gap: 0.6rem; padding: 0.28rem 0; }
.p-consequence__list li::before { content: "→"; color: var(--p-faint); flex: 0 0 auto; }
/* "Dokunulmayacak" satırları: operatörün tıklamasını asıl bu mümkün kılıyor. */
.p-consequence__safe { color: var(--p-muted); }
.p-consequence__safe::before { content: "✓" !important; color: var(--p-ok) !important; }

/* ── Eksik veri rozeti ─────────────────────────────────────────── */
.p-missing {
  display: inline-flex; align-items: center; gap: 0.3rem;
  border-radius: 4px;
  background: rgb(251 113 133 / 0.14);
  color: #fda4af;
  padding: 0.05rem 0.35rem;
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.02em;
}

/* ── Filtre çubuğu ─────────────────────────────────────────────── */
.p-filters {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--p-line-soft);
}
/* Filtre alanları içeriğe göre daralır. `.p-input`'un genel `width:100%` kuralı
   flex çocuğunda max-content'e çözülüyor ve uzun bir <option> metni ("2027 Season
   Opening") tüm alanı kaplayıp filtreleri alt alta yığıyordu. Burada genişlik
   içeriğe bırakılır ve tavan konur; yalnız arama kutusu kalan yeri alır. */
.p-filters .p-field { flex: 0 1 auto; min-width: 0; }
.p-filters .p-input,
.p-filters .p-select { width: auto; min-width: 7rem; max-width: 15rem; }
.p-filters .p-search { flex: 1 1 18rem; }
.p-filters .p-search .p-input { width: 100%; max-width: none; }
.p-filters .p-btn { flex: 0 0 auto; }
.p-search {
  flex: 1 1 16rem; min-width: 12rem;
  position: relative;
}
.p-search i {
  position: absolute; left: 0.65rem; top: 50%; transform: translateY(-50%);
  color: var(--p-faint); font-size: 0.8rem; pointer-events: none;
}
.p-search .p-input { padding-left: 2rem; }

/* ── Anahtar/değer listesi (detay ekranları) ───────────────────── */
.p-kv { display: grid; grid-template-columns: minmax(9rem, auto) 1fr; gap: 0.1rem 1rem; font-size: 0.83rem; }
.p-kv dt { color: var(--p-muted); padding: 0.35rem 0; }
.p-kv dd { margin: 0; padding: 0.35rem 0; color: var(--p-text); }

/* ── Bölüm başlığı ─────────────────────────────────────────────── */
.p-section { margin-top: 1.25rem; }
.p-section__head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.p-section__title { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--p-muted); }

/* ── Not / bilgi kutusu ────────────────────────────────────────── */
.p-note {
  border: 1px solid var(--p-line);
  background: var(--p-surface-2);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  font-size: 0.8rem;
  color: var(--p-muted);
}
.p-note strong { color: var(--p-text); }
.p-note--warn { border-color: rgb(251 191 36 / 0.35); background: rgb(251 191 36 / 0.06); color: #fde68a; }
.p-note--danger { border-color: rgb(251 113 133 / 0.35); background: rgb(251 113 133 / 0.06); color: #fecdd3; }

/* ── Sayfalama ─────────────────────────────────────────────────── */
.p-pager {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--p-line-soft);
  font-size: 0.78rem; color: var(--p-muted);
}
.p-pager__spacer { margin-left: auto; }

/* ── İlerleme çubuğu ───────────────────────────────────────────── */
.p-progress { height: 5px; border-radius: 999px; background: var(--p-surface-2); overflow: hidden; }
.p-progress__bar { height: 100%; background: var(--p-accent); }
.p-progress__bar--full { background: var(--p-ok); }
.p-progress__bar--warn { background: var(--p-warn); }

/* ── Sekmeler ──────────────────────────────────────────────────── */
.p-tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--p-line); margin-bottom: 1rem; }
.p-tab {
  padding: 0.5rem 0.8rem;
  font-size: 0.82rem; color: var(--p-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.p-tab:hover { color: var(--p-text); }
.p-tab--active { color: #fff; border-bottom-color: var(--p-accent); }

/* ── Onay girdisi: sayıyı yazdır ───────────────────────────────── */
/* "SİL" yazmak hiçbir şey kanıtlamaz. Silinecek SATIR SAYISINI yazmak,
   sayının okunduğunu kanıtlar. */
.p-confirm { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.p-confirm .p-input { width: 7rem; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: 0.08em; }

/* ── Satır içi form ────────────────────────────────────────────── */
.p-grid-2 { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }

/* ── Kod bloğu (ham PayPal cevabı vb.) ─────────────────────────── */
.p-code {
  background: var(--p-bg);
  border: 1px solid var(--p-line);
  border-radius: 8px;
  padding: 0.8rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  line-height: 1.55;
  color: var(--p-muted);
  overflow-x: auto;
  white-space: pre;
  max-height: 26rem;
}

.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.78rem; letter-spacing: 0.02em; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.p-muted { color: var(--p-muted); }
.p-faint { color: var(--p-faint); }
.mt-3 { margin-top: 0.75rem; }

/* Toplu işlem çubuğu (biletler listesi).
   Not alanı esner, düğmeler sabit kalır; dar ekranda alt satıra iner.
   `.p-filters` ile aynı hatayı tekrarlamamak için not alanına min-width
   verilir — yoksa uzun bir placeholder çubuğu tek satıra sığmaz hâle getirir. */
.p-toolbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.75rem 0 0.5rem;
}
.p-toolbar__count {
  font-size: 0.78rem;
  color: var(--p-muted);
  white-space: nowrap;
}
.p-toolbar__count span { font-weight: 650; color: var(--p-text); font-variant-numeric: tabular-nums; }
.p-toolbar .p-input { flex: 1 1 18rem; min-width: 0; }
