:root { color-scheme: light; font-family: Inter, system-ui, sans-serif; color: #17202a; background: #f4f6f8; }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #2255aa; }
.topbar { height: 64px; padding: 0 max(24px, calc((100vw - 1120px) / 2)); display: flex; align-items: center; justify-content: space-between; background: #17202a; color: white; }
.brand { color: white; font-size: 20px; font-weight: 700; text-decoration: none; }
.session, .actions { display: flex; align-items: center; gap: 12px; }
.container { max-width: 1120px; margin: 40px auto; padding: 0 24px; }
.page-heading { display: flex; align-items: start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
h1 { margin: 8px 0; }
h2 { font-size: 16px; margin: 0 0 8px; }
button, .button { border: 0; border-radius: 7px; padding: 10px 16px; background: #2255aa; color: white; font: inherit; cursor: pointer; text-decoration: none; }
.secondary { background: #e4e9ef; color: #17202a; }
.danger { background: #b42318; }
.link-button { padding: 0; background: transparent; color: white; text-decoration: underline; }
.auth-card { width: min(440px, 100%); margin: 70px auto; padding: 32px; background: white; border-radius: 12px; box-shadow: 0 8px 30px #17202a16; }
.stack { display: grid; gap: 8px; }
input, textarea { width: 100%; border: 1px solid #bac3cc; border-radius: 7px; padding: 10px; font: inherit; }
.stack button { margin-top: 12px; }
.validation { color: #b42318; font-size: 14px; }
.validation:empty { display: none; }
.success { margin: 16px 0; padding: 12px; border-radius: 7px; background: #d9f2e3; color: #17633a; }
.empty { padding: 24px; background: white; border-radius: 10px; }
.config-list { display: grid; gap: 14px; }
.config-card { position: relative; overflow: visible; background: white; border: 1px solid #e2e7ec; border-radius: 14px; box-shadow: 0 4px 18px #17202a0a; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.config-card:has(.config-details[open]) { z-index: 5; }
.config-card:hover { border-color: #cbd5df; box-shadow: 0 10px 30px #17202a12; transform: translateY(-1px); }
.config-card.is-deleted { background: #fbfcfd; }
.config-card-main { padding: 22px; }
.config-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.config-card-title { display: flex; align-items: center; gap: 13px; min-width: 0; }
.config-card-title h2 { margin: 0 0 6px; font-size: 18px; color: #17202a; }
.config-icon { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 11px; background: #edf3ff; color: #2255aa; font: 700 15px Consolas, monospace; }
.config-icon svg { width: 23px; height: 23px; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-badge.active { background: #e7f7ee; color: #18794e; }
.status-badge.deleted { background: #f1f3f5; color: #6b7580; }
.config-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.config-actions form { margin: 0; }
.config-public-link { display: grid; gap: 5px; margin: 20px 0; padding: 13px 15px; border: 1px solid #dde5ee; border-radius: 9px; background: #f8fafc; }
.endpoint-control { display: flex; align-items: center; gap: 10px; min-width: 0; }
.endpoint-url { min-width: 0; flex: 1; overflow: hidden; color: #2255aa; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.endpoint-actions { display: flex; align-items: center; gap: 5px; }
.icon-button { position: relative; display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; padding: 0; border: 1px solid #d9e1e8; border-radius: 8px; background: white; color: #52606d; transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease; }
.icon-button:hover { border-color: #b9c7d4; background: #f1f5f9; color: #2255aa; }
.icon-button:active { transform: scale(.92); }
.icon-button svg { position: absolute; width: 18px; height: 18px; transition: opacity .16s ease, transform .2s ease; }
.icon-button .check-icon { opacity: 0; transform: scale(.45) rotate(-12deg); color: #18794e; }
.icon-button.copied { border-color: #a7ddbf; background: #e7f7ee; }
.icon-button.copied .copy-icon { opacity: 0; transform: scale(.45) rotate(12deg); }
.icon-button.copied .check-icon { opacity: 1; transform: scale(1) rotate(0); }
.icon-button.copy-failed { border-color: #efb5ae; color: #b42318; animation: copy-shake .28s ease; }
@keyframes copy-shake { 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
.config-public-link.unavailable { color: #7a8692; }
.config-public-link.unavailable > span:last-child { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.link-label, .metric-label { color: #74808c; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.config-metrics { display: grid; grid-template-columns: 110px 180px minmax(180px, 1fr); gap: 0; padding-top: 2px; }
.metric { display: grid; align-content: start; gap: 3px; padding-right: 20px; }
.metric + .metric { padding-left: 20px; border-left: 1px solid #e6eaee; }
.metric strong { color: #26323d; font-size: 14px; }
.metric small { color: #7a8692; }
.config-details { position: relative; align-self: start; justify-self: end; color: #5d6975; font-size: 13px; }
.config-details summary { cursor: pointer; user-select: none; }
.config-details dl { position: absolute; z-index: 10; top: calc(100% + 8px); right: 0; display: grid; gap: 8px; width: 300px; margin: 0; padding: 13px; border: 1px solid #dde3e8; border-radius: 9px; background: white; box-shadow: 0 12px 32px #17202a1f; }
.config-details dl div { display: grid; grid-template-columns: 70px 1fr; gap: 10px; }
.config-details dt { color: #7a8692; }
.config-details dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-family: Consolas, monospace; }
.public-url { overflow-wrap: anywhere; }
.editor-form { display: grid; gap: 10px; }
.editor-form textarea { min-height: 520px; resize: vertical; font: 14px/1.5 Consolas, monospace; }
.config-meta { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(180px, .8fr) auto; gap: 24px; align-items: end; margin-bottom: 12px; }
.config-meta label { display: grid; gap: 7px; }
.mode-switch { display: flex; gap: 18px; border: 0; padding: 0; }
.mode-switch legend { margin-bottom: 8px; color: #647180; font-size: 14px; }
.mode-switch label { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 6px; }
.mode-switch input { width: auto; }
.default-workspace { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr); gap: 18px; align-items: start; }
.panel { min-width: 0; padding: 20px; background: white; border-radius: 10px; box-shadow: 0 2px 12px #17202a0d; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.panel-heading h2, .panel-heading p { margin: 0; }
.panel-heading p { margin-top: 5px; color: #647180; }
.feature-list { display: grid; gap: 14px; }
.builder-section { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid #e3e7eb; }
.readonly-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 26px; }
.readonly-fields label { display: grid; gap: 6px; }
.readonly-fields input:disabled { background: #eef1f4; color: #52606d; }
.revision-transition { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 41px; padding: 9px 12px; border: 1px solid #bac3cc; border-radius: 7px; background: #eef1f4; font-weight: 800; }
.revision-current { color: #b42318; }
.revision-next { color: #18794e; }
.revision-arrow { color: #7a8692; font-weight: 500; }
.settings-list { display: grid; gap: 9px; }
.setting-item { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(160px, 1.2fr) auto; gap: 8px; }
.feature-item { padding: 16px; border: 1px solid #d7dde3; border-radius: 8px; }
.feature-topline { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.feature-topline label, .feature-controls label { display: grid; gap: 6px; }
.feature-controls { display: grid; grid-template-columns: auto minmax(220px, 1fr) minmax(150px, .6fr); gap: 16px; align-items: end; margin-top: 14px; }
.feature-controls .toggle-row { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; }
.toggle-row input { width: 42px; height: 22px; accent-color: #2255aa; }
.percent-control { display: grid; grid-template-columns: 1fr 80px; gap: 10px; align-items: center; }
.percent-control input[type="range"] { padding: 0; }
.percentage-input { display: grid; grid-template-columns: 1fr auto; align-items: center; overflow: hidden; border: 1px solid #bac3cc; border-radius: 7px; background: white; }
.percentage-input input { min-width: 0; border: 0; border-radius: 0; outline: 0; }
.percentage-input span { padding-right: 10px; color: #647180; }
.json-preview { position: sticky; top: 20px; }
.json-preview pre { min-height: 500px; max-height: 70vh; margin: 0; padding: 16px; overflow: auto; background: #101820; color: #d9e7f5; border-radius: 7px; font: 14px/1.55 Consolas, monospace; }
.code-editor { min-height: 560px !important; }
.numbered-code { counter-reset: code-line; }
.code-line { display: block; min-height: 1.55em; white-space: pre; }
.code-line::before { content: attr(data-line); display: inline-block; width: 38px; margin-right: 14px; padding-right: 10px; color: #718096; text-align: right; border-right: 1px solid #344250; user-select: none; }
.code-editor-wrap { display: grid; grid-template-columns: 52px 1fr; min-height: 560px; overflow: hidden; border: 1px solid #bac3cc; border-radius: 7px; background: #101820; }
.code-editor-wrap .code-editor { min-width: 0; margin: 0; border: 0; border-radius: 0; outline: 0; background: #101820; color: #d9e7f5; line-height: 1.5; white-space: pre; overflow: auto; }
.line-gutter { height: 560px; margin: 0; padding: 10px 10px 10px 0; overflow: hidden; border-right: 1px solid #344250; color: #718096; text-align: right; font: 14px/1.5 Consolas, monospace; user-select: none; }
.sticky-actions { position: sticky; bottom: 0; padding: 12px 0; background: #f4f6f8; }
.account-tabs { display: flex; gap: 8px; margin: -8px 0 22px; border-bottom: 1px solid #d7dde3; }
.account-tabs a { padding: 10px 14px; color: #52606d; text-decoration: none; }
.account-tabs a.active { color: #2255aa; border-bottom: 2px solid #2255aa; font-weight: 700; }
.rollback-form { margin: 14px 0; }
[hidden] { display: none !important; }
@media (max-width: 700px) { .page-heading { flex-direction: column; } .actions { flex-wrap: wrap; } .config-card-heading { flex-direction: column; } .config-actions { justify-content: flex-start; } .config-metrics { grid-template-columns: 1fr 1fr; row-gap: 18px; } .config-details { grid-column: 1 / -1; justify-self: start; } }
@media (max-width: 900px) { .default-workspace, .config-meta { grid-template-columns: 1fr; } .feature-controls { grid-template-columns: 1fr; } .json-preview { position: static; } }
