:root { color-scheme: dark; --bg: #171717; --card: #202020; --surface-2: #292929; --border: #414141; --text: #eeeeee; --muted: #b5b5b5; --accent: #dedede; --accent-text: #171717; --green: #9dd5b5; --warning: #e4c18a; --danger: #efa4ab; --danger-bg: #382427; --code-bg: #191919; --radius: 6px; --radius-sm: 4px; }
:root[data-theme="light"] { color-scheme: light; --bg: #f5f5f5; --card: #fafafa; --surface-2: #e8e8e8; --border: #c7c7c7; --text: #252525; --muted: #595959; --accent: #333333; --accent-text: #fafafa; --green: #276344; --warning: #765015; --danger: #972e38; --danger-bg: #f7e7e9; --code-bg: #eeeeee; }
:root[data-theme="slate"] { color-scheme: dark; --bg: #18202a; --card: #212c39; --surface-2: #2d3b4c; --border: #485b70; --text: #e9eff5; --muted: #b3c1d0; --accent: #b6cee5; --accent-text: #18202a; --green: #9dd5b5; --warning: #e4c18a; --danger: #efa4ab; --danger-bg: #382427; --code-bg: #19232f; }
:root[data-theme="warm"] { color-scheme: dark; --bg: #211e1b; --card: #2b2723; --surface-2: #38322c; --border: #574d43; --text: #eee7de; --muted: #c0b5a8; --accent: #decbb4; --accent-text: #211e1b; --green: #9dd5b5; --warning: #e4c18a; --danger: #efa4ab; --danger-bg: #382427; --code-bg: #231f1b; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1rem; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: var(--text); }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.025em; }
h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin: .2rem 0 .7rem; }
h2 { font-size: 1.2rem; margin: 0 0 .9rem; }
h3 { font-size: 1rem; }
p { margin: .5rem 0 1rem; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 84px; padding: 1rem 2rem; border-bottom: 1px solid var(--border); background: var(--card); }
.brand { display: flex; align-items: center; gap: .8rem; color: var(--text); text-decoration: none; font-size: 1.05rem; font-weight: 750; }
.brand-mark { display: grid; place-items: center; height: 36px; width: 36px; border-radius: var(--radius-sm); color: var(--accent-text); background: var(--accent); font-size: 1.2rem; font-weight: 750; }
.header-meta { display: flex; align-items: center; gap: 1rem; }
.version { color: var(--muted); font-size: .8rem; }
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - 84px); }
.sidebar { border-right: 1px solid var(--border); padding: 1.6rem 1rem; background: var(--card); }
.sidebar nav a { display: block; border-radius: var(--radius-sm); padding: .55rem .8rem; margin: .15rem 0; color: var(--muted); text-decoration: none; }
.sidebar nav a:hover { background: var(--surface-2); color: var(--text); }
.sidebar nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); font-weight: 650; }
.nav-label { margin: 1.4rem .8rem .5rem; font-size: .85rem; font-weight: 600; color: var(--muted); }
.nav-label:first-child { margin-top: 0; }
.sidebar-note { margin: 2rem .8rem 0; padding-top: 1rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .75rem; }
main { width: 100%; max-width: 1600px; padding: 2.5rem clamp(1rem, 3vw, 3rem); margin: 0 auto; min-width: 0; }
.auth-shell { display: block; }
.auth-shell main { max-width: 820px; }
.auth { max-width: 600px; margin: auto; }
footer { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: 2rem; padding-top: 1.5rem; font-size: .8rem; color: var(--muted); }
.page-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-heading { margin-bottom: 2rem; }
.page-heading p { color: var(--muted); max-width: 750px; }
.section-heading { margin-bottom: 1rem; }
.section-heading h2 { margin: 0; }
.card, .notice { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; }
.card > p, .muted, .preview { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1.25rem; }
.grid > .card { margin-bottom: 0; }
.grid { margin-bottom: 1.5rem; }
.overview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric { display: flex; flex-direction: column; gap: .6rem; }
.metric > span { color: var(--muted); }
.metric > strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.metric > strong.status-text { font-size: 1.1rem; color: var(--green); }
.metric > a { font-size: .8rem; }
.badge { display: inline-block; font-size: .8rem; line-height: 1.5; padding: .15rem .45rem; color: var(--muted); border: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius-sm); white-space: nowrap; }
.badge.positive { color: var(--green); border-color: var(--green); }
.project-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm); color: var(--text); background: var(--surface-2); font-size: 1.1rem; font-weight: 600; }
.project-card h2 a { color: var(--text); text-decoration: none; }
.project-card > p { min-height: 2.6em; }
.project-id { color: var(--muted); font-size: .75rem; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: .75rem; }
.card-bottom > span { color: var(--muted); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; padding: 0; margin: 1.5rem 0 0; }
.steps strong { color: var(--text); }
.steps p { color: var(--muted); font-size: .85rem; }
label { display: block; margin-bottom: 1rem; font-weight: 600; }
input, textarea, select { display: block; width: 100%; margin-top: .4rem; padding: .75rem; font: inherit; color: var(--text); background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { min-height: 5rem; resize: vertical; }
.code-editor { font: 13px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; tab-size: 2; min-height: 360px; }
.record-editor { min-height: 260px; }
.check { display: flex; align-items: flex-start; gap: .6rem; font-weight: 400; }
.check input { width: auto; margin: .3rem 0 0; flex-shrink: 0; }
button, .button { display: inline-flex; align-items: center; justify-content: center; padding: .65rem 1rem; color: var(--accent-text); font: inherit; font-weight: 650; line-height: 1.5; background: var(--accent); border: 1px solid var(--accent); border-radius: var(--radius-sm); cursor: pointer; text-decoration: none; }
button:hover, .button:hover { background: var(--text); color: var(--accent-text); }
button.secondary, .button.secondary { color: var(--text); background: var(--card); border-color: var(--border); }
button.secondary:hover, .button.secondary:hover { background: var(--surface-2); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.danger { color: var(--danger); background: var(--danger-bg); border-color: var(--danger); }
.danger:hover { background: var(--danger-bg); color: var(--text); }
.danger-zone { border-color: var(--danger); }
.notice { border-color: var(--border); }
.security { border-color: var(--warning); }
.error { color: var(--danger); background: var(--danger-bg); padding: 1rem; border: 1px solid var(--danger); border-radius: var(--radius); }
.success { border-color: var(--green); color: var(--green); }
code { overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .88em; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; overflow: auto; padding: 1rem; border-radius: var(--radius-sm); background: var(--code-bg); border: 1px solid var(--border); font-size: .85rem; }
pre.json { white-space: pre; max-height: 70vh; margin: 0; }
.selectable { user-select: all; }
.table-scroll { overflow-x: auto; width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: .85rem; }
th, td { text-align: left; vertical-align: top; padding: .85rem .7rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: .85rem; font-weight: 600; white-space: nowrap; }
td { min-width: 90px; max-width: 400px; overflow-wrap: anywhere; }
tbody tr:hover { background: var(--surface-2); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.actions button { font-size: .75rem; padding: .4rem .65rem; }
.resource-links { margin: 1rem 0; gap: .8rem; }
.search, .filter-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem; }
.search label, .filter-form label { flex: 1 1 18rem; margin-bottom: 0; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1rem; color: var(--muted); }
.editor-grid { display: grid; grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); gap: 1.5rem; }
.editor-grid > section:only-child { grid-column: 1 / -1; }
.resource-list ul { list-style: none; padding: 0; }
.resource-list li a { display: block; padding: .6rem; border-radius: 6px; text-decoration: none; }
.resource-list li a[aria-current="page"] { background: var(--surface-2); }
.resource-list code { display: block; margin-top: .2rem; color: var(--muted); font-size: .7rem; }
.empty-state { padding: 2.5rem; text-align: center; color: var(--muted); }
.empty-state h2, .empty-state h3 { color: var(--text); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 10; padding: .7rem; background: var(--accent); color: var(--bg); }
.skip-link:focus { top: .5rem; }
.theme-picker { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: .85rem; font-weight: 400; }
.theme-picker select { width: auto; padding: .3rem .5rem; margin: 0; }
table { font-variant-numeric: tabular-nums; }
.json-editor-controls { margin-bottom: .75rem; }
.json-editor-controls [aria-pressed="true"] { border-color: var(--accent); font-weight: 700; }
.json-field { display: grid; grid-template-columns: minmax(100px, 1fr) 100px minmax(140px, 2fr) auto; gap: .6rem; align-items: start; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.json-field > label { margin: .5rem 0; overflow-wrap: anywhere; }
.json-field > select, .json-field > input, .json-field > textarea { margin: 0; padding: .45rem; }
.json-field input[type="checkbox"] { width: auto; margin: .6rem; }
.json-field > details { min-width: 0; }
.json-field > details > .json-field { grid-template-columns: 1fr; padding-left: .5rem; }
.json-field > button { font-size: .8rem; padding: .4rem .6rem; }
.json-visual-editor > .actions { padding: 1rem 0; }
.json-visual-editor > .actions > input { width: auto; }
@media (max-width: 760px) { .json-field { grid-template-columns: 1fr; } }
@media (max-width: 1100px) { .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .shell { grid-template-columns: 190px minmax(0, 1fr); } .header-meta > .badge { display: none; } }
@media (max-width: 760px) { .topbar { padding: 1rem; } .version { display: none; } .shell { display: block; } .sidebar { border-right: 0; border-bottom: 1px solid var(--border); padding: .7rem; } .sidebar nav { display: flex; flex-wrap: wrap; gap: .2rem; } .sidebar nav a { padding: .35rem .55rem; font-size: .75rem; } .nav-label, .sidebar-note { display: none; } main { padding: 1.5rem 1rem; } .page-heading { align-items: flex-start; } .steps { grid-template-columns: 1fr; gap: .5rem; } .editor-grid { grid-template-columns: 1fr; } .card { padding: 1.1rem; } .header-meta { gap: .4rem; } .brand { font-size: .9rem; } .brand-mark { width: 35px; height: 35px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
