/* Maustbot: Ustakit tasarım sisteminin renkleri ve yüzeyleri. */

:root {
  --bg: #f4f2ec;
  --surface: #ffffff;
  --surface-2: #f9f8f4;
  --ink: #161513;
  --ink-2: #57544d;
  --ink-3: #8b877e;
  --line: #e3dfd5;
  --line-2: #cdc8bb;
  --primary: #161513;
  --on-primary: #ffffff;
  --hl: #d8f26a;
  --on-hl: #161513;
  --ok: #1d7f46;
  --ok-bg: #e5f4e9;
  --err: #b8322a;
  --err-bg: #fbe9e6;
  --focus: #3a57ff;
  --font: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Consolas, monospace;
  --r: 18px;
  --r-md: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 0 rgb(22 21 19 / 4%), 0 10px 30px -18px rgb(22 21 19 / 25%);
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --surface: #1b1b19;
    --surface-2: #222220;
    --ink: #f2f0ea;
    --ink-2: #b7b2a8;
    --ink-3: #87837a;
    --line: #2e2d2a;
    --line-2: #44423d;
    --primary: #f2f0ea;
    --on-primary: #161513;
    --ok: #5fcf8a;
    --ok-bg: #16301f;
    --err: #ff8a7d;
    --err-bg: #3a1a17;
    --focus: #8ea0ff;
    --shadow: 0 1px 0 rgb(0 0 0 / 30%), 0 10px 30px -18px rgb(0 0 0 / 70%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font);
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
code, .mono { font-family: var(--mono); font-size: .92em; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
[hidden] { display: none !important; }

.wrap { width: min(1040px, 100%); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.note { margin-top: 1rem; }

/* ---- Düğmeler ve alanlar ---- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 42px; padding: 0 1.1rem; border: 1px solid var(--line-2); border-radius: 999px;
  background: var(--surface); color: var(--ink); font: 600 .95rem/1 var(--font);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn.hl { background: var(--hl); color: var(--on-hl); border-color: var(--hl); }
.btn.danger { color: var(--err); border-color: var(--err); background: transparent; }
.btn.small { min-height: 34px; padding: 0 .8rem; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: default; }

label.field { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; }
label.field .hint { font-weight: 400; color: var(--ink-2); }
input[type=text], input[type=url], input[type=number], textarea, select {
  width: 100%; padding: .65rem .8rem; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--ink); font: 400 1rem/1.4 var(--font);
}
textarea { min-height: 92px; resize: vertical; }
input[type=number] { max-width: 9rem; }
.check { display: flex; align-items: center; gap: .6rem; font-weight: 600; font-size: .95rem; cursor: pointer; }
.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--ink); }
.prefix { display: flex; align-items: stretch; }
.prefix span {
  display: grid; place-items: center; padding: 0 .7rem; border: 1px solid var(--line-2); border-right: 0;
  border-radius: var(--r-sm) 0 0 var(--r-sm); background: var(--surface); font-family: var(--mono);
}
.prefix input { border-radius: 0 var(--r-sm) var(--r-sm) 0; }

/* ---- Kartlar ---- */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: clamp(18px, 3vw, 28px); }
.stack { display: grid; gap: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.grid2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---- Ana sayfa ---- */

.hero { padding: clamp(48px, 10vw, 112px) 0 clamp(32px, 6vw, 64px); }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.hero h1 { font-size: clamp(2.3rem, 7vw, 4.2rem); max-width: 14ch; margin: 1.5rem 0 1rem; }
.hero .lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-2); max-width: 40ch; }
.hero .row { margin-top: 1.75rem; }
.features { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); padding-bottom: 48px; }
.features h2 { font-size: 1.1rem; margin-bottom: .4rem; }
.footer { border-top: 1px solid var(--line); padding: 24px 0 40px; }

/* ---- Panel ---- */

.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(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; }
.status { display: flex; flex-wrap: wrap; gap: .5rem; margin: 24px 0 16px; }
.pill { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .75rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .875rem; }
.pill .dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--ink-3); }
.pill.live .dot { background: #e5484d; }
.tabs { display: flex; gap: .25rem; overflow-x: auto; margin-bottom: 16px; padding-bottom: 2px; scrollbar-width: thin; }
.tabs button {
  border: 0; background: none; color: var(--ink-2); font: 600 .95rem/1 var(--font);
  padding: .7rem .95rem; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.tabs button[aria-selected=true] { background: var(--primary); color: var(--on-primary); }
main.panel { padding-bottom: 64px; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-head h2 { font-size: 1.35rem; }
.section-head p { margin-top: .35rem; max-width: 60ch; }

.list { display: grid; gap: .6rem; }
.item { display: grid; grid-template-columns: 1fr auto; gap: .75rem; align-items: start; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.item.off { opacity: .55; }
.item .name { font-family: var(--mono); font-weight: 700; }
.item .text { margin-top: .25rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.item .meta { margin-top: .4rem; display: flex; flex-wrap: wrap; gap: .35rem .9rem; color: var(--ink-2); font-size: .82rem; }
.item .actions { display: flex; gap: .4rem; }
.builtins { display: grid; }
.builtin { display: grid; grid-template-columns: minmax(10rem, 14rem) 1fr auto; gap: .25rem 1rem; padding: .65rem 0; border-top: 1px solid var(--line); align-items: baseline; }
.builtin .name { font-family: var(--mono); font-weight: 700; font-size: .9rem; }
.empty { padding: 22px; text-align: center; color: var(--ink-2); border: 1px dashed var(--line-2); border-radius: var(--r-md); }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 999px; padding: .3rem .65rem; font: 500 .82rem/1.2 var(--mono); cursor: pointer; }
.chip:hover { border-color: var(--ink-3); }

fieldset { border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; margin: 0; display: grid; gap: 1rem; }
legend { font-weight: 700; padding: 0 .4rem; }

.error { color: var(--err); background: var(--err-bg); padding: .6rem .8rem; border-radius: var(--r-sm); font-size: .92rem; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 20;
  background: var(--primary); color: var(--on-primary); padding: .7rem 1.1rem; border-radius: 999px;
  font-weight: 600; box-shadow: var(--shadow); max-width: calc(100vw - 32px);
}
.counter { justify-self: end; font-weight: 400; color: var(--ink-3); font-size: .8rem; }

.login { min-height: 70vh; display: grid; place-items: center; text-align: center; }
.login .card { max-width: 30rem; display: grid; gap: 1rem; justify-items: center; }

@media (max-width: 560px) {
  .item { grid-template-columns: 1fr; }
  .builtin { grid-template-columns: 1fr; }
}
