/* Панель ai-agent. Без внешних шрифтов и картинок: CSP разрешает только 'self'. */

:root {
  --bg: #14161a;
  --panel: #1c1f26;
  --line: #2b303a;
  --text: #e6e8ec;
  --muted: #8d94a3;
  --ok: #4caf7d;
  --bad: #d8785c;
  --accent: #6ea8fe;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 24px 16px 48px;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.wrap { max-width: 880px; margin: 0 auto; }

h1 { font-size: 20px; margin: 0; font-weight: 600; }
h2 { font-size: 14px; margin: 0 0 10px; color: var(--muted);
     text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

.top {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: baseline; justify-content: space-between;
  padding-bottom: 16px; margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.top-right { display: flex; gap: 14px; align-items: baseline; }

section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}

table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 6px 8px 6px 0; vertical-align: top;
         font-weight: 400; border-bottom: 1px solid var(--line); }
tr:last-child td, tr:last-child th { border-bottom: 0; }
th { color: var(--muted); width: 34%; white-space: nowrap; }
table.wide th { width: auto; color: var(--muted); }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.nodata { color: var(--muted); margin: 0; }

.state { font-weight: 600; }
.state-ok { color: var(--ok); }
.state-bad { color: var(--bad); }

footer { margin-top: 20px; font-size: 13px; }

/* --- форма входа --- */

.login-box {
  max-width: 340px; margin: 12vh auto 0;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 24px;
}
.login-box h1 { margin-bottom: 18px; }

label { display: block; margin: 14px 0 6px; font-size: 13px; color: var(--muted); }

input[type="text"], input[type="password"] {
  width: 100%; padding: 9px 10px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 6px;
  font: inherit;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

button {
  margin-top: 20px; width: 100%; padding: 10px;
  background: var(--accent); color: #10131a;
  border: 0; border-radius: 6px;
  font: inherit; font-weight: 600; cursor: pointer;
}
button:hover { filter: brightness(1.08); }

button.link {
  width: auto; margin: 0; padding: 0;
  background: none; color: var(--accent);
  font-weight: 400; text-decoration: underline;
}

.error {
  margin: 0; padding: 9px 11px;
  background: #3a2320; border: 1px solid var(--bad); border-radius: 6px;
  color: #f0c3b6; font-size: 14px;
}
