:root { --bg: #0b0d12; --panel: #141821; --panel-2: #1b2030; --line: #262c3b; --text: #e8eaf0; --muted: #8d93a5;
  --red: #e0383f; --gold: #d9a441; --green: #3db51f; --ok: #3fbf6a; --bad: #ff5a5f; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; min-height: 100vh; }
a { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 2px; }
.dot--red { background: var(--red); } .dot--gold { background: var(--gold); } .dot--green { background: var(--green); }

.top { border-bottom: 1px solid var(--line); background: #0e1118; position: sticky; top: 0; z-index: 2; }
.top__in { max-width: 1280px; margin: 0 auto; padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 18px; letter-spacing: .02em; display: flex; align-items: center; gap: 4px; }
.top__right { display: flex; gap: 14px; align-items: center; font-size: 14px; }
.link { color: var(--muted); font-size: 14px; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 22px 20px 40px; }

.summary { border-radius: 14px; padding: 14px 18px; font-weight: 700; margin-bottom: 18px; }
.summary--ok { background: rgba(63,191,106,.12); color: #7fe3a0; border: 1px solid rgba(63,191,106,.35); }
.summary--warn { background: rgba(217,164,65,.12); color: #f2c86e; border: 1px solid rgba(217,164,65,.4); }
.alert { background: rgba(255,90,95,.12); border: 1px solid rgba(255,90,95,.4); color: #ffb3b5; border-radius: 14px; padding: 14px 18px; margin-bottom: 16px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 14px; border-top: 5px solid var(--line); }
.card--red { border-top-color: var(--red); } .card--gold { border-top-color: var(--gold); } .card--green { border-top-color: var(--green); }
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.card h2 { margin: 0; font-size: 21px; }
.card__head p { margin: 2px 0 0; font-size: 14px; }
.state { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.state--ok { background: rgba(63,191,106,.15); color: var(--ok); }
.state--bad { background: rgba(255,90,95,.15); color: var(--bad); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.kpis > div { background: var(--panel-2); border-radius: 12px; padding: 10px 12px; }
.kpis dt { font-size: 12px; color: var(--muted); }
.kpis dd { margin: 2px 0 0; font-size: 19px; font-weight: 800; }
.warn { display: block; text-decoration: none; background: rgba(217,164,65,.12); border: 1px solid rgba(217,164,65,.4); color: #f2c86e; border-radius: 10px; padding: 9px 12px; font-size: 14px; font-weight: 600; }
.warn:hover { background: rgba(217,164,65,.2); }
.err { background: rgba(255,90,95,.12); color: #ffb3b5; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 0; }
.card__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; }

.btn { display: inline-block; font: inherit; font-weight: 700; font-size: 15px; background: var(--text); color: var(--bg); border: 0; border-radius: 10px; padding: 10px 16px; cursor: pointer; text-decoration: none; }
.btn:hover { background: #fff; }
.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--panel-2); }
.btn--s { padding: 7px 12px; font-size: 14px; }

.login { max-width: 400px; margin: 0 auto; padding: 12vh 20px 40px; }
.login__brand { font-weight: 800; font-size: 20px; margin-bottom: 16px; display: flex; align-items: center; gap: 4px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.panel h1 { margin: 0; font-size: 24px; }
.panel p { margin: 0; }
.panel label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); font-weight: 600; }
.panel input { font: inherit; font-size: 17px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.panel input:focus { outline: none; border-color: var(--muted); }
.panel .btn { width: 100%; padding: 13px; }
.brand__icon { width: 34px; height: 34px; border-radius: 9px; background: #fff; display: inline-flex; align-items: center; justify-content: center; margin-right: 8px; }
.brand__icon img { height: 26px; width: auto; }
.brand__sub { color: #76b82a; font-weight: 700; margin-left: 4px; }
.login__logo { background: #fff; border-radius: 18px; padding: 18px 24px; margin-bottom: 16px; display: flex; justify-content: center; }
.login__logo img { width: 100%; max-width: 280px; height: auto; display: block; }
.wrap--narrow { max-width: 860px; }
.card + .card, .alert + .card, .summary + .card { margin-top: 16px; }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.state--warn { background: rgba(217,164,65,.15); color: var(--gold); }
.files { background: var(--panel-2); border-radius: 12px; padding: 12px 14px; }
.files ul, .commits { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.files li { padding: 3px 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; }
.commits li { padding: 8px 0; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.commits li:first-child { border-top: 0; }
.tag { display: inline-block; font-family: system-ui, sans-serif; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 6px; background: var(--line); color: var(--muted); }
.tag--new { background: rgba(63,191,106,.15); color: var(--ok); }
.tag--live { background: rgba(63,191,106,.15); color: var(--ok); }
.btn--go { background: var(--green); color: #fff; width: 100%; padding: 14px; font-size: 17px; }
.btn--go:hover { background: #4cc72c; }
.panel--flat { background: transparent; border: 0; padding: 0; }
.inline { display: inline; margin-left: auto; }
details.card summary { cursor: pointer; font-weight: 700; }
.update-banner { display: block; text-decoration: none; background: rgba(61,181,31,.12); border: 1px solid rgba(61,181,31,.45); color: #9be27e; border-radius: 14px; padding: 12px 18px; margin-bottom: 18px; font-weight: 700; }
.busy { position: fixed; inset: 0; background: rgba(0,0,0,.65); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; z-index: 10; color: #fff; font-weight: 700; }
.busy[hidden] { display: none; }
.spinner { width: 44px; height: 44px; border: 5px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.brand, .brand:hover { text-decoration: none; color: inherit; }
