:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --surface-2: #eef3f0;
  --text: #101814;
  --muted: #56645c;
  --border: #dde6e0;
  --accent: #0f8a5f;
  --accent-hover: #0b7550;
  --accent-text: #ffffff;
  --ok: #15803d;
  --ok-bg: #dcfce7;
  --warn: #a35a06;
  --warn-bg: #fef3c7;
  --bad: #b91c1c;
  --bad-bg: #fee2e2;
  --code-bg: #0f1a15;
  --code-text: #d7efe3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(10, 30, 20, .04), 0 4px 16px rgba(10, 30, 20, .05);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b110e;
    --surface: #121a16;
    --surface-2: #18221d;
    --text: #e6efe9;
    --muted: #9badA2;
    --border: #24312a;
    --accent: #34d399;
    --accent-hover: #6ee7b7;
    --accent-text: #06150e;
    --ok: #4ade80;
    --ok-bg: rgba(74, 222, 128, .12);
    --warn: #fbbf24;
    --warn-bg: rgba(251, 191, 36, .12);
    --bad: #f87171;
    --bad-bg: rgba(248, 113, 113, .13);
    --code-bg: #08100c;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); letter-spacing: -.02em; }
h2 { font-size: 1.5rem; margin-top: .2em; }
h2 small, h1 small { font-size: .85rem; font-weight: 500; color: var(--muted); margin-left: .4em; }
h3 { font-size: 1.1rem; }
h4 { font-size: 1rem; margin-top: 1.4em; }
code, .mono { font-family: var(--mono); font-size: .9em; }
:not(pre) > code { background: var(--surface-2); padding: .1em .35em; border-radius: 5px; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.big { font-size: 1.4rem; font-weight: 600; margin: .2em 0; }
.nowrap { white-space: nowrap; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 420px; padding-top: 48px; }
main > section { margin: 56px 0; }

.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--muted); font-weight: 500; }
.top nav { display: flex; gap: 18px; overflow-x: auto; }
.top nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.top nav a:hover { color: var(--text); }
@media (max-width: 600px) { .brand span { display: none; } .top nav { gap: 12px; } }

.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; margin-top: 40px; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 34em; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } }

pre { margin: 0; }
pre.code, pre.hero-code, pre.chat {
  background: var(--code-bg); color: var(--code-text); font: 13.5px/1.55 var(--mono);
  padding: 14px 16px; border-radius: 10px; overflow-x: auto; white-space: pre;
}
pre.hero-code { white-space: pre-wrap; word-break: break-all; font-size: 13px; }
pre.hero-code .c { color: #7f9b8c; }
pre.chat { white-space: pre-wrap; background: #dcf8c6; color: #111; border-radius: 10px 10px 10px 2px; max-width: 26em; font-family: system-ui, sans-serif; font-size: 14px; }
@media (prefers-color-scheme: dark) { pre.chat { background: #144d37; color: #e9f5ee; } }

.status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: .92rem; background: var(--surface-2); }
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.status.ok { background: var(--ok-bg); color: var(--ok); } .status.ok .dot { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
.status.warn { background: var(--warn-bg); color: var(--warn); } .status.warn .dot { background: var(--warn); }
.status.bad { background: var(--bad-bg); color: var(--bad); } .status.bad .dot { background: var(--bad); }

.note { padding: 14px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); margin: 24px 0; }
.note.warn { background: var(--warn-bg); border-color: transparent; }
.note.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
main > section.card { margin: 28px 0; }

.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.steps > li { counter-increment: s; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 20px 20px 64px; position: relative; box-shadow: var(--shadow); min-width: 0; }
.steps > li::before { content: counter(s); position: absolute; left: 18px; top: 18px; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-weight: 700; }
.steps p { margin: .4em 0; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 18px; border-radius: 10px; border: 1px solid transparent; background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: var(--bad-bg); color: var(--bad); }
.btn.sm { padding: 4px 10px; font-size: .85rem; font-weight: 500; }

input, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; width: 100%; }
input:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); outline-offset: 0; border-color: var(--accent); }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 600; }
.try { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.try .full { grid-column: 1 / -1; }
.try p { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .try { grid-template-columns: 1fr; } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; margin-top: 32px; }
.row input { flex: 1; min-width: 160px; width: auto; }
.stack { display: grid; gap: 14px; }
.okt { color: var(--ok); font-weight: 600; } .badt { color: var(--bad); font-weight: 600; }

.tbl { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tr.dim td { opacity: .55; }
.card .tbl { background: transparent; }

.ep { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 1.8em; }
.ep .m { font: 700 .72rem var(--mono); background: var(--accent); color: var(--accent-text); padding: 3px 7px; border-radius: 5px; }

details { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin: 10px 0; }
details > summary { cursor: pointer; padding: 12px 16px; font-weight: 600; }
details > :not(summary) { margin: 0 16px 14px; }
details > pre.code { margin: 0 12px 12px; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 14px 0; font-size: .93rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stats div { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; }
.stats b { display: block; font-size: 1.5rem; }
.stats span { color: var(--muted); font-size: .85rem; }
@media (max-width: 600px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.link-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 12px; }
@media (max-width: 720px) { .link-grid { grid-template-columns: 1fr; } }
#qrBox { margin-top: 16px; }
#qr { background: #fff; padding: 10px; border-radius: 10px; max-width: 100%; height: auto; display: block; }
.code-big { font-size: 2rem; font-weight: 700; letter-spacing: .12em; }
.tag { font-size: .8rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); }
.tag.sent { background: var(--ok-bg); color: var(--ok); }
.tag.failed { background: var(--bad-bg); color: var(--bad); }
.tag.queued, .tag.sending { background: var(--warn-bg); color: var(--warn); }

.foot { border-top: 1px solid var(--border); padding: 24px 0 40px; margin-top: 64px; font-size: .85rem; }
.foot .wrap { display: flex; flex-direction: column; gap: 4px; }

/* ---------------------------------------------------------------- form oluşturucu */
.hero.single { grid-template-columns: 1fr; margin-bottom: 8px; }
.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.ways > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.ways span { color: var(--muted); font-size: .92rem; }
@media (max-width: 760px) { .ways { grid-template-columns: 1fr; } }
.num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-size: .95rem; margin-right: 6px; vertical-align: 2px; }
.row.between.nomargin { margin-top: 0; }
.tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tpl { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); color: var(--text); font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer; }
.tpl span { font-size: 1.6rem; }
.tpl:hover { border-color: var(--accent); }

.editor { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; margin-top: 8px; }
@media (max-width: 860px) { .editor { grid-template-columns: 1fr; } }
.ed-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ed-left h3 { margin: 10px 0 0; }
.ed-right { min-width: 0; position: sticky; top: 72px; align-self: start; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 860px) { .ed-right { position: static; } }
.fld { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
.fld-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.fld-type { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.fld-btns { display: flex; gap: 4px; }
.ico { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; font: inherit; line-height: 1; }
.ico.rm { color: var(--bad); }
.fld-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.fld-grid .full { grid-column: 1 / -1; }
.fld-grid label { font-weight: 500; font-size: .85rem; }
.fld-grid input, .fld-grid textarea { padding: 7px 10px; background: var(--surface); }
label.chk { flex-direction: row; align-items: center; gap: 8px; }
label.chk input { width: auto; }
@media (max-width: 520px) { .fld-grid { grid-template-columns: 1fr; } }
.addrow { gap: 6px; }
.adv { margin: 4px 0; }
.adv > label { margin: 0 16px 12px; }
.savebar { margin-top: 6px; }

.pv { border: 1px dashed var(--border); border-radius: 12px; padding: 18px; background: var(--bg); }
.pv .nwa-form { display: flex; flex-direction: column; }
.pv .nwa-form h1 { font-size: 1.25rem; margin: 0 0 .4em; }
.pv .nwa-desc { color: var(--muted); margin: 0 0 .6em; font-size: .95rem; }
.pv .nwa-form > label { font-weight: 600; font-size: .9rem; margin: 12px 0 5px; flex-direction: row; display: block; }
.pv label b { color: var(--bad); }
.pv .nwa-form select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; width: 100%; }
.pv .nwa-form input, .pv .nwa-form textarea { background: var(--surface); }
.pv .nwa-check { display: flex !important; flex-direction: row; gap: 10px; align-items: flex-start; font-weight: 500 !important; }
.pv .nwa-check input { width: auto; margin-top: 4px; }
.pv .nwa-form button { margin-top: 18px; font: inherit; font-weight: 600; background: var(--accent); color: var(--accent-text); border: 0; border-radius: 10px; padding: 11px 18px; }
.pv-label { margin-top: 4px; }
#pvMsg { max-width: none; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin: 14px 0 16px; }
.tab { font: inherit; font-weight: 600; font-size: .93rem; padding: 9px 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); cursor: pointer; margin-bottom: -1px; }
.tab.on { color: var(--accent); border-bottom-color: var(--accent); }
.tabpane { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.tabpane[hidden] { display: none; }
.tabpane p, .tabpane ul { margin: 0; }
.copyrow { display: flex; gap: 8px; width: 100%; flex-wrap: wrap; }
.copyrow input { flex: 1; min-width: 200px; font-family: var(--mono); font-size: .9rem; }
.codebox { font: 12.5px/1.5 var(--mono); background: var(--code-bg); color: var(--code-text); border-color: transparent; white-space: pre; overflow: auto; }
#bOut > .row { margin-top: 18px; }
#rehber details ol, #rehber details ul { padding-left: 22px; }
#rehber details li { margin: 4px 0; }
#rehber .tbl { margin: 0 16px 14px; }
.promo { background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface)); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
.promo ul { padding-left: 0; list-style: none; display: grid; gap: 6px; }
.promo .btn { margin: 4px 6px 4px 0; }
