:root {
  color-scheme: dark;
  --bg: #07110f;
  --panel: rgba(17, 34, 30, .92);
  --panel-2: #10231f;
  --line: #24463e;
  --text: #ecf8f4;
  --muted: #8eaaa2;
  --accent: #4fe0ae;
  --accent-2: #9cf4d5;
  --bad: #ff7d83;
  --warn: #ffc56b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 85% 0%, #143b32 0, transparent 36%), var(--bg); color: var(--text); }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 48px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.brand { display: flex; gap: 12px; align-items: center; }
.mark { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid #398c71; border-radius: 13px; color: var(--accent); background: #0c211b; font-weight: 800; }
h1 { font-size: 22px; margin: 0; letter-spacing: -.02em; }
.eyebrow { margin: 0 0 4px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.status { border: 1px solid #2d6957; background: #0c211b; color: var(--accent-2); border-radius: 999px; padding: 8px 12px; font-size: 13px; }
.grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .6fr); gap: 18px; }
.card { background: linear-gradient(180deg, rgba(18, 39, 34, .96), rgba(12, 27, 24, .96)); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: 0 24px 80px rgba(0,0,0,.22); }
.card h2 { margin: 0 0 8px; font-size: 17px; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0 0 14px; }
textarea, input, select { width: 100%; color: var(--text); background: #081815; border: 1px solid #2a4c44; border-radius: 12px; padding: 12px 13px; outline: none; }
textarea { min-height: 300px; resize: vertical; line-height: 1.55; }
textarea:focus, input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,224,174,.12); }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.actions.compact { margin-top: 0; gap: 6px; flex-wrap: nowrap; }
.actions.compact button { padding: 8px 10px; }
button, .button { border: 0; border-radius: 11px; padding: 11px 15px; font-weight: 700; cursor: pointer; background: var(--accent); color: #052018; text-decoration: none; }
button.secondary, .button.secondary { background: #18352e; color: var(--text); border: 1px solid #315d52; }
button.danger { background: #4a2327; color: #ffd1d3; border: 1px solid #7d3a40; }
button:disabled { cursor: not-allowed; opacity: .48; }
.metric { border-bottom: 1px solid var(--line); padding: 15px 0; display: flex; justify-content: space-between; gap: 16px; }
.metric:last-child { border-bottom: 0; }
.metric strong { font-size: 18px; }
.muted { color: var(--muted); }
.login { width: min(430px, calc(100% - 32px)); margin: 12vh auto; }
.login .card { padding: 28px; }
.login input { margin: 14px 0; }
.notice { margin-top: 14px; color: var(--warn); font-size: 13px; }
.error { color: var(--bad); }
.success { color: var(--accent); }
.hidden { display: none !important; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; }
th { color: var(--muted); background: #0b1d19; position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; background: #17372f; color: var(--accent-2); font-size: 12px; }
.pill.bad { background: #3b2023; color: #ffb1b4; }
.pill.warn { background: #49381c; color: #ffe0a3; }
.manual-card { margin-bottom: 18px; border-color: #80632d; }
.manual-screen-wrap { overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: #050908; }
.manual-screen { display: block; width: 100%; max-width: 1280px; height: auto; margin: 0 auto; cursor: crosshair; user-select: none; }
.diagnostic-url { max-width: 420px; margin-top: 5px; overflow-wrap: anywhere; }
.diagnostic-link { display: inline-block; margin-top: 7px; padding: 6px 9px; font-size: 12px; }
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin: 18px 0 12px; }
.toolbar h2 { margin: 0; }
.stack { display: grid; gap: 12px; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
dialog { width: min(540px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: 18px; color: var(--text); background: #0c1d19; padding: 22px; }
dialog::backdrop { background: rgba(0,0,0,.72); }
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } .row { grid-template-columns: 1fr; } .shell { width: min(100% - 20px, 1180px); } }
