:root {
  color-scheme: dark;
  --bg: #07100d;
  --panel: rgba(16, 29, 24, .78);
  --panel-solid: #101d18;
  --border: rgba(188, 229, 207, .13);
  --text: #edf7f1;
  --muted: #8da69a;
  --green: #6ff0a8;
  --green-dark: #123e2a;
  --amber: #f2c96d;
  --red: #ff7b77;
  --shadow: 0 22px 80px rgba(0, 0, 0, .32);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 78% 0%, #14392a 0, transparent 32%), linear-gradient(160deg, #091510, var(--bg) 55%); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input { font: inherit; }
button { color: inherit; }
.page { width: min(1440px, calc(100% - 48px)); margin: 0 auto; padding: 42px 0 70px; }
.topbar { height: 70px; padding: 0 max(24px, calc((100vw - 1440px) / 2)); display: flex; align-items: center; gap: 24px; border-bottom: 1px solid var(--border); background: rgba(7, 16, 13, .7); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 10; }
.brand { color: var(--text); display: flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 720; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 10px; background: var(--green); color: #07130d; font-size: 12px; font-weight: 900; box-shadow: 0 0 26px rgba(111, 240, 168, .18); }
.topbar-status { margin-left: auto; display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13px; }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(111, 240, 168, .1); }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--border); background: transparent; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }
.icon-button:hover { background: rgba(255, 255, 255, .05); }
.icon-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero { display: flex; justify-content: space-between; align-items: end; margin-bottom: 32px; }
.eyebrow { color: var(--green); font-size: 10px; font-weight: 850; letter-spacing: .2em; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(38px, 5vw, 62px); letter-spacing: -.055em; line-height: .96; margin: 10px 0 13px; }
h2 { margin: 7px 0 0; font-size: 25px; letter-spacing: -.035em; }
.hero p, .login-copy p { color: var(--muted); margin-bottom: 0; }
.secondary-button, .primary-button { border-radius: 11px; padding: 11px 17px; cursor: pointer; font-weight: 700; }
.secondary-button { background: transparent; border: 1px solid var(--border); }
.secondary-button:hover { border-color: rgba(111, 240, 168, .45); }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-card, .service-card, .incidents-block { border: 1px solid var(--border); background: var(--panel); backdrop-filter: blur(16px); border-radius: 16px; box-shadow: var(--shadow); }
.metric-card { min-height: 138px; padding: 20px; }
.metric-card.accent { background: linear-gradient(145deg, rgba(35, 79, 57, .8), rgba(16, 29, 24, .8)); }
.metric-head { display: flex; justify-content: space-between; align-items: center; }
.metric-head span { color: var(--muted); font-size: 13px; }
.metric-head strong { font-size: 25px; letter-spacing: -.04em; }
.metric-card small { color: var(--muted); display: block; margin-top: 15px; }
.meter { height: 5px; background: rgba(255,255,255,.07); border-radius: 10px; overflow: hidden; margin-top: 26px; }
.meter i { display: block; height: 100%; width: 0; background: var(--green); transition: width .3s; }
.section-block { margin-top: 42px; }
.section-title { display: flex; justify-content: space-between; align-items: end; margin-bottom: 16px; }
.summary { color: var(--muted); font-size: 13px; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.service-card { padding: 20px; min-width: 0; }
.service-head { display: flex; justify-content: space-between; gap: 14px; }
.service-name { font-size: 17px; font-weight: 750; margin-bottom: 6px; }
.service-description { color: var(--muted); font-size: 13px; min-height: 37px; }
.status { flex: none; height: 25px; padding: 0 9px; display: inline-flex; align-items: center; gap: 7px; border-radius: 20px; background: rgba(111, 240, 168, .1); color: var(--green); font-size: 11px; font-weight: 800; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.down { color: var(--red); background: rgba(255, 123, 119, .1); }
.service-meta { display: flex; gap: 16px; margin: 18px 0; color: var(--muted); font-size: 11px; }
.service-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.action-button { padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: rgba(255,255,255,.025); cursor: pointer; font-size: 12px; }
.action-button:hover { background: rgba(111, 240, 168, .08); border-color: rgba(111, 240, 168, .3); }
.action-button.stop:hover { color: var(--red); border-color: rgba(255,123,119,.35); }
.incidents-block { padding: 21px; }
.danger-text { color: var(--red); }
.incident-list { display: grid; gap: 8px; }
.incident { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 11px 13px; background: rgba(255, 123, 119, .045); border-left: 2px solid var(--red); border-radius: 5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.incident strong { color: #ffc4c1; font-family: inherit; }
.incident span { color: #bda6a4; overflow-wrap: anywhere; }
.empty-state { grid-column: 1 / -1; padding: 35px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: 14px; }
dialog { width: min(1000px, calc(100% - 32px)); height: min(720px, calc(100% - 32px)); border: 1px solid var(--border); border-radius: 17px; background: #08110e; color: var(--text); box-shadow: 0 30px 120px #000; padding: 0; }
dialog::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(5px); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.dialog-head h2 { font-size: 18px; }
#logs-output { margin: 0; padding: 20px; height: calc(100% - 79px); overflow: auto; color: #b8d2c5; font: 11px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.toast { position: fixed; right: 20px; bottom: 20px; max-width: 420px; padding: 12px 15px; border-radius: 10px; background: #183125; border: 1px solid var(--border); box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; font-size: 13px; }
.toast.visible { opacity: 1; transform: none; }
.toast.error { background: #3a1a19; }
.auth-page { width: 100%; padding: 0; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 440px; align-items: center; gap: 7vw; width: min(1120px, calc(100% - 48px)); margin: auto; }
.login-copy h1 { max-width: 650px; font-size: clamp(54px, 7vw, 94px); }
.login-copy p { max-width: 470px; font-size: 18px; }
.login-card { padding: 30px; border: 1px solid var(--border); border-radius: 20px; background: rgba(14, 27, 22, .84); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.login-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.login-card-head div { display: grid; gap: 1px; }
.login-card-head small, .login-note { color: var(--muted); }
.login-card label { display: grid; gap: 8px; color: var(--muted); font-size: 12px; margin-top: 16px; }
.login-card input { width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 13px 14px; color: var(--text); background: rgba(4, 10, 8, .58); outline: none; }
.login-card input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(111, 240, 168, .09); }
.primary-button { width: 100%; margin-top: 22px; border: 0; background: var(--green); color: #07130d; }
.primary-button:hover { filter: brightness(1.06); }
.login-note { margin: 18px 0 0; text-align: center; font-size: 11px; }
.alert { padding: 10px 12px; border-radius: 9px; background: rgba(255, 123, 119, .1); color: #ffc4c1; font-size: 12px; }
@media (max-width: 980px) { .metrics { grid-template-columns: repeat(2, 1fr); } .service-grid { grid-template-columns: repeat(2, 1fr); } .login-shell { grid-template-columns: 1fr 380px; } }
@media (max-width: 720px) { .page { width: min(100% - 28px, 1440px); padding-top: 28px; } .topbar { padding: 0 14px; } .topbar-status { display: none; } .metrics, .service-grid { grid-template-columns: 1fr; } .hero { align-items: start; gap: 20px; } .hero h1 { font-size: 42px; } .login-shell { grid-template-columns: 1fr; padding: 50px 0; } .login-copy h1 { font-size: 52px; } .incident { grid-template-columns: 1fr; gap: 5px; } }

