:root {
  --bg: #07110f;
  --panel: #0d1b18;
  --panel-2: #11231f;
  --line: #224039;
  --text: #e9f7f2;
  --muted: #8eaaa1;
  --brand: #40e0ad;
  --brand-2: #8bffd8;
  --danger: #ff7b86;
  --warning: #f7c65f;
  --shadow: 0 24px 70px rgba(0,0,0,.25);
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: radial-gradient(circle at 80% -10%, #12372d 0, transparent 35%), var(--bg); color: var(--text); }
a { color: var(--brand-2); text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); font-weight: 760; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #06130f; background: linear-gradient(135deg, var(--brand-2), var(--brand)); box-shadow: 0 8px 25px rgba(64,224,173,.2); }
.brand-mark svg { width: 21px; }
.topbar { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(7,17,15,.83); backdrop-filter: blur(15px); position: sticky; top: 0; z-index: 10; }
.toplinks { display: flex; gap: 10px; align-items: center; }
.btn { border: 1px solid var(--line); background: var(--panel-2); color: var(--text); padding: 9px 14px; border-radius: 9px; transition: .15s ease; }
.btn:hover { border-color: #3b6c60; transform: translateY(-1px); }
.btn.primary { color: #05100d; background: var(--brand); border-color: var(--brand); font-weight: 700; }
.btn.danger { color: var(--danger); }
.btn.small { padding: 6px 9px; font-size: 12px; }
.muted { color: var(--muted); }
.pill { display: inline-flex; align-items: center; border: 1px solid var(--line); background: rgba(64,224,173,.07); color: var(--brand-2); border-radius: 999px; padding: 4px 9px; font-size: 12px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-right: 7px; box-shadow: 0 0 9px var(--brand); }
.shell { max-width: 1280px; margin: 0 auto; padding: 28px; }
.grid { display: grid; gap: 16px; }
.cards { grid-template-columns: repeat(4, minmax(0,1fr)); }
.card { background: linear-gradient(145deg, rgba(17,35,31,.92), rgba(11,25,22,.92)); border: 1px solid var(--line); border-radius: 15px; padding: 20px; box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.metric { font-size: 30px; font-weight: 750; letter-spacing: -.04em; margin-top: 8px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 32px 0 12px; }
.section-head h2 { margin: 0 0 4px; font-size: 20px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 13px; }
table { width: 100%; border-collapse: collapse; min-width: 750px; background: rgba(10,25,21,.75); }
th, td { text-align: left; padding: 13px 15px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .08em; }
td { font-size: 14px; }
tr:last-child td { border-bottom: 0; }
.actions { display: flex; gap: 7px; flex-wrap: wrap; }
.status-ok { color: var(--brand); }
.status-bad { color: var(--danger); }
.modal-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(0,0,0,.7); display: grid; place-items: center; padding: 22px; backdrop-filter: blur(8px); }
.modal { width: min(610px, 100%); max-height: 90vh; overflow: auto; background: #0d1b18; border: 1px solid #315248; border-radius: 17px; padding: 24px; box-shadow: 0 35px 100px #000; }
.modal h2 { margin: 0 0 20px; }
.hidden { display: none !important; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1/-1; }
.field label { color: var(--muted); font-size: 13px; }
input, select { width: 100%; padding: 11px 12px; background: #071310; color: var(--text); border: 1px solid var(--line); border-radius: 9px; outline: none; }
input:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(64,224,173,.09); }
.checklist { max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 9px; padding: 8px; }
.check { display: flex; align-items: center; gap: 10px; padding: 8px; }
.check input { width: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 50; background: #18352d; border: 1px solid #3f6e61; padding: 13px 16px; border-radius: 10px; box-shadow: var(--shadow); }
.secret { display: block; word-break: break-all; padding: 13px; background: #071310; border: 1px dashed var(--brand); border-radius: 9px; color: var(--brand-2); margin: 12px 0; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 22px; }
.login-card { width: min(430px, 100%); }
.login-card .brand { margin-bottom: 24px; }
.login-card h1 { font-size: 30px; margin-bottom: 8px; }
.login-card form { margin-top: 22px; display: grid; gap: 12px; }

.docs-layout { display: grid; grid-template-columns: 240px minmax(0, 820px); gap: 48px; max-width: 1160px; margin: 0 auto; padding: 46px 28px 90px; }
.docs-nav { position: sticky; top: 102px; align-self: start; display: grid; gap: 5px; }
.docs-nav a { color: var(--muted); padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.docs-nav a:hover { color: var(--text); background: var(--panel); }
.docs-main h1 { font-size: clamp(38px, 7vw, 62px); letter-spacing: -.055em; line-height: 1; margin: 12px 0 18px; }
.docs-main h2 { margin-top: 58px; padding-top: 15px; font-size: 28px; letter-spacing: -.035em; }
.docs-main h3 { margin-top: 30px; }
.lead { font-size: 19px; line-height: 1.65; color: #b7ccc5; }
.endpoint { display: flex; align-items: center; gap: 11px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 13px 0; }
.method { color: #06130f; background: var(--brand); font-weight: 800; padding: 4px 7px; border-radius: 5px; font-size: 11px; }
.method.get { background: #74b9ff; }
pre { margin: 14px 0; background: #030a08; border: 1px solid var(--line); border-radius: 12px; padding: 18px; overflow: auto; color: #c9e5dc; line-height: 1.6; font-size: 13px; }
code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.callout { border-left: 3px solid var(--brand); background: rgba(64,224,173,.07); padding: 14px 17px; border-radius: 0 10px 10px 0; margin: 18px 0; color: #bed4cd; }
.error-table code { color: var(--brand-2); }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr 1fr; } .docs-layout { grid-template-columns: 1fr; } .docs-nav { display: none; } }
@media (max-width: 620px) { .topbar { padding: 0 16px; } .shell { padding: 18px 14px; } .cards, .form-grid { grid-template-columns: 1fr; } .field.full { grid-column: auto; } .toplinks .optional { display:none; } }
