/* ===== Gezen Tabak — Design tokens ===== */
:root {
  --bg: #f4f3f8;
  --bg-deep: #e9e7f2;
  --surface: #ffffff;
  --surface-2: #f7f6fb;
  --ink: #2b2161;
  --muted: #686868;
  --primary: #ed1c24;
  --primary-mid: #d9141c;
  --primary-dark: #b5121a;
  --accent: #ed1c24;
  --accent-soft: #fff1f2;
  --line: #e7e5f0;
  --line-strong: rgba(43, 33, 97, 0.12);
  --success: #2f6b4f;
  --success-bg: #e8f5ee;
  --danger: #a61b1b;
  --danger-bg: #fff0f0;
  --shadow-sm: 0 4px 14px rgba(43, 33, 97, 0.06);
  --shadow: 0 16px 40px rgba(43, 33, 97, 0.09);
  --shadow-lg: 0 24px 56px rgba(43, 33, 97, 0.14);
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --font: "Figtree", "Nunito Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-display: "Baloo 2", "Figtree", ui-rounded, system-ui, sans-serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 48px;
  --header-h: 72px;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 100% -10%, #f0d9b8 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at -10% 40%, #ead7bc 0%, transparent 45%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ===== Typography ===== */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-3);
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.35rem, 2.5vw, 1.75rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 var(--space-3); color: var(--muted); }
.lead { font-size: 1.1rem; line-height: 1.65; max-width: 36em; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary-mid);
  margin-bottom: var(--space-2);
}
/* Sadece tabak sayfası bölüm etiketleri */
.eyebrow-icon .icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  letter-spacing: 0;
  opacity: 0.95;
}
.muted { color: var(--muted); font-size: 0.9rem; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }

/* ===== Layout shell ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 20px;
  padding-top: max(14px, env(safe-area-inset-top));
  transition: background 0.25s var(--ease), box-shadow 0.25s var(--ease), backdrop-filter 0.25s;
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--line-strong), var(--shadow-sm);
  border-radius: 0 0 16px 16px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  flex-shrink: 0;
  display: grid;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(43, 33, 97, 0.22);
}
.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.brand-text strong { display: block; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.brand-text small { display: block; font-size: 0.72rem; color: var(--muted); margin-top: 1px; font-weight: 500; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--primary-mid), var(--primary));
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  box-shadow: 0 6px 18px rgba(43, 33, 97, 0.28);
  transition: transform 0.18s var(--ease), box-shadow 0.18s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(43, 33, 97, 0.32); }
.nav-cta .icon { width: 18px; height: 18px; }

.page-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 20px 72px;
  animation: pageIn 0.4s var(--ease);
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 20px 36px;
  border-top: 1px solid var(--line-strong);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer a { color: var(--primary); font-weight: 600; }
.footer-brand em { font-style: normal; font-size: 0.75rem; opacity: 0.6; margin-left: 4px; }

/* ===== Cards & surfaces ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-6);
}
.card-soft { background: var(--surface-2); box-shadow: none; }

/* ===== Buttons ===== */
.button {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 13px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  touch-action: manipulation;
  user-select: none;
  line-height: 1.2;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: 0.55; cursor: wait; transform: none; }
.button .icon { width: 18px; height: 18px; flex-shrink: 0; }

.button.primary {
  background: linear-gradient(145deg, var(--primary-mid), var(--primary));
  color: #fff;
  box-shadow: 0 6px 16px rgba(43, 33, 97, 0.22);
}
.button.primary:hover { background: linear-gradient(145deg, #c4141b, var(--primary-dark)); }

.button.secondary {
  background: var(--bg-deep);
  color: var(--primary-dark);
}
.button.secondary:hover { background: #e3e1ee; }

.button.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--line);
}
.button.ghost:hover { background: var(--surface-2); }

.button.danger {
  background: var(--danger-bg);
  color: var(--danger);
}
.button.tiny { padding: 7px 12px; font-size: 0.82rem; border-radius: 10px; }
.button.full { width: 100%; margin-top: var(--space-4); padding: 15px 20px; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--space-6); }
.button-row .button { flex: 1 1 auto; min-width: 140px; }

.button.loading { position: relative; color: transparent !important; pointer-events: none; }
.button.loading::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.text-button {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: none;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--muted);
}
.text-button:hover { background: rgba(0,0,0,0.04); color: var(--ink); }
.text-button.danger { color: var(--danger); }
.text-button.danger:hover { background: var(--danger-bg); }

/* ===== Forms ===== */
label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--ink);
}
input, select {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px 15px;
  border-radius: 13px;
  color: var(--ink);
  outline: none;
  font-size: 16px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(237, 28, 36, 0.18);
}
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.field { margin-bottom: var(--space-4); }
.name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.name-row .field { margin-bottom: 8px; }
@media (max-width: 520px) {
  .name-row { grid-template-columns: 1fr; }
}

/* ===== Notices ===== */
.notice {
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 var(--space-4);
  font-weight: 500;
  font-size: 0.92rem;
}
.notice.success { color: var(--success); background: var(--success-bg); }
.notice.error { color: var(--danger); background: var(--danger-bg); }
.callout {
  background: var(--accent-soft);
  color: var(--primary-dark);
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 500;
  font-size: 0.95rem;
  margin: 0 0 var(--space-4);
  border: 1px solid rgba(237, 28, 36, 0.25);
  line-height: 1.55;
}

/* ===== Badges & chips ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-deep);
  color: var(--primary-dark);
  white-space: nowrap;
}
.badge.accent { background: var(--accent-soft); color: var(--primary); }
.badge.success { background: var(--success-bg); color: var(--success); }
.badge.warn { background: #fff1f2; color: #b5121a; }
.badge.muted { background: #ecebf3; color: var(--muted); }

/* ===== Home / Hero ===== */
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 40px;
  min-height: 420px;
  overflow: hidden;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, transparent 60%);
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; }
.hero h1 { margin: 8px 0 16px; }
.hero .lead { margin-bottom: 0; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.feature {
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--primary-mid), var(--primary));
  color: #fff;
  margin-bottom: 14px;
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h2 { font-size: 1.2rem; margin-bottom: 6px; }
.feature p { font-size: 0.92rem; margin: 0; }

.steps-section { margin-top: 20px; }
.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 8px;
  position: relative;
}
.step-item {
  text-align: center;
  padding: 20px 16px;
  position: relative;
}
.step-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 42px;
  right: -8%;
  width: 16%;
  height: 2px;
  background: linear-gradient(90deg, var(--line), transparent);
}
.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  background: var(--surface);
  border: 2px solid var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.step-item strong { display: block; font-size: 0.95rem; margin-bottom: 4px; color: var(--ink); }
.step-item span { font-size: 0.85rem; color: var(--muted); }

/* ===== Illustrative map ===== */
.hero-map {
  width: min(360px, 100%);
  aspect-ratio: 1;
  margin: auto;
  border-radius: 28px;
  border: 8px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-lg);
  overflow: hidden;
  position: relative;
}
.illus-map {
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, #f3f2f9 0%, var(--surface) 62%);
  width: 100%;
  height: 100%;
}
.illus-terrain, .illus-grid, .illus-route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.illus-terrain .terrain-a { fill: #e4e2f0; opacity: 0.75; }
.illus-terrain .terrain-b { fill: #dcd9ec; opacity: 0.55; }
.illus-grid { opacity: 0.7; mix-blend-mode: multiply; }
.route-casing { fill: none; stroke: #fff1f2; stroke-width: 9; stroke-linecap: round; opacity: 0.95; }
.route-line { fill: none; stroke: var(--primary); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1.5 11; opacity: 0.9; }
.route-anim-line { fill: none; stroke: var(--primary); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 2 12; opacity: 0.9; }
.route-anim-casing { fill: none; stroke: #fff1f2; stroke-width: 8; stroke-linecap: round; opacity: 0.95; }
.illus-compass { position: absolute; top: 12px; left: 12px; width: 38px; height: 38px; z-index: 3; }
.illus-compass circle { fill: rgba(255, 255, 255, 0.85); stroke: rgba(43, 33, 97, 0.28); stroke-width: 1.5; }
.illus-compass path { fill: var(--primary); opacity: 0.85; }
.illus-compass text { font-size: 11px; font-weight: 700; fill: var(--primary-dark); font-family: var(--font-display); }
.illus-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  text-align: center;
  z-index: 2;
  opacity: 0;
  animation: pinBounceIn 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  animation-fill-mode: forwards;
  cursor: pointer;
  /* Animasyon bitmese bile pinler tıklanabilir ve görünür kalsın */
}
.illus-pin.latest { z-index: 20; }
/* Son konum: harita altında, taşmaz */
.map-now-here {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line-strong);
  box-shadow: 0 8px 20px rgba(43, 33, 97, 0.14);
  max-width: calc(100% - 20px);
  box-sizing: border-box;
}
.map-now-here[hidden] { display: none !important; }
.map-now-here strong {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.02em;
}
.map-now-address {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  max-height: 3.2em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.illus-caption.soft-cap {
  background: rgba(20, 16, 50, 0.78);
  font-size: 9px;
  max-width: 88px;
  font-weight: 600;
}
.route-illus-map {
  overflow: visible;
}
#route-map {
  overflow: visible;
}
.map-card .route-illus-map,
#route-map .illus-map {
  overflow: hidden; /* kenar yuvarlak kalsın ama pin padding ile içeride */
  padding: 4px;
}
.illus-shadow {
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 18px;
  height: 6px;
  background: rgba(20, 16, 50, 0.28);
  border-radius: 50%;
  filter: blur(2px);
  transform: translateX(-50%);
}
.illus-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 50% 4px;
  transform: rotate(-45deg);
  background: var(--primary);
  color: white;
  font-weight: 700;
  border: 3px solid white;
  box-shadow: 0 8px 16px rgba(43, 33, 97, 0.32);
}
.illus-dot b { transform: rotate(45deg); display: block; font-family: var(--font-display); font-size: 0.9rem; }
.illus-pin.latest .illus-dot {
  background: var(--accent);
  animation: pulse 1.8s 2s infinite, pulseRing 1.5s 2s infinite;
}
.illus-caption {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
  z-index: 5;
}
.map-live-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 4;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--primary-dark);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line-strong);
  padding: 5px 10px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}

.illus-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
  padding: 20px;
  font-size: 0.95rem;
}
/* Tabak: pinle aynı hizada, 1 → son konuma gezer */
.plate-traveler {
  position: absolute;
  z-index: 40;
  font-size: 40px;
  line-height: 1;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
  transform: translate(-50%, -55%);
  will-change: left, top;
}
.plate-traveler.arrived {
  animation: plateBob 2s ease-in-out infinite;
}
@keyframes plateBob {
  0%, 100% { transform: translate(-50%, -55%); }
  50% { transform: translate(-50%, calc(-55% - 4px)); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(237, 28, 36, 0.45), 0 4px 14px rgba(0,0,0,0.25); }
  50% { box-shadow: 0 0 0 12px rgba(237, 28, 36, 0), 0 4px 14px rgba(0,0,0,0.25); }
}
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(237, 28, 36, 0.55), 0 0 0 0 rgba(237, 28, 36, 0.25); }
  100% { box-shadow: 0 0 0 10px rgba(237, 28, 36, 0), 0 0 0 22px rgba(237, 28, 36, 0); }
}
@keyframes pinBounceIn {
  0% { opacity: 0; transform: translate(-50%, -100%) scale(0); }
  60% { opacity: 1; transform: translate(-50%, -100%) scale(1.12); }
  100% { opacity: 1; transform: translate(-50%, -100%) scale(1); }
}
@keyframes rippleWave {
  0% { width: 0; height: 0; opacity: 1; }
  100% { width: 200px; height: 200px; opacity: 0; }
}

/* ===== Plate identity ===== */
.plate-identity {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.plate-identity h1 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin: 4px 0 6px;
}
.plate-code {
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--primary);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-block;
}
.plate-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

/* ===== Stepper (check-in) ===== */
.stepper {
  display: flex;
  gap: 0;
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
}
.stepper-step {
  flex: 1;
  text-align: center;
  padding: 10px 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  position: relative;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}
.stepper-step .step-index {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-deep);
  font-size: 0.75rem;
  margin-right: 6px;
  vertical-align: middle;
}
.stepper-step.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.stepper-step.active .step-index {
  background: var(--primary);
  color: #fff;
}
.stepper-step.done {
  color: var(--success);
  border-bottom-color: var(--success);
}
.stepper-step.done .step-index {
  background: var(--success);
  color: #fff;
}
.step-panel { display: none; animation: pageIn 0.3s var(--ease); }
.step-panel.active { display: block; }
.step-actions {
  display: flex;
  gap: 10px;
  margin-top: var(--space-5);
  flex-wrap: wrap;
}
.step-actions .button { flex: 1 1 auto; min-width: 120px; }

/* KVKK onayı */
.kvkk-box {
  margin: 4px 0 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.kvkk-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  margin: 0;
  font-weight: 500;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ink);
}
.kvkk-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.kvkk-check-box {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid #b9b6cc;
  background: #fff;
  flex-shrink: 0;
  margin-top: 1px;
  display: grid;
  place-items: center;
  transition: border-color .15s, background .15s;
}
.kvkk-check-box::after {
  content: "";
  width: 11px;
  height: 6px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) translateY(-1px) scale(0);
  transition: transform .12s ease;
}
.kvkk-check input:checked + .kvkk-check-box {
  background: var(--primary);
  border-color: var(--primary);
}
.kvkk-check input:checked + .kvkk-check-box::after {
  transform: rotate(-45deg) translateY(-1px) scale(1);
}
.kvkk-check input:focus-visible + .kvkk-check-box {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.kvkk-check-text strong { color: var(--primary-dark); }
.kvkk-details {
  margin-top: 12px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
.kvkk-details summary {
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  list-style: none;
}
.kvkk-details summary::-webkit-details-marker { display: none; }
.kvkk-details summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform .15s;
}
.kvkk-details[open] summary::before { transform: rotate(90deg); }
.kvkk-body {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.55;
}
.kvkk-body p { margin: 0 0 8px; }
.kvkk-body p:last-child { margin-bottom: 0; }

.location-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1; /* adres listesinin ALTINDA — liste butonun üstüne binmesin */
}
.location-actions .button {
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 1;
}
#use-location .icon {
  pointer-events: none;
}

.photo-drop {
  border: 2px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 28px 16px;
  text-align: center;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.photo-drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.photo-drop strong { display: block; color: var(--ink); margin-bottom: 4px; }
.photo-thumb {
  width: 100%;
  max-width: 200px;
  margin: 12px auto 0;
  border-radius: 12px;
  border: 2px solid var(--line);
  object-fit: cover;
  aspect-ratio: 1;
}
.photo-preview-wrap { text-align: center; }

/* Suggest autocomplete — akışta (absolute değil): mobilde butonun altına sarkmaz */
.suggest-wrap {
  position: relative;
  z-index: 20;
  overflow: visible;
  margin-bottom: 0;
}
#checkin-section,
#checkin-form,
.step-panel {
  overflow: visible;
}
/* Liste input’un hemen altında, sayfa akışında → “Konumumu kullan” aşağı itilir */
.suggest-box {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  z-index: 30;
  display: flex;
  flex-direction: column;
  margin-top: 8px;
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  max-height: min(320px, 46vh);
  width: 100%;
  overflow: hidden;
}
.suggest-box[hidden] { display: none !important; }

/* Üst pin: yazılan adres en üstte sabit (liste içinde) */
.suggest-pin {
  flex: 0 0 auto;
  background: #fff1f2;
  border-bottom: 1px solid var(--line);
  z-index: 2;
}
.suggest-pin .suggest-item-custom {
  background: transparent;
  padding: 12px 14px 14px;
}
.suggest-pin-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}
.suggest-typed {
  display: block;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  word-break: break-word;
  white-space: normal;
}
.suggest-pin-hint {
  display: block !important;
  margin-top: 6px !important;
  font-size: 0.75rem !important;
  color: var(--muted) !important;
  font-weight: 500 !important;
}

/* Alt: sadece öneriler kayar */
.suggest-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: min(200px, 32vh);
  background: #fff;
}

/* Mobil: daha kompakt liste, buton net şekilde listenin altında */
@media (max-width: 560px) {
  .suggest-box {
    max-height: min(280px, 42vh);
    margin-top: 10px;
    border-radius: 14px;
  }
  .suggest-scroll {
    max-height: min(160px, 28vh);
  }
  .suggest-pin .suggest-item-custom {
    padding: 11px 12px 12px;
  }
  .suggest-typed {
    font-size: 0.92rem;
  }
  .location-actions {
    margin-top: 14px;
  }
}

.suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  color: inherit;
}
.suggest-scroll .suggest-item + .suggest-item { border-top: 1px solid var(--line); }
.suggest-item:hover,
.suggest-item:focus,
.suggest-item.is-active {
  background: var(--accent-soft);
  outline: none;
}
.suggest-pin .suggest-item-custom:hover,
.suggest-pin .suggest-item-custom:focus,
.suggest-pin .suggest-item-custom.is-active {
  background: #fff1f2;
}
.suggest-item small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 3px;
  line-height: 1.35;
  white-space: normal;
  word-break: break-word;
}
.suggest-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.suggest-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--accent-soft);
  color: var(--primary);
  text-transform: none;
}
.suggest-empty {
  padding: 12px 16px 14px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}
.suggest-loading {
  font-style: italic;
}

/* ===== Map card ===== */
.map-card { padding: var(--space-6); overflow: hidden; margin-bottom: 20px; }
.map-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
#route-map {
  height: 380px;
  border-radius: 16px;
  overflow: hidden;
  background: #e3e1ee;
  position: relative;
}
#route-map .illus-map,
#route-map .route-illus-map {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  /* Pinler layout ile içeride tutulur; hepsi çizilir */
  overflow: hidden;
}
.route-illus-map { width: 100%; height: 100%; border-radius: 16px; }

/* ===== Vertical timeline ===== */
.timeline {
  list-style: none;
  margin: 8px 0 0;
  padding: 0 0 0 4px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 17px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--line));
  border-radius: 2px;
}
.timeline-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  position: relative;
}
.timeline-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-deep);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
  font-family: var(--font-display);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px var(--line);
  z-index: 1;
  position: relative;
}
.timeline-item.latest .timeline-dot {
  background: linear-gradient(145deg, var(--accent), #c87830);
  color: #fff;
  box-shadow: 0 0 0 3px var(--accent-soft), 0 4px 12px rgba(237, 28, 36, 0.35);
}
.timeline-body {
  background: var(--surface-2);
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid transparent;
  min-width: 0;
}
.timeline-item.latest .timeline-body {
  background: var(--accent-soft);
  border-color: rgba(237, 28, 36, 0.35);
}
.timeline-body strong {
  display: block;
  font-size: 0.98rem;
  color: var(--ink);
  margin-bottom: 2px;
}
.timeline-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-mid);
  margin-bottom: 2px;
}
.timeline-body small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 2px;
}
.timeline-photo {
  margin-top: 10px;
  border-radius: 10px;
  overflow: hidden;
  max-width: 200px;
  border: 1px solid var(--line);
}
.timeline-photo img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
}
.timeline-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--muted);
}
.timeline-empty .empty-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--bg-deep);
  display: grid;
  place-items: center;
  color: var(--primary);
}

/* ===== Scanner ===== */
.narrow-stack {
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}
.scanner-card { text-align: center; padding: var(--space-5); }
.reader-host:empty { display: none; }
.reader-host:not(:empty) {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  max-width: 360px;
  margin: 0 auto 14px;
  min-height: 220px;
  background: #111;
}
#reader {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  max-width: 360px;
  margin: 0 auto 12px;
}
#reader video {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 220px;
  object-fit: cover;
  border-radius: 16px;
  background: #000;
  /* iOS Safari siyah ekran / tam ekran zorlamasın */
  -webkit-playsinline: true;
}
#reader video::-webkit-media-controls {
  display: none !important;
}
/* Tarama çizgisi yalnızca kamera açıkken */
.reader-host:not(:empty)::after,
#reader:has(video)::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  box-shadow: 0 0 12px var(--accent);
  animation: scanLine 2.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 5;
  border-radius: 2px;
}
@keyframes scanLine {
  0% { top: 12%; }
  50% { top: 85%; }
  100% { top: 12%; }
}
.scan-actions {
  display: grid;
  gap: 10px;
  max-width: 360px;
  margin: 0 auto 12px;
}
.scan-actions .hidden { display: none !important; }
.scan-file-btn {
  cursor: pointer;
  margin: 0;
}
.scan-live {
  display: inline-block;
  color: var(--primary-dark, #6B3418);
  font-weight: 600;
}
.scan-error {
  text-align: center;
  padding: 8px 0 4px;
}
.scan-error-title {
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
}
.scan-error .button { margin-top: 10px; }
.scan-error.cam-denied {
  display: grid;
  gap: 10px;
  justify-items: stretch;
  text-align: left;
  max-width: 420px;
  margin: 0 auto;
  padding: 12px 4px;
}
.scan-error.cam-denied .scan-error-title { text-align: center; }
.scan-error.cam-denied .cam-denied-lead {
  text-align: left;
  margin: 0;
  line-height: 1.5;
}
.cam-denied-steps {
  margin: 0;
  padding: 12px 14px 12px 1.4rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--ink);
}
.cam-denied-steps li { margin-bottom: 8px; }
.cam-denied-steps li:last-child { margin-bottom: 0; }
.cam-bypass-title {
  margin: 4px 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
}
.cam-capture-btn {
  cursor: pointer;
  margin: 0 !important;
  width: 100%;
  box-sizing: border-box;
}
.cam-help-steps ol { margin-bottom: 10px; }
.cam-help-os {
  margin: 8px 0 6px !important;
  font-size: 0.86rem;
  color: var(--primary-dark);
}
.cam-help-note {
  margin: 0 0 10px !important;
  font-size: 0.82rem !important;
  line-height: 1.45;
}
.cam-help-note code {
  font-size: 0.72rem;
  background: var(--accent-soft);
  padding: 1px 5px;
  border-radius: 4px;
  word-break: break-all;
}
.cam-help-card .popup-buttons .button.full { margin-top: 0; }
.geo-error {
  display: block;
  line-height: 1.55;
  color: var(--ink);
}
.geo-error small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}
.geo-help-card {
  max-width: 420px;
  text-align: left;
  max-height: min(90vh, 720px);
  overflow-y: auto;
}
.geo-help-card h3 { text-align: center; }
.geo-help-icon {
  margin: 0 auto 12px;
  color: var(--primary);
}
.geo-help-icon .icon { width: 28px; height: 28px; }
.geo-help-lead {
  font-size: 0.92rem !important;
  text-align: left !important;
  margin-bottom: 14px !important;
}
.geo-help-steps {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px 4px;
  margin-bottom: 12px;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--ink);
}
.geo-help-steps ol {
  margin: 0 0 12px 1.1rem;
  padding: 0;
}
.geo-help-steps li { margin-bottom: 6px; }
.geo-help-os {
  margin: 4px 0 6px !important;
  font-size: 0.82rem;
  color: var(--primary-dark);
}
.geo-help-origin {
  font-size: 0.78rem;
  word-break: break-all;
  margin: 0 0 14px !important;
  text-align: center;
}
.geo-help-origin code {
  font-size: 0.75rem;
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 6px;
}
.geo-hint-overlay .popup-card { text-align: center; }

/* ===== Auth ===== */
.auth-wrap {
  min-height: 55vh;
  display: grid;
  place-items: center;
}
.auth-card {
  width: min(420px, 100%);
}
.auth-card h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }

/* ===== Admin ===== */
.admin-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.admin-heading h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 6px;
}
.admin-sub {
  margin: 0;
  font-size: 0.95rem;
  max-width: 36em;
}
.admin-heading-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: "";
  position: absolute;
  right: -12px;
  top: -12px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-soft);
  opacity: 0.7;
  pointer-events: none;
}
.stat-label {
  display: block;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: var(--primary);
  font-weight: 600;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}
.stat-value.stat-ok { color: var(--success); }
.stat-value.stat-accent { color: #b86b20; }
.admin-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.create-card h2 { margin-bottom: 6px; }
.create-hint { margin: 0 0 16px; font-size: 0.9rem; }
.batch-inline { margin-top: 0; }
.inventory-card { padding: 0; overflow: hidden; }
.section-heading { padding: 20px 24px 0; }
.inventory-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6em;
  padding: 2px 10px;
  margin-left: 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--primary);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  vertical-align: middle;
}
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.admin-search-wrap {
  flex: 1 1 180px;
  min-width: 160px;
}
.admin-search-wrap input {
  padding: 11px 14px;
  border-radius: 12px;
  background: #fff;
}
#status-filter {
  width: auto;
  min-width: 150px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #fff;
}
/* Custom checkboxes + bulk selection */
.plate-check-wrap {
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  user-select: none;
}
.plate-check-wrap input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.check-box {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 2px solid #b9b6cc;
  background: #fff;
  display: grid;
  place-items: center;
  transition: border-color .15s, background .15s, box-shadow .15s;
  flex-shrink: 0;
}
.check-box::after {
  content: "";
  width: 11px;
  height: 6px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) translateY(-1px) scale(0);
  transition: transform .12s ease;
}
.plate-check-wrap input:checked + .check-box {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(43, 33, 97, 0.25);
}
.plate-check-wrap input:checked + .check-box::after {
  transform: rotate(-45deg) translateY(-1px) scale(1);
}
.plate-check-wrap input:focus-visible + .check-box {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.plate-check-wrap:hover .check-box {
  border-color: var(--primary-mid);
}
.check-col {
  width: 48px;
  text-align: center;
}
.table-check { padding: 4px; }

.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px 20px;
  background: linear-gradient(135deg, #fff1f2, #f1f0f7);
  border-bottom: 1px solid rgba(43, 33, 97, 0.12);
  position: sticky;
  top: 0;
  z-index: 5;
}
.bulk-bar[hidden] { display: none !important; }
.bulk-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--primary-dark);
  font-weight: 600;
}
.bulk-info strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--primary);
}
.bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.plate-row.is-selected,
.plate-card.is-selected {
  background: #fff1f2 !important;
  box-shadow: inset 3px 0 0 var(--primary);
}
.plate-row.is-selected td {
  background: transparent;
}
.plate-row {
  cursor: pointer;
}
.plate-card {
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s, background .15s;
}
.plate-card.is-selected {
  border-color: rgba(43, 33, 97, 0.28);
}

.table-wrap { overflow: auto; }
.desktop-table { display: block; }
.plate-cards { display: none; padding: 16px; gap: 12px; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
th, td {
  padding: 14px 16px;
  text-align: left;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  vertical-align: middle;
}
th {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  background: var(--surface-2);
  position: sticky;
  top: 0;
  z-index: 1;
}
tbody tr:hover { background: rgba(255, 255, 255, 0.55); }
.plate-code-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}
.plate-code-link:hover { text-decoration: underline; }
.title-edit {
  border: 1px solid var(--line) !important;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  width: 100%;
  min-width: 120px;
  max-width: 220px;
  font-size: 0.9rem !important;
  background: #fff !important;
}
.status-select {
  padding: 8px 12px !important;
  font-size: 0.85rem !important;
  border-radius: 10px !important;
  background: #fff !important;
  width: auto;
  min-width: 120px;
}
.status-select.status-active { color: var(--success); font-weight: 700; }
.status-select.status-paused { color: #b5121a; font-weight: 700; }
.status-select.status-retired { color: var(--muted); font-weight: 700; }
.stop-fold {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.stop-fold[aria-expanded="true"] .stop-count {
  background: var(--primary);
  color: #fff;
}
tr.plate-stops-row[hidden] { display: none !important; }
tr.plate-stops-row.is-open { display: table-row; }
.admin-fold-body { margin-top: 10px; }
.admin-fold-btn[aria-expanded="true"] {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.status-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.chip-active { background: var(--success-bg); color: var(--success); }
.chip-paused { background: #fff1f2; color: #b5121a; }
.chip-retired { background: #ecebf3; color: var(--muted); }
.stop-count {
  display: inline-flex;
  min-width: 28px;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--bg-deep);
  font-weight: 700;
  color: var(--primary-dark);
}
.muted-cell { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.inventory-empty,
.inventory-empty-cell {
  text-align: center;
  padding: 36px 16px;
  color: var(--muted);
  font-weight: 500;
}
.filter-empty {
  text-align: center;
  padding: 20px;
  margin: 0;
}

/* Mobile plate cards */
.plate-card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.plate-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.plate-card-top .plate-check-wrap {
  padding-top: 2px;
}
.plate-card-id {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.plate-card-id .plate-code-link { font-size: 1rem; }
.plate-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 10px 0 12px;
}
.meta-item {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 10px 12px;
}
.meta-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}
.meta-item strong {
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 700;
}
.meta-time { font-size: 0.82rem !important; font-weight: 600 !important; color: var(--muted) !important; }
.field-tight { margin-bottom: 10px; }
.field-tight label { font-size: 0.8rem; margin-bottom: 6px; }
.field-tight .title-edit,
.field-tight .status-select {
  max-width: none;
  width: 100%;
}
.plate-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.plate-card-actions .button { flex: 1 1 auto; }

/* —— Hediye (durak N) —— */
.gift-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff3d6, #ffe8b0);
  color: #8a5a00;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
}
.timeline-phone {
  display: block;
  margin-top: 4px;
  font-weight: 600;
  color: var(--primary-dark);
  letter-spacing: 0.02em;
}
.timeline-item.gift-won .timeline-dot {
  background: linear-gradient(145deg, #ed1c24, #c47a2a);
  box-shadow: 0 0 0 3px rgba(237, 28, 36, 0.25);
}
.gift-popup-card {
  text-align: center;
  border: 1px solid rgba(237, 28, 36, 0.35);
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, #fff8e8 0%, transparent 55%),
    var(--surface);
}
.gift-popup-icon {
  font-size: 2.75rem;
  line-height: 1;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 12px rgba(237, 28, 36, 0.25));
}
.gift-win-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 8px;
}
.gift-win-desc {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 0.98rem;
}
.gift-count-pill {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.gifts-desk-card { margin-top: 20px; padding: 0 0 20px; overflow: hidden; }
.gift-range-box {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  max-width: 420px;
}
.gift-range-label {
  margin: 0 0 10px;
  font-size: 0.92rem;
  color: var(--ink);
}
.gift-range-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.gift-range-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.gift-range-field input {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  width: 100%;
}
.gifts-random-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}
.gifts-random-actions .button { min-height: 44px; }
@media (max-width: 560px) {
  .gifts-random-actions .button { width: 100%; justify-content: center; }
  .gift-range-box { max-width: none; }
}
.gifts-desk-list {
  display: grid;
  gap: 16px;
  padding: 8px 20px 8px;
}
.gift-desk-plate {
  padding: 0;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.gift-desk-plate > summary {
  cursor: pointer;
  list-style: none;
}
.gift-desk-plate > summary::-webkit-details-marker { display: none; }
.gift-desk-plate[open] { background: #fff; }
.gift-desk-plate-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin: 0;
  padding: 14px 16px;
}
.gift-desk-plate .gift-admin-block { margin: 0 16px 14px; }
.gift-admin-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}
.gift-desk-plate .gift-admin-block {
  margin-top: 8px;
  padding-top: 8px;
  border-top: none;
}
.gift-admin-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}
.gift-admin-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: grid;
  gap: 8px;
}
.gift-admin-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.gift-admin-item strong { display: block; font-size: 0.82rem; color: var(--muted); }
.gift-admin-title { display: block; font-weight: 700; color: var(--ink); margin: 2px 0; }
.gift-admin-status {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 4px;
}
.gift-status-waiting { background: #eef2f6; color: #4a5a6a; }
.gift-status-reserved { background: #fff1f2; color: #b5121a; }
.gift-status-completed { background: var(--success-bg); color: var(--success); }
.gift-admin-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.gift-admin-form .gift-stop-input { grid-column: 1; }
.gift-admin-form .gift-title-input { grid-column: 2; }
.gift-admin-form .gift-desc-input { grid-column: 1 / -1; }
.gift-admin-form button[type="submit"],
.gift-admin-form .gift-random-one {
  grid-column: span 1;
  min-height: 40px;
}
.gift-admin-form input {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.9rem;
}
@media (min-width: 700px) {
  .gift-admin-form {
    grid-template-columns: 80px 1.1fr 1.2fr auto auto;
  }
  .gift-admin-form .gift-stop-input,
  .gift-admin-form .gift-title-input,
  .gift-admin-form .gift-desc-input,
  .gift-admin-form button[type="submit"],
  .gift-admin-form .gift-random-one {
    grid-column: auto;
  }
}

/* Yönetici paneli — QR yalnızca giriş sonrası */
.plate-card-body-with-qr {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.plate-card-fields { flex: 1; min-width: 0; }
.admin-qr-thumb {
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.admin-qr-thumb > *,
.admin-qr-thumb img,
.admin-qr-thumb canvas,
.admin-qr-thumb table {
  width: 78% !important;
  height: 78% !important;
  max-width: 78% !important;
  max-height: 78% !important;
  margin: auto !important;
  display: block;
  object-fit: contain;
  object-position: center;
  justify-self: center;
  align-self: center;
}
.admin-qr-thumb-sm {
  width: 56px;
  height: 56px;
  border-radius: 8px;
}
.admin-qr-cell {
  width: 64px;
  vertical-align: middle;
}

/* ===== Popups ===== */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 50, 0.45);
  display: grid;
  place-items: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
  backdrop-filter: blur(4px);
}
.popup-card {
  background: var(--surface);
  border-radius: 22px;
  padding: 32px 28px;
  text-align: center;
  max-width: 380px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line-strong);
  animation: pageIn 0.3s var(--ease);
}
.popup-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  background: var(--success-bg);
  color: var(--success);
}
.popup-icon svg { width: 32px; height: 32px; }
.popup-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 10px;
}
.popup-card p {
  font-size: 0.95rem;
  margin: 0 0 20px;
  line-height: 1.55;
}
.popup-buttons { display: flex; flex-direction: column; gap: 10px; }
.popup-address {
  font-weight: 700 !important;
  color: var(--ink) !important;
  font-size: 1rem !important;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== Label studio (screen) ===== */
body.label-mode .site-header,
body.label-mode .site-footer,
body.label-mode .scroll-top { display: none !important; }
body.label-mode {
  background: #ecebf3;
  min-height: 100vh;
}
body.label-mode .page-shell {
  max-width: none;
  padding: 0;
  margin: 0;
}

.label-studio {
  display: grid;
  gap: 0;
  min-height: 100vh;
}
.label-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.label-toolbar-left,
.label-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.label-toolbar h1 {
  font-size: 1.15rem;
  margin: 0;
  font-family: var(--font-display);
}
.label-toolbar .muted { margin: 0; font-size: 0.9rem; }
.label-toolbar-opts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.label-text-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.label-text-toggle input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
/* Yazılar kapalı: ekran + baskı */
.label-print-area.hide-label-text .label-brand,
.label-print-area.hide-label-text .label-copy,
body.label-hide-text .label-print-area .label-brand,
body.label-hide-text .label-print-area .label-copy {
  display: none !important;
}
.label-print-area.hide-label-text .label-sheet {
  gap: 0;
}
.label-size-group,
.label-color-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  background: var(--surface-2);
  border-radius: 999px;
  border: 1px solid var(--line);
}
.label-size-group button,
.label-color-group button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.label-size-group button.is-active,
.label-color-group button.is-active {
  background: var(--primary);
  color: #fff;
}
.label-color-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}
/* Beyaz QR (şeffaf zemin) swatch */
.label-color-btn--white .label-color-swatch {
  background:
    linear-gradient(45deg, #ccc 25%, transparent 25%),
    linear-gradient(-45deg, #ccc 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ccc 75%),
    linear-gradient(-45deg, transparent 75%, #ccc 75%);
  background-size: 6px 6px;
  background-position: 0 0, 0 3px, 3px -3px, -3px 0;
  border-color: #999;
  box-shadow: inset 0 0 0 3px transparent, inset 2px 2px 0 2px #fff, inset -2px -2px 0 2px #fff;
}
/* Klasik: siyah QR / beyaz zemin */
.label-color-btn--classic .label-color-swatch,
.label-color-btn--fullwhite .label-color-swatch {
  background: #fff;
  border-color: #888;
  box-shadow: inset 0 0 0 1px #ddd, inset 3px 3px 0 0 #111;
}
.label-preview-wrap {
  display: grid;
  place-items: center;
  padding: 28px 16px 48px;
  gap: 20px;
}
.label-hint {
  max-width: 36rem;
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0;
}

/* Printable sheet */
.label-sheet {
  --label-w: 70mm;
  --label-h: 70mm;
  --qr-size: 42mm;
  --code-size: 4.2mm;
  width: var(--label-w);
  height: var(--label-h);
  background: #fff;
  color: #000;
  border: 1px dashed #bbb;
  border-radius: 0;
  padding: 3.5mm;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2mm;
  box-sizing: border-box;
  page-break-inside: avoid;
  break-inside: avoid;
}
/*
 * Beyaz QR: etiket zemini kırmızı DEĞİL.
 * Ekranda şeffaflık için dama tahtası önizleme; baskıda şeffaf.
 * QR PNG: beyaz kareler + şeffaf arka plan.
 */
.label-sheet[data-color="white"] {
  background-color: transparent;
  background-image:
    linear-gradient(45deg, #ecebf3 25%, transparent 25%),
    linear-gradient(-45deg, #ecebf3 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #ecebf3 75%),
    linear-gradient(-45deg, transparent 75%, #ecebf3 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0;
  color: #2b2161;
  border: 1px dashed #bbb;
}
.label-sheet[data-color="white"] .label-brand,
.label-sheet[data-color="white"] .label-code,
.label-sheet[data-color="white"] .label-tagline {
  color: #2b2161;
}
.label-sheet[data-color="white"] .label-qr {
  background: transparent;
}
/* Klasik: siyah QR / beyaz opak etiket */
.label-sheet[data-color="classic"],
.label-sheet[data-color="fullwhite"] {
  background: #fff;
  color: #000;
  border: 1px dashed #bbb;
}
.label-sheet[data-color="classic"] .label-brand,
.label-sheet[data-color="classic"] .label-code,
.label-sheet[data-color="classic"] .label-tagline,
.label-sheet[data-color="fullwhite"] .label-brand,
.label-sheet[data-color="fullwhite"] .label-code,
.label-sheet[data-color="fullwhite"] .label-tagline {
  color: #000;
}
.label-sheet[data-color="classic"] .label-qr,
.label-sheet[data-color="fullwhite"] .label-qr {
  background: #fff;
}
.label-sheet[data-size="50"] {
  --label-w: 50mm;
  --label-h: 50mm;
  --qr-size: 30mm;
  --code-size: 3.2mm;
  padding: 2.5mm;
  gap: 1.4mm;
}
.label-sheet[data-size="70"] {
  --label-w: 70mm;
  --label-h: 70mm;
  --qr-size: 42mm;
  --code-size: 4.2mm;
}
.label-sheet[data-size="90"] {
  --label-w: 90mm;
  --label-h: 55mm;
  --qr-size: 36mm;
  --code-size: 4mm;
  flex-direction: row;
  text-align: left;
  gap: 4mm;
  padding: 4mm;
}
.label-sheet[data-size="90"] .label-copy {
  align-items: flex-start;
  text-align: left;
}
.label-sheet[data-size="a6"] {
  --label-w: 105mm;
  --label-h: 148mm;
  --qr-size: 62mm;
  --code-size: 6mm;
  padding: 8mm;
  gap: 4mm;
  border-style: solid;
  border-color: #111;
  border-width: 0.4mm;
}
.label-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5mm;
  font-family: var(--font-display);
  font-size: calc(var(--code-size) * 0.95);
  font-weight: 700;
  color: #111;
  letter-spacing: 0.02em;
  line-height: 1;
  margin: 0;
}
.label-brand img {
  width: calc(var(--code-size) * 1.35);
  height: calc(var(--code-size) * 1.35);
  border-radius: 20%;
  box-shadow: none;
}
.label-qr {
  width: var(--qr-size);
  height: var(--qr-size);
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: #fff;
}
.label-qr img,
.label-qr canvas,
.label-qr table {
  width: var(--qr-size) !important;
  height: var(--qr-size) !important;
  max-width: 100%;
  image-rendering: pixelated;
  background: #fff;
}
.label-qr table { border-collapse: collapse; }
.label-qr table td { border: 0 !important; padding: 0 !important; }
.label-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1mm;
  min-width: 0;
}
.label-code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: var(--code-size);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #000;
  margin: 0;
  line-height: 1.1;
  word-break: break-all;
}
.label-tagline {
  margin: 0;
  font-size: calc(var(--code-size) * 0.55);
  font-weight: 600;
  color: #222;
  line-height: 1.25;
  max-width: 100%;
}
.label-url {
  margin: 0;
  font-size: calc(var(--code-size) * 0.48);
  color: #444;
  word-break: break-all;
  line-height: 1.2;
  max-width: 100%;
}

/* Multi-label sheet on screen */
.label-print-area {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 100%;
  max-width: 220mm;
}
.label-print-area.layout-a4 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--label-w, 70mm), 1fr));
  justify-items: center;
  gap: 8mm 6mm;
  max-width: 210mm;
  padding: 10mm;
  background: #fff;
  border: 1px solid #ddd;
  box-shadow: var(--shadow);
}

/* ===== Print ===== */
@page {
  margin: 8mm;
}
@media print {
  @page {
    margin: 6mm;
    size: auto;
  }
  html, body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color: #000 !important;
  }
  .no-print,
  .site-header,
  .site-footer,
  .scroll-top,
  .label-toolbar,
  .label-hint { display: none !important; }

  /* Üst/alt yazı kapalıysa basımda da yok */
  body.label-hide-text .label-brand,
  body.label-hide-text .label-copy,
  .label-print-area.hide-label-text .label-brand,
  .label-print-area.hide-label-text .label-copy {
    display: none !important;
  }

  body.label-mode .page-shell,
  #app.page-shell,
  .page-shell,
  .label-studio,
  .label-preview-wrap {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  .label-print-area {
    display: block !important;
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    gap: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  .label-print-area.layout-a4 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    gap: 6mm;
    justify-items: center;
  }
  .label-print-area.layout-a4[data-size="50"] {
    grid-template-columns: repeat(3, 1fr);
  }
  .label-print-area.layout-a4[data-size="90"] {
    grid-template-columns: repeat(2, 1fr);
  }
  .label-print-area.layout-a4[data-size="a6"] {
    grid-template-columns: 1fr;
  }

  .label-sheet {
    box-shadow: none !important;
    border: 0.3mm solid #000 !important;
    border-style: solid !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #000 !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  /* Beyaz QR: kırmızı zemin senin kâğıdın — etiket zemini basılmaz */
  .label-sheet[data-color="white"] {
    background: transparent !important;
    background-image: none !important;
    color: #000 !important;
    border: none !important;
    box-shadow: none !important;
  }
  .label-sheet[data-color="white"] .label-brand,
  .label-sheet[data-color="white"] .label-code,
  .label-sheet[data-color="white"] .label-tagline {
    /* İstersen kırmızı kâğıtta okunaklı olsun diye beyaz yazı; şimdilik siyah tutuyoruz
       (kâğıt rengi sende). Yazıyı da beyaz istersen söyle. */
    color: #000 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .label-sheet[data-color="white"] .label-qr {
    background: transparent !important;
  }
  .label-sheet[data-color="white"] .label-qr img {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .label-sheet[data-color="classic"],
  .label-sheet[data-color="fullwhite"] {
    background: #fff !important;
    color: #000 !important;
    border: 0.3mm solid #000 !important;
  }
  .label-sheet[data-color="classic"] .label-brand,
  .label-sheet[data-color="classic"] .label-code,
  .label-sheet[data-color="classic"] .label-tagline,
  .label-sheet[data-color="fullwhite"] .label-brand,
  .label-sheet[data-color="fullwhite"] .label-code,
  .label-sheet[data-color="fullwhite"] .label-tagline {
    color: #000 !important;
  }
  .label-sheet[data-color="classic"] .label-qr,
  .label-sheet[data-color="fullwhite"] .label-qr {
    background: #fff !important;
  }
  /* Tek etiket: sayfa başına bir tane, ortalanmış */
  .label-print-area:not(.layout-a4) .label-sheet {
    margin: 0 auto;
    page-break-after: always;
    break-after: page;
  }
  .label-print-area:not(.layout-a4) .label-sheet:last-child {
    page-break-after: auto;
    break-after: auto;
  }
  /* A4 ızgara: sayfa dolunca doğal kır */
  .label-print-area.layout-a4 .label-sheet {
    page-break-inside: avoid;
    break-inside: avoid;
    margin: 0;
  }

  .label-brand,
  .label-code,
  .label-tagline,
  .label-url { color: #000 !important; }
  .label-qr img,
  .label-qr canvas {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* ===== Skeleton ===== */
@keyframes shimmer {
  0% { background-position: -200px 0; }
  100% { background-position: 200px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #ecebf3 25%, #f4f3f8 50%, #ecebf3 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
.skeleton-text { height: 14px; margin-bottom: 10px; }
.skeleton-title { height: 28px; width: 55%; margin-bottom: 14px; }
.skeleton-card { height: 180px; border-radius: var(--radius); }

/* ===== Scroll top ===== */
.scroll-top {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom));
  right: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: 0;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(43, 33, 97, 0.3);
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.3s var(--ease);
  z-index: 90;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.scroll-top.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.scroll-top:hover { background: var(--primary-dark); transform: translateY(-2px); }

/* ===== Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

/* ===== Shake ===== */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}
.shake { animation: shake 0.4s ease; }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; min-height: auto; }
  .hero-map { width: min(260px, 70vw); }
  .feature-grid,
  .steps-row { grid-template-columns: 1fr; }
  .steps-row .step-item:not(:last-child)::after { display: none; }

  /* —— Yönetici paneli (tablet / mobil) —— */
  .admin-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 16px;
  }
  .admin-heading-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .admin-heading-actions .button {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
  .admin-sub { max-width: none; font-size: 0.9rem; }

  .admin-actions-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
  }
  .stat-card { padding: 14px 16px; }
  .stat-value { font-size: clamp(1.5rem, 6vw, 2rem); }

  /* Tablo yerine kart listesi */
  .desktop-table { display: none !important; }
  .plate-cards {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 14px 100px; /* bulk bar için alt boşluk */
  }

  .inventory-card {
    border-radius: 18px;
    overflow: visible; /* sticky bulk kesilmesin */
  }
  .section-heading,
  .inventory-head { padding: 16px 16px 0; }
  .inventory-head h2 { font-size: 1.25rem; }

  .admin-toolbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 14px;
  }
  .admin-search-wrap {
    flex: none;
    min-width: 0;
    width: 100%;
  }
  .admin-search-wrap input,
  #status-filter {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    font-size: 16px; /* iOS zoom engeli */
  }
  .admin-toolbar .button {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  /* Seçim çubuğu — mobilde alta yapışır */
  .bulk-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 40;
    margin: 0;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(43, 33, 97, 0.15);
    border-bottom: none;
    box-shadow: 0 -8px 28px rgba(43, 33, 97, 0.12);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .bulk-info { justify-content: center; }
  .bulk-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .bulk-actions .button {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    font-size: 0.8rem;
    padding: 10px 8px;
  }
  .bulk-actions .button.primary,
  .bulk-actions .button.danger {
    grid-column: span 1;
  }

  /* Kart düzeni */
  .plate-card {
    padding: 14px;
    border-radius: 16px;
    max-width: 100%;
  }
  .plate-card-body-with-qr {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .admin-qr-thumb {
    width: 88px;
    height: 88px;
    align-self: center;
  }
  .plate-card-fields .field-tight .title-edit,
  .plate-card-fields .field-tight .status-select,
  .plate-card .title-edit,
  .plate-card .status-select {
    width: 100% !important;
    max-width: none !important;
    min-height: 44px;
    font-size: 16px !important;
  }
  .plate-card-meta {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .plate-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .plate-card-actions .button {
    flex: none;
    width: 100%;
    min-height: 44px;
    justify-content: center;
    font-size: 0.85rem;
  }
  .plate-card-actions .button.danger {
    grid-column: 1 / -1;
  }
  .plate-code-link {
    word-break: break-all;
    font-size: 0.95rem;
  }

  .create-card { padding: 18px 16px; }
  .create-card .button.full { min-height: 48px; }
  .batch-inline {
    display: grid !important;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  .batch-inline input {
    min-height: 46px;
    font-size: 16px;
  }
  .batch-inline .button { min-height: 46px; }

  /* Etiket stüdyosu — QR önizleme mobilde görünsün (içerik değişmez) */
  body.label-mode .page-shell {
    overflow: visible !important;
    overflow-x: auto !important;
    max-width: none;
    padding: 0;
  }
  .label-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 12px 12px;
    gap: 12px;
  }
  .label-toolbar-left,
  .label-toolbar-right,
  .label-toolbar-opts {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .label-toolbar-right {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .label-toolbar-right .button {
    width: 100%;
    min-height: 46px;
    justify-content: center;
  }
  .label-size-group,
  .label-color-group,
  .label-payload-group {
    width: 100%;
    border-radius: 14px;
    justify-content: stretch;
  }
  .label-size-group button,
  .label-color-group button,
  .label-payload-group button {
    flex: 1 1 auto;
    min-height: 40px;
    font-size: 0.78rem;
  }
  .label-text-toggle {
    width: 100%;
    justify-content: flex-start;
    min-height: 44px;
    border-radius: 12px;
    white-space: normal;
  }
  .label-preview-wrap {
    padding: 16px 12px 32px;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    place-items: center;
    justify-items: center;
  }
  .label-hint {
    font-size: 0.82rem;
    word-break: break-word;
    max-width: 100%;
    padding: 0 4px;
  }
  .label-print-area {
    padding: 8px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
  }
  .label-print-area.layout-a4 {
    grid-template-columns: 1fr !important;
    max-width: 100%;
    padding: 12px;
    gap: 16px;
  }
  /* Ekranda etiket sığsın; mm ölçü baskıyı bozmasın diye sadece screen */
  .label-sheet {
    max-width: calc(100vw - 32px);
    height: auto !important;
    min-height: min(var(--label-h), calc(100vw - 32px));
    aspect-ratio: 1 / 1;
  }
  .label-sheet[data-size="90"] {
    aspect-ratio: 90 / 55;
    flex-direction: column;
    text-align: center;
  }
  .label-sheet[data-size="90"] .label-copy {
    align-items: center;
    text-align: center;
  }
  .label-sheet[data-size="a6"] {
    aspect-ratio: 105 / 148;
  }
  .label-qr {
    width: min(var(--qr-size), 52vw) !important;
    height: min(var(--qr-size), 52vw) !important;
    min-width: 140px;
    min-height: 140px;
    flex: 0 0 auto;
    background: #fff !important;
    border: 1px solid #eee;
  }
  .label-qr img,
  .label-qr canvas,
  .label-qr table {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    object-fit: contain;
    background: #fff;
  }
  /* Paneldeki küçük QR önizlemeleri */
  .admin-qr-thumb {
    background: #fff !important;
    min-width: 72px;
    min-height: 72px;
  }
  .admin-qr-thumb > *,
  .admin-qr-thumb img,
  .admin-qr-thumb canvas,
  .admin-qr-thumb table {
    display: block !important;
    width: 78% !important;
    height: 78% !important;
    max-width: 78% !important;
    max-height: 78% !important;
    margin: auto !important;
    object-fit: contain;
    object-position: center;
  }

  .auth-wrap { padding: 12px 0; }
  .auth-card { width: 100%; max-width: none; }
}

@media (max-width: 560px) {
  .page-shell {
    padding: 8px 12px calc(72px + env(safe-area-inset-bottom));
    overflow-x: hidden;
  }
  .card { padding: 16px; border-radius: 16px; }
  .site-header { padding: 10px 12px; gap: 8px; }
  .nav-cta { padding: 9px 12px; font-size: 0.82rem; }
  .brand-text small { display: none; }
  .button-row .button { min-width: 100%; }
  .inline-form { grid-template-columns: 1fr; }
  .location-actions { flex-direction: column; align-items: stretch; }
  .location-actions .button { width: 100%; justify-content: center; }
  #route-map { height: 300px; }
  .timeline-item { grid-template-columns: 32px 1fr; }
  .timeline-item .text-button { grid-column: 2; justify-self: start; }
  .stepper-step { font-size: 0.72rem; padding: 8px 4px 12px; }
  .stepper-step .step-index { width: 18px; height: 18px; margin-right: 3px; font-size: 0.68rem; }

  .stats-grid { gap: 8px; }
  .stat-card { padding: 12px; }
  .stat-label { font-size: 0.72rem; margin-bottom: 4px; }
  .admin-heading h1 { font-size: clamp(1.45rem, 7vw, 1.85rem); }
  .plate-cards { padding: 12px 12px 110px; gap: 10px; }
  .admin-qr-thumb { width: 76px; height: 76px; }
  .meta-item { padding: 8px 10px; }
  .meta-item strong { font-size: 0.88rem; }

  .site-footer {
    padding: 16px 12px calc(20px + env(safe-area-inset-bottom));
    font-size: 0.82rem;
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Çok dar ekran: istatistikler 2×2, butonlar daha sıkı */
@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .bulk-actions { grid-template-columns: 1fr; }
  .plate-card-actions { grid-template-columns: 1fr; }
  .plate-card-actions .button.danger { grid-column: auto; }
  .admin-heading-actions { grid-template-columns: 1fr; }
}

/* 2026-11-06: yönetici QR önizlemeleri karenin tam ortasında */
.admin-qr-thumb { display: grid !important; place-items: center !important; place-content: center; padding: 0 !important; box-sizing: border-box; }
.admin-qr-cell .admin-qr-thumb { margin: 0 auto; }

/* ===== Al / Ver kayıt akışı ===== */
.gt-alver-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.gt-alver-btn {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 16px 18px !important;
  min-height: 88px;
  height: auto !important;
  line-height: 1.25;
  white-space: normal;
}
.gt-alver-btn strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.gt-alver-btn small {
  font-weight: 500;
  font-size: 0.86rem;
  opacity: 0.9;
  line-height: 1.35;
}
.button.primary.gt-alver-btn small { color: rgba(255,255,255,0.9); }
.button.secondary.gt-alver-btn small { color: var(--muted); }
.gt-alver-hint { margin: 0 0 14px; }
.gt-alver-back-wrap { margin: 14px 0 0; text-align: center; }
.gt-alver-code { font-weight: 700; color: var(--ink); margin: 0 0 8px; }
.gt-alver-popup .popup-buttons { margin-top: 8px; }

.gt-hold-banner {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: #eef3ff;
  border: 1px solid rgba(43, 33, 97, 0.14);
  color: var(--ink);
}
.gt-hold-banner strong { display: block; font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 4px; }
.gt-hold-banner p { margin: 0; color: var(--ink); }
.gt-hold-banner.is-overdue {
  background: var(--danger-bg);
  border-color: rgba(237, 28, 36, 0.28);
}
.gt-hold-banner.is-overdue strong { color: var(--primary); }

.stat-card-alert { box-shadow: 0 0 0 2px rgba(237, 28, 36, 0.25); }
.stat-danger { color: var(--primary) !important; }
.gt-overdue-panel { margin-top: 18px; }
.gt-overdue-panel.is-clear { padding: 16px 18px; }
.gt-overdue-lead { margin: 0 0 14px; }
.gt-overdue-pill { background: var(--primary); color: #fff; }
.gt-overdue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.gt-overdue-item {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--danger-bg);
  border-left: 4px solid var(--primary);
}
.gt-overdue-item p { margin: 0 0 6px; }
.gt-overdue-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.gt-overdue-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
}
.gt-overdue-clear { margin: 0; color: var(--success); font-weight: 600; }
