@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #0f172a;
  --surface: #151d32;
  --surface-2: #1d2740;
  --line: rgba(255, 255, 255, .09);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --primary: #ec4899;
  --danger: #f87171;
  --ok: #34d399;
  --warn: #fbbf24;
  color-scheme: dark;
  font-family: Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 20px; background: rgba(15, 23, 42, .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.bar-title { display: flex; align-items: center; gap: 8px; }
.bar-sub { color: var(--muted); }
.mark { width: 18px; height: 18px; border-radius: 6px 6px 6px 2px; background: var(--primary); }
.bar-right { display: flex; align-items: center; gap: 14px; }
.role { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: #cbd5e1; }
.link { color: #93c5fd; text-decoration: none; }
.link:hover { text-decoration: underline; }

main { max-width: 1100px; margin: 0 auto; padding: 20px; }

.gate { max-width: 460px; margin: 12vh auto; text-align: center; }
.gate h1 { font-size: 22px; margin: 0 0 8px; }
.gate p { color: var(--muted); margin: 0 0 20px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat { padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.stat b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; }
.stat.alert b { color: var(--warn); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--primary); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.toolbar input { flex: 1; min-width: 200px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: none; padding: 7px 12px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }

input, select { min-height: 38px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
textarea { width: 100%; min-height: 70px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; resize: vertical; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 14px; border-radius: 8px;
  border: 1px solid transparent; background: #e2e8f0; color: #0f172a; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn:hover { background: #fff; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { background: transparent; color: var(--danger); border-color: rgba(248, 113, 113, .4); }
.btn.danger:hover { background: rgba(248, 113, 113, .1); }
.btn.small { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }

.list { display: grid; gap: 8px; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 10px; }

.report { display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.thumb { width: 56px; height: 72px; border-radius: 8px; background: var(--surface-2) center / cover; display: grid; place-items: center; color: var(--muted); font-weight: 700; }
.report h3 { margin: 0 0 2px; font-size: 15px; }
.meta { color: var(--muted); font-size: 12px; }
.reason { display: inline-block; margin: 6px 6px 0 0; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); font-size: 12px; font-weight: 600; }
.reason.minor { background: rgba(248, 113, 113, .16); color: #fecaca; }
.quote { margin: 8px 0 0; padding: 8px 10px; border-left: 2px solid var(--line); color: #cbd5e1; white-space: pre-wrap; word-break: break-word; }
.quote img, .quote video { max-width: 220px; max-height: 220px; border-radius: 6px; display: block; }
.actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.status { font-size: 12px; font-weight: 600; }
.status.open, .status.reviewing { color: var(--warn); }
.status.actioned { color: var(--ok); }
.status.dismissed { color: var(--muted); }
.banned-tag { color: var(--danger); font-weight: 600; font-size: 12px; margin-left: 6px; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }

.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; margin-bottom: 26px; }
.grid-form label, .field { display: grid; gap: 6px; color: var(--muted); font-size: 12px; }
h2 { font-size: 15px; margin: 6px 0 12px; }
.hint { color: var(--muted); margin: -6px 0 12px; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 600; font-size: 12px; }
.table input[type="number"] { width: 110px; }

.log-item { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.log-item time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

.drawer { position: fixed; inset: 0; z-index: 50; display: none; }
.drawer.open { display: block; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(520px, 100%); overflow-y: auto; background: var(--bg); border-left: 1px solid var(--line); padding: 16px 20px 28px; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.drawer-head h2 { margin: 0; font-size: 17px; }
.icon { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: none; display: grid; place-items: center; }
.icon svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.section { padding: 14px 0; border-top: 1px solid var(--line); }
.section h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 4px 10px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo { position: relative; aspect-ratio: .78; border-radius: 8px; background: var(--surface-2) center / cover; }
.photo .btn { position: absolute; left: 6px; right: 6px; bottom: 6px; }
.stack { display: grid; gap: 8px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); padding: 10px 14px; border-radius: 8px; background: #f8fafc; color: #0f172a; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s; z-index: 100; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  main { padding: 14px; }
  .report { grid-template-columns: 48px 1fr; }
  .report .actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .kv { grid-template-columns: 1fr; }
  .log-item { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.login{display:grid;gap:12px;text-align:left}
.login .field input{width:100%;min-height:42px}
.login .btn{min-height:42px}
.login-error{margin:0;color:var(--danger);font-size:13px}
.login-error:empty{display:none}
