:root {
  color-scheme: light;
  --paper: #f3f4f8;
  --surface: #fff;
  --ink: #1a1c31;
  --muted: #555970;
  --stroke: #dadee9;
  --blue: #5240c5;
  --blue-hover: #3f2bb3;
  --tint: #eae5fc;
  --dark: #19182b;
  --red: #a52345;
  --good: #14683e;
  font: 15px/1.5 "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: var(--blue); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; text-wrap: pretty; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.055em; }
h2 { font-size: 1.4rem; letter-spacing: -.035em; }
h3 { font-size: 1.06rem; }
small { font-size: .86rem; }
button, input, select, textarea { font: inherit; }
button, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 15px; border: 1px solid var(--stroke); border-radius: 9px; background: var(--surface); color: var(--ink); font-weight: 650; line-height: 1.25; cursor: pointer; text-decoration: none; text-align: center; }
button:hover, .button:hover { border-color: var(--blue); color: var(--blue); }
button:disabled { opacity: .55; cursor: default; }
button.primary, .button.primary { background: var(--blue); border-color: transparent; color: white; }
button.primary:hover, .button.primary:hover { background: var(--blue-hover); }
button.danger { color: var(--red); }
:focus-visible { outline: 3px solid #7460ed; outline-offset: 3px; }
.form { display: grid; gap: 14px; }
.form label, .field { display: grid; gap: 6px; align-content: start; font-weight: 600; }
.form small { color: var(--muted); font-weight: 450; }
.form .check { display: flex; gap: 8px; align-items: center; }
input:not([type="checkbox" i]), select, textarea { min-width: 0; width: 100%; border: 1px solid var(--stroke); border-radius: 8px; padding: 9px 11px; color: var(--ink); background: white; }
textarea { resize: vertical; min-height: 84px; }
input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); }
fieldset { margin: 0; min-width: 0; padding: 0; border: 0; }
fieldset:disabled { opacity: .72; }
.full { grid-column: 1 / -1; }
.muted { color: var(--muted); font-weight: 450; }
.stack { display: grid; gap: 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.split { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.columns { display: grid; gap: 15px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.columns.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.actions button, .button.small { min-height: 34px; padding: 5px 10px; font-size: .88rem; }
.brand { display: inline-flex; gap: 10px; align-items: center; font-size: 1.47rem; font-weight: 800; letter-spacing: -.065em; text-decoration: none; color: inherit; }
.brand-mark { display: inline-block; flex: 0 0 33px; width: 33px; height: 33px; vertical-align: middle; border-radius: 11px; background: #c5b6ff; position: relative; overflow: hidden; }
.brand-mark::after { content: ""; position: absolute; width: 25px; height: 17px; left: 4px; top: 7px; background: #24203b; clip-path: polygon(0 58%, 20% 26%, 36% 49%, 59% 12%, 75% 43%, 100% 0, 100% 35%, 77% 80%, 58% 47%, 36% 85%, 20% 62%, 0 97%); }
.boot { display: flex; align-items: center; gap: 12px; justify-content: center; min-height: 90dvh; color: var(--muted); }
.layout { min-height: 100dvh; display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; align-self: start; height: 100dvh; display: flex; flex-direction: column; gap: 26px; padding: 24px 17px 17px; background: var(--dark); color: #fbfaff; }
.sidebar .brand { padding-inline: 7px; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 9px; color: #dad6ee; text-decoration: none; font-weight: 600; white-space: nowrap; }
.sidebar nav a:hover, .sidebar nav a[aria-current="page"] { color: white; background: #3b315f; }
.sidebar nav a[aria-current="page"] { box-shadow: inset 3px 0 #c5b6ff; }
.nav-icon { color: #b7a7ff; width: 19px; text-align: center; font-size: 1.13rem; }
.sidebar-footer { margin-top: auto; display: grid; gap: 9px; padding-inline: 7px; overflow-wrap: anywhere; }
.sidebar-footer small { color: #d1c9ed; }
.sidebar-footer button { justify-self: start; background: transparent; color: white; border: 1px solid #5d517b; }
.workspace { min-width: 0; width: min(100%, 1340px); margin-inline: auto; padding: 27px clamp(16px, 4vw, 52px) 52px; }
.workspace-head { gap: 9px; margin-bottom: 24px; }
.workspace-head p { margin-top: 6px; color: var(--muted); }
.content { display: grid; gap: 17px; }
.card { display: grid; gap: 15px; border: 1px solid var(--stroke); border-radius: 14px; background: var(--surface); padding: clamp(15px, 2vw, 24px); min-width: 0; align-content: start; }
.scene { min-height: 290px; display: grid; grid-template-columns: minmax(210px, .89fr) minmax(0, 1.11fr); gap: 15px; overflow: hidden; position: relative; padding: 20px; border-radius: 17px; background: #282044; color: white; border: 1px solid #3b2d63; }
.scene .scene-copy { display: flex; flex-direction: column; gap: 11px; align-items: flex-start; justify-content: center; z-index: 1; padding: 8px 4px 8px 10px; }
.scene h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); letter-spacing: -.05em; }
.scene p { color: #e5dff7; font-size: .95rem; max-width: 32ch; }
.scene .button { border-color: transparent; color: #211636; background: #d9c9ff; }
.scene .button:hover { background: white; }
.monitor { display: grid; place-items: center; min-height: 200px; background-color: #171326; background-image: linear-gradient(#c4b1ff13 1px, transparent 1px), linear-gradient(90deg, #c4b1ff13 1px, transparent 1px); background-size: 20px 20px; border: 1px solid #5a487a; border-radius: 12px; overflow: hidden; }
.monitor iframe, .catalog iframe { width: 100%; height: 100%; min-height: 225px; border: 0; }
.card .monitor { height: 330px; }
.scene-banner { max-width: calc(100% - 24px); width: 216px; border: 1px solid #c9b9ff; border-radius: 50px 50px 15px 15px; padding: 18px 12px; text-align: center; background: #21153b; box-shadow: 7px 7px #553f89; font-weight: 650; }
.scene-banner strong { display: block; font-size: clamp(1.45rem, 3vw, 2.1rem); font-weight: 850; letter-spacing: -.065em; color: #d7c5ff; }
.scene-banner span { font-size: .8rem; color: #e3d9ff; }
.status { display: inline-flex; align-items: center; gap: 7px; align-self: start; padding: 4px 10px; border-radius: 22px; background: var(--tint); color: #422b99; font-weight: 700; font-size: .86rem; white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; background: currentColor; border-radius: 50%; }
.status.good { color: var(--good); background: #dbf3e7; }
.status.bad { color: var(--red); background: #f9e2e8; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--stroke); border-radius: 14px; background: var(--surface); }
.metric { padding: 14px 20px; display: grid; gap: 3px; min-width: 0; }
.metric + .metric { border-left: 1px solid var(--stroke); }
.metric strong { font-size: clamp(1.18rem, 2.3vw, 1.85rem); letter-spacing: -.045em; overflow-wrap: anywhere; }
.metric span { font-size: .87rem; color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--stroke); overflow-wrap: anywhere; }
th { font-size: .84rem; color: var(--muted); font-weight: 700; }
td { font-size: .93rem; }
td:first-child { font-weight: 650; }
tr:last-child td { border-bottom: 0; }
.empty { color: var(--muted); padding: 13px 0; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 5; max-width: calc(100vw - 40px); padding: 11px 15px; border-radius: 9px; background: #221938; color: white; box-shadow: 0 3px 18px #20193d40; overflow-wrap: anywhere; }
.toast[data-error="true"] { background: #831c39; }
.key-row { display: flex; gap: 8px; }
.key-row input { text-overflow: ellipsis; }
.steps { margin: 0; padding-left: 22px; display: grid; gap: 9px; }
.catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.catalog article { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--stroke); border-radius: 11px; }
.catalog iframe { height: 220px; min-height: 0; }
.catalog .monitor { min-height: 0; }
.catalog h3 { align-self: center; }
.catalog .copy { justify-self: start; }
meter { width: 100%; height: 12px; accent-color: var(--blue); }
.auth { display: grid; grid-template-columns: minmax(0, .94fr) minmax(320px, 1.06fr); min-height: 100dvh; }
.auth-side { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; position: relative; min-width: 0; padding: clamp(24px, 5vw, 72px); background: #231b39; color: #fff; }
.auth-side .brand { position: absolute; top: 26px; }
.auth-side h1 { margin: 45px 0 14px; color: #e3d8ff; max-width: 13ch; font-size: clamp(2.2rem, 5vw, 4.1rem); }
.auth-side p { color: #ece5fd; max-width: 36ch; }
.auth-side .monitor { width: 100%; max-width: 455px; margin-top: 28px; }
.auth-stage { display: grid; place-items: center; padding: 24px; }
.auth-card { display: grid; gap: 18px; width: min(100%, 382px); }
.auth-card footer { text-align: center; color: var(--muted); }
.auth-card [role=alert]:empty { display: none; }
.auth-card [role=alert] { color: var(--red); }
.public-root { min-width: 0; padding: 22px 20px 60px; background: #ece8fa; }
.public-beacon { max-width: 650px; margin: 0 auto 30px; }
.public-card { display: grid; gap: 18px; max-width: 650px; margin-inline: auto; border: 1px solid #d5c9f6; border-radius: 20px; padding: clamp(20px, 6vw, 52px); background: white; overflow-wrap: anywhere; }
.public-card .public-name { font-size: clamp(2rem, 7vw, 4rem); }
.public-card .divider { padding-top: 17px; border-top: 1px solid var(--stroke); }
.public-request form { margin-top: 13px; }
@media (max-width: 800px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; gap: 13px; padding: 13px 16px; }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .sidebar nav a { padding: 7px 8px; font-size: .85rem; }
  .sidebar-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0; }
  .sidebar-footer button { min-height: 30px; padding-block: 4px; }
  .workspace { padding-top: 20px; }
}
@media (max-width: 540px) {
  .scene, .columns, .columns.three, .auth { grid-template-columns: minmax(0, 1fr); }
  .scene { padding: 12px; }
  .metrics { grid-template-columns: 1fr; }
  .metric + .metric { border-left: 0; border-top: 1px solid var(--stroke); }
  .metric { padding: 10px 15px; }
  .auth-side .monitor { display: none; }
  .auth-side h1 { margin-top: 44px; }
  .workspace-head { flex-wrap: wrap; }
}
.multiline { white-space: pre-wrap; }
.card legend { margin-bottom: 8px; font-weight: 700; }
.table-wrap audio { max-width: min(230px, 50vw); }
