:root {
  --bg:#0f1115; --panel:#171a21; --panel2:#1e222b; --line:#2a2f3a;
  --fg:#e6e9ef; --muted:#8b93a3; --accent:#5b9dff; --accent2:#3ad29f;
  --danger:#ff6b6b; --radius:12px;
}
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--fg);
  font:15px/1.5 system-ui,-apple-system,Segoe UI,Roboto,sans-serif; }
a { color:var(--accent); }
button { font:inherit; cursor:pointer; border:none; border-radius:8px; padding:9px 14px;
  background:var(--accent); color:#08111f; font-weight:600; }
button.secondary { background:var(--panel2); color:var(--fg); border:1px solid var(--line); }
button.danger { background:transparent; color:var(--danger); border:1px solid var(--line); }
button:disabled { opacity:.5; cursor:default; }
input, textarea, select { font:inherit; padding:10px 12px; border-radius:8px; border:1px solid var(--line);
  background:var(--panel2); color:var(--fg); width:100%; }
textarea { resize:vertical; }
.row { display:flex; gap:10px; align-items:center; }
.muted { color:var(--muted); }

/* layout */
header.top { display:flex; align-items:center; justify-content:space-between;
  padding:14px 22px; border-bottom:1px solid var(--line); background:var(--panel); }
header.top .brand { font-weight:700; letter-spacing:.3px; }
header.top .brand small { color:var(--muted); font-weight:400; margin-left:8px; }
main { max-width:1080px; margin:0 auto; padding:24px 22px 60px; }
.section-title { display:flex; align-items:center; justify-content:space-between; margin:26px 0 12px; }
.section-title h2 { font-size:15px; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); margin:0; }

/* cards */
.grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); gap:14px; }
.card { background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:16px; }
.card h3 { margin:0 0 4px; font-size:16px; }
.card .meta { font-size:12.5px; color:var(--muted); margin-bottom:10px; word-break:break-all; }
.card .info { display:flex; flex-direction:column; gap:4px; margin-bottom:12px; font-size:12.5px; }
.card .info-row { display:flex; gap:6px; align-items:baseline; color:var(--fg); overflow:hidden; }
.card .info-row span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.card .info-row a { text-decoration:none; }
.badge { display:inline-block; font-size:11px; padding:2px 8px; border-radius:999px; border:1px solid var(--line); }
.badge.running { color:var(--accent2); border-color:#245; } .badge.stopped,.badge.missing { color:var(--muted); }
.chips { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 12px; }
.chip { font-size:11px; padding:2px 8px; border-radius:6px; background:var(--panel2); border:1px solid var(--line); color:var(--muted); }
.card .actions { display:flex; gap:8px; flex-wrap:wrap; }
.card .actions button { padding:7px 11px; font-size:13px; }

/* login */
.login-wrap { min-height:100vh; display:grid; place-items:center; }
.login { width:360px; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:28px; }
.login h1 { font-size:20px; margin:0 0 4px; } .login p { margin:0 0 18px; }

/* modal */
.modal-back { position:fixed; inset:0; background:rgba(0,0,0,.55); display:grid; place-items:center; z-index:50; }
.modal { width:440px; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); padding:22px; }
.modal h3 { margin:0 0 14px; }
.checks { display:flex; flex-direction:column; gap:8px; max-height:200px; overflow:auto; margin:8px 0 16px; }
.checks label { display:flex; gap:8px; align-items:center; background:var(--panel2); border:1px solid var(--line); border-radius:8px; padding:8px 10px; }
.checks input { width:auto; }
.field { margin-bottom:14px; } .field label { display:block; font-size:13px; color:var(--muted); margin-bottom:6px; }
.end { display:flex; justify-content:flex-end; gap:10px; }
.warn { background:#2a1f14; border:1px solid #5a3a1a; color:#ffcf99; padding:10px 12px; border-radius:8px; font-size:13px; margin-bottom:16px; }

/* terminal */
.term-view { position:fixed; inset:0; background:#000; display:flex; flex-direction:column; z-index:40; }
.term-bar { display:flex; align-items:center; justify-content:space-between; padding:8px 14px; background:var(--panel); border-bottom:1px solid var(--line); }
.term-bar .t { font-weight:600; } .term-bar .t small { color:var(--muted); font-weight:400; margin-left:8px; }
.term-host { flex:1; padding:6px; overflow:hidden; }
.toast { position:fixed; bottom:20px; left:50%; transform:translateX(-50%); background:var(--panel2);
  border:1px solid var(--line); padding:10px 16px; border-radius:8px; z-index:60; }
.toast.err { border-color:var(--danger); color:var(--danger); }
