/* ==========================================================
   Tasarım token'ları
   Sıcak nötrler + mandalina vurgu. Birincil butonlar turuncu
   zemin üstüne koyu mürekkep yazı (kontrast için).
   ========================================================== */
:root {
  --font-ui: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-display: "Bricolage Grotesque", "Onest", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;

  --bg: oklch(0.975 0.006 70);
  --surface: oklch(0.995 0.003 70);
  --surface-2: oklch(0.955 0.009 70);
  --surface-3: oklch(0.93 0.011 70);
  --border: oklch(0.905 0.01 70);
  --border-strong: oklch(0.83 0.013 65);
  --text: oklch(0.23 0.018 45);
  --muted: oklch(0.5 0.016 55);
  --faint: oklch(0.64 0.012 60);

  --brand: oklch(0.74 0.17 52);          /* mandalina */
  --brand-hover: oklch(0.7 0.18 48);
  --brand-press: oklch(0.66 0.18 45);
  --on-brand: oklch(0.2 0.03 40);
  --brand-ink: oklch(0.52 0.16 42);      /* metin olarak turuncu */
  --brand-soft: oklch(0.955 0.035 65);
  --brand-line: oklch(0.87 0.08 60);

  --ok: oklch(0.52 0.12 155);
  --ok-soft: oklch(0.95 0.035 155);
  --warn: oklch(0.55 0.11 75);
  --warn-soft: oklch(0.96 0.045 85);
  --bad: oklch(0.55 0.19 27);
  --bad-soft: oklch(0.955 0.03 27);

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --shadow-sm: 0 1px 2px oklch(0.3 0.03 50 / .06);
  --shadow: 0 1px 2px oklch(0.3 0.03 50 / .05), 0 8px 24px -8px oklch(0.3 0.03 50 / .12);
  --shadow-lg: 0 24px 60px -20px oklch(0.25 0.05 45 / .35);
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: oklch(0.17 0.01 50);
    --surface: oklch(0.205 0.012 50);
    --surface-2: oklch(0.24 0.013 50);
    --surface-3: oklch(0.28 0.014 50);
    --border: oklch(0.3 0.013 50);
    --border-strong: oklch(0.38 0.015 50);
    --text: oklch(0.94 0.008 70);
    --muted: oklch(0.72 0.012 60);
    --faint: oklch(0.58 0.012 60);
    --brand: oklch(0.76 0.16 55);
    --brand-hover: oklch(0.8 0.15 60);
    --brand-press: oklch(0.72 0.16 52);
    --brand-ink: oklch(0.8 0.14 60);
    --brand-soft: oklch(0.29 0.05 50);
    --brand-line: oklch(0.42 0.08 50);
    --ok: oklch(0.76 0.13 155);
    --ok-soft: oklch(0.28 0.05 155);
    --warn: oklch(0.8 0.12 80);
    --warn-soft: oklch(0.3 0.05 80);
    --bad: oklch(0.72 0.16 27);
    --bad-soft: oklch(0.3 0.06 27);
    --shadow-sm: none;
    --shadow: 0 0 0 1px oklch(1 0 0 / .02);
    --shadow-lg: 0 24px 60px -20px oklch(0 0 0 / .6);
    color-scheme: dark;
  }
}

/* ==========================================================
   Temel
   ========================================================== */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 650; letter-spacing: -.015em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
code { font-family: var(--font-mono); font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--font-mono); }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ==========================================================
   Üst bar
   ========================================================== */
.topbar {
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.topbar .container { display: flex; align-items: center; gap: 12px; height: 64px; }
.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em;
  color: var(--text);
}
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  background: var(--brand); color: var(--on-brand);
  display: grid; place-items: center;
}
.logo-mark { --dot: var(--brand); }
.logo-mark svg { width: 18px; height: 18px; }
.logo small { font-family: var(--font-ui); font-weight: 500; font-size: .8rem; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.nav { display: flex; gap: 6px; align-items: center; }

.balance {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 14px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums;
}
.balance:hover { text-decoration: none; border-color: var(--border-strong); }
.balance .plus {
  width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: var(--on-brand);
  display: grid; place-items: center; font-size: 1.05rem; line-height: 1; font-weight: 600;
}

/* ==========================================================
   Butonlar ve form
   ========================================================== */
.btn {
  appearance: none; border: 1px solid var(--border); background: var(--surface); color: var(--text);
  height: 38px; padding: 0 16px; border-radius: var(--r-sm); font: inherit; font-weight: 550; font-size: .92rem;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease);
}
.btn:hover { background: var(--surface-2); border-color: var(--border-strong); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); border-color: transparent; color: var(--on-brand); font-weight: 650; }
.btn-primary:hover { background: var(--brand-hover); border-color: transparent; }
.btn-primary:active { background: var(--brand-press); }
.btn-dark { background: var(--text); border-color: transparent; color: var(--bg); }
.btn-dark:hover { background: color-mix(in oklch, var(--text) 85%, var(--bg)); border-color: transparent; }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: var(--bad-soft); border-color: color-mix(in oklch, var(--bad) 30%, var(--border)); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 11px; font-size: .84rem; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 1rem; border-radius: var(--r); }
.btn-block { width: 100%; }
.btn.loading { color: transparent; position: relative; pointer-events: none; }
.btn.loading::after {
  content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--on-brand); border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

label { display: block; font-weight: 550; margin-bottom: 6px; font-size: .88rem; }
.field { margin-bottom: 16px; }
.hint { font-size: .8rem; color: var(--muted); margin-top: 6px; line-height: 1.45; }
input, select, textarea {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: .95rem;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
textarea { height: auto; padding: 10px 12px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: var(--faint); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in oklch, var(--brand) 25%, transparent);
}
input:disabled { background: var(--surface-2); cursor: not-allowed; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
input[type="search"] { padding-left: 36px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23948b80' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E") no-repeat 12px center; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; }

/* Anahtar (toggle) görünümlü checkbox */
.switch { appearance: none; padding: 0 !important; width: 36px !important; height: 20px !important; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border-strong); position: relative; cursor: pointer; transition: background-color .15s var(--ease); flex-shrink: 0; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease); }
.switch:checked { background: var(--brand); border-color: transparent; }
.switch:checked::after { transform: translateX(16px); }

/* ==========================================================
   Paneller
   ========================================================== */
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.panel-pad { padding: 24px; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.panel-head h2 { font-size: 1.05rem; }
.panel-body { padding: 24px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.15rem; }

/* ==========================================================
   Sekmeler (kullanıcı paneli)
   ========================================================== */
.tabs {
  display: inline-flex; gap: 2px; padding: 4px; margin-bottom: 28px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r);
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  height: 34px; padding: 0 16px; border: 0; border-radius: 7px; background: none; color: var(--muted);
  font: inherit; font-weight: 550; font-size: .9rem; cursor: pointer; white-space: nowrap;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }

/* ==========================================================
   Servis / ülke seçici
   ========================================================== */
.picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.list {
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
  height: 600px;
}
.list .list-body { flex: 1; min-height: 0; height: auto; }
.list { scroll-margin-top: 76px; }

/* Teklifler / Kendi fiyatım */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); height: 40px; }
.seg button { border: 0; border-radius: 4px; background: none; font: inherit; font-size: .88rem; font-weight: 550; color: var(--muted); cursor: pointer; transition: background-color .15s var(--ease), color .15s var(--ease); }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }

.offers { display: flex; flex-direction: column; gap: 6px; padding: 4px; }
.offer {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; margin: 0;
  border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; font-weight: 500;
  transition: border-color .12s var(--ease), background-color .12s var(--ease);
}
.offer:hover { border-color: var(--border-strong); background: var(--surface-2); }
.offer input { position: absolute; opacity: 0; pointer-events: none; }
.offer .radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border-strong); flex-shrink: 0; transition: border-width .15s var(--ease), border-color .15s var(--ease); }
.offer.checked { border-color: var(--brand); background: var(--brand-soft); }
.offer.checked .radio { border: 6px solid var(--brand); }
.offer:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.offer-price { font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.offer-count { margin-left: auto; color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.offers-hint { color: var(--muted); font-size: .8rem; padding: 8px 8px 4px; margin: 0; }

.custom-price { padding: 14px 10px; }
.money-input { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); height: 52px; padding-left: 14px; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.money-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in oklch, var(--brand) 25%, transparent); }
.money-input span { font-size: 1.3rem; font-weight: 700; color: var(--muted); }
.money-input input { border: 0; box-shadow: none !important; height: 100%; font-size: 1.3rem; font-weight: 700; padding-left: 6px; background: transparent; }
.custom-err { color: var(--bad); }
.money-input input::-webkit-outer-spin-button, .money-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.money-input input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.buy-bar { padding: 12px; border-top: 1px solid var(--border); background: var(--surface); }
.list-head { padding: 14px 14px 12px; border-bottom: 1px solid var(--border); }
.list-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-weight: 650; font-size: .95rem; }
.list-title .step {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--text); color: var(--bg); font-size: .75rem; font-weight: 700;
}
.list-title .step.off { background: var(--surface-3); color: var(--muted); }
.list-title .sel { color: var(--muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-body { height: 480px; overflow-y: auto; overscroll-behavior: contain; padding: 6px; }
.item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 8px 10px;
  border: 0; border-radius: var(--r); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: background-color .12s var(--ease);
}
.item:hover { background: var(--surface-2); }
.item.selected { background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-line); }
.item .name { flex: 1; min-width: 0; font-weight: 550; line-height: 1.3; }
.item .name .meta { display: block; color: var(--muted); font-size: .8rem; font-weight: 400; margin-top: 2px; }
.item .price { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item .price small { font-weight: 450; color: var(--muted); font-size: .78rem; margin-right: 2px; }
.item.country { cursor: default; }
.item.country:hover { background: var(--surface-2); }
.avatar {
  --h: 40;
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: oklch(0.93 0.05 var(--h)); color: oklch(0.42 0.12 var(--h));
  display: grid; place-items: center; font-size: .8rem; font-weight: 700; letter-spacing: -.02em;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .avatar { background: oklch(0.32 0.06 var(--h)); color: oklch(0.88 0.08 var(--h)); }
}
.stock { display: inline-flex; align-items: center; gap: 5px; }
.stock::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.stock.low::before { background: var(--warn); }

.buy-btn { min-width: 92px; }
.buy-btn.confirm { background: var(--text); color: var(--bg); }

.empty { padding: 48px 20px; text-align: center; color: var(--muted); font-size: .92rem; }
.empty strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; }

.skeleton { padding: 6px; }
.skeleton div {
  height: 46px; border-radius: var(--r); margin-bottom: 6px;
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 50%, var(--surface-2) 100%);
  background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ==========================================================
   Aktif numara kartları
   ========================================================== */
.orders-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-bottom: 36px; }
.order {
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface);
  box-shadow: var(--shadow); overflow: hidden; position: relative;
  animation: rise .35s var(--ease);
}
.order.got { border-color: color-mix(in oklch, var(--ok) 45%, var(--border)); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.order-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; }
.order-head .avatar { width: 30px; height: 30px; font-size: .72rem; border-radius: 8px; }
.order-head .what { flex: 1; min-width: 0; font-size: .85rem; line-height: 1.3; }
.order-head .what b { display: block; font-weight: 600; font-size: .92rem; }
.order-head .what span { color: var(--muted); }
.timer { font-variant-numeric: tabular-nums; font-weight: 600; font-size: .85rem; color: var(--muted); }
.timer.low { color: var(--bad); }
.phone-row { display: flex; align-items: center; gap: 8px; padding: 12px 16px 4px; }
.phone {
  flex: 1; font-size: 1.45rem; font-weight: 700; letter-spacing: .01em; font-variant-numeric: tabular-nums;
  background: none; border: 0; padding: 0; color: var(--text); font-family: inherit; text-align: left; cursor: pointer;
}
.icon-btn {
  width: 32px; height: 32px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface);
  color: var(--muted); display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn svg { width: 16px; height: 16px; }
.code-box {
  margin: 10px 16px 14px; padding: 16px; border-radius: var(--r); text-align: center;
  background: var(--surface-2); min-height: 86px; display: flex; flex-direction: column; justify-content: center; gap: 2px;
}
.code-box .label { font-size: .78rem; color: var(--muted); font-weight: 500; }
.code-box .code {
  font-family: var(--font-mono); font-size: 2rem; font-weight: 700; letter-spacing: .18em; color: var(--ok);
  background: none; border: 0; cursor: pointer; padding: 0; line-height: 1.2;
}
.code-box.got { background: var(--ok-soft); animation: pop .4s var(--ease); }
@keyframes pop { from { transform: scale(.97); } }
.code-box .prev { font-size: .78rem; color: var(--muted); }
.waiting-line { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 500; font-size: .92rem; justify-content: center; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); position: relative; }
.pulse::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--brand); animation: ping 1.5s var(--ease) infinite; }
@keyframes ping { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
.order-foot { display: flex; align-items: center; gap: 8px; padding: 0 16px 16px; }
.order-foot .cost { margin-left: auto; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--surface-2); }
.progress i { display: block; height: 100%; background: var(--brand); transform-origin: left; transition: transform 1s linear; }

/* ==========================================================
   Tablolar, rozetler, istatistik
   ========================================================== */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
th { font-weight: 550; color: var(--muted); font-size: .78rem; background: var(--surface-2); position: sticky; top: 0; }
tbody tr { transition: background-color .12s var(--ease); }
tbody tr:hover { background: color-mix(in oklch, var(--surface-2) 55%, transparent); }
tr:last-child td { border-bottom: 0; }
td.wrap { white-space: normal; word-break: break-all; max-width: 260px; }
td input:not([type="checkbox"]) { height: 32px; padding: 0 9px; font-size: .88rem; }
td .empty { padding: 36px 16px; }
.amount-pos { color: var(--ok); font-weight: 600; }
.amount-neg { color: var(--text); }

.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: .74rem; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); }
.badge.plain::before { display: none; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface);
  overflow: hidden; margin-bottom: 24px; box-shadow: var(--shadow-sm);
}
.stat { padding: 18px 20px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat:nth-child(4n) { border-right: 0; }
.stat:nth-last-child(-n+4) { border-bottom: 0; }
.stat .label { color: var(--muted); font-size: .8rem; font-weight: 500; }
.stat .value { font-size: 1.45rem; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat .value small { font-size: .8rem; font-weight: 500; color: var(--ok); margin-left: 4px; }

.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r);
  background: var(--warn-soft); color: color-mix(in oklch, var(--warn) 70%, var(--text)); margin-bottom: 20px; font-size: .9rem;
  border: 1px solid color-mix(in oklch, var(--warn) 25%, transparent);
}
.notice.info { background: var(--brand-soft); color: var(--text); border-color: var(--brand-line); }
.notice a { color: inherit; font-weight: 600; text-decoration: underline; }

/* ==========================================================
   Admin düzeni: yan menü
   ========================================================== */
.admin-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; padding-top: 28px; padding-bottom: 48px; }
.sidenav { position: sticky; top: 92px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.sidenav .group { font-size: .72rem; font-weight: 600; color: var(--faint); padding: 16px 12px 6px; }
.sidenav .group:first-child { padding-top: 0; }
.sidenav .tab {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border-radius: var(--r-sm);
  text-align: left; width: 100%;
}
.sidenav .tab svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .8; }
.sidenav .tab:hover { background: var(--surface-2); }
.sidenav .tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
.sidenav .count { margin-left: auto; background: var(--brand); color: var(--on-brand); font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.view-title { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.view-title h1 { font-size: 1.5rem; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input, .toolbar select { max-width: 260px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.result-line { margin-top: 14px; font-size: .88rem; color: var(--muted); min-height: 1.4em; }
.result-line.ok { color: var(--ok); }
.result-line.bad { color: var(--bad); }
.wallet { display: grid; grid-template-columns: 90px 100px 1fr auto; gap: 8px; margin-bottom: 8px; }

/* ==========================================================
   Giriş / kayıt
   ========================================================== */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.auth-side {
  background: var(--brand); color: var(--on-brand); padding: 40px 48px; display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.auth-side .logo { color: var(--on-brand); }
.auth-side .logo-mark { background: var(--on-brand); color: var(--brand); --dot: var(--on-brand); }
.auth-side h2 { font-family: var(--font-display); font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.02; margin-top: auto; max-width: 13ch; }
.auth-side ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; font-weight: 500; }
.auth-side li { display: flex; gap: 10px; align-items: center; }
.auth-side li::before { content: ''; width: 18px; height: 18px; border-radius: 50%; background: var(--on-brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23f0a060' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 8.5 2.5 2.5L12 5.5'/%3E%3C/svg%3E") center/12px no-repeat; flex-shrink: 0; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-form { width: 100%; max-width: 380px; }
.auth-form h1 { font-family: var(--font-display); font-size: 2rem; letter-spacing: -.03em; margin-bottom: 8px; }
.auth-form .sub { color: var(--muted); margin-bottom: 28px; }
.auth-form .mobile-logo { display: none; margin-bottom: 32px; }

/* ==========================================================
   Ana sayfa
   ========================================================== */
.landing-top { background: var(--brand); border-bottom: 0; backdrop-filter: none; }
.landing-top .logo { color: var(--on-brand); }
.landing-top .logo-mark { background: var(--on-brand); color: var(--brand); --dot: var(--on-brand); }
.landing-top .btn-ghost { color: var(--on-brand); }
.landing-top .btn-ghost:hover { background: oklch(0.2 0.03 40 / .08); }
.landing-top .balance { background: oklch(1 0 0 / .35); border-color: transparent; color: var(--on-brand); }

.hero { background: var(--brand); color: var(--on-brand); padding: 48px 0 96px; overflow: hidden; }
.hero .container { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: center; }
.hero h1 {
  font-family: var(--font-display); font-size: clamp(2.6rem, 6.2vw, 5rem); font-weight: 700;
  letter-spacing: -.045em; line-height: .96; margin-bottom: 24px;
}
.hero h1 em { font-style: normal; background: var(--on-brand); color: var(--brand); padding: 0 .12em; border-radius: .12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.hero .lead { font-size: 1.15rem; max-width: 34ch; margin-bottom: 32px; line-height: 1.5; opacity: .88; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero .cta .btn-dark { height: 52px; padding: 0 26px; font-size: 1.02rem; border-radius: var(--r); background: var(--on-brand); color: var(--brand); }
.hero .cta .btn-dark:hover { background: oklch(0.28 0.035 40); }
.hero .cta .link { color: var(--on-brand); font-weight: 600; }
.facts { display: flex; gap: 28px; margin-top: 44px; flex-wrap: wrap; }
.facts div { font-size: .88rem; line-height: 1.35; max-width: 16ch; }
.facts b { display: block; font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -.03em; }

/* Kahraman alanındaki canlı ürün önizlemesi */
.demo { position: relative; }
.demo-card {
  background: var(--surface); color: var(--text); border-radius: 20px; box-shadow: var(--shadow-lg);
  padding: 20px; max-width: 360px; margin-left: auto; transform: rotate(1.5deg);
}
.demo-card .order-head, .demo-card .phone-row { padding-left: 0; padding-right: 0; }
.demo-card .order-head { padding-top: 0; }
.demo-card .code-box { margin: 12px 0 0; position: relative; }
.demo-card .phone { cursor: default; }
.demo-wait, .demo-code { transition: opacity .4s var(--ease), transform .4s var(--ease); }
.demo-code { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; opacity: 0; transform: translateY(6px); }
.demo-card.got .demo-wait { opacity: 0; }
.demo-card.got .demo-code { opacity: 1; transform: none; }
.demo-card.got .code-box { background: var(--ok-soft); }
.demo-toast {
  position: absolute; left: -12px; bottom: -28px; background: var(--text); color: var(--bg);
  padding: 10px 14px; border-radius: 12px; font-size: .85rem; font-weight: 500; box-shadow: var(--shadow-lg);
  transform: rotate(-2deg); display: flex; gap: 8px; align-items: center;
}
.demo-toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

.section { padding: 72px 0 0; }
.section-lead { display: flex; align-items: end; gap: 24px; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; }
.section-lead h2 { font-family: var(--font-display); font-size: clamp(1.8rem, 3.5vw, 2.5rem); letter-spacing: -.035em; font-weight: 700; }
.section-lead p { color: var(--muted); max-width: 42ch; margin: 0; }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--border-strong); }
.how li { list-style: none; padding: 24px 28px 8px 0; }
.how li + li { padding-left: 28px; border-left: 1px solid var(--border); }
.how .n { font-family: var(--font-display); font-size: 3rem; font-weight: 700; color: var(--brand); line-height: 1; letter-spacing: -.04em; }
.how h3 { font-size: 1.05rem; margin: 14px 0 6px; }
.how p { color: var(--muted); font-size: .92rem; max-width: 32ch; }
ol.how { margin: 0; padding: 0; }

.faq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.faq details { border-bottom: 1px solid var(--border); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font-weight: 400; font-size: 1.3rem; line-height: 1; transition: transform .2s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 10px 0 0; font-size: .93rem; max-width: 60ch; }

.footer { margin-top: 88px; border-top: 1px solid var(--border); padding: 28px 0 36px; color: var(--muted); font-size: .85rem; }
.footer .container { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* ==========================================================
   Toast ve diyalog
   ========================================================== */
#toasts { position: fixed; bottom: 20px; right: 20px; left: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 100; pointer-events: none; }
.toast {
  background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: var(--r); max-width: 380px;
  box-shadow: var(--shadow-lg); font-size: .9rem; font-weight: 500; pointer-events: auto;
  display: flex; gap: 10px; align-items: center; animation: toast-in .3s var(--ease);
}
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex-shrink: 0; }
.toast.error::before { background: var(--bad); }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

dialog.ask {
  border: 1px solid var(--border); border-radius: var(--r-lg); padding: 0; width: min(420px, calc(100vw - 32px));
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
dialog.ask::backdrop { background: oklch(0.2 0.02 45 / .45); }
dialog.ask[open] { animation: rise .25s var(--ease); }
dialog.ask form { padding: 24px; }
dialog.ask h3 { font-size: 1.1rem; margin-bottom: 8px; }
dialog.ask p { color: var(--muted); font-size: .92rem; white-space: pre-line; }
dialog.ask .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

main.container { padding-top: 32px; padding-bottom: 56px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack > * + * { margin-top: 16px; }

.pay-address {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px dashed var(--border-strong);
}
.pay-address code { flex: 1; word-break: break-all; font-size: .85rem; }

/* ==========================================================
   Duyarlı
   ========================================================== */
@media (max-width: 1080px) {
  .picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .list[data-step3-list] { grid-column: 1 / -1; height: auto; min-height: 360px; }
}
@media (max-width: 900px) {
  .picker { grid-template-columns: minmax(0, 1fr); }
  .hero .container { grid-template-columns: minmax(0, 1fr); gap: 64px; }
  .demo-card { margin: 0 auto; }
  .admin-shell { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 16px; }
  .sidenav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px 4px; }
  .sidenav .group { display: none; }
  .sidenav .tab { width: auto; flex-shrink: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(4n) { border-right: 1px solid var(--border); }
  .stat:nth-child(2n) { border-right: 0; }
  .stat:nth-last-child(-n+4) { border-bottom: 1px solid var(--border); }
  .stat:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 760px) {
  .container { padding: 0 16px; }
  .picker, .grid-2, .faq { grid-template-columns: minmax(0, 1fr); }
  .how { grid-template-columns: minmax(0, 1fr); }
  .how li, .how li + li { padding: 20px 0 4px; border-left: 0; border-top: 1px solid var(--border); }
  .how li:first-child { border-top: 0; }
  .list { height: 460px; }
  .list[data-step3-list] { height: auto; min-height: 380px; }
  .hide-mobile { display: none !important; }
  .topbar .container { gap: 8px; height: 58px; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { display: none; }
  .auth-form .mobile-logo { display: flex; }
  .hero { padding: 32px 0 80px; }
  .facts { gap: 20px; }
  .orders-grid { grid-template-columns: minmax(0, 1fr); }
  .wallet { grid-template-columns: 1fr 1fr; }
  .wallet input[data-w="address"] { grid-column: 1 / -1; }
  .section { padding-top: 56px; }
  main.container { padding-top: 20px; }
}

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

/* ==========================================================
   USDT ödeme ekranı
   ========================================================== */
.pay-grid { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 20px; align-items: start; }
.qr { width: 148px; height: 148px; border-radius: var(--r); border: 1px solid var(--border); background: oklch(0.995 0.003 70); padding: 6px; }
.pay-info .label { font-size: .8rem; font-weight: 550; color: var(--muted); margin-bottom: 4px; }
.pay-amount { display: flex; align-items: center; gap: 8px; font-size: 1.7rem; font-weight: 750; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pay-amount small { font-size: .95rem; font-weight: 600; color: var(--muted); }
.pay-rules { margin: 18px 0 0; padding: 14px 16px 14px 32px; border-radius: var(--r); background: var(--warn-soft); color: color-mix(in oklch, var(--warn) 60%, var(--text)); font-size: .86rem; display: grid; gap: 6px; }
.pay-status { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); font-size: .9rem; font-weight: 500; }
.claim { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.claim p { margin-bottom: 8px; }
.done-box { text-align: center; padding: 16px 0; }
.done-box h3 { font-size: 1.2rem; margin: 12px 0 4px; }
.done-icon { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); font-size: 1.6rem; font-weight: 700; animation: pop .4s var(--ease); }
@media (max-width: 760px) {
  .pay-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .pay-amount { justify-content: center; }
  .pay-info { width: 100%; }
}

/* Admin üst çubuk: SMS API bakiyesi */
.provider-balance {
  height: 32px; padding: 0 12px; gap: 6px; font-size: .85rem; font-weight: 500;
  white-space: nowrap; flex-shrink: 0; line-height: 1;
}
.provider-balance .lbl { color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .02em; }
.provider-balance b { font-weight: 700; font-variant-numeric: tabular-nums; }
.provider-balance.low { border-color: color-mix(in oklch, var(--bad) 45%, var(--border)); background: var(--bad-soft); }
.provider-balance.low b { color: var(--bad); }
@media (max-width: 760px) { .provider-balance .lbl { display: none; } .provider-balance { padding: 0 10px; } }
.logo { white-space: nowrap; min-width: 0; }
@media (max-width: 760px) { .logo small { display: none; } .logo { font-size: 1.05rem; } }
