:root { --bg: #0f1218; --panel: #171b23; --panel-2: #1e232d; --line: #2a3140; --ink: #e8ecf3; --muted: #8b96a8; --accent: #f5a623; --primary: #3b82f6; --ok: #22c55e; --err: #ef4444; --radius: 10px; }
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5; }
a { color: #93c5fd; text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.2; } h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1rem; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .error { color: var(--err); font-size: .9rem; min-height: 1.3em; margin: 8px 0 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; background: var(--panel-2); color: var(--ink); transition: filter .15s; }
.btn:hover { filter: brightness(1.15); text-decoration: none; } .btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--primary); color: #fff; } .btn--accent { background: var(--accent); color: #1a1a1a; } .btn--ok { background: var(--ok); color: #06210f; } .btn--danger { background: transparent; border-color: var(--err); color: #fca5a5; }
.btn--ghost { background: transparent; border-color: var(--line); } .btn--sm { padding: 6px 10px; font-size: .85rem; } .btn--block { width: 100%; } .btn--icon { padding: 6px 8px; min-width: 34px; }
/* login */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.login__card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 32px; }
.login__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--muted); margin-bottom: 18px; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; }
.login__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); display: inline-block; }
.login label { display: block; margin: 12px 0; font-weight: 600; font-size: .9rem; } .login input { display: block; width: 100%; margin-top: 6px; }
input, select, textarea { width: 100%; padding: 10px 12px; background: #0b0e14; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; font: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.25); }
textarea { min-height: 96px; resize: vertical; } input[type=color] { padding: 2px; height: 42px; width: 64px; } input[type=checkbox] { width: auto; }
/* shell */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px; padding: 12px 24px; background: var(--panel); border-bottom: 1px solid var(--line); }
.topbar__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; } .topbar__nav a { color: var(--ink); font-weight: 600; } .topbar__user { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .9rem; }
.app { max-width: 1240px; margin: 0 auto; padding: 28px 24px 80px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.crumb { color: var(--muted); font-size: .9rem; margin-bottom: 6px; } .crumb a { color: var(--muted); }
.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .75rem; font-weight: 700; } .badge--warn { background: rgba(245,166,35,.18); color: var(--accent); } .badge--ok { background: rgba(34,197,94,.18); color: #86efac; }
/* dashboard */
.sites { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.site-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.site-card__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.site-card h2 { margin: 0; } .site-card .meta { color: var(--muted); font-size: .85rem; }
.site-card .actions { margin-top: 8px; }
/* editor */
.tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); padding: 10px 14px; font: inherit; font-weight: 600; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.panel h2 { margin-bottom: 4px; } .panel > .muted { margin-bottom: 16px; display: block; }
.frow { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 18px; } .frow .full { grid-column: 1 / -1; }
.f { display: flex; flex-direction: column; gap: 6px; } .f label { font-weight: 600; font-size: .88rem; } .f .hint { font-size: .78rem; color: var(--muted); }
.img-field { display: flex; gap: 14px; align-items: center; } .img-field img { width: 96px; height: 64px; object-fit: contain; background: #0b0e14; border: 1px solid var(--line); border-radius: 6px; }
.img-field > div { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.list { display: grid; gap: 12px; }
.item { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: start; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.item--noimg { grid-template-columns: 1fr auto; }
.item img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; background: #0b0e14; }
.item .f + .f { margin-top: 8px; } .item .tools { display: flex; flex-direction: column; gap: 6px; }
.item.is-off { opacity: .55; }
.sticky-bar { position: sticky; bottom: 0; background: rgba(15,18,24,.92); backdrop-filter: blur(6px); border-top: 1px solid var(--line); padding: 12px 0; margin-top: 10px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sticky-bar .status { margin-left: auto; color: var(--muted); font-size: .88rem; }
.toast-region { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 50; }
.toast { background: #0b0e14; border: 1px solid var(--line); border-left: 4px solid var(--primary); color: var(--ink); padding: 10px 14px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.4); font-size: .92rem; }
.toast--ok { border-left-color: var(--ok); } .toast--err { border-left-color: var(--err); }
.subs { display: grid; gap: 10px; } .sub { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 14px; } .sub strong { display: block; } .sub .muted { font-size: .82rem; } .sub p { white-space: pre-wrap; margin: 8px 0; }
@media (max-width: 800px) { .sites, .frow { grid-template-columns: 1fr; } .item { grid-template-columns: 1fr; } .item img { width: 100%; height: 140px; } .topbar { flex-wrap: wrap; } .app { padding: 18px 14px 80px; } }
/* v2 additions */
.site-card__id { display: flex; align-items: center; gap: 14px; } .site-card__logo { height: 44px; max-width: 150px; object-fit: contain; background: #fff; padding: 5px 8px; border-radius: 6px; }
.badge--info { background: rgba(96,165,250,.18); color: #93c5fd; }
.activity { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; } .activity li { display: flex; gap: 12px; align-items: center; font-size: .9rem; padding: 8px 0; border-bottom: 1px solid var(--line); } .activity__time { color: var(--muted); min-width: 170px; font-size: .82rem; }
.check { display: flex; align-items: center; gap: 8px; padding: 10px 0; font-weight: 500; } .check input { width: auto; }
.item--noimg { grid-template-columns: 1fr auto; }
@media (max-width: 800px) { .activity li { flex-wrap: wrap; } .item--noimg { grid-template-columns: 1fr; } }
