:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --hover: #f3f4f6;
  --accent: #4f46e5;
  --accent-soft: #eef2ff;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --ok: #15803d;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --panel: #181b21;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --line: #2a2f37;
    --hover: #20242b;
    --accent: #818cf8;
    --accent-soft: #23264a;
    --danger: #f87171;
    --danger-soft: #3a1d1d;
    --warn: #fbbf24;
    --warn-soft: #33290f;
    --ok: #4ade80;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- üst bar */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 16px; white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.brand span { color: var(--muted); font-weight: 600; font-size: 14px; padding-left: 10px; border-left: 1px solid var(--line); }
.brand .logo { height: 22px; width: auto; display: block; }
.login-logo { height: 30px; width: auto; max-width: 100%; display: block; align-self: flex-start; object-fit: contain; margin: 0 0 14px; }
@media (prefers-color-scheme: dark) { .logo { filter: brightness(0) invert(.92); } }
.tabs { display: flex; gap: 4px; }
.tab {
  border: 0; background: none; padding: 6px 12px; border-radius: 8px; color: var(--muted); font-weight: 500;
}
.tab.active { background: var(--accent-soft); color: var(--accent); }
.spacer { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); font-weight: 500; white-space: nowrap;
}
.btn:hover { background: var(--hover); }
a.btn { text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: none; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }

main { max-width: 1400px; margin: 0 auto; padding: 16px; }

/* ---------- özet kartları */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.stat {
  text-align: left; border: 1px solid var(--line); background: var(--panel);
  border-radius: var(--radius); padding: 10px 14px;
}
.stat b { display: block; font-size: 22px; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 12.5px; }
.stat.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.stat.red b { color: var(--danger); }
.stat.amber b { color: var(--warn); }

/* ---------- filtreler */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.filters input[type=search], .filters select {
  height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 0 10px;
  min-width: 0;
}
.filters input[type=search] { flex: 1 1 220px; }
.filters select { flex: 0 1 180px; }
.check { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); white-space: nowrap; }

.bulkbar {
  position: sticky; top: 57px; z-index: 15;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px; margin-bottom: 8px;
  background: var(--accent-soft); border-radius: var(--radius);
}

/* ---------- liste */
.list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.row {
  display: grid;
  grid-template-columns: 32px 130px 130px minmax(120px, 1fr) 150px minmax(180px, 2fr) 84px 185px;
  gap: 10px; align-items: center;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.row:first-child { border-top: 0; }
.row:hover { background: var(--hover); }
.salt-okunur .row { cursor: default; }
.c-adet { text-align: right; }
.adet { font-variant-numeric: tabular-nums; }
.adet-in {
  width: 100%; box-sizing: border-box; padding: 5px 6px; text-align: right; font: inherit; font-variant-numeric: tabular-nums;
  color: var(--text); background: transparent; border: 1px solid transparent; border-radius: 6px; cursor: text;
  -moz-appearance: textfield; appearance: textfield;
}
.adet-in::-webkit-inner-spin-button, .adet-in::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.row:hover .adet-in, .adet-in:focus { border-color: var(--line); background: var(--panel); }
.row.head {
  cursor: default; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .02em;
  background: var(--bg); position: sticky;
}
.row.head:hover { background: var(--bg); }
.row.done > :not(.c-durum) { opacity: .55; }
.row.selected { background: var(--accent-soft); }
.cell-sub { display: block; font-size: 12px; color: var(--muted); }
.yayin { font-weight: 600; }
.note { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-only { display: none; }

.due { font-variant-numeric: tabular-nums; }
.badge { display: inline-block; font-size: 11.5px; padding: 1px 7px; border-radius: 99px; font-weight: 600; margin-top: 2px; }
.badge.late { background: var(--danger-soft); color: var(--danger); }
.badge.soon { background: var(--warn-soft); color: var(--warn); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  border: 1px solid var(--line); background: var(--panel); border-radius: 99px;
  padding: 3px 10px 3px 8px; font-size: 12.5px; font-weight: 500;
}
.pill i { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--muted); }
.pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill .caret { font-weight: 400; color: var(--muted); font-size: 11px; margin-left: 2px; }
.pill-btn { all: unset; cursor: pointer; max-width: 100%; border-radius: 99px; }
.pill-btn:hover .pill { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.pill-btn:focus-visible .pill { outline: 2px solid var(--accent); }

.empty { padding: 40px; text-align: center; color: var(--muted); }
.count { color: var(--muted); font-size: 13px; margin: 10px 2px; }

.group-head {
  padding: 8px 12px; font-weight: 700; background: var(--bg); border-top: 1px solid var(--line);
  display: flex; justify-content: space-between;
}
.group-head small { color: var(--muted); font-weight: 500; }

/* ---------- popover menü */
.menu {
  position: fixed; z-index: 60; min-width: 200px; max-height: 60vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 4px;
}
.menu button {
  display: flex; width: 100%; align-items: center; gap: 8px; text-align: left;
  border: 0; background: none; padding: 8px 10px; border-radius: 6px;
}
.menu button:hover { background: var(--hover); }
.menu i { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.menu button span { flex: 1; }
.menu button.cur { font-weight: 600; background: var(--accent-soft); }
.menu em { font-style: normal; color: var(--accent); }

/* ---------- modal */
.overlay {
  position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.4);
  display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow: auto;
}
.modal {
  width: 100%; max-width: 640px; background: var(--panel); border-radius: 14px; box-shadow: var(--shadow);
}
.modal header { display: flex; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal header h2 { margin: 0; font-size: 16px; flex: 1; }
.modal .body { padding: 16px 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.modal footer {
  display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap;
}
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field .hint { font-size: 11.5px; color: var(--muted); }
.field input[type=date], .field textarea, .field input[type=text] {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 8px 10px; min-height: 38px;
}
.field textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus, .combo:focus-within { outline: 2px solid var(--accent); outline-offset: -1px; }

/* ---------- combo (seç veya yeni ekle) */
.combo {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 4px 6px; min-height: 38px;
}
.combo input, .field .combo input[type=text] { flex: 1 1 80px; width: auto; min-width: 60px; min-height: 0; border: 0; outline: 0; background: none; padding: 4px; }
.combo .chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 2px 4px 2px 8px; font-size: 13px;
}
.combo .chip button, .combo .clear { border: 0; background: none; color: inherit; padding: 0 4px; font-size: 15px; line-height: 1; }
.combo .clear { color: var(--muted); }
.combo .new-tag { font-size: 11px; color: var(--accent); font-weight: 600; padding-right: 4px; }
.combo ul {
  position: absolute; left: -1px; right: -1px; top: calc(100% + 4px); z-index: 50;
  list-style: none; margin: 0; padding: 4px; max-height: 260px; overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow);
}
.combo li { padding: 7px 10px; border-radius: 6px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.combo li.hl { background: var(--hover); }
.combo li.add { color: var(--accent); font-weight: 600; }
.combo li.none { color: var(--muted); cursor: default; }
.combo li i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.combo li mark { background: none; color: inherit; font-weight: 700; }

/* ---------- listeler (ayarlar) */
.lists { display: grid; grid-template-columns: 220px 1fr; gap: 16px; }
.lists nav { display: flex; flex-direction: column; gap: 4px; }
.lists nav button {
  display: flex; justify-content: space-between; text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 8px;
}
.lists nav button.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.lists nav small { color: var(--muted); }
.opt-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.opt-tools { display: flex; gap: 8px; padding: 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.opt-tools input { flex: 1 1 200px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 0 10px; }
.opt {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-top: 1px solid var(--line);
}
.opt:first-child { border-top: 0; }
.opt input.name { flex: 1; min-width: 0; border: 1px solid transparent; background: none; border-radius: 6px; padding: 6px 8px; }
.opt input.name:hover { border-color: var(--line); }
.opt input[type=color] { width: 30px; height: 30px; border: 0; padding: 0; background: none; }
.opt .uses { color: var(--muted); font-size: 12px; white-space: nowrap; min-width: 70px; text-align: right; }
.opt .btn { height: 30px; padding: 0 8px; }

/* ---------- takvim yükleme */
.modal.wide { max-width: 980px; }
.tbody { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 40px 20px; border: 2px dashed var(--line); border-radius: 12px; cursor: pointer; color: var(--muted);
}
.drop b { color: var(--accent); font-size: 15px; }
.drop small { max-width: 460px; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop.busy { opacity: .5; pointer-events: none; }
.tinfo { color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tinfo b { color: var(--text); }
.tinfo select { height: 30px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.tgrid { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
[data-step2] { display: flex; flex-direction: column; gap: 14px; }
.inline { display: flex; align-items: center; gap: 8px; min-height: 38px; }
.inline input { width: 64px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 0 8px; }
.tmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px 16px; margin-top: 6px; }
.tmap-row { display: grid; grid-template-columns: 76px 16px 1fr; align-items: center; gap: 6px; }
.tlabel { font-weight: 700; background: var(--bg); border-radius: 6px; padding: 7px 8px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arrow { color: var(--muted); }
.tsum { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tsum span { padding: 4px 10px; border-radius: 99px; font-weight: 600; font-size: 12.5px; background: var(--bg); }
.tsum .c-yeni { background: #dcfce7; color: #166534; }
.tsum .c-degisti { background: var(--warn-soft); color: var(--warn); }
.tsum .c-eksik { background: var(--danger-soft); color: var(--danger); }
@media (prefers-color-scheme: dark) { .tsum .c-yeni { background: #14361f; color: #4ade80; } }
.twarn { color: var(--warn); margin-bottom: 8px; }
.tsec { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.tsec summary { display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer; background: var(--bg); list-style: none; }
.tsec summary::-webkit-details-marker { display: none; }
.tsec summary::before { content: "▸"; color: var(--muted); }
.tsec[open] summary::before { content: "▾"; }
.tsec .hint { padding: 6px 12px 2px; font-size: 12px; color: var(--muted); }
.tsec.yeni summary b { color: var(--ok); }
.tsec.degisti summary b { color: var(--warn); }
.tsec.eksik summary b { color: var(--danger); }
.tcount { color: var(--muted); font-weight: 600; }
.tall { margin-left: auto; display: flex; gap: 2px; }
.trow {
  display: grid; grid-template-columns: 22px 190px 170px 1fr; gap: 10px; align-items: center;
  padding: 6px 12px; border-top: 1px solid var(--line); font-size: 13px; cursor: pointer;
}
.trow:hover { background: var(--hover); }
.trow s { color: var(--muted); }
.trow small { display: block; color: var(--muted); }
.ty { font-weight: 600; }
.tsec.ayni .trow, .tsec.atla .trow { cursor: default; color: var(--muted); }
.tgecmis h3 { font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 0 0 4px; }
.tgecmis-row { display: grid; grid-template-columns: 128px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.tgecmis-row .ty { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tgecmis-row small { display: block; color: var(--muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.tgecmis-row .tt, .tgecmis-row .tsay, .tgecmis-row .tgeri { color: var(--muted); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tgecmis-row.geri .ty { color: var(--muted); }
@media (max-width: 560px) {
  .tgecmis-row { grid-template-columns: minmax(0, 1fr) auto; }
  .tgecmis-row .tt { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .tgrid { grid-template-columns: 1fr; }
  .tmap { grid-template-columns: 1fr; }
  .trow { grid-template-columns: 22px 1fr; gap: 2px 8px; }
  .trow > :nth-child(n+2) { grid-column: 2; }
  .modal.wide .tbody { flex: 1; }
}

/* ---------- kurum renkleri */
.row[style*="--k"] { box-shadow: inset 4px 0 0 var(--k); }
.kdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; flex: none; }
.cdot, .sw-btn {
  flex: none; width: 20px; height: 20px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line); margin-left: 4px;
}
.cdot:hover, .sw-btn:hover { box-shadow: 0 0 0 2px var(--accent); }
.sw-btn { width: 26px; height: 26px; margin: 0; }
.sw-btn.lg { width: 36px; height: 36px; }
.palette { padding: 12px; min-width: 0; width: 220px; }
.pal-title { font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 2px 10px; }
.pal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.palette .sw {
  display: grid; place-items: center; position: relative; width: 100%; aspect-ratio: 1; padding: 0;
  border-radius: 10px; background: var(--c); transition: transform .08s;
}
.palette .sw:hover { background: var(--c); transform: scale(1.08); }
.palette .sw.cur, .palette .sw.cur:hover { background: var(--c); box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--c); }
.palette .sw.cur::after { content: "✓"; color: #fff; font-weight: 700; font-size: 16px; }
.palette .sw i, .pal-note i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.9); }
.palette .sw i { position: absolute; right: 5px; bottom: 5px; }
.pal-custom { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; cursor: pointer; }
.pal-custom input { width: 28px; height: 28px; border: 0; padding: 0; background: none; cursor: pointer; }
.pal-note { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.pal-note i { background: var(--muted); }

/* ---------- toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100;
  background: #111827; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow);
  max-width: calc(100% - 32px);
}
.toast.err { background: var(--danger); }

.fab { display: none; }

/* ---------- mobil */
@media (max-width: 860px) {
  .topbar { padding: 8px 12px; gap: 8px; }
  .brand { display: none; }
  .desk-only { display: none !important; }
  main { padding: 12px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stat { padding: 8px 12px; }
  .stat b { font-size: 19px; }
  .filters select { flex: 1 1 calc(50% - 4px); }
  .bulkbar { top: 53px; }

  .list { background: none; border: 0; }
  .row.head { display: none; }
  .row {
    grid-template-columns: 26px 1fr auto auto;
    grid-template-areas:
      "chk kurum adet durum"
      "chk yayin yayin yayin"
      "chk meta meta meta";
    gap: 2px 8px; padding: 12px; margin-bottom: 8px;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  }
  .row:first-child { border-top: 1px solid var(--line); }
  .row > .c-chk { grid-area: chk; align-self: start; padding-top: 2px; }
  .row > .c-kurum { grid-area: kurum; font-weight: 600; font-size: 13px; color: var(--muted); }
  .row > .c-durum { grid-area: durum; }
  .row > .c-adet { grid-area: adet; }
  .row .adet-in { width: 64px; border-color: var(--line); }
  .row .adet:not(.bos)::after { content: " adet"; color: var(--muted); font-size: 12px; }
  .row > .c-yayin { grid-area: yayin; font-size: 15px; }
  .row > .c-due, .row > .c-sinav, .row > .c-sinif { display: none; }
  .row > .c-meta { grid-area: meta; display: flex !important; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
  .m-only { display: block; }
  .group-head { border: 0; background: none; padding: 12px 4px 6px; }

  .modal .body { grid-template-columns: 1fr; }
  .overlay { padding: 0; align-items: stretch; }
  .modal { border-radius: 0; min-height: 100%; display: flex; flex-direction: column; }
  .modal .body { flex: 1; align-content: start; }
  .modal footer { position: sticky; bottom: 0; background: var(--panel); }

  .lists { grid-template-columns: 1fr; }
  .lists nav { flex-direction: row; overflow-x: auto; }
  .lists nav button { white-space: nowrap; gap: 6px; }

  .fab {
    display: flex; position: fixed; right: 18px; bottom: 18px; z-index: 30;
    width: 56px; height: 56px; border-radius: 50%; border: 0;
    background: var(--accent); color: #fff; font-size: 28px; align-items: center; justify-content: center;
    box-shadow: 0 6px 20px rgba(79,70,229,.45);
  }
}
.c-meta { display: none; }

/* ---------- giriş */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 360px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.login-card h1 { font-size: 18px; margin: 0 0 6px; display: flex; gap: 10px; align-items: center; }
.login-card label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.login-card input { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 0 12px; font-size: 15px; }
.login-card .btn { width: 100%; height: 42px; }
.login-hint { margin: 0; font-size: 12.5px; color: var(--muted); }
.login-err { color: var(--danger); font-size: 13px; min-height: 18px; }

/* ---------- kullanıcılar */
.users { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.users-tools { display: flex; gap: 8px; align-items: center; padding: 12px; border-bottom: 1px solid var(--line); }
.users-tools h2 { margin: 0; font-size: 15px; }
.user-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) 110px 150px 130px auto; gap: 10px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); }
.user-row:first-of-type { border-top: 0; }
.user-row.head { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--hover); }
.user-row.pasif { opacity: .55; }
.user-row .u-ad b { display: block; }
.user-row .u-ad small, .user-row .u-meta { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.user-row .u-act { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--hover); color: var(--muted); white-space: nowrap; }
.badge.admin { background: var(--accent-soft); color: var(--accent); }
.badge.ok { color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.err { background: var(--danger-soft); color: var(--danger); }
.field input[type=email], .field input[type=password], .field select {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 8px 10px; min-height: 38px;
}
.kod-kutu { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 10px; background: var(--accent-soft); }
.kod-kutu code { font-size: 22px; font-weight: 700; letter-spacing: 2px; color: var(--accent); user-select: all; }
.kod-kutu p { margin: 0; font-size: 13px; }
.user-chip { color: var(--muted); font-size: 13px; white-space: nowrap; }
@media (max-width: 860px) {
  .user-row { grid-template-columns: 1fr auto; }
  .user-row.head { display: none; }
  .user-row .u-meta { grid-column: 1 / -1; }
  .user-row .u-act { grid-column: 1 / -1; justify-content: flex-start; }
  .user-chip { display: none; }
}
