:root {
  --bg: #f4f5f8; --panel: #fff; --ink: #1d2230; --muted: #6b7285; --line: #e2e5ec; --accent: #3b5bdb; --accent-ink: #fff;
  --ok: #2b8a3e; --warn: #e8590c; --bad: #c92a2a; --chip: #eef1f8;
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
[hidden] { display: none !important; }
a { color: var(--accent); }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 24px 0 8px; }
.shell { display: grid; grid-template-columns: 200px 1fr; min-height: 100vh; }
.side { background: #1d2230; color: #cfd4e2; padding: 16px 0; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.side .brand { font-weight: 700; color: #fff; padding: 0 20px 16px; font-size: 16px; }
.side a { color: #cfd4e2; text-decoration: none; padding: 8px 20px; }
.side a:hover, .side a.on { background: #2c3348; color: #fff; }
.side .who { margin-top: auto; padding: 12px 20px; font-size: 12px; color: #8b93a8; word-break: break-all; }
main { padding: 24px 32px; min-width: 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.stat b { display: block; font-size: 26px; }
.stat span { color: var(--muted); }
.banner { background: #fff4e6; border: 1px solid #ffc078; color: #7a3a00; padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; }
.banner.bad { background: #fff5f5; border-color: #ffa8a8; color: #7d1a1a; }
.bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.bar .grow { flex: 1; }
input, select, textarea { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); }
textarea { width: 100%; min-height: 80px; }
button, .btn { font: inherit; padding: 7px 14px; border-radius: 7px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink); text-decoration: none; display: inline-block; }
button:hover, .btn:hover { border-color: #b8bfd0; }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.danger { color: var(--bad); }
button:disabled { opacity: .5; cursor: not-allowed; }
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #f9fafc; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr:last-child td { border-bottom: 0; }
td.thumb img { width: 96px; height: 54px; object-fit: cover; border-radius: 5px; display: block; background: var(--chip); }
.chip { display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--chip); font-size: 12px; }
.chip.published, .chip.ok { background: #d3f9d8; color: var(--ok); }
.chip.draft { background: #fff3bf; color: #8a6d00; }
.chip.bad { background: #ffe3e3; color: var(--bad); }
.muted { color: var(--muted); }
.err { color: var(--bad); min-height: 1em; }
.login { display: grid; place-items: center; min-height: 100vh; }
.login form { width: 340px; display: grid; gap: 12px; }
label { display: grid; gap: 4px; font-weight: 600; font-size: 13px; }
label.inline { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form .wide { grid-column: 1 / -1; }
.media { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.media img, .media video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--chip); border-radius: 6px; }
.modal { position: fixed; inset: 0; background: rgba(20, 24, 36, .45); display: grid; place-items: start center; overflow: auto; padding: 40px 16px; z-index: 10; }
.modal .card { width: min(920px, 100%); }
.toast { position: fixed; bottom: 20px; right: 20px; background: #1d2230; color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 20; max-width: 420px; }
.members { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 8px; max-height: 420px; overflow: auto; }
.members li { display: flex; gap: 10px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line); background: #fff; cursor: grab; }
.members li.drag { opacity: .4; }
.members li img { width: 64px; height: 36px; object-fit: cover; border-radius: 4px; }
.members li .grow { flex: 1; }
.diff td { font-size: 13px; }
.diff .old { color: var(--bad); text-decoration: line-through; word-break: break-word; }
.diff .new { color: var(--ok); word-break: break-word; }
.progress { height: 8px; background: var(--chip); border-radius: 99px; overflow: hidden; margin: 8px 0; }
.progress div { height: 100%; background: var(--accent); width: 0; transition: width .2s; }
@media (max-width: 760px) { .shell { grid-template-columns: 1fr; } .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; } .form, .media { grid-template-columns: 1fr; } main { padding: 16px; } }
td:last-child { white-space: nowrap; }
td button { padding: 4px 10px; font-size: 13px; }
.media > div { min-width: 0; }
.media input { width: 100%; max-width: 100%; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); text-align: center; }
