/* ==========================================================================
   HSD Trakya · Kayıt Sistemi — tasarım tokenları ve bileşenler
   Performans kuralları (mobil webview'lar için):
   • Animasyonlar YALNIZCA transform ve opacity kullanır (layout/reflow yok).
   • backdrop-filter kullanılmaz; "cam" etkisi koyu yarı saydam gradyanla verilir.
   • will-change yalnızca animasyon anında (.is-animating sınıfıyla) açılır.
   ========================================================================== */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Zemin & yüzeyler */
  --bg: #0A0C14;                      /* Deep Obsidian */
  --surface-1: rgba(22, 26, 41, .94);
  --surface-2: rgba(14, 17, 28, .94);
  --field: rgba(7, 9, 16, .62);
  --line: rgba(255, 255, 255, .12);
  --line-soft: rgba(255, 255, 255, .07);
  /* Metin */
  --text: #F2F4FA;
  --text-2: #B3B9CC;
  --text-3: #7D849A;
  /* Marka */
  --red: #CF0A2C;                     /* Huawei Crimson */
  --red-hi: #FF1E42;                  /* parıltı & hover */
  --blue: #1E50C8;                    /* Trakya ambiyans ışıması */
  --navy: #243F90;                    /* Trakya kurumsal lacivert */
  --sky: #77AED5;                     /* Trakya destek mavisi */
  --gold: #DCB941;                    /* köprü kemerleri */
  --gold-2: #CB9932;                  /* Trakya kurumsal altın */
  --green: #00F5AA;                   /* neon onay */
  --danger: #FF6B7D;
  /* Biçim */
  --r-lg: 22px;
  --r-md: 14px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: 16px;
}

/* --- temel ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 500 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
img, svg { display: block; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.mono { font-family: var(--mono); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
body.is-locked { overflow: hidden; }

/* --- arka plan: obsidyen + süptil kod ızgarası + ambiyans ışıması ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg);
}
/* Izgara aşağı doğru zemine karışır. mask-image yerine üstte bir solma gradyanı kullanılır:
   aynı görüntü, raster maliyeti çok daha düşük (zayıf telefon GPU'ları için). */
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(120% 70% at 50% 0%, rgba(10, 12, 20, 0) 22%, var(--bg) 76%),
    linear-gradient(rgba(255, 255, 255, .042) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .042) 1px, transparent 1px);
  background-size: 100% 100%, 32px 32px, 32px 32px;
  background-position: center top;
}
.bg-glow { position: absolute; width: 900px; height: 900px; border-radius: 50%; }
.bg-glow--blue { left: -520px; top: -560px; background: radial-gradient(closest-side, rgba(30, 80, 200, .45), rgba(30, 80, 200, 0)); }
.bg-glow--red { right: -560px; bottom: -620px; background: radial-gradient(closest-side, rgba(207, 10, 44, .32), rgba(207, 10, 44, 0)); }

/* --- yerleşim -------------------------------------------------------------- */
.shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) var(--gutter) max(24px, env(safe-area-inset-bottom));
}
.top { display: flex; justify-content: center; padding: 4px 0 18px; }
.brand-row { display: flex; align-items: center; gap: 14px; }
.brand-tu { width: 44px; height: 44px; border-radius: 50%; }
.brand-sep { width: 1px; height: 30px; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .28), transparent); }
.brand-hsd { width: 104px; height: auto; }
.brand-row--sm { gap: 11px; }
.brand-row--sm .brand-tu { width: 36px; height: 36px; }
.brand-row--sm .brand-sep { height: 24px; }
.brand-row--sm .brand-hsd { width: 84px; }

/* --- kahraman alanı -------------------------------------------------------- */
.hero { text-align: center; padding: 2px 2px 22px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .02em;
}
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.live-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(0, 245, 170, .55);
  animation: ping 2.4s var(--ease-out) infinite;
}
@keyframes ping { 0% { transform: scale(.4); opacity: 1; } 80%, 100% { transform: scale(1.7); opacity: 0; } }
.hero-title {
  margin: 16px 0 10px;
  font-size: clamp(31px, 8.8vw, 44px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.028em;
  text-wrap: balance;
}
.grad {
  background: linear-gradient(92deg, #FF3355 0%, #FF6A3D 48%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub { margin: 0 auto; max-width: 34ch; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.chip--count { margin-top: 14px; color: var(--text); border-color: rgba(220, 185, 65, .35); background: rgba(220, 185, 65, .08); }
.chip--count b { color: var(--gold); }
.count-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }

/* --- kart (sahte cam: blur yok) ------------------------------------------- */
.card {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-1), var(--surface-2));
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.card::before, .pass::before {
  content: "";
  position: absolute;
  left: 28px;
  right: 28px;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 30, 66, .85), rgba(220, 185, 65, .75), transparent);
}
.form-card { padding: 20px 18px 18px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.tag {
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 30, 66, .28);
  background: rgba(207, 10, 44, .12);
  color: var(--red-hi);
  font-size: 11.5px;
  font-weight: 700;
}
.card-title { flex: 1; margin: 0; font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; }
.eta { color: var(--text-3); font-size: 12px; font-weight: 700; white-space: nowrap; }

/* --- form alanları ----------------------------------------------------------- */
form { display: grid; gap: 15px; }
.field { min-width: 0; margin: 0; padding: 0; border: 0; }
.field > label, .field > legend {
  display: block;
  margin: 0 0 7px 2px;
  padding: 0;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
}
.opt { margin-left: 6px; color: var(--text-3); font-size: 12px; font-weight: 600; }
.control { position: relative; }
.control input {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 44px 0 46px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: var(--r-md);
  outline: none;
  background: var(--field);
  color: var(--text);
  font-size: 16px; /* 16px altı iOS'ta otomatik yakınlaştırma yapar */
  font-weight: 600;
  letter-spacing: .005em;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .18s, background-color .18s, box-shadow .18s;
}
#f-student, #f-phone { font-family: var(--mono); letter-spacing: .03em; }
.control input::placeholder { color: rgba(179, 185, 204, .36); font-weight: 500; }
.control input:focus { border-color: rgba(255, 30, 66, .65); background: rgba(7, 9, 16, .86); box-shadow: 0 0 0 4px rgba(207, 10, 44, .16); }
.control .ic, .control .ok { position: absolute; top: 50%; pointer-events: none; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.control .ic { left: 15px; width: 19px; height: 19px; margin-top: -9.5px; stroke: var(--text-3); stroke-width: 2; transition: stroke .18s; }
.control:focus-within .ic { stroke: var(--red-hi); }
.control .ok {
  right: 14px;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  stroke: var(--green);
  stroke-width: 2.8;
  opacity: 0;
  transform: scale(.4);
  transition: opacity .2s, transform .3s var(--ease-out);
}
.field.is-valid .ok { opacity: 1; transform: scale(1); }
.field.is-invalid .control input { border-color: rgba(255, 107, 125, .7); box-shadow: 0 0 0 4px rgba(255, 107, 125, .12); }
.err { margin: 6px 2px 0; color: var(--danger); font-size: 12.5px; font-weight: 600; }
.err:empty { display: none; }
.shake { animation: shake .36s var(--ease-io); }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}

/* ilgi alanı hapları: seçilince <…/> parantezleri belirir (genişlik sabit → reflow yok) */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; display: inline-flex; }
.pill input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pill span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 700;
  pointer-events: none;
  transition: background-color .18s, border-color .18s, color .18s;
}
.pill-br {
  color: var(--red-hi);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transform: scale(.3);
  transition: opacity .18s, transform .28s var(--ease-out);
}
.pill input:checked + span { border-color: rgba(255, 30, 66, .55); background: rgba(207, 10, 44, .14); color: #fff; }
.pill input:checked + span .pill-br { opacity: 1; transform: scale(1); }
.pill input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

/* KVKK onay kutusu (.field > label kuralını ezmek için iki sınıflı seçici) */
.field > .consent {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  cursor: pointer;
}
.consent input { position: absolute; left: 0; top: 0; width: 22px; height: 22px; margin: 0; opacity: 0; }
.consent .box {
  display: grid;
  flex: none;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1.5px solid rgba(255, 255, 255, .3);
  border-radius: 7px;
  background: var(--field);
  transition: background-color .15s, border-color .15s;
}
.consent .box svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #fff;
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transform: scale(.5);
  transition: opacity .15s, transform .25s var(--ease-out);
}
.consent input:checked + .box { border-color: var(--red-hi); background: var(--red); }
.consent input:checked + .box svg { opacity: 1; transform: scale(1); }
.consent input:focus-visible + .box { outline: 2px solid var(--gold); outline-offset: 2px; }
.field--consent.is-invalid .box { border-color: var(--danger); }
.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(255, 30, 66, .6);
  text-underline-offset: 3px;
  cursor: pointer;
}

/* bot tuzağı: görünmez ama DOM'da */
.hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.form-alert {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 107, 125, .35);
  border-radius: 12px;
  background: rgba(255, 107, 125, .1);
  color: #FFD5DB;
  font-size: 13.5px;
  font-weight: 600;
}

/* --- ana aksiyon butonu ------------------------------------------------------
   Yüzey 3 parçadır (sol kapak · orta · sağ kapak). Daralma/genişleme; kapakların
   translate'i + ortanın scaleX'i ile yapılır → köşe yarıçapı bozulmaz, reflow olmaz. */
.cta {
  position: relative;
  display: block;
  width: 100%;
  height: 58px;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  border-radius: 29px;
  background: none;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .01em;
  touch-action: manipulation;
  isolation: isolate;
  -webkit-user-select: none;
  user-select: none;
  transition: transform .14s var(--ease-out);
}
.cta:active { transform: scale(.97); }
.cta:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.cta[disabled] { cursor: default; }
.cta-glow {
  position: absolute;
  inset: -16px -8px;
  z-index: -1;
  border-radius: 48px;
  background: radial-gradient(50% 60% at 50% 55%, rgba(255, 30, 66, .55), rgba(255, 30, 66, 0));
  animation: breathe 3.6s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: .35; } 50% { opacity: .7; } }
.cta-surface, .cta-done { position: absolute; inset: 0; display: flex; }
.cta-cap { flex: none; width: 29px; height: 100%; }
.cta-cap--l { border-radius: 29px 0 0 29px; }
.cta-cap--r { border-radius: 0 29px 29px 0; }
.cta-mid { flex: 1; height: 100%; margin: 0 -1px; }
.cta-surface > * { background: linear-gradient(180deg, #E3143B, var(--red)); }
@media (hover: hover) { .cta:hover .cta-surface > * { background: linear-gradient(180deg, #FF2C4F, #E3102F); } }
.cta-ring { position: absolute; inset: 0; border: 1px solid rgba(255, 255, 255, .2); border-radius: 29px; pointer-events: none; }
.cta-shine { position: absolute; inset: 0; overflow: hidden; border-radius: 29px; pointer-events: none; }
.cta-shine::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -45%;
  width: 45%;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .26), rgba(255, 255, 255, 0));
  animation: shine 5s var(--ease-io) 1.5s infinite;
}
@keyframes shine { 0%, 72% { transform: translateX(0); } 100% { transform: translateX(330%); } }
.cta-ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  border: 2px solid rgba(255, 255, 255, .8);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.cta-label { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; height: 100%; }
.cta-br { color: rgba(255, 255, 255, .92); font-size: 16px; letter-spacing: -.04em; }
.cta-spin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: round;
  opacity: 0;
}
.cta-done { opacity: 0; pointer-events: none; }
.cta-done > * { background: #0B1914; border: 0 solid var(--green); }
.cta-done .cta-cap--l { border-width: 1.5px 0 1.5px 1.5px; }
.cta-done .cta-cap--r { border-width: 1.5px 1.5px 1.5px 0; }
.cta-done .cta-mid { border-width: 1.5px 0; }
.cta-tick {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}
.cta-tick path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.cta-done-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-size: 15.5px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
}
.cta-done-label svg { width: 17px; height: 17px; margin-right: 7px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cta.is-busy .cta-shine, .cta.is-busy .cta-glow { animation: none; opacity: 0; }

/* Mod B butonu: Trakya laciverti + altın kontur */
body[data-mode="bridge_pulse"] .cta-surface > * { background: linear-gradient(180deg, #2E4DAA, var(--navy)); }
body[data-mode="bridge_pulse"] .cta-ring { border: 1.5px solid var(--gold); }
body[data-mode="bridge_pulse"] .cta-glow { background: radial-gradient(50% 60% at 50% 55%, rgba(220, 185, 65, .38), rgba(220, 185, 65, 0)); }

.secure-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 0; color: var(--text-3); font-size: 12px; font-weight: 600; text-align: left; }
.secure-note svg { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* --- bildirim kutuları --------------------------------------------------------- */
.notice { margin: 0 0 16px; padding: 14px; border-radius: 14px; font-size: 14px; }
.notice p { margin: 0; }
.notice--ok { border: 1px solid rgba(0, 245, 170, .3); background: rgba(0, 245, 170, .06); }
.notice--closed { border: 1px solid rgba(220, 185, 65, .3); background: rgba(220, 185, 65, .07); text-align: center; }
.notice-title { margin-bottom: 4px !important; color: var(--gold); font-weight: 800; }
.notice-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* --- butonlar ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 50px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .005em;
  text-decoration: none;
  touch-action: manipulation;
  transition: transform .14s var(--ease-out), background-color .18s, border-color .18s;
}
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.btn svg { flex: none; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn--primary { background: linear-gradient(180deg, #E8153C, var(--red)); color: #fff; box-shadow: 0 12px 30px -12px rgba(255, 30, 66, .75), inset 0 1px 0 rgba(255, 255, 255, .18); }
@media (hover: hover) { .btn--primary:hover { background: linear-gradient(180deg, #FF2C4F, #E3102F); } }
.btn--glass { border-color: rgba(255, 255, 255, .14); background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03)); color: var(--text); }
.btn--ghost { border-color: var(--line); background: transparent; color: var(--text-2); }
.btn--small { height: 40px; padding: 0 14px; border-radius: 12px; font-size: 13.5px; }
.btn--block { width: 100%; }
.btn--glow { position: relative; isolation: isolate; }
.btn--glow::after {
  content: "";
  position: absolute;
  inset: -10px;
  z-index: -1;
  border-radius: 22px;
  background: radial-gradient(50% 60% at 50% 60%, rgba(255, 30, 66, .5), rgba(255, 30, 66, 0));
  animation: breathe 3.2s ease-in-out infinite;
}
.btn[disabled] { opacity: .6; }

/* --- alt bilgi ------------------------------------------------------------------- */
.foot { padding: 30px 8px 4px; color: var(--text-3); font-size: 12px; text-align: center; }
.bridge-art {
  width: 100%;
  max-width: 360px;
  height: auto;
  aspect-ratio: 360 / 72;
  margin: 0 auto 14px;
  color: var(--gold);
  opacity: .5;
  stroke-width: 1.6;
}
.foot-brand { margin: 0 0 6px; font-weight: 600; }
.foot-links { display: flex; justify-content: center; gap: 14px; margin: 0; }
.foot-links .link { color: var(--text-2); font-weight: 600; }

/* ==========================================================================
   Başarı ekranı · HSD Trakya Developer Pass
   ========================================================================== */
.success { position: fixed; inset: 0; z-index: 40; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.success.is-preparing { opacity: .01; pointer-events: none; }
.success-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 440px;
  min-height: 100%;
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) var(--gutter) max(26px, env(safe-area-inset-bottom));
}
.pass {
  position: relative;
  overflow: hidden;
  padding: 20px 18px 74px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 26px;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(30, 80, 200, .24), transparent 60%),
    radial-gradient(90% 50% at 100% 100%, rgba(207, 10, 44, .2), transparent 62%),
    linear-gradient(180deg, rgba(25, 29, 46, .98), rgba(13, 16, 27, .98));
  box-shadow: 0 22px 44px -26px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 30, 66, .14);
}
/* Kartın arkasındaki kırmızı hale: büyük blur gölge yerine ucuz radyal gradyan */
.pass-halo {
  position: absolute;
  left: -14%;
  right: -14%;
  top: 6%;
  height: 90%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 30, 66, .26), rgba(255, 30, 66, 0));
  pointer-events: none;
}
.success-inner > .pass, .success-inner > p { position: relative; }
/* Kartın altında kendi şeridinde duran altın Meriç Köprüsü süslemesi */
.pass-bridge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  width: min(300px, 86%);
  height: auto;
  margin: 0 auto;
  aspect-ratio: 360 / 72;
  color: var(--gold);
  opacity: .32;
  stroke-width: 1.5;
  pointer-events: none;
}
.pass > *:not(.pass-bridge) { position: relative; }
.pass-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.badge-ok {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(0, 245, 170, .55);
  border-radius: 999px;
  background: rgba(0, 245, 170, .08);
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  white-space: nowrap;
}
.badge-ok svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.pass-title { margin: 18px 0 2px; outline: none; font-size: 27px; font-weight: 800; letter-spacing: -.022em; line-height: 1.15; }
.pass-sub { margin: 0 0 16px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.pass-sub .mono { color: var(--gold); font-weight: 700; }
.pass-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 14px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(5, 7, 13, .55);
}
.pass-info { display: grid; gap: 9px; min-width: 0; margin: 0; }
.pass-info dt, .pass-idlabel { color: var(--text-3); font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.pass-info dd { margin: 1px 0 0; font-size: 14.5px; font-weight: 800; overflow-wrap: anywhere; }
#p-name { font-size: 17px; line-height: 1.25; }
.pass-qr { align-self: center; width: 100px; height: 100px; padding: 6px; border-radius: 12px; background: #fff; }
.pass-qr svg { width: 100%; height: 100%; }
.pass-qr path { fill: #0A0C14; }
.pass-idrow {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding-top: 11px;
  border-top: 1px dashed rgba(255, 255, 255, .12);
}
.pass-id { color: #fff; font-size: 14px; font-weight: 800; white-space: nowrap; }
.br-red { color: var(--red-hi); }
.pass-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.pass-tags:empty { display: none; }
.pass-tags li { padding: 5px 10px; border: 1px solid rgba(255, 30, 66, .3); border-radius: 999px; background: rgba(207, 10, 44, .12); font-size: 12px; font-weight: 700; }
.pass-meta { margin: 12px 0 0; color: var(--text-3); font-size: 12.5px; font-weight: 600; }
.pass-meta:empty { display: none; }
.pass-actions { display: grid; gap: 10px; margin-top: 16px; }
.success-note { margin: 16px 0 0; color: var(--text-2); font-size: 13.5px; font-weight: 600; text-align: center; }
.success-links { display: flex; justify-content: center; gap: 18px; margin: 10px 0 0; font-size: 13px; }

/* ==========================================================================
   Onay animasyonu sahnesi
   ========================================================================== */
.stage { position: fixed; inset: 0; z-index: 50; visibility: hidden; pointer-events: none; }
.stage.is-on { visibility: visible; pointer-events: auto; }
.dimmer { position: fixed; inset: 0; z-index: 35; background: rgba(8, 10, 18, .84); opacity: 0; visibility: hidden; pointer-events: none; }
.dimmer.is-on { visibility: visible; pointer-events: auto; }
.stage-core { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
.stage-core > * { position: absolute; left: 0; top: 0; }
.stage-glow { width: 320px; height: 320px; margin: -160px 0 0 -160px; border-radius: 50%; opacity: 0; }
.stage-glow--red { background: radial-gradient(closest-side, rgba(255, 30, 66, .5), rgba(207, 10, 44, .16) 55%, rgba(207, 10, 44, 0)); }
.stage-glow--green { background: radial-gradient(closest-side, rgba(0, 245, 170, .5), rgba(0, 245, 170, .14) 55%, rgba(0, 245, 170, 0)); }
.br { width: 30px; height: 60px; margin: -30px 0 0 -15px; overflow: visible; opacity: 0; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.br path { stroke: var(--red-hi); stroke-width: 5.5; }
.br .br-glow { stroke: rgba(255, 30, 66, .22); stroke-width: 14; }
.bar { width: 78px; height: 6px; margin: -3px 0 0 -39px; overflow: hidden; border-radius: 6px; background: rgba(255, 255, 255, .12); opacity: 0; }
.bar-fill { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--red-hi), var(--gold)); transform: scaleX(0); transform-origin: 0 50%; }
.tick { width: 64px; height: 64px; margin: -32px 0 0 -32px; opacity: 0; overflow: visible; fill: none; stroke: var(--green); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.tick path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.stage-text { width: 280px; margin: 50px 0 0 -140px; color: var(--text-2); font-size: 13.5px; font-weight: 700; letter-spacing: .02em; text-align: center; opacity: 0; }
.stage-text.is-ok { color: var(--green); }
.stage-text.is-err { color: var(--danger); }
.stage-text.is-ok .dots, .stage-text.is-err .dots { display: none; }
.dots i { display: inline-block; font-style: normal; opacity: .2; }
/* yalnızca sahne açıkken çalışır: gizli öğede sonsuz animasyon boşuna stil hesabı yaptırmasın */
.stage.is-on .dots i { animation: dot 1.2s infinite; }
.stage.is-on .dots i:nth-child(2) { animation-delay: .2s; }
.stage.is-on .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dot { 0%, 100% { opacity: .2; } 40% { opacity: 1; } }
.sparks { width: 0; height: 0; }
.spark { position: absolute; left: 0; top: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; }
.spark--red { background: var(--red-hi); box-shadow: 0 0 10px rgba(255, 30, 66, .85); }
.spark--green { background: var(--green); box-shadow: 0 0 10px rgba(0, 245, 170, .85); }
.spark--gold { background: var(--gold); box-shadow: 0 0 10px rgba(220, 185, 65, .85); }
/* will-change bilinçli olarak CSS'te yok: app.js yalnızca o modda hareket eden öğelere
   animasyon süresince ekler (promote) ve bitince kaldırır (demote). */

/* Mod B: Trakya köprüsünden buluta sinyal */
.bfx { width: 240px; height: 140px; margin: -100px 0 0 -120px; overflow: visible; opacity: 0; fill: none; stroke-linecap: round; }
.bfx-arch, .bfx-deck { stroke: var(--gold); stroke-width: 3.4; stroke-dasharray: 1; stroke-dashoffset: 1; }
.bfx-deck { stroke-width: 2; opacity: .55; }
.bfx-cloud { stroke: var(--sky); stroke-width: 3; stroke-dasharray: 1; stroke-dashoffset: 1; }
.bfx--ok path { stroke: var(--green); stroke-width: 3.4; }
.bfx--ok .thin { stroke-width: 2.2; opacity: .6; }
.bfx-cloud--2 { stroke-width: 2.2; opacity: .6; }
.bfx-link { stroke: rgba(119, 174, 213, .4); stroke-width: 2; stroke-dasharray: 3 4; }
/* köprü kemerinin tepesinden (SVG 120,78) buluta (120,56) giden sinyal noktası; çekirdeğe göre (0,-22) */
.bfx-pulse { width: 7px; height: 7px; margin: -25.5px 0 0 -3.5px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 8px rgba(119, 174, 213, .9); opacity: 0; }
.bfx-done {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 270px;
  height: 46px;
  margin: 58px 0 0 -135px;
  border: 1.5px solid var(--green);
  border-radius: 999px;
  background: rgba(0, 245, 170, .08);
  color: var(--green);
  font-size: 14.5px;
  font-weight: 800;
  opacity: 0;
}
.bfx-done svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
body[data-mode="bridge_pulse"] .stage-text { color: var(--gold); }

/* --- alttan açılan pencere (dialog) ------------------------------------------------ */
.sheet {
  width: min(560px, calc(100% - 24px));
  max-width: none;
  max-height: min(88vh, 780px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, #171B2B, #0F121D);
  color: var(--text);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .6);
}
.sheet::backdrop { background: rgba(5, 6, 10, .74); }
.sheet[open] { animation: sheet-in .34s var(--ease-out); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.sheet-inner { display: flex; flex-direction: column; gap: 14px; max-height: min(88vh, 780px); padding: 20px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head h3 { margin: 0; font-size: 18px; font-weight: 800; }
.sheet-x { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .04); color: var(--text-2); }
.sheet-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; color: var(--text-2); font-size: 14px; line-height: 1.6; }
.sheet-body h4 { margin: 14px 0 4px; color: var(--text); font-size: 14px; }
.sheet-body p { margin: 0 0 6px; }
.sheet-body a { color: var(--text); }
.sheet-hint { margin: 0; color: var(--text-2); font-size: 13.5px; }
.sheet-img { width: 100%; max-height: 54vh; border-radius: 14px; background: #000; object-fit: contain; }

/* --- kart doğrulama / 404 sayfası --------------------------------------------------- */
.page-verify .verify {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 100vh;
  padding: 24px var(--gutter);
}
.verify-card {
  width: 100%;
  max-width: 420px;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--surface-1), var(--surface-2));
  text-align: center;
}
.verify-card .brand-row { justify-content: center; }
.verify-status { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 18px 0 14px; font-size: 20px; font-weight: 800; }
.verify-status.is-valid { color: var(--green); }
.is-invalid .verify-status { color: var(--danger); }
.verify-icon { display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid currentColor; border-radius: 50%; }
.verify-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.verify-note { margin: 0; color: var(--text-2); font-size: 14px; }
.verify-list { display: grid; gap: 10px; margin: 0; padding: 14px; border: 1px solid var(--line-soft); border-radius: 14px; background: rgba(5, 7, 13, .5); text-align: left; }
.verify-list div { display: flex; justify-content: space-between; gap: 12px; }
.verify-list dt { color: var(--text-3); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.verify-list dd { margin: 0; font-weight: 700; text-align: right; }
.accent { color: var(--red-hi); }
.verify-admin { margin-top: 16px; text-align: left; }
.verify-admin-title { margin: 0 0 8px; color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.verify-admin .btn { margin-top: 12px; }
.link-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.noscript { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 100; padding: 12px; border-radius: 12px; background: var(--red); color: #fff; font-weight: 700; text-align: center; }

/* --- geniş ekran: kahraman solda, form sağda ------------------------------------------ */
@media (min-width: 960px) {
  .shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    grid-template-areas: "top top" "hero card" "foot foot";
    align-items: center;
    column-gap: 72px;
    max-width: 1100px;
    padding-top: 32px;
  }
  .top { grid-area: top; justify-content: flex-start; padding-bottom: 28px; }
  .hero { grid-area: hero; padding-bottom: 0; text-align: left; }
  .hero-title { font-size: 58px; }
  .hero-sub { margin: 0; font-size: 17px; }
  .form-card { grid-area: card; }
  .foot { grid-area: foot; padding-top: 44px; }
}

@media (max-width: 359px) {
  :root { --gutter: 12px; }
  .form-card { padding: 18px 14px 16px; }
  .pass { padding: 18px 14px 16px; }
  .pass-qr { width: 88px; height: 88px; }
}

/* --- hareket azaltma tercihi ----------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
