:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #101418;
  color: #edf2f7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 480px) 1fr;
  background:
    linear-gradient(120deg, rgba(15, 23, 42, 0.92), rgba(16, 20, 24, 0.86)),
    radial-gradient(circle at 78% 18%, rgba(20, 184, 166, 0.22), transparent 32%),
    #101418;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
  background: #f8fafc;
  color: #111827;
}

.brand-mark {
  width: 76px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #0f766e;
  color: #ecfeff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark.compact {
  width: 64px;
  height: 38px;
}

.login-panel h1 {
  margin: 28px 0 8px;
  font-size: 36px;
}

.login-panel p {
  margin: 0 0 28px;
  color: #475569;
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 18px;
}

.login-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.login-form input,
.node-form input,
.node-form select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 13px 14px;
  background: #ffffff;
  color: #111827;
}

.login-form button,
.node-form button,
.ghost-button {
  border: 0;
  border-radius: 8px;
  padding: 13px 18px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.form-error {
  padding: 12px;
  border-radius: 8px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 700;
}

.login-context {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 56px;
  gap: 12px;
}

.login-context span,
.eyebrow {
  color: #5eead4;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
}

.login-context strong {
  max-width: 760px;
  font-size: clamp(32px, 5vw, 68px);
  line-height: 1.04;
}

.dashboard-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px 1fr;
  background: #111827;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid #243244;
  background: #0b1120;
}

.sidebar nav {
  display: grid;
  gap: 10px;
  margin-top: 32px;
}

.sidebar a {
  color: #cbd5e1;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
}

.sidebar a:hover {
  background: #1f2937;
  color: #ffffff;
}

.workspace {
  padding: 28px;
  display: grid;
  gap: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.topbar h1 {
  margin: 4px 0 0;
  font-size: 32px;
}

.eyebrow {
  margin: 0;
}

.ghost-button {
  background: #1f2937;
  border: 1px solid #334155;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 14px;
}

.metric,
.section-block,
.service-card,
.architecture article {
  border: 1px solid #243244;
  border-radius: 8px;
  background: #17202e;
}

.metric {
  padding: 18px;
}

.metric span,
.service-card span,
.section-heading p,
.architecture span {
  color: #94a3b8;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.metric.wide {
  grid-column: span 2;
}

.section-block {
  padding: 22px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
}

.section-heading p {
  margin: 0;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 14px;
}

.service-card {
  padding: 18px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.service-card h3 {
  margin: 8px 0;
}

.service-card p {
  margin: 0;
  color: #cbd5e1;
}

.card-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.status {
  color: #86efac !important;
  font-weight: 800;
}

.card-actions a,
.text-button {
  color: #93c5fd;
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.node-form {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr auto;
  gap: 10px;
  margin-bottom: 16px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 13px;
  border-bottom: 1px solid #243244;
  text-align: left;
}

th {
  color: #cbd5e1;
}

.empty-state {
  padding: 24px;
  border: 1px dashed #334155;
  border-radius: 8px;
  color: #94a3b8;
}

.architecture {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.architecture article {
  padding: 18px;
  display: grid;
  gap: 10px;
}

@media (max-width: 980px) {
  .login-shell,
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .login-context {
    min-height: 360px;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .metric-grid,
  .service-grid,
  .architecture,
  .node-form {
    grid-template-columns: 1fr;
  }

  .metric.wide {
    grid-column: auto;
  }
}
