:root {
  --bg: #101415;
  --base: #0b0f10;
  --surface: #191c1e;
  --panel: #1e293b;
  --panel-2: #272a2c;
  --line: #334155;
  --line-soft: #45464c;
  --text: #e0e3e5;
  --muted: #a7adb7;
  --cyan: #4cd7f6;
  --cyan-2: #03b5d3;
  --green: #10b981;
  --purple: #8b5cf6;
  --amber: #f59e0b;
  --red: #ff8f86;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(76, 215, 246, 0.1), transparent 24rem),
    radial-gradient(circle at 80% 18%, rgba(139, 92, 246, 0.09), transparent 24rem),
    var(--bg);
  font-family: Inter, system-ui, sans-serif;
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.68);
}

.login-hero {
  position: relative;
  min-height: 620px;
  padding: 44px;
  background:
    linear-gradient(135deg, rgba(11, 17, 32, 0.94), rgba(16, 20, 21, 0.58)),
    linear-gradient(90deg, transparent 23px, rgba(76, 215, 246, 0.08) 24px),
    linear-gradient(0deg, transparent 23px, rgba(76, 215, 246, 0.08) 24px);
  background-size: auto, 24px 24px, 24px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #001f26;
  background: var(--cyan);
}

.login-hero h1 {
  max-width: 560px;
  margin: 90px 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.login-hero p {
  max-width: 560px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.login-form {
  display: flex;
  align-items: center;
  padding: 44px;
}

.login-form form { width: 100%; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h2, h3 { margin: 0; }

.field { display: grid; gap: 8px; margin: 18px 0; }
.field label { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }

.input, .search {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  color: var(--text);
  background: var(--base);
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: none;
}

.input:focus, .search:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(76, 215, 246, .12); }

.btn {
  min-height: 40px;
  padding: 10px 13px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-weight: 900;
}

.btn.primary { color: #001f26; background: var(--cyan); }
.btn.secondary { color: var(--cyan); background: transparent; border-color: var(--cyan); }
.btn.ghost { color: var(--text); background: transparent; }
.btn:hover { transform: translateY(-1px); }

.error { min-height: 22px; color: var(--red); font-weight: 700; }

.app {
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr) 340px;
  min-height: 100vh;
}

.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(11, 15, 16, 0.98);
}

.side-head { padding: 24px; border-bottom: 1px solid var(--line); }
.side-head small { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

.nav { padding: 14px 0; overflow-y: auto; }
.nav button {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 46px;
  padding: 10px 20px;
  border: 0;
  border-right: 3px solid transparent;
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-weight: 700;
}
.nav button:hover, .nav button.active { color: var(--cyan); background: rgba(76, 215, 246, .08); border-right-color: var(--cyan); }
.nav i { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 5px; font-style: normal; background: rgba(255,255,255,.06); font-size: 11px; }

.side-foot { margin-top: auto; padding: 18px 24px; border-top: 1px solid var(--line); color: var(--muted); }

.main { min-width: 0; }
.top {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  padding: 12px 24px;
  background: rgba(16, 20, 21, .86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top h1 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.top .search { width: min(35vw, 380px); }

.content { padding: 24px; }

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    radial-gradient(circle at 100% 0, rgba(76, 215, 246, .16), transparent 20rem),
    #0b1120;
}
.hero h2 { font-size: clamp(28px, 4vw, 48px); line-height: 1.05; letter-spacing: -.04em; }
.hero p { max-width: 720px; color: var(--muted); line-height: 1.55; }

.strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metric, .card, .log-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(30, 41, 59, .72);
}
.metric { padding: 16px; }
.metric span { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.metric strong { display: block; margin-top: 10px; font: 800 30px/1 JetBrains Mono, monospace; }
.metric em { display: block; margin-top: 8px; color: var(--green); font-style: normal; }

.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: 1.1fr .9fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.card { padding: 18px; }
.card h3 { color: var(--text); font-size: 18px; }
.muted { color: var(--muted); line-height: 1.5; }

.feed, .list { display: grid; gap: 10px; }
.row {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(11, 15, 16, .42);
}
.split { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pill { width: fit-content; padding: 4px 8px; border-radius: 999px; color: var(--cyan); background: rgba(76,215,246,.1); font-size: 12px; font-weight: 900; }
.pill.green { color: var(--green); background: rgba(16,185,129,.1); }
.pill.amber { color: var(--amber); background: rgba(245,158,11,.1); }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(16,185,129,.5); animation: ping 1.7s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 12px rgba(16,185,129,0); } }

.sim {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(139, 92, 246, .44);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(139,92,246,.16), rgba(30,41,59,.84));
}
.sim ol { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.sim li { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; padding: 9px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); }
.sim li b { display: grid; place-items: center; width: 26px; height: 22px; border-radius: 99px; background: var(--line); font-size: 10px; }
.sim li.active { color: var(--text); border-color: var(--purple); }
.sim li.done b { color: #001f26; background: var(--green); }
.sim-output { margin-top: 12px; padding: 12px; border-radius: 6px; border: 1px solid rgba(16,185,129,.26); background: rgba(16,185,129,.08); }
.scan { height: 3px; margin-top: 12px; overflow: hidden; border-radius: 99px; background: var(--line); }
.scan::after { content: ""; display: block; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, var(--cyan), transparent); animation: scan 1s linear infinite; }
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

.bars { display: flex; align-items: end; gap: 10px; height: 180px; }
.bars div { flex: 1; height: var(--h); min-width: 24px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, var(--cyan), var(--purple)); }

.ops-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.agent { padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: rgba(30,41,59,.72); }
.agent.active { border-color: rgba(76,215,246,.62); box-shadow: 0 0 0 3px rgba(76,215,246,.08); }

.watch {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-left: 1px solid var(--line);
  background: rgba(25,28,30,.96);
}
.watch-head, .watch-foot { padding: 20px; border-bottom: 1px solid var(--line); }
.watch-head h2 { margin: 0; color: var(--cyan); }
.watch-feed { overflow-y: auto; }
.watch article { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.watch article.hot { border-left: 3px solid var(--green); background: rgba(16,185,129,.08); }
.watch time, .watch-foot { color: var(--muted); font: 12px JetBrains Mono, monospace; }
.watch p { color: var(--muted); line-height: 1.45; }

@media (max-width: 1180px) {
  .app { grid-template-columns: 86px 1fr; }
  .watch { display: none; }
  .side-head small, .side-head .brand span:last-child, .nav span { display: none; }
  .strip, .grid.two, .grid.three, .grid.four, .ops-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .login-card, .app { display: block; }
  .login-hero { min-height: 420px; }
  .side { position: relative; height: auto; }
  .nav { display: flex; overflow-x: auto; }
  .nav button { min-width: 170px; }
  .nav span, .side-head small, .side-head .brand span:last-child { display: inline; }
  .top { position: relative; flex-wrap: wrap; }
  .top .search { width: 100%; }
  .strip, .grid.two, .grid.three, .grid.four, .ops-grid { grid-template-columns: 1fr; }
}
