:root {
  --bg: #0f1026; --surface: #1a1b3d; --surface2: #222452; --line: #2f3168;
  --text: #f1f2ff; --muted: #9a9dc8; --brand: #7a5cff; --brand2: #5b8cff;
  --ok: #3ccf8e; --err: #ff6b6b; --warn: #ffca46;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg); color: var(--text); }
a { color: #a9b7ff; }
h1 { font-size: 22px; margin: 0 0 16px; }
h2 { font-size: 17px; margin: 28px 0 10px; }
h3 { font-size: 15px; margin: 18px 0 8px; }
p.hint, .hint { color: var(--muted); font-size: 13px; }
.layout { display: flex; min-height: 100vh; }
nav.side { width: 220px; flex: none; background: #0b0c1e; border-right: 1px solid var(--line); padding: 16px 0; }
nav.side .brand { font-weight: 800; font-size: 17px; padding: 0 18px 14px; letter-spacing: .3px; }
nav.side .brand span { color: var(--brand); }
nav.side a { display: block; padding: 8px 18px; color: var(--muted); text-decoration: none; }
nav.side a:hover { color: var(--text); background: var(--surface); }
nav.side a.on { color: var(--text); background: var(--surface); border-left: 3px solid var(--brand); padding-left: 15px; }
nav.side .sep { height: 1px; background: var(--line); margin: 10px 18px; }
nav.side form { padding: 8px 18px; }
main { flex: 1; min-width: 0; padding: 24px 28px 60px; max-width: 1200px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.stat b { font-size: 26px; display: block; }
.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; }
.flash.ok { background: rgba(60,207,142,.12); border: 1px solid rgba(60,207,142,.4); }
.flash.err { background: rgba(255,107,107,.12); border: 1px solid rgba(255,107,107,.45); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; background: var(--surface2); color: var(--muted); }
.badge.ok { background: rgba(60,207,142,.15); color: var(--ok); }
.badge.err { background: rgba(255,107,107,.15); color: var(--err); }
.badge.warn { background: rgba(255,202,70,.15); color: var(--warn); }
input[type=text], input[type=password], input[type=number], input[type=url], input[type=email], select, textarea {
  background: #0d0e22; color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 10px; font: inherit; width: 100%; }
textarea { resize: vertical; min-height: 60px; }
textarea.code { font: 12.5px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; min-height: 70vh; white-space: pre; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
label { display: block; margin: 10px 0 4px; color: var(--muted); font-size: 13px; }
label.inline { display: inline-flex; gap: 8px; align-items: center; color: var(--text); margin: 6px 16px 6px 0; }
button, .btn { display: inline-block; background: linear-gradient(135deg, var(--brand2), var(--brand)); color: #fff;
  border: 0; border-radius: 8px; padding: 8px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
button.ghost, .btn.ghost { background: var(--surface2); color: var(--text); border: 1px solid var(--line); }
button.danger { background: var(--err); }
button.small { padding: 4px 10px; font-size: 13px; }
button:disabled { opacity: .5; cursor: default; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 200px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
td.key { font: 12px ui-monospace, Menlo, monospace; color: var(--muted); width: 210px; word-break: break-all; }
td.en { width: 38%; color: #cfd2f5; white-space: pre-wrap; }
tr.changed td { background: rgba(122,92,255,.08); }
tr.missing td.key { color: var(--warn); }
.sticky-bar { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); padding: 12px 0; margin-top: 12px; z-index: 5; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tabs a { padding: 5px 12px; border-radius: 99px; background: var(--surface); color: var(--muted); text-decoration: none; border: 1px solid var(--line); }
.tabs a.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.list li { margin: 4px 0; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 4px; vertical-align: middle; border: 1px solid #fff3; }
.block { background: #0d0e22; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.block .head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.block .head select { width: auto; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.thumbs figure { margin: 0; background: #0d0e22; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.thumbs img { width: 100%; height: 110px; object-fit: contain; }
.thumbs figcaption { font-size: 12px; color: var(--muted); word-break: break-all; margin: 6px 0; }
.login { max-width: 360px; margin: 12vh auto; }
.muted { color: var(--muted); }
ul.errors li { color: var(--err); }
ul.warnings li { color: var(--warn); }
@media (max-width: 800px) {
  .layout { display: block; }
  nav.side { width: auto; display: flex; flex-wrap: wrap; padding: 8px; }
  nav.side .brand, nav.side .sep { display: none; }
  nav.side a { padding: 6px 10px; }
  main { padding: 16px; }
  td.key { width: auto; }
}
