@import url("tokens.css?v=4");

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { min-height: 100vh; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; line-height: 1.1; }

h1 { font-size: 1.7rem; } h2 { font-size: 1.15rem; } h3 { font-size: 0.98rem; }
p { margin: 0; }
.grad { background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--text-2); } .dim { color: var(--text-3); } .mono { font-family: var(--mono); font-size: 0.85em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

.topbar { height: 60px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.topbar .wrap { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; }
.brand .area { font-family: var(--mono); font-weight: 400; font-size: 0.7rem; color: var(--text-3); padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; }
.tabs { display: flex; gap: 2px; margin-inline: auto; overflow-x: auto; }
.tabs a { padding: 7px 11px; border-radius: var(--r-sm); color: var(--text-2); font-size: 0.9rem; font-weight: 500; white-space: nowrap; }
.tabs a:hover, .tabs a[aria-current="page"] { color: var(--text); background: var(--panel); }
.who { display: flex; align-items: center; gap: 10px; }
.who .user { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--text-2); }
.who img { border-radius: 50%; }
@media (max-width: 760px) { .tabs { order: 3; width: 100%; } .topbar { height: auto; padding: 10px 0; } .topbar .wrap { flex-wrap: wrap; } .who { margin-left: auto; } }

main { padding: 32px 0 48px; }
.foot { padding: 24px 0 40px; color: var(--text-3); font-size: 0.8rem; }
.foot a:hover { color: var(--text); }

.page-title { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-title p { margin-top: 6px; color: var(--text-2); }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card { padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); }
.card + .card { margin-top: 14px; }
.card h2 { margin-bottom: 6px; }
.card .sub { color: var(--text-2); font-size: 0.9rem; margin-bottom: 14px; }
.card.accent { border-color: var(--accent-line); background: var(--accent-wash); }
.stat .label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.stat .value { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.04em; margin-top: 4px; }
.stat .hint { color: var(--text-3); font-size: 0.8rem; margin-top: 2px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); font-weight: 600; font-size: 0.88rem; cursor: pointer; white-space: nowrap; transition: background var(--fast), border-color var(--fast); }
.btn:hover { background: var(--panel-hover); }
.btn-primary { background: var(--brand); border-color: transparent; color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text); background: var(--panel); }
.btn-danger { color: var(--danger); border-color: rgba(251,113,133,0.35); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 0.82rem; }
.btn-discord { background: #5865f2; border-color: transparent; color: #fff; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
form.inline { display: inline; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 0.85rem; font-weight: 500; color: var(--text-2); }
.field input, .field select, .field textarea { height: 40px; padding: 0 12px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--bg-raised); color: var(--text); width: 100%; }
.field textarea { height: auto; padding: 10px 12px; min-height: 90px; }
.field .help { font-size: 0.78rem; color: var(--text-3); }
.row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; } .row .field { flex: 1; min-width: 160px; margin: 0; }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.05em; text-transform: uppercase; border: 1px solid var(--line); color: var(--text-2); }
.tag-ok { color: var(--ok); border-color: rgba(74,222,128,0.3); } .tag-warn { color: var(--warn); border-color: rgba(251,191,36,0.3); } .tag-danger { color: var(--danger); border-color: rgba(251,113,133,0.3); } .tag-brand { color: var(--accent); border-color: var(--accent-line); background: var(--accent-wash); }

.key { font-family: var(--mono); font-size: 1.05rem; letter-spacing: 0.04em; padding: 10px 14px; border-radius: var(--r); background: var(--bg-raised); border: 1px solid var(--line); display: inline-flex; gap: 12px; align-items: center; }
.key button { height: 28px; }

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); font-weight: 500; }
tr:hover td { background: var(--panel); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
.table-wrap table td:first-child, .table-wrap table th:first-child { padding-left: 16px; }

.flash { padding: 12px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); margin-bottom: 20px; font-size: 0.9rem; }
.flash-ok { border-color: rgba(74,222,128,0.35); color: var(--ok); }
.flash-error { border-color: rgba(251,113,133,0.35); color: var(--danger); }
.empty { padding: 32px; text-align: center; color: var(--text-3); border: 1px dashed var(--line); border-radius: var(--r-lg); }

.steps { display: grid; gap: 10px; counter-reset: s; }
.steps li { list-style: none; display: grid; grid-template-columns: 28px 1fr; gap: 12px; color: var(--text-2); font-size: 0.9rem; }
.steps li::before { counter-increment: s; content: counter(s, decimal-leading-zero); font-family: var(--mono); color: var(--accent); font-size: 0.75rem; padding-top: 3px; }
.steps b { color: var(--text); }
kbd, code { font-family: var(--mono); font-size: 0.85em; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-strong); background: var(--panel-strong); }

/* auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-art { display: none; } }
.auth-panel { display: grid; place-items: center; padding: 48px 24px; }
.auth-box { width: min(380px, 100%); }
.auth-box .brand { margin-bottom: 36px; font-size: 1.3rem; }
.auth-box h1 { margin-bottom: 10px; }
.auth-box p { color: var(--text-2); margin-bottom: 24px; }
.auth-box .btn { width: 100%; height: 44px; }
.auth-box .links { margin-top: 28px; font-size: 0.85rem; color: var(--text-3); display: flex; gap: 14px; }
.auth-art { background: var(--brand); position: relative; overflow: hidden; }
.auth-art .big { position: absolute; left: 32px; bottom: 24px; color: #0b0a10; font-weight: 700; font-size: clamp(5rem, 14vw, 12rem); letter-spacing: -0.06em; line-height: 0.85; }
.auth-art .line { position: absolute; left: 36px; bottom: calc(24px + clamp(5rem, 14vw, 12rem)); color: #0b0a10; font-weight: 600; font-size: 0.95rem; }
