:root {
    --bg: #0f1115; --panel: #171a21; --panel2: #1e222b; --line: #2a2f3a;
    --text: #e6e8ec; --muted: #9aa2b1; --primary: #6c8cff; --primary-d: #4f6ff0;
    --green: #2fbf71; --red: #e05260; --amber: #e0a63a; --grey: #6b7280;
    --radius: 10px;
}
* { box-sizing: border-box; }
body {
    margin: 0; background: var(--bg); color: var(--text);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; font-size: 15px;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.container { max-width: 1080px; margin: 0 auto; padding: 24px 20px 64px; }

.nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 20px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.nav-left { display: flex; gap: 18px; align-items: center; }
.nav-right { display: flex; gap: 14px; align-items: center; }
.brand { font-weight: 700; color: var(--text); }
.inline { display: inline; margin: 0; }
.link { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; }
.link:hover { color: var(--text); }

h1 { font-size: 24px; margin: 12px 0 4px; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 18px 0 8px; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } }

.card {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 18px; margin: 16px 0;
}

label { display: block; margin: 10px 0; font-size: 14px; color: var(--muted); }
input, select, textarea {
    width: 100%; margin-top: 4px; padding: 8px 10px; background: var(--panel2);
    border: 1px solid var(--line); border-radius: 8px; color: var(--text); font: inherit;
}
input[readonly] { color: var(--muted); }
.checks { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0; }
.check { display: inline-flex; align-items: center; gap: 6px; width: auto; color: var(--text); }
.check input { width: auto; }

.btn {
    display: inline-block; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
    background: var(--panel2); color: var(--text); cursor: pointer; font: inherit; margin-top: 8px;
}
.btn:hover { border-color: var(--primary); text-decoration: none; }
.btn.primary { background: var(--primary-d); border-color: var(--primary-d); color: #fff; }
.btn.primary:disabled { opacity: .5; cursor: not-allowed; }
.btn.danger { border-color: #7a2b33; color: #ffb3ba; }
.mt { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }

.table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.table th, .table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-weight: 600; font-size: 13px; }
.ellipsis { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pill {
    display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px;
    background: var(--panel2); border: 1px solid var(--line); color: var(--muted);
}
.badge { display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: 12px; color: #fff; }
.badge.red { background: #b23a46; } .badge.green { background: #2f8f5b; }
.badge.amber { background: #b5842a; color: #1a1400; } .badge.grey { background: var(--grey); }

.flash { padding: 10px 14px; border-radius: 8px; margin: 12px 0; }
.flash.ok { background: #12331f; border: 1px solid #2f8f5b; color: #9ff0c0; }
.flash.error { background: #33161a; border: 1px solid #7a2b33; color: #ffb3ba; }

.issues { list-style: none; padding: 0; }
.issues li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.assets { list-style: none; padding: 0; }
.assets li { padding: 6px 0; display: flex; gap: 8px; align-items: center; }

.package {
    background: var(--panel2); border: 1px solid var(--line); border-radius: 8px;
    padding: 14px; overflow-x: auto; white-space: pre-wrap; font-family: ui-monospace, monospace; font-size: 13px;
}

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { width: 360px; max-width: 92vw; }

.cards-row { display: flex; gap: 16px; flex-wrap: wrap; }
.card.stat { flex: 1; min-width: 140px; text-align: center; }
.stat-n { font-size: 30px; font-weight: 700; color: var(--primary); }
.metrics-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end; }
.metrics-form button { grid-column: 1 / -1; }
@media (max-width: 720px) { .metrics-form { grid-template-columns: 1fr 1fr; } }
