﻿:root {
  --bg: #071426;
  --sidebar: #091a2e;
  --panel: #0d2038;
  --panel-2: #142a47;
  --line: #24405f;
  --text: #eef7ff;
  --muted: #9fb5cf;
  --accent: #17d4cb;
  --accent-2: #67a8ff;
  --danger: #ff4f6a;
  --warn: #ffb020;
  --ok: #12c99b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  padding: 24px 18px;
  background: linear-gradient(180deg, #0b1d32, #071426);
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 8px;
  filter: drop-shadow(0 10px 22px rgba(23, 212, 203, 0.28));
}

.brand strong, .brand span { display: block; }
.brand span { color: var(--muted); font-size: 13px; margin-top: 2px; }

nav {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 650;
}

nav a:hover, nav a.active {
  background: #102945;
  color: var(--text);
}

.sidebar-card {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1c31;
}

.sidebar-card span, .sidebar-card small { display: block; color: var(--muted); }
.sidebar-card strong { display: block; margin: 5px 0; }

.shell {
  margin-left: 260px;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(13, 32, 56, 0.96), rgba(7, 20, 38, 0.96));
}

.hero-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-title img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 16px 30px rgba(23, 212, 203, 0.22));
}

h1, h2, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.08; }
h2 { font-size: 18px; }
p { color: var(--muted); margin-top: 7px; line-height: 1.5; }

.account {
  min-width: 190px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-align: right;
}
.account span, .account strong { display: block; }
.account span { color: var(--muted); font-size: 13px; }
.account strong { margin-top: 4px; color: var(--accent); }

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.metrics article, .panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.metrics article { padding: 18px; }
.metrics span { display: block; color: var(--muted); font-size: 13px; }
.metrics strong { display: block; margin-top: 8px; font-size: 26px; }

.grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
  margin-bottom: 14px;
}

.lower-grid { grid-template-columns: 1fr 1fr; }
.panel { padding: 18px; }

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 6px;
  background: #173456;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.status.live, .status.running { background: rgba(18, 201, 155, 0.16); color: var(--ok); }
.status.installing, .status.restarting { background: rgba(255, 176, 32, 0.16); color: var(--warn); }
.status.removing { background: rgba(255, 79, 106, 0.16); color: var(--danger); }

.coin-stats, .network-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.coin-stats div, .network-stats div {
  padding: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.coin-stats span, .network-stats span { display: block; color: var(--muted); font-size: 12px; }
.coin-stats strong, .network-stats strong { display: block; margin-top: 6px; font-size: 15px; }

.form { display: grid; gap: 12px; }
label { color: var(--muted); font-size: 13px; font-weight: 700; }
input {
  width: 100%;
  margin-top: 7px;
  padding: 12px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #08182a;
  color: var(--text);
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #03151a;
  padding: 11px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}
button:hover { filter: brightness(1.08); }
button.ghost { background: #183556; color: var(--text); }
button.danger { background: var(--danger); color: white; }

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}
th, td {
  padding: 12px;
  border-top: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}
th { color: var(--muted); background: #0a1a2e; font-size: 12px; }
code { color: #b5e5ff; }
.actions { display: flex; gap: 8px; }
.actions button { padding: 8px 10px; }

.jobs-list, .network-list { display: grid; gap: 10px; }
.job, .network-node {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0a1a2e;
}
.job span, .network-node span { color: var(--accent); text-transform: uppercase; font-size: 11px; font-weight: 900; }
.job small { color: var(--muted); }
.network-node { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.network-node strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.empty-state {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}
.preview-result {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #07172a;
  color: var(--text);
  text-align: left;
}
.preview-result strong { color: var(--accent); }
.preview-result span { color: var(--muted); font-size: 12px; }
.preview-result pre {
  max-height: 220px;
  overflow: auto;
  margin: 0;
  padding: 10px;
  border-radius: 8px;
  background: #03101f;
  color: #d8f6ff;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.preview-result.error { border-color: rgba(255, 79, 106, 0.7); color: var(--danger); }
.preview-note { color: var(--muted); font-size: 12px; }
.preview-actions { display: flex; justify-content: flex-end; gap: 10px; }
.preview-actions button { width: auto; min-width: 180px; padding: 10px 14px; }

.settings-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.settings-row span { color: var(--muted); }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #03151a;
  font-weight: 850;
  opacity: 0;
  transform: translateY(14px);
  transition: 180ms ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 920px) {
  .sidebar {
    position: static;
    width: auto;
  }
  .sidebar-card { position: static; margin-top: 18px; }
  .shell { margin-left: 0; padding: 18px; }
  .topbar, .panel-heading, .settings-row, .hero-title { flex-direction: column; align-items: stretch; }
  .hero-title img { width: 58px; height: 58px; }
  .account { text-align: left; }
  .metrics, .grid, .lower-grid, .coin-stats, .network-stats { grid-template-columns: 1fr; }
}

.login-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.login-overlay.hidden { display: none; }
.login-box {
  width: 320px;
  max-width: 90vw;
  padding: 28px 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  display: grid;
  gap: 12px;
  text-align: center;
}
.login-box .brand-logo { width: 48px; height: 48px; margin: 0 auto; }
.login-box h1 { font-size: 18px; margin: 4px 0 0; }
.login-box p { color: var(--muted); margin: 0 0 8px; font-size: 13px; }
.login-error {
  color: var(--danger);
  font-size: 12px;
  min-height: 16px;
}
.account { display: flex; align-items: center; gap: 12px; }
.account button { padding: 8px 12px; font-size: 12px; }



