:root {
    --bg: #f4f6f8;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #d7dce2;
    --primary: #204a87;
    --primary-dark: #16345f;
    --danger: #b42318;
    --success-bg: #ecfdf3;
    --success-line: #abefc6;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}
.brand a { font-weight: 700; color: var(--text); font-size: 18px; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 14px; }
.container { max-width: 1240px; margin: 24px auto; padding: 0 16px; }
h1 { margin: 0 0 18px; font-size: 28px; }
h2 { margin: 0 0 14px; font-size: 20px; }
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    padding: 18px;
    margin-bottom: 18px;
}
.narrow { max-width: 460px; margin: 70px auto; }
.grid { display: grid; gap: 18px; }
.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { font-size: 36px; font-weight: 700; margin: 8px 0; }
.muted { color: var(--muted); }
.flash {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    background: #fff;
}
.flash.success { background: var(--success-bg); border-color: var(--success-line); }
.flash.error { background: #fef3f2; border-color: #fecdca; }
form label { display: block; margin-bottom: 12px; font-weight: 600; }
input, select, textarea {
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
}
fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 10px 0 14px; }
legend { padding: 0 8px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 8px 0; }
.check input { width: auto; margin: 0; }
button, .button {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    border: 0;
    padding: 10px 14px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
}
button:hover, .button:hover { background: var(--primary-dark); text-decoration: none; }
button.secondary, .button.secondary { background: #eef4ff; color: #1849a9; }
button.secondary:hover, .button.secondary:hover { background: #dceafe; }
button.danger { background: var(--danger); padding: 8px 10px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f8fafc; font-weight: 700; }
code { background: #f2f4f7; padding: 2px 5px; border-radius: 5px; }
pre.json-view, pre.token-box {
    background: #0b1020;
    color: #e5e7eb;
    padding: 14px;
    border-radius: 10px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}
.success-box { border-color: var(--success-line); background: var(--success-bg); }
.details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
@media (max-width: 800px) {
    .topbar { align-items: flex-start; flex-direction: column; padding: 14px; }
    .cards { grid-template-columns: 1fr; }
    .details { grid-template-columns: 1fr; }
    table { font-size: 13px; }
    th, td { padding: 8px; }
}

.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.hero { max-width: 760px; margin: 60px auto 18px; }
pre { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow:auto; }
