:root {
    color-scheme: light;
    --bg: #f4f6f8;
    --card: #ffffff;
    --text: #18212b;
    --muted: #66727f;
    --line: #dfe5ea;
    --accent: #146c5c;
    --accent-hover: #0d5749;
    --danger: #a52d32;
    --success-bg: #e8f5ef;
    --error-bg: #fdeced;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: var(--accent); }
.topbar { min-height: 68px; padding: 0 4vw; display: flex; align-items: center; justify-content: space-between; background: #102b27; color: #fff; }
.brand { color: #fff; font-size: 1.12rem; font-weight: 750; text-decoration: none; letter-spacing: .01em; }
.brand span { color: #91d6c8; }
nav { display: flex; align-items: center; gap: 22px; }
nav a, .link-button { color: #e4f2ef; text-decoration: none; font: inherit; }
.link-button { border: 0; padding: 0; background: transparent; cursor: pointer; }
.container { width: min(1180px, 92vw); min-height: calc(100vh - 128px); margin: 0 auto; padding: 38px 0 64px; }
h1 { margin: 0 0 26px; font-size: clamp(1.65rem, 3vw, 2.3rem); }
h2 { margin: 0 0 16px; font-size: 1.12rem; }
.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.controls { margin-bottom: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: 0 6px 24px rgba(23, 39, 52, .05); }
.narrow { max-width: 560px; margin: 0 auto; }
.stack { display: grid; gap: 15px; }
label { display: grid; gap: 6px; font-weight: 650; }
input, select { width: 100%; min-height: 44px; border: 1px solid #bdc7cf; border-radius: 9px; padding: 9px 11px; background: #fff; color: var(--text); font: inherit; }
input:focus, select:focus { outline: 3px solid rgba(20,108,92,.15); border-color: var(--accent); }
button, .button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; border: 1px solid #aeb9c2; border-radius: 9px; padding: 8px 14px; background: #fff; color: var(--text); font: 650 0.95rem/1.2 inherit; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: #f2f5f6; }
button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
button.primary:hover { background: var(--accent-hover); }
button.danger { border-color: #d5a7aa; color: var(--danger); }
button.small { min-height: 34px; padding: 6px 10px; font-size: .85rem; }
.inline { display: inline; }
.input-suffix { display: flex; align-items: center; border: 1px solid #bdc7cf; border-radius: 9px; overflow: hidden; }
.input-suffix:focus-within { outline: 3px solid rgba(20,108,92,.15); border-color: var(--accent); }
.input-suffix input { border: 0; border-radius: 0; outline: 0; }
.input-suffix span { padding: 0 12px; color: var(--muted); white-space: nowrap; }
.muted, .hint, .optional { color: var(--muted); }
.hint { margin: -4px 0 2px; font-size: .86rem; }
.optional { font-size: .78rem; font-weight: 500; }
.notice { margin-bottom: 18px; padding: 13px 16px; border-radius: 10px; }
.notice.success { background: var(--success-bg); color: #145541; }
.notice.error { background: var(--error-bg); color: #7e2025; }
.status { display: inline-flex; border-radius: 999px; padding: 4px 9px; font-size: .78rem; font-weight: 700; }
.status.on { background: #e5f5ee; color: #136246; }
.status.off { background: #f9e6e7; color: #8c292e; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { border-bottom: 1px solid var(--line); padding: 13px 10px; text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
.section-head h2, .section-head p { margin: 0; }
.section-head input { max-width: 280px; }
.steps { padding-left: 22px; }
.steps li { margin: 8px 0; }
.qr-wrap { display: flex; justify-content: center; margin: 18px 0; }
.qr-wrap img { width: min(280px, 100%); height: auto; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
code.secret, .credentials code { display: inline-block; padding: 8px 10px; background: #eef3f2; border-radius: 7px; font-size: 1rem; letter-spacing: .08em; }
code.break { display: block; margin-top: 10px; word-break: break-all; font-size: .78rem; }
.credentials { display: grid; grid-template-columns: 150px 1fr; gap: 10px 18px; }
.credentials dt { color: var(--muted); }
.credentials dd { margin: 0; font-weight: 700; }
.warning-card { border-color: #d7c485; }
footer { padding: 20px; text-align: center; color: var(--muted); font-size: .82rem; }
@media (max-width: 760px) {
    .topbar { padding: 14px 4vw; align-items: flex-start; gap: 16px; }
    nav { flex-wrap: wrap; justify-content: flex-end; gap: 10px 15px; }
    .grid.two { grid-template-columns: 1fr; }
    .card { padding: 18px; }
    .section-head { align-items: flex-start; flex-direction: column; }
    .section-head input { max-width: none; }
    .credentials { grid-template-columns: 1fr; }
}
