:root { --bg:#f6f7fb; --card:#fff; --text:#1f2937; --muted:#6b7280; --line:#e5e7eb; --primary:#2563eb; --danger:#dc2626; --warning:#d97706; --ok:#15803d; }
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; background:var(--bg); color:var(--text); }
a { color:var(--primary); text-decoration:none; }
a:hover { text-decoration:underline; }
.topbar { height:60px; display:flex; justify-content:space-between; align-items:center; padding:0 28px; background:var(--card); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:2; }
.brand { font-weight:700; font-size:18px; color:var(--text); }
.topbar nav { display:flex; align-items:center; gap:18px; }
.container { max-width:1180px; margin:28px auto; padding:0 20px; }
.login-card { max-width:430px; margin:10vh auto; background:var(--card); padding:28px; border:1px solid var(--line); border-radius:16px; box-shadow:0 12px 30px rgba(15,23,42,.06); }
.login-card.oauth { max-width:520px; }
h1 { margin:0 0 12px; font-size:28px; }
h2 { margin-top:32px; }
h3 { margin:0 0 8px; }
.muted { color:var(--muted); }
code { background:#eef2ff; padding:2px 5px; border-radius:5px; }
.stack { display:flex; flex-direction:column; gap:14px; }
label { display:flex; flex-direction:column; gap:6px; font-weight:600; }
input, select, textarea { width:100%; padding:10px 12px; border:1px solid #cfd5df; border-radius:9px; font:inherit; background:white; }
textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
button, .button { display:inline-flex; align-items:center; justify-content:center; gap:6px; border:0; border-radius:9px; padding:10px 14px; background:var(--primary); color:#fff; font-weight:700; cursor:pointer; font:inherit; text-decoration:none; }
button:hover, .button:hover { filter:brightness(.95); text-decoration:none; }
button.secondary, .button.secondary { background:#4b5563; }
button.danger, .danger { background:var(--danger); }
button.warning, .warning { background:var(--warning); }
button:disabled { opacity:.55; cursor:not-allowed; }
.link-button { background:transparent; color:var(--primary); padding:0; font-weight:500; }
.inline { display:inline; margin:0; }
.page-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:20px; }
.page-head.small { margin-top:28px; align-items:center; }
.button-row { display:flex; gap:10px; align-items:center; }
.button-row.wrap { flex-wrap:wrap; margin:16px 0 24px; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; background:var(--card); padding:20px; border:1px solid var(--line); border-radius:14px; }
.form-grid .wide { grid-column:1 / -1; }
.checkbox { flex-direction:row; align-items:center; gap:10px; }
.checkbox input { width:auto; }
.actions { grid-column:1 / -1; display:flex; gap:12px; align-items:center; margin-top:4px; }
table { width:100%; border-collapse:collapse; background:var(--card); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
th, td { padding:12px 14px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
th { background:#f9fafb; font-size:13px; text-transform:uppercase; color:#4b5563; letter-spacing:.04em; }
tr:last-child td { border-bottom:0; }
.badge { display:inline-block; border-radius:999px; padding:3px 8px; font-size:12px; font-weight:700; }
.badge.ok { background:#dcfce7; color:var(--ok); }
.badge.off { background:#f3f4f6; color:#4b5563; }
.alert { padding:12px 14px; border-radius:10px; margin:12px 0; }
.alert.error { background:#fee2e2; color:#991b1b; }
.alert.ok { background:#dcfce7; color:#166534; }
.help { margin-top:24px; background:#fff7ed; border:1px solid #fed7aa; border-radius:12px; padding:16px; }
.raw { white-space:pre-wrap; word-break:break-word; background:#111827; color:#f9fafb; padding:18px; border-radius:12px; overflow:auto; max-height:70vh; }
@media (max-width:760px) { .page-head, .topbar { flex-direction:column; height:auto; align-items:flex-start; padding:16px; } .form-grid { grid-template-columns:1fr; } table { display:block; overflow:auto; } }
