@font-face { font-family: "Manrope"; src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("fonts/manrope-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+20A0-20C0; }

:root {
  --teal: #0F766E; --teal-d: #0B5C56; --teal-l: #E6F4F2; --amber: #F59E0B; --ink: #17252A; --ink-2: #4A5A5E;
  --line: #DCE4E3; --paper: #F6F8F7; --white: #fff; --red: #B42318; --red-l: #FEF3F2; --warn-l: #FFF7E6;
  --r: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Manrope", system-ui, sans-serif; color: var(--ink); background: var(--paper); font-size: 15px; line-height: 1.5; }
a { color: var(--teal); }
h1 { font-size: 1.6rem; margin: 0 0 .4rem; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 .6rem; }
h2.sect { margin: 1.6rem 0 .6rem; }
code { font-size: .85em; background: var(--teal-l); padding: .1em .35em; border-radius: 6px; }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; }
.warn { background: var(--warn-l); border-radius: 8px; padding: .6rem .8rem; }

/* üst bar ve yerleşim */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 1.25rem; background: var(--ink); color: #fff; }
.brand { display: flex; align-items: center; gap: .5rem; color: #fff; text-decoration: none; font-weight: 800; }
.brand em { font-style: normal; font-weight: 600; color: #9FD8D1; margin-left: .35rem; font-size: .9rem; }
.logout { display: flex; align-items: center; gap: .75rem; margin: 0; }
.who { color: #B9CFCB; font-size: .9rem; }
.layout { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 52px); }
.side { background: #fff; border-right: 1px solid var(--line); padding: 1rem .6rem; display: flex; flex-direction: column; gap: .15rem; position: sticky; top: 52px; align-self: start; height: calc(100vh - 52px); }
.side a { display: flex; align-items: center; justify-content: space-between; padding: .55rem .75rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.side a:hover { background: var(--paper); }
.side a[aria-current="page"] { background: var(--teal-l); color: var(--teal-d); }
.side hr { border: 0; border-top: 1px solid var(--line); margin: .6rem .4rem; width: auto; }
.count { background: var(--amber); color: var(--ink); border-radius: 999px; font-size: .75rem; padding: 0 .5rem; margin-left: .4rem; }
.main { padding: 1.5rem clamp(1rem, 3vw, 2.5rem) 5rem; max-width: 1100px; width: 100%; }

/* kartlar ve formlar */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.25rem; margin: 1rem 0; }
fieldset.card { min-width: 0; }
legend { font-weight: 800; padding: 0 .35rem; }
.status { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.status h2 { margin-bottom: .2rem; }
.stack { display: flex; flex-direction: column; gap: .8rem; }
.narrow { max-width: 380px; }
label { font-weight: 600; font-size: .9rem; }
.stack label, .field { display: flex; flex-direction: column; gap: .3rem; }
.field { margin: .7rem 0; }
.field small { font-weight: 500; color: var(--ink-2); }
input:not([type=checkbox]):not([type=radio]), textarea, select {
  font: inherit; font-weight: 500; color: var(--ink); width: 100%; padding: .55rem .7rem; border: 1px solid #C5D2D0; border-radius: 8px; background: #fff;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus, .btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid rgba(15,118,110,.35); outline-offset: 1px; border-color: var(--teal); }
.check { display: inline-flex; flex-direction: row !important; align-items: center; gap: .45rem; font-weight: 600; cursor: pointer; }
.check.big { font-size: 1rem; }
.check.danger { color: var(--red); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.money { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 .75rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; margin-top: .5rem; }
.pkgs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.pkg.is-empty { border-style: dashed; background: #FBFCFC; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 40px; padding: .5rem 1.1rem; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-d); }
.btn-ghost { background: #fff; color: var(--teal-d); border-color: var(--teal); }
.btn-quiet { background: transparent; color: inherit; border-color: rgba(127,127,127,.35); min-height: 34px; padding: .3rem .85rem; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink-2); text-decoration: underline; cursor: pointer; margin-top: .9rem; }
.linkbtn.danger { color: var(--red); }
.savebar { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--paper) 35%); padding: 1.2rem 0 .6rem; display: flex; justify-content: flex-end; }

.flash { background: var(--teal-l); color: var(--teal-d); border-radius: 10px; padding: .7rem .95rem; font-weight: 600; }
.flash-error { background: var(--red-l); color: var(--red); }
.pill { display: inline-block; background: var(--teal-l); color: var(--teal-d); border-radius: 999px; font-size: .75rem; font-weight: 700; padding: .05rem .55rem; }

/* metinler */
.tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin: 1rem 0 .5rem; }
.tabs a { padding: .45rem .85rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.tabs a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.toolbar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: .75rem 0; }
.toolbar .filter { max-width: 320px; }
.group .field { padding: .6rem .7rem; margin: .4rem 0; border-radius: 10px; }
.group .field.is-changed { background: var(--warn-l); }
.group label { flex-direction: row; display: flex; align-items: center; gap: .5rem; }
.key { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .78rem; color: var(--ink-2); font-weight: 500; }
.default { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--ink-2); margin-top: .3rem; }
[hidden] { display: none !important; }

/* tablolar */
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .8rem; color: var(--ink-2); font-weight: 700; padding: .5rem; border-bottom: 1px solid var(--line); }
.table td { padding: .55rem .5rem; border-bottom: 1px solid #EEF2F1; vertical-align: top; }
.table td.right { text-align: right; }
.table form { margin: 0; }
.diff .old { color: var(--ink-2); text-decoration: line-through; max-width: 280px; }
.diff .new { color: var(--teal-d); font-weight: 600; max-width: 280px; }
tr.is-warn td { background: var(--red-l); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-top: 1rem; }
.actions form { margin: 0; }
.publish { display: flex; gap: .5rem; flex: 1 1 420px; justify-content: flex-end; }
.publish input { max-width: 340px; }
.seo { border: 0; padding: 0; margin: 1rem 0; border-top: 1px solid var(--line); padding-top: .6rem; }
.counter { font-size: .78rem; color: var(--ink-2); font-weight: 500; }
.counter.over { color: var(--red); }
.checklist li { margin: .35rem 0; }

/* giriş */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: var(--ink); }
.auth-card { width: min(420px, 100%); background: #fff; border-radius: 16px; padding: 1.75rem; }
.auth-brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.25rem; margin-bottom: 1.25rem; }
.auth h1 { font-size: 1.35rem; }
.qr { display: block; margin: .75rem auto; border: 1px solid var(--line); border-radius: 10px; }
.secret { display: inline-block; margin-top: .3rem; letter-spacing: .06em; word-break: break-all; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); }
  .side hr { display: none; }
  .grid2, .pkgs { grid-template-columns: 1fr; }
  .money { grid-template-columns: 1fr 1fr; }
  .who { display: none; }
}

/* çalışma modu */
.btn-amber { background: var(--amber); color: var(--ink); }
.btn-amber:hover { background: #E08E06; }
.count.on { background: var(--ink); color: #fff; }
.maint-bar { background: var(--ink); color: #fff; border-radius: 10px; padding: .65rem .95rem; font-weight: 600; }
.maint-bar a { color: #5EE6D0; }
.status.maint-on { border-color: var(--amber); background: #FFFBF0; }
