:root {
  color-scheme: dark;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  --bg: #050a14;
  --panel: rgba(11, 25, 48, 0.88);
  --panel-2: rgba(15, 36, 68, 0.92);
  --line: rgba(137, 183, 255, 0.17);
  --text: #f6f8ff;
  --muted: #9eabc1;
  --blue: #2d8cff;
  --blue-2: #1762d2;
  --gold: #e3b85e;
  --green: #2bd683;
  --red: #ff6373;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
}

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 12%, rgba(41, 128, 255, 0.2), transparent 35%),
    radial-gradient(circle at 15% 95%, rgba(227, 184, 94, 0.09), transparent 28%),
    linear-gradient(145deg, #050a14 0%, #071226 50%, #040810 100%);
}

.shell { position: relative; min-height: 100vh; padding: 32px; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 7px; color: var(--gold); font-size: .85rem; font-weight: 800; letter-spacing: .06em; }
h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.7rem); line-height: 1.2; }
h2 { margin: 0; font-size: 1.2rem; }
.muted { color: var(--muted); line-height: 1.8; }

.login-wrap { min-height: calc(100vh - 64px); display: grid; place-items: center; }
.login-card {
  width: min(100%, 440px);
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(17, 39, 72, .94), rgba(7, 18, 38, .96));
  box-shadow: var(--shadow);
}

.brand-mark {
  position: absolute;
  top: max(28px, calc(50% - 300px));
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(227, 184, 94, .45);
  border-radius: 20px;
  color: var(--gold);
  background: #0a1b35;
  font-size: 2.2rem;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
  transform: translateY(-30px);
}

label { display: block; margin: 18px 0 8px; font-weight: 700; color: #dce6f7; }
input {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--text);
  background: rgba(2, 9, 20, .64);
  font: inherit;
}
input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(45, 140, 255, .13); }

button {
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease, background .16s ease;
}
button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }
button:disabled { opacity: .5; cursor: wait; }
.wide { width: 100%; margin-top: 24px; }
.primary { color: white; background: linear-gradient(135deg, var(--blue), var(--blue-2)); box-shadow: 0 8px 24px rgba(45,140,255,.2); }
.ghost { color: #d8e6ff; border-color: var(--line); background: rgba(255,255,255,.04); }
.quiet { color: var(--muted); background: transparent; }
.danger { color: white; background: linear-gradient(135deg, #e34b5d, #aa2334); }

.dashboard { width: min(1180px, 100%); margin: 0 auto; padding: 12px 0 40px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0 28px; }
.header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}
.summary > div {
  min-height: 92px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(9, 23, 46, .72);
}
.big { color: var(--gold); font-size: 2.15rem; font-weight: 900; }
.big.small { font-size: 1.28rem; }

.process-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.process-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, var(--panel-2), var(--panel));
  box-shadow: 0 16px 45px rgba(0,0,0,.18);
}
.process-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--status-color, var(--muted));
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--status-color); font-weight: 900; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 18px currentColor; }
.meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 22px 0; }
.meta div { padding: 12px; border-radius: 12px; background: rgba(0,0,0,.16); }
.meta span { display: block; color: var(--muted); font-size: .78rem; margin-bottom: 4px; }
.meta strong { font-size: .95rem; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card-actions button { flex: 1; min-width: 90px; }
.action-start { color: #d9ffec; border-color: rgba(43,214,131,.28); background: rgba(43,214,131,.1); }
.action-stop { color: #ffdce0; border-color: rgba(255,99,115,.28); background: rgba(255,99,115,.1); }
.action-restart { color: #e6efff; border-color: rgba(45,140,255,.3); background: rgba(45,140,255,.12); }

.message { min-height: 24px; margin: 18px 0 0; text-align: center; color: var(--muted); }
.message.error { color: #ff9ca8; }
.message.success { color: #7befb5; }

dialog {
  width: min(92vw, 430px);
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--text);
  background: #0b1930;
  box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(1,5,12,.76); backdrop-filter: blur(5px); }
dialog form { padding: 16px; }
.dialog-icon { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 16px; border-radius: 14px; color: #ffdce0; background: rgba(255,99,115,.14); font-size: 1.4rem; font-weight: 900; }
.dialog-actions { display: flex; justify-content: flex-start; gap: 10px; margin-top: 24px; }

@media (max-width: 760px) {
  .shell { padding: 20px; }
  .login-card { padding: 32px 24px; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .header-actions { width: 100%; }
  .header-actions button { flex: 1; }
  .summary, .process-grid { grid-template-columns: 1fr; }
  .meta { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 430px) {
  .shell { padding: 14px; }
  .header-actions button { min-width: calc(50% - 8px); }
  .summary > div { padding: 16px; }
  .process-card { padding: 19px; }
  .meta { grid-template-columns: 1fr; }
}

