/* menba platform — menba.net tasarım dilinin panel karşılığı. Koyu tema varsayılan. */

@font-face { font-family: 'Bricolage Grotesque'; src: url('../fonts/BricolageGrotesque.ttf') format('truetype'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url('../fonts/HankenGrotesk.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/JetBrainsMono.ttf') format('truetype'); font-weight: 100 800; font-display: swap; }

:root {
  --font-display: 'Bricolage Grotesque', 'Hanken Grotesk', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;
  --r: 16px; --r-sm: 10px; --r-xs: 6px; --r-pill: 999px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

:root[data-theme="koyu"] {
  color-scheme: dark;
  --bg: #15110f;
  --bg-2: #1a1512;
  --surface: #1f1916;
  --surface-2: #28211c;
  --line: #342b25;
  --line-strong: #4a3d34;
  --ink: #f3ece1;
  --ink-soft: #d6ccbf;
  --muted: #a39585;
  --brand: #ff7a45;
  --brand-strong: #ff9467;
  --brand-ink: #1c1714;
  --brand-soft: rgba(255, 122, 69, .14);
  --ok: #5fcf8c; --ok-soft: rgba(95, 207, 140, .14);
  --warn: #f2b84b; --warn-soft: rgba(242, 184, 75, .14);
  --err: #ff6b57; --err-soft: rgba(255, 107, 87, .14);
  --add: rgba(95, 207, 140, .12); --del: rgba(255, 107, 87, .12);
  --sh: 0 10px 30px -14px rgba(0, 0, 0, .6);
}

:root[data-theme="acik"] {
  color-scheme: light;
  --bg: #faf7f2;
  --bg-2: #f3ece1;
  --surface: #ffffff;
  --surface-2: #f3ece1;
  --line: #e8dfd2;
  --line-strong: #d8ccba;
  --ink: #1c1714;
  --ink-soft: #463c34;
  --muted: #6d6258;
  --brand: #e7551f;
  --brand-strong: #cb4413;
  --brand-ink: #ffffff;
  --brand-soft: #fbe6da;
  --ok: #1f8a4c; --ok-soft: #e3f3ea;
  --warn: #9a6a07; --warn-soft: #fbf0d8;
  --err: #c43d2b; --err-soft: #fbe8e4;
  --add: #e3f3ea; --del: #fbe8e4;
  --sh: 0 10px 30px -12px rgba(40, 24, 12, .18);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 15.5px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.01em; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.2rem); font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0 0 .8em; }
code, pre, .mono { font-family: var(--font-mono); font-size: .88em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.pre-wrap { white-space: pre-wrap; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* --- Üst çubuk --------------------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1240px; margin: 0 auto; padding: 10px clamp(14px, 3vw, 28px); display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.brand, .auth-brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); font-weight: 500; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand b, .auth-brand b { font-weight: 800; color: var(--brand); }
.brand-mark { width: 22px; height: 22px; border-radius: 7px; background: var(--brand); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { color: var(--ink-soft); padding: 7px 12px; border-radius: var(--r-pill); font-weight: 550; font-size: .95rem; }
.nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav a.on { background: var(--brand-soft); color: var(--brand); }
.topbar-end { display: flex; align-items: center; gap: 8px; }
.who { color: var(--muted); font-size: .8rem; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Yerleşim --------------------------------------------------------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 26px clamp(14px, 3vw, 28px) 80px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin: 0 0 18px; box-shadow: var(--sh); }
.card.flush { padding: 0; overflow: hidden; }
.card.narrow { max-width: 620px; }
.card.attention { border-color: var(--warn); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 20px 6px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.grid-3 > .card { margin: 0; }
.span-2 { grid-column: 1 / -1; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.inline { display: inline; }
.inline-form { display: flex; align-items: flex-end; gap: 10px; padding: 14px 20px 18px; flex-wrap: wrap; border-top: 1px solid var(--line); }
.inline-form label { min-width: 220px; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } .who { display: none; } }

.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs .sep { color: var(--line-strong); }

/* --- Formlar ---------------------------------------------------------- */
label { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--ink-soft); }
label.check { flex-direction: row; align-items: center; gap: 9px; font-weight: 500; color: var(--ink); }
input, select, textarea {
  font: 400 .95rem/1.4 var(--font-body); color: var(--ink); background: var(--bg-2);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 10px 12px; width: 100%;
}
textarea { resize: vertical; }
textarea.mono, input.mono { font-family: var(--font-mono); font-size: .84rem; line-height: 1.5; }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand); }
input[readonly] { color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
fieldset { border: 1px solid var(--line); }
fieldset.card { padding-top: 12px; }
legend { font-family: var(--font-display); font-weight: 650; padding: 0 6px; }
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.filters label { min-width: 180px; }

/* --- Düğmeler --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 650 .92rem/1 var(--font-body); color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 10px 18px; cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .1s;
}
.btn:hover { border-color: var(--brand); color: var(--ink); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: var(--brand-ink); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--err); border-color: color-mix(in srgb, var(--err) 45%, transparent); }
.btn.danger:hover { background: var(--err-soft); border-color: var(--err); }
.btn.sm { padding: 7px 13px; font-size: .85rem; }
.btn.xs { padding: 5px 10px; font-size: .78rem; }
.btn.block { width: 100%; }
.actions { white-space: nowrap; text-align: right; }
.actions .btn, .actions form { margin-left: 4px; }

/* --- Rozet, bildirim -------------------------------------------------- */
.badge { display: inline-flex; align-items: center; font: 650 .74rem/1 var(--font-body); padding: 5px 9px; border-radius: var(--r-pill); white-space: nowrap; vertical-align: middle; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--err-soft); color: var(--err); }
.badge.muted { background: var(--surface-2); color: var(--muted); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
.flash { border-radius: var(--r-sm); padding: 11px 14px; margin: 0 0 16px; border: 1px solid transparent; font-weight: 550; }
.flash.ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.flash.hata { background: var(--err-soft); color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, transparent); }
.flash.bilgi { background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.chip { display: inline-block; padding: 3px 9px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-soft); font-size: .78rem; margin: 2px 4px 2px 0; }
.copy { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.copy code { background: var(--bg-2); border: 1px solid var(--line); padding: 4px 8px; border-radius: var(--r-xs); word-break: break-all; }
.copy code.big { font-size: 1.1rem; }

/* --- Tablolar --------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: left; font: 650 .75rem/1 var(--font-body); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.current td { background: color-mix(in srgb, var(--ok-soft) 60%, transparent); }
.tbl td.detail { max-width: 380px; word-break: break-word; }

/* --- Pano ------------------------------------------------------------- */
.stat .stat-v { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; margin: 6px 0; }
.app-card { display: block; color: var(--ink); transition: border-color .15s var(--ease), transform .15s var(--ease); }
.app-card:hover { border-color: var(--brand); text-decoration: none; color: var(--ink); transform: translateY(-2px); }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.plain li:last-child { border-bottom: 0; }
.summary { margin: 8px 0 0; padding-left: 18px; color: var(--ink-soft); }

/* --- Bakım ------------------------------------------------------------- */
.tasks { list-style: none; margin: 0; padding: 0; }
.task { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.task-actions { display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; }
.task.geciken .task-head b { color: var(--err); }
details summary { cursor: pointer; color: var(--muted); font-size: .85rem; margin-top: 4px; }

/* --- Doğrulama, fark, kod ---------------------------------------------- */
.issue-list { list-style: none; padding: 0; margin: 0; }
.issue-list li { padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.diff-wrap { overflow: auto; max-height: 70vh; border: 1px solid var(--line); border-radius: var(--r-sm); }
.diff { border-collapse: collapse; width: 100%; font-family: var(--font-mono); font-size: .8rem; }
.diff td { padding: 1px 8px; vertical-align: top; white-space: pre; }
.diff td.ln { color: var(--muted); text-align: right; user-select: none; width: 1%; border-right: 1px solid var(--line); }
.diff td.sg { width: 1%; user-select: none; }
.diff tr.d-add td { background: var(--add); }
.diff tr.d-add td.sg { color: var(--ok); }
.diff tr.d-del td { background: var(--del); }
.diff tr.d-del td.sg { color: var(--err); }
.diff tr.d-skip td { color: var(--muted); text-align: center; background: var(--bg-2); padding: 4px; font-family: var(--font-body); }
.diff code { font-size: inherit; }
pre.code { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px; overflow: auto; max-height: 70vh; font-size: .8rem; line-height: 1.5; }
textarea.prompt { min-height: 280px; }
.steps { margin: 0 0 10px; padding-left: 20px; }
.steps li { margin-bottom: 6px; }

/* --- Sayfa düzenleyici ve önizleme ------------------------------------ */
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.editor-grid > .card { margin: 0; }
@media (max-width: 1000px) { .editor-grid { grid-template-columns: 1fr; } }
.prose { font-size: .98rem; line-height: 1.65; }
.prose h1 { font-size: 1.6rem; }
.prose h2 { font-size: 1.2rem; margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 22px; }
.prose table { border-collapse: collapse; margin: 1em 0; font-size: .9rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.prose blockquote { border-left: 3px solid var(--brand); margin: 1em 0; padding: 4px 14px; color: var(--ink-soft); }

/* --- Giriş ------------------------------------------------------------- */
body.bare .wrap { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding-top: 40px; }
.auth { width: 100%; max-width: 420px; padding: 30px; }
.auth.wide { max-width: 640px; }
.auth-brand { margin-bottom: 22px; }
.totp-setup { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: start; }
@media (max-width: 640px) { .totp-setup { grid-template-columns: 1fr; } }
.qr { border-radius: var(--r-sm); background: #faf7f2; padding: 6px; }
.secret { word-break: break-all; }
.codes { columns: 2; font-size: 1rem; padding-left: 22px; }
.codes li { margin-bottom: 6px; }
.offscreen{position:fixed;left:-9999px;top:0}
