:root {
  --bg: #0e1116; --bg2: #161b22; --bg3: #1f2630; --line: #2b3341; --text: #e6e8eb; --muted: #8b96a5;
  --accent: #ffb400; --blue: #2f81f7; --green: #3fb950; --red: #f85149; --amber: #e3b341; --radius: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 "Inter", -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
.boot { padding: 40px; color: var(--muted); text-align: center; }
header.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg2); border-bottom: 1px solid var(--line); }
header.top .logo { font-weight: 800; font-size: 17px; letter-spacing: -.3px; }
header.top .logo span { color: var(--accent); }
nav.tabs { display: flex; gap: 2px; overflow-x: auto; flex: 1; scrollbar-width: none; }
nav.tabs::-webkit-scrollbar { display: none; }
nav.tabs a { padding: 7px 12px; border-radius: 8px; color: var(--muted); white-space: nowrap; font-size: 14px; }
nav.tabs a.active { background: var(--bg3); color: var(--text); }
main { max-width: 1100px; margin: 0 auto; padding: 14px; padding-bottom: 60px; }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.card h2 { font-size: 16px; margin-bottom: 10px; }
.card h3 { font-size: 13px; margin: 12px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.brand-tile { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; color: var(--text); display: block; }
.brand-tile:hover { border-color: var(--accent); }
.brand-tile .name { font-weight: 800; font-size: 17px; }
.brand-tile .sub { color: var(--muted); font-size: 13px; margin: 4px 0 8px; }
.bar { height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.two { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
label.f { display: block; margin: 10px 0 4px; color: var(--muted); font-size: 12.5px; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=url], select, textarea {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; font: inherit;
}
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline > * { flex: 1; }
.inline > .fix { flex: 0 0 auto; }
button { font: inherit; border: none; border-radius: 8px; padding: 9px 14px; cursor: pointer; background: var(--bg3); color: var(--text); font-weight: 600; }
button:hover { filter: brightness(1.15); }
button.primary { background: var(--accent); color: #101722; }
button.good { background: var(--green); color: #06120a; }
button.danger { background: var(--red); color: #fff; }
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
button.sm { padding: 5px 10px; font-size: 13px; border-radius: 6px; }
button:disabled { opacity: .5; cursor: default; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.chip { padding: 6px 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; color: var(--muted); font-size: 13px; cursor: pointer; white-space: nowrap; }
.chip.active, .chip:hover { border-color: var(--accent); color: var(--text); }
.muted { color: var(--muted); } .small { font-size: 13px; } .ok { color: var(--green); } .warn { color: var(--amber); } .err { color: var(--red); }
.kv { color: var(--muted); font-size: 13px; margin-bottom: 3px; } .kv b { color: var(--text); font-weight: 600; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th, table.t td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--bg3); border: 1px solid var(--line); color: var(--text); padding: 10px 18px; border-radius: 10px; z-index: 99; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
.toast.err { border-color: var(--red); }
.login-wrap { max-width: 360px; margin: 12vh auto 0; padding: 0 16px; }
.login-wrap .logo { font-size: 26px; font-weight: 800; text-align: center; margin-bottom: 18px; }
.login-wrap .logo span { color: var(--accent); }
/* chat */
.chatlog { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; max-height: 60vh; overflow: auto; padding-right: 4px; }
.bub { max-width: 88%; padding: 9px 13px; border-radius: 14px; font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }
.bub.user { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.bub.bot { align-self: flex-start; background: var(--bg3); border-bottom-left-radius: 4px; }
.bub.pending { opacity: .6; font-style: italic; }
.bub .meta { display: block; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
/* checklist */
.ck { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.ck:last-child { border-bottom: none; }
.ck .st { flex: 0 0 auto; }
.ck select { width: auto; padding: 4px 8px; font-size: 12.5px; }
.ck .t { font-weight: 600; }
.ck .d { color: var(--muted); font-size: 13px; margin-top: 2px; }
.ck.done .t { color: var(--green); }
.ck.blocked .t { color: var(--red); }
.badge { font-size: 11.5px; padding: 2px 8px; border-radius: 20px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge.done { color: var(--green); border-color: rgba(63,185,80,.4); }
.badge.doing { color: var(--blue); border-color: rgba(47,129,247,.4); }
.badge.blocked { color: var(--red); border-color: rgba(248,81,73,.4); }
.badge.auto { color: var(--accent); border-color: rgba(255,180,0,.4); }
/* assets */
.assets { display: flex; flex-wrap: wrap; gap: 8px; }
.asset { width: 120px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px; font-size: 11.5px; color: var(--muted); text-align: center; }
.asset img { width: 100%; height: 90px; object-fit: contain; background: #fff; border-radius: 6px; }
.asset .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 4px; }
.swatch { display: inline-block; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line); vertical-align: middle; margin-right: 6px; }
.opt { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; cursor: pointer; }
.opt:hover { border-color: var(--accent); }
.opt .v { font-weight: 700; }
.opt .w { color: var(--muted); font-size: 13px; }
details summary { cursor: pointer; color: var(--muted); font-size: 13px; margin: 6px 0; }
pre { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; overflow: auto; font-size: 12.5px; white-space: pre-wrap; word-break: break-word; }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); margin-right: 6px; vertical-align: middle; }
.status-dot.ok { background: var(--green); } .status-dot.warn { background: var(--amber); } .status-dot.err { background: var(--red); }
.inline select.auto { width: auto; }
@media (max-width: 640px) { main { padding: 10px; } .inline { flex-direction: column; align-items: stretch; } .inline > * { width: 100%; } }
