:root { --blue:#153f63; --blue2:#21658f; --red:#c6002b; --ink:#15324b; --muted:#617188; --line:#dbe2e8; --panel:#fff; --soft:#f3f6f8; }
* { box-sizing:border-box; }
body { margin:0; color:var(--ink); background:#eef2f5; font-family:Arial,Helvetica,sans-serif; }
a { color:inherit; }
.topbar { min-height:68px; padding:0 28px; display:flex; align-items:center; gap:28px; color:#fff; background:linear-gradient(110deg,var(--blue),var(--blue2)); }
.brand { font-size:20px; font-weight:700; text-decoration:none; }
.brand span { color:#fff; letter-spacing:.08em; }
.topbar nav { display:flex; gap:8px; }
.topbar nav a { padding:10px 12px; border-radius:7px; text-decoration:none; }
.topbar nav a:hover { background:rgba(255,255,255,.13); }
.user-menu { margin-left:auto; display:flex; align-items:center; gap:12px; font-size:14px; }
.user-menu form { margin:0; }
.link-button { padding:0; border:0; color:#fff; background:none; text-decoration:underline; cursor:pointer; }
.app-main { width:min(1540px,calc(100% - 40px)); margin:28px auto 60px; }
.page-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:22px; }
.page-heading h1 { margin:3px 0 5px; font-size:34px; }
.page-heading p { margin:0; color:var(--muted); }
.eyebrow { color:var(--red)!important; font-size:12px; font-weight:800; letter-spacing:.13em; }
.connection-panel { display:flex; align-items:center; gap:9px; padding:12px 15px; border:1px solid var(--line); border-radius:10px; background:#fff; box-shadow:0 4px 14px rgba(21,50,75,.06); }
.connection-panel span:last-child { color:var(--muted); font-variant-numeric:tabular-nums; }
.status-dot { width:10px; height:10px; border-radius:50%; background:#d29c00; box-shadow:0 0 0 4px rgba(210,156,0,.12); }
.status-dot.online { background:#0a9a5b; box-shadow:0 0 0 4px rgba(10,154,91,.12); }
.status-dot.offline { background:#c6002b; box-shadow:0 0 0 4px rgba(198,0,43,.12); }
.dashboard-grid { display:grid; grid-template-columns:minmax(520px,1.6fr) minmax(320px,.8fr); gap:20px; }
.card { padding:22px; border:1px solid var(--line); border-radius:14px; background:var(--panel); box-shadow:0 5px 22px rgba(21,50,75,.06); }
.card h2 { margin:0 0 16px; font-size:21px; }
.card p { color:var(--muted); }
.card-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.card-heading h2 { margin-bottom:3px; }
.card-heading p { margin:0 0 14px; font-size:13px; }
.badge { padding:5px 9px; color:#fff; border-radius:999px; background:#66778a; font-size:12px; font-weight:700; }
.badge.running { background:#0a9a5b; }
.preview-shell { position:relative; height:540px; overflow:hidden; border:8px solid #18222b; border-radius:12px; background:#030303; }
.preview-canvas { position:absolute; top:0; left:0; overflow:hidden; color:#fff; background:#030303; transform-origin:top left; }
.preview-stage { box-sizing:content-box; margin:0 auto; min-height:150%; transform-origin:top center; will-change:transform; }
.preview-stage article { color:#fff; font-family:Arial,Helvetica,sans-serif; font-weight:700; line-height:1.34; letter-spacing:.012em; text-align:center; text-wrap:balance; white-space:pre-wrap; }
.preview-foot { margin-top:9px; display:flex; justify-content:space-between; gap:15px; color:var(--muted); font-size:12px; }
.button-row { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.button { display:inline-flex; justify-content:center; align-items:center; min-height:39px; padding:8px 14px; border:1px solid #c7d0d9; border-radius:8px; color:var(--ink); background:#fff; font:inherit; font-weight:700; text-decoration:none; cursor:pointer; }
.button:hover { border-color:#8ea0af; background:#f8fafb; }
.button-primary { color:#fff; border-color:var(--red); background:var(--red); }
.button-primary:hover { color:#fff; border-color:#9f0022; background:#9f0022; }
.button-dark { color:#fff; border-color:var(--blue); background:var(--blue); }
.button-full { width:100%; }
.button-small { min-height:31px; padding:5px 9px; font-size:12px; }
.range-label { display:block; margin:18px 0; font-weight:700; }
.range-label span { display:flex; justify-content:space-between; margin-bottom:7px; }
.range-label input { width:100%; accent-color:var(--red); }
.feedback { min-height:42px; margin:20px 0 0; padding:11px 12px; border-radius:8px; color:#345069!important; background:var(--soft); font-size:13px; }
.feedback.error { color:#9f0022!important; background:#fff0f3; }
.text-card label,.form-stack label { display:grid; gap:6px; margin-bottom:14px; font-weight:700; }
input,textarea,select { width:100%; padding:10px 11px; color:var(--ink); border:1px solid #cbd4dc; border-radius:7px; background:#fff; font:inherit; }
textarea { resize:vertical; line-height:1.45; }
small { color:var(--muted); font-weight:400; }
.copy-row { display:flex; gap:8px; }
.copy-row input { min-width:0; }
.danger-form { margin-top:16px; }
.link-danger { padding:0; color:#a40024; border:0; background:none; text-decoration:underline; cursor:pointer; }
.login-card { width:min(480px,100%); margin:8vh auto; padding:32px; border:1px solid var(--line); border-radius:16px; background:#fff; box-shadow:0 14px 50px rgba(21,50,75,.12); }
.login-card h1 { margin:5px 0 8px; }
.login-card>p { color:var(--muted); }
.separator { display:flex; align-items:center; gap:12px; margin:20px 0; color:var(--muted); font-size:12px; }
.separator::before,.separator::after { content:""; height:1px; flex:1; background:var(--line); }
.alert { margin:16px 0; padding:11px 12px; border-radius:8px; }
.alert-error { color:#9f0022; background:#fff0f3; }
.two-column { display:grid; grid-template-columns:minmax(300px,.7fr) minmax(560px,1.3fr); gap:20px; align-items:start; }
.table-scroll { overflow:auto; }
table { width:100%; border-collapse:collapse; }
th,td { padding:11px 10px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
th { color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.05em; }
.inline-form { display:inline; }
.inline-reset { display:flex; gap:5px; margin-top:6px; }
.inline-reset input { min-width:150px; padding:6px 8px; font-size:12px; }
.pair-code { margin-top:20px; padding:18px; display:grid; gap:7px; border:2px solid var(--red); border-radius:10px; background:#fff7f9; }
.pair-code strong { color:var(--red); font-size:30px; letter-spacing:.12em; }
@media (max-width:1050px) { .dashboard-grid,.two-column { grid-template-columns:1fr; } .preview-shell { height:460px; } }
@media (max-width:700px) { .topbar { padding:12px 16px; flex-wrap:wrap; } .topbar nav { order:3; width:100%; } .app-main { width:min(100% - 22px,1540px); margin-top:18px; } .page-heading { align-items:flex-start; flex-direction:column; } .connection-panel { width:100%; } .preview-shell { height:340px; } .copy-row { flex-wrap:wrap; } .copy-row input { flex-basis:100%; } }

