:root {
  --bg-0: #050a14;
  --bg-1: #0a1426;
  --bg-2: #0d1f3b;
  --line: rgba(142, 171, 214, 0.26);
  --text: #e8eef8;
  --muted: #9eb0cc;
  --top-a: #091221;
  --top-b: #0f2340;
  --top-line: rgba(255, 178, 74, 0.22);
  --module-text: #d8e4f9;
  --module-hover: rgba(122, 161, 223, 0.2);
  --module-active: linear-gradient(180deg, rgba(255, 140, 35, 0.96), rgba(255, 184, 79, 0.94));
  --sub-active: #ff9e2f;
  --panel: linear-gradient(180deg, rgba(18, 35, 68, 0.92), rgba(14, 26, 50, 0.95));
  --ok: #70d691;
  --bad: #d66a6a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI Variable", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1150px 560px at 16% -2%, rgba(255, 178, 74, 0.16), transparent 60%),
    radial-gradient(1000px 600px at 90% 8%, rgba(71, 141, 245, 0.14), transparent 62%),
    linear-gradient(180deg, var(--bg-2), var(--bg-1) 30%, var(--bg-0));
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.top-shell {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(132, 162, 203, 0.2);
  box-shadow: 0 10px 30px rgba(3, 8, 18, 0.55);
  background: linear-gradient(102deg, var(--top-a), var(--top-b));
  backdrop-filter: blur(8px);
}

.top-row {
  min-height: 74px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.brand-logo {
  height: 56px;
  width: auto;
  display: block;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.5));
}

.top-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.net {
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 10px;
  font-weight: 800;
  color: #f1f7ff;
  background: rgba(255, 175, 67, 0.2);
  border: 1px solid rgba(255, 178, 74, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.net::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(180deg, #7be39f, #57bc7a);
  box-shadow: 0 0 0 5px rgba(123, 227, 159, 0.12);
}

.net.offline {
  color: #fff2f2;
  background: rgba(214, 106, 106, 0.2);
  border-color: rgba(255, 190, 190, 0.36);
}

.net.offline::before {
  background: linear-gradient(180deg, #f08f8f, #d66a6a);
  box-shadow: 0 0 0 5px rgba(240, 143, 143, 0.12);
}

.module-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  margin-left: 18px;
  overflow-x: auto;
}

.module-btn {
  border: 1px solid rgba(125, 158, 209, 0.22);
  background: transparent;
  color: var(--module-text);
  cursor: pointer;
  min-height: 40px;
  min-width: 88px;
  padding: 6px 10px;
  border-radius: 11px;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(233, 241, 253, 0.06);
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.module-btn:hover {
  background: var(--module-hover);
  border-color: rgba(154, 185, 232, 0.36);
}

.module-btn:active {
  transform: none;
}

.module-btn.active {
  background: var(--module-active);
  color: #1e2024;
  border-color: rgba(255, 214, 150, 0.55);
  box-shadow: 0 12px 24px rgba(255, 149, 35, 0.26);
}

.module-btn .ico {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  opacity: 0.96;
}

.sub-line {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 12px;
  background: rgba(8, 18, 35, 0.75);
  border-top: 1px solid var(--top-line);
  border-bottom: 1px solid rgba(112, 148, 199, 0.24);
  overflow-x: auto;
}

.sub-btn {
  border: 0;
  background: transparent;
  color: #b9cee9;
  padding: 8px 1px 9px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color 130ms ease;
}

.sub-btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: transparent;
}

.sub-btn:hover {
  color: #e4efff;
}

.sub-btn.active {
  color: #ffdba8;
}

.sub-btn.active::after {
  background: #ffb049;
}

.workspace {
  padding: 14px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 16px;
  box-shadow: 0 14px 34px rgba(3, 9, 18, 0.36);
}

h1 {
  margin: 0;
  font-size: 34px;
  font-weight: 780;
  letter-spacing: -0.4px;
}

.muted {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.page-shell {
  min-height: calc(100vh - 172px);
}

.page-shell.plan-mode {
  padding: 8px;
}
