/* Çember yönetim paneli — uygulamanın "gece + aurora + cam" dilinin sakin, çalışma odaklı hali. */
:root {
  --night: #08071a;
  --night-raised: #100e26;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f6f4ff;
  --muted: rgba(246, 244, 255, 0.66);
  --faint: rgba(246, 244, 255, 0.42);
  --accent: #ff6a5c;
  --accent-ink: #1a0907;
  --violet: #9b87ff;
  --teal: #4fe3cf;
  --gold: #ffc56b;
  --success: #4ade9a;
  --danger: #ff6a7a;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Plus Jakarta Sans', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--night);
  background-image:
    radial-gradient(60vw 50vh at 85% -10%, rgba(109, 75, 255, 0.28), transparent 70%),
    radial-gradient(50vw 45vh at -10% 110%, rgba(31, 200, 180, 0.16), transparent 70%),
    radial-gradient(40vw 40vh at 60% 120%, rgba(255, 94, 91, 0.12), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font: 400 15px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 30px; line-height: 1.1; }
h2 { font-size: 21px; line-height: 1.2; }
h3 { font-size: 16px; line-height: 1.3; font-family: var(--body); letter-spacing: 0; }
p { margin: 0; }
a { color: inherit; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; line-height: 1.4; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 6px; }

/* ---------- Kabuk ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
  padding: 24px 14px;
  border-right: 1px solid var(--line);
  background: rgba(8, 7, 26, 0.55);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; font: 800 20px var(--display); }
.brand-ring { width: 24px; height: 24px; border-radius: 50%; border: 3px solid var(--accent); display: grid; place-items: center; }
.brand-ring::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--text); }
.brand small { font: 500 12px var(--body); color: var(--faint); margin-left: auto; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--r-sm);
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px;
}
.nav a:hover { background: var(--panel); color: var(--text); }
.nav a[aria-current='page'] { background: var(--panel-strong); color: var(--text); }
.nav a .count { margin-left: auto; font-size: 12px; color: var(--accent); }
.side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sync { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); }
.sync i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.sync.off i { background: var(--danger); }

.main { padding: 32px 40px 80px; max-width: 1240px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin-top: 6px; }
.back { display: inline-flex; gap: 6px; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 10px; }
.back:hover { color: var(--text); }

/* ---------- Yüzeyler ---------- */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  backdrop-filter: blur(14px);
}
.pad { padding: 22px; }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; align-items: start; }

/* ---------- Üyelik koltukları: 100 ücretsiz üyelik ---------- */
.seats-panel { padding: 26px 26px 22px; display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; }
.seats { display: grid; grid-template-columns: repeat(20, 18px); gap: 6px; }
.seat { width: 18px; height: 18px; border-radius: 5px; background: var(--panel-strong); }
.seat.on { background: var(--accent); box-shadow: 0 0 10px rgba(255, 106, 92, 0.45); }
.seat.new { background: var(--gold); box-shadow: 0 0 12px rgba(255, 197, 107, 0.6); }
.seats-copy .big { font: 800 64px/0.95 var(--display); letter-spacing: -0.04em; }
.seats-copy .big span { color: var(--faint); font-weight: 500; font-size: 32px; letter-spacing: -0.02em; }
.seats-copy p { margin-top: 10px; max-width: 34ch; }
.seats-legend { display: flex; gap: 16px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.seats-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); }
.fact { background: var(--night-raised); padding: 18px 20px; }
.fact b { display: block; font: 700 26px var(--display); }
.fact span { color: var(--muted); font-size: 13px; }

/* ---------- Tablolar ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 600; color: var(--faint); font-size: 13px; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover td { background: rgba(255, 255, 255, 0.025); }
.num { font-variant-numeric: tabular-nums; }

.av { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; background: var(--panel-strong); display: inline-grid; place-items: center; font: 700 13px var(--body); color: var(--muted); }
.av.lg { width: 56px; height: 56px; font-size: 18px; }
.thumb { width: 56px; height: 42px; border-radius: 10px; object-fit: cover; flex: none; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person b { font-weight: 600; }

/* ---------- Etiketler ---------- */
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--panel-strong); color: var(--muted); }
.tag.family { background: rgba(79, 227, 207, 0.14); color: var(--teal); }
.tag.dress { background: rgba(155, 135, 255, 0.16); color: var(--violet); }
.tag.full { background: rgba(255, 106, 92, 0.16); color: var(--accent); }
.tag.ok { background: rgba(74, 222, 154, 0.14); color: var(--success); }
.tag.wait { background: rgba(255, 197, 107, 0.14); color: var(--gold); }
.tag.admin { background: rgba(255, 106, 92, 0.14); color: var(--accent); }
.tag.premium { background: rgba(255, 197, 107, 0.16); color: var(--gold); }
.code-input { font: 700 26px/1 var(--display); letter-spacing: 0.4em; text-align: center; padding-left: 0.4em; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }

.meter { height: 6px; border-radius: 3px; background: var(--panel-strong); overflow: hidden; min-width: 80px; }
.meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--accent)); border-radius: 3px; }

/* ---------- Butonlar & form ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px;
  font: 700 14px var(--body); color: var(--text);
  background: var(--panel-strong); border: 1px solid var(--line-strong);
  transition: transform 120ms ease, background 120ms ease;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { background: rgba(255, 255, 255, 0.13); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.primary:hover { background: #ff7d70; }
.btn.danger { color: var(--danger); }
.btn.danger.armed { background: var(--danger); color: var(--accent-ink); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--panel); }
.btn[disabled] { opacity: 0.45; cursor: default; }

label.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; min-height: 42px; padding: 9px 13px;
  font: 500 15px var(--body); color: var(--text);
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-strong); border-radius: 12px;
}
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
select.input option { background: var(--night-raised); }
.input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(79, 227, 207, 0.18); }
.hint { font-weight: 500; color: var(--faint); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.form-grid .full { grid-column: 1 / -1; }

.switch { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); cursor: pointer; }
.switch input { appearance: none; width: 40px; height: 24px; border-radius: 12px; background: var(--panel-strong); position: relative; flex: none; cursor: pointer; margin: 0; transition: background 150ms; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 150ms; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }
.switch b { display: block; font-size: 14px; color: var(--text); }
.switch span { font-size: 13px; color: var(--muted); font-weight: 500; }

.presets { display: flex; gap: 8px; flex-wrap: wrap; }
.preset { width: 64px; height: 44px; border-radius: 10px; border: 2px solid transparent; padding: 0; cursor: pointer; background-size: cover; background-position: center; }
.preset[aria-pressed='true'] { border-color: var(--accent); }

.pick-list { max-height: 220px; overflow: auto; display: grid; gap: 2px; padding: 6px; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(255, 255, 255, 0.03); }
.pick-list label { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-weight: 500; color: var(--text); font-size: 14px; }
.pick-list label:hover { background: var(--panel); }
.pick-list input { accent-color: var(--accent); width: 16px; height: 16px; }

.error { color: var(--danger); font-size: 13px; font-weight: 600; min-height: 18px; }

/* ---------- Çekmece (etkinlik formu) ---------- */
.drawer-back { position: fixed; inset: 0; background: rgba(4, 3, 14, 0.6); backdrop-filter: blur(4px); z-index: 20; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 21;
  width: min(640px, 100vw); overflow-y: auto;
  background: var(--night-raised); border-left: 1px solid var(--line-strong);
  padding: 28px; display: grid; gap: 20px; align-content: start;
  animation: slide-in 220ms cubic-bezier(0.23, 1, 0.32, 1);
}
@keyframes slide-in { from { transform: translateX(40px); opacity: 0; } }
.drawer-foot { position: sticky; bottom: -28px; margin: 0 -28px -28px; padding: 16px 28px; background: var(--night-raised); border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.drawer-foot .error { margin-right: auto; }

/* ---------- Etkinlik detayı ---------- */
.hero { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 200px; display: flex; align-items: flex-end; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 7, 26, 0.1), rgba(8, 7, 26, 0.92)); }
.hero > div { position: relative; z-index: 1; padding: 22px; display: grid; gap: 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 14px; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; font-weight: 600; }
.count-big { font: 800 44px/1 var(--display); letter-spacing: -0.03em; }
.count-big span { font-size: 22px; color: var(--faint); font-weight: 500; }

/* ---------- Check-in ---------- */
.scanner { position: relative; border-radius: var(--r-md); overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner .frame { position: absolute; inset: 18%; border: 3px solid rgba(255, 255, 255, 0.85); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35); }
.scan-result { padding: 16px; border-radius: var(--r-md); display: flex; gap: 12px; align-items: center; }
.scan-result.ok { background: rgba(74, 222, 154, 0.14); border: 1px solid rgba(74, 222, 154, 0.4); }
.scan-result.warn { background: rgba(255, 197, 107, 0.12); border: 1px solid rgba(255, 197, 107, 0.4); }
.scan-result.bad { background: rgba(255, 106, 122, 0.12); border: 1px solid rgba(255, 106, 122, 0.4); }
.check { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; flex: none; }
.check.on { background: var(--success); color: var(--night); }
.check.off { border: 2px solid var(--line-strong); }

.empty { padding: 40px 22px; text-align: center; color: var(--muted); display: grid; gap: 12px; justify-items: center; }

/* ---------- Giriş ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login .panel { width: min(420px, 100%); padding: 32px; display: grid; gap: 18px; }
.login .brand { padding: 0; }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  padding: 12px 18px; border-radius: 999px; background: var(--text); color: var(--night);
  font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none;
  transition: opacity 180ms, transform 180ms; z-index: 50; max-width: calc(100vw - 32px);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.bad { background: var(--danger); color: var(--accent-ink); }

/* ---------- Duyarlı ---------- */
@media (max-width: 1000px) {
  .grid-2 { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .seats-panel { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; height: auto; flex-direction: row; align-items: center; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); z-index: 10; overflow-x: auto; }
  .brand { padding: 0 8px 0 0; font-size: 17px; }
  .brand small, .side-foot .who, .sync { display: none; }
  .nav { display: flex; gap: 2px; }
  .nav a { padding: 8px 10px; font-size: 13px; white-space: nowrap; }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; }
  .main { padding: 22px 16px 60px; }
  .seats { grid-template-columns: repeat(10, 14px); }
  .form-grid { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  td, th { padding: 10px 10px; }
  h1 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
