/* Günde 1 Kelime paneli — uygulamanın renkleriyle sade bir arayüz.
   Dış kaynak (yazı tipi, CDN) kullanılmaz. */
:root {
  --bg: #e7f6ff;
  --surface: #fff;
  --ink: #001d2e;
  --ink-soft: #4e7186;
  --muted: #7ea9c3;
  --primary: #3674de;
  --accent: #ff1a81;
  --ok: #4f9e2c;
  --ok-soft: #e9f7e1;
  --bad: #ca5757;
  --bad-soft: #fbeaea;
  --wait: #c98a00;
  --wait-soft: #fff5d9;
  --shadow: #b4d6ea;
  --line: #d8e9f3;
  --radius: 16px;
  font-family: ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); line-height: 1.45; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--bg); padding: 1px 6px; border-radius: 6px; font-size: .9em; word-break: break-all; }
h1 { font-size: 1.6rem; margin: 0; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* Üst çubuk */
.topbar { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; padding: .75rem 1.25rem; background: var(--surface); box-shadow: 0 3px 0 var(--shadow); position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: .5rem; }
.brand:hover { text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: #fff; font-weight: 900; }
.brand-mark.big { width: 56px; height: 56px; border-radius: 16px; font-size: 1.8rem; }
.nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav a { padding: .4rem .75rem; border-radius: 10px; color: var(--ink-soft); font-weight: 700; }
.nav a:hover { background: var(--bg); text-decoration: none; }
.nav a.active { background: var(--primary); color: #fff; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.topbar-right form { margin: 0; }
.user-link { font-weight: 700; color: var(--ink-soft); }
.pill { background: var(--bg); padding: .2rem .6rem; border-radius: 999px; font-weight: 700; font-size: .85rem; color: var(--ink-soft); }

.container { max-width: 1100px; margin: 0 auto; padding: 1.25rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin: .5rem 0 1rem; }

/* Kartlar */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: 0 4px 0 var(--shadow); padding: 1.25rem; margin-bottom: 1.25rem; }
.card.empty { text-align: center; padding: 2.5rem 1.25rem; }
.card.narrow { max-width: 420px; width: 100%; }
.narrow-form { max-width: 520px; }
details.card summary { cursor: pointer; font-weight: 700; }
details.card[open] summary { margin-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 + .card, .grid-2 + details, .card + .grid-2 { margin-top: 1.25rem; }

.center-page { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.login-brand { text-align: center; margin-bottom: 1rem; }
.login-brand h1 { margin-top: .5rem; }
.login-brand p { margin: 0; }

/* İstatistikler */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat { background: var(--surface); border-radius: var(--radius); box-shadow: 0 4px 0 var(--shadow); padding: 1rem 1.25rem; color: var(--ink-soft); display: flex; flex-direction: column; font-weight: 700; transition: transform .08s; }
.stat:hover { text-decoration: none; transform: translateY(-2px); }
.stat-n { font-size: 2rem; font-weight: 900; color: var(--ink); }
.stat-wait .stat-n { color: var(--wait); }
.stat-ok .stat-n { color: var(--ok); }
.stat-bad .stat-n { color: var(--bad); }
.progress { display: flex; height: 14px; border-radius: 999px; background: var(--line); overflow: hidden; margin-bottom: 1rem; }
.progress span { display: block; width: 0; transition: width .6s ease-out; }
.p-ok { background: var(--ok); }
.p-bad { background: var(--bad); }
.facts { margin: 0; padding-left: 1.1rem; }
.facts li { margin: .3rem 0; }
.list { list-style: none; margin: 0 0 .75rem; padding: 0; }
.list li { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }

/* Formlar */
label { display: block; font-weight: 700; color: var(--ink-soft); font-size: .9rem; margin-bottom: .75rem; }
input, select, textarea { display: block; width: 100%; margin-top: .3rem; font: inherit; font-weight: 500; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: .55rem .7rem; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
textarea { resize: vertical; }
input[type=checkbox] { display: inline-block; width: auto; margin: 0 .4rem 0 0; accent-color: var(--primary); }
fieldset { border: 2px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem .25rem; margin: 0 0 1rem; }
legend { font-weight: 800; padding: 0 .4rem; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: flex-end; }
.row > label { flex: 1 1 140px; }
.row > .grow, .grow { flex: 1 1 auto; }
.row > .w-small, .w-small { flex: 0 0 110px; }
label.check { display: flex; align-items: center; font-weight: 600; }

/* Butonlar (uygulamadaki "basınca çöken" düğmeler) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 800; padding: .6rem 1rem; border-radius: 14px; border: 0; cursor: pointer; background: #fff; color: var(--ink); box-shadow: 0 4px 0 var(--shadow); transition: transform .06s, box-shadow .06s; text-decoration: none; }
.btn:hover { text-decoration: none; filter: brightness(1.03); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--shadow); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-ok { background: var(--ok); color: #fff; }
.btn-bad { background: #fff; color: var(--bad); box-shadow: 0 4px 0 #efc4c4; }
.btn-block { width: 100%; margin-top: .5rem; }
.link-button { background: none; border: 0; font: inherit; color: var(--primary); cursor: pointer; padding: 0; font-weight: 700; }

/* Mesajlar */
.flash { border-radius: 12px; padding: .7rem 1rem; margin-bottom: 1rem; font-weight: 600; }
.flash-ok { background: var(--ok-soft); color: #2d6b14; }
.flash-error { background: var(--bad-soft); color: #8c2b2b; }
.flash ul { margin: .5rem 0 0; }

/* Liste */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.filters input, .filters select { width: auto; margin: 0; flex: 1 1 160px; }
.filters .btn { flex: 0 0 auto; }
.bulk-bar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-bottom: .75rem; }
.bulk-bar label.check { margin: 0 .5rem 0 0; }
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: 0 4px 0 var(--shadow); }
.card .table-wrap { box-shadow: none; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .6rem .75rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }
.table tr.is-hidden td { opacity: .5; }
.lemma { font-weight: 800; font-size: 1.05rem; }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1.25rem 0; }

.tag { display: inline-block; font-size: .72rem; font-weight: 800; padding: .1rem .45rem; border-radius: 8px; background: var(--bg); color: var(--ink-soft); vertical-align: middle; }
.tag-ai { background: #efe6ff; color: #6a3fc1; }
.tag-trap { background: #ffe3f0; color: var(--accent); }
.tag-bad { background: var(--bad-soft); color: var(--bad); }
.status { display: inline-block; font-size: .8rem; font-weight: 800; padding: .15rem .55rem; border-radius: 999px; }
.status-pending { background: var(--wait-soft); color: var(--wait); }
.status-approved { background: var(--ok-soft); color: var(--ok); }
.status-rejected { background: var(--bad-soft); color: var(--bad); }

/* Düzenleme */
.lemma-title { font-size: 2.2rem; color: var(--accent); display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.lemma-title .status { font-size: .85rem; }
.edit-form .card { margin-bottom: 1.25rem; }
.edit-form .grid-2 { margin-bottom: 1.25rem; }
.example-row { display: flex; gap: .75rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.example-row:last-child { border-bottom: 0; }
.example-row input { margin: .2rem 0; }
.example-row input:first-child { font-weight: 700; }
.example-row .tag { flex: 0 0 auto; white-space: nowrap; }
.example-n { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-weight: 800; color: var(--muted); }
.action-bar { position: sticky; bottom: 0; display: flex; gap: .75rem; align-items: center; background: var(--surface); padding: .9rem 1.25rem; border-radius: var(--radius) var(--radius) 0 0; box-shadow: 0 -3px 0 var(--shadow); flex-wrap: wrap; }
.action-bar .spacer { flex: 1; }

@media (max-width: 640px) {
  .topbar { position: static; }
  .topbar-right { margin-left: 0; width: 100%; justify-content: space-between; }
  .lemma-title { font-size: 1.7rem; }
  .action-bar .btn { flex: 1 1 auto; }
}

/* Panel 2.0 */
.w-num { width: 4.5rem; }
.inline-form { display: inline-flex; gap: .5rem; align-items: center; margin: 0; }
.inline-form select { margin: 0; width: auto; }
.chips { border: 0; padding: 0; margin: .5rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.chips legend { font-weight: 700; margin-bottom: .4rem; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: .35rem; margin: 0; padding: .3rem .65rem; border-radius: 999px; background: var(--bg); font-weight: 700; font-size: .9rem; cursor: pointer; }
.chip input { width: auto; margin: 0; }
.chip:has(input:checked) { background: var(--primary); color: #fff; }
.ai-log { max-height: 320px; overflow-y: auto; margin-top: 1rem; }
.ai-log li.ok { color: #2d6b14; }
.ai-log li.bad { color: var(--bad); font-weight: 700; }
.table td input { margin: 0; }
.page-head .row { align-items: center; }
[hidden] { display: none !important; }
.grid-2 + .grid-2 { margin-top: 1.25rem; }

/* İstatistik çubukları */
.bars { list-style: none; margin: .5rem 0 0; padding: 0; }
.bars li { display: grid; grid-template-columns: 7.5rem 1fr 3.5rem; gap: .6rem; align-items: center; padding: .25rem 0; font-size: .9rem; }
.bar-label { color: var(--ink-soft); font-weight: 700; }
.bar-track { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; background: var(--primary); border-radius: 999px; transition: width .6s ease-out; }
.bar-fill.bar-ai { background: #8e6ad8; }
.bar-value { text-align: right; font-weight: 800; }
.small-progress { height: 8px; margin: .4rem 0 0; min-width: 120px; }
.w-progress { width: 25%; }
.settings-form label { margin-top: .75rem; }
.settings-form p.small { margin: .2rem 0 .25rem; }
