:root {
  --bg: #e9e1d6;
  --ink: #1d1712;
  --muted: #604b3b;
  --line: rgba(68, 45, 28, 0.18);
  --panel: rgba(255, 252, 247, 0.84);
  --panel-strong: rgba(255, 252, 247, 0.94);
  --rust: #b65323;
  --gold: #ae8732;
  --cyan: #1c9f99;
  --blue: #315b7d;
  --shadow: 0 24px 70px rgba(42, 27, 16, 0.14);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  background:
    linear-gradient(135deg, rgba(233, 225, 214, 0.94), rgba(239, 232, 219, 0.88)),
    radial-gradient(circle at 84% 12%, rgba(28, 159, 153, 0.18), transparent 28rem),
    radial-gradient(circle at 14% 88%, rgba(174, 135, 50, 0.18), transparent 30rem),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(73, 52, 32, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(73, 52, 32, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 78%);
}

button,
input {
  font: inherit;
}

select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  min-height: 100vh;
  max-width: 100vw;
  overflow-x: hidden;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 276px;
  height: 100vh;
  overflow-y: auto;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: rgba(255, 249, 240, 0.66);
  backdrop-filter: blur(20px) saturate(130%);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fffaf0;
  background: linear-gradient(135deg, var(--rust), var(--blue));
  font-family: "SF Mono", "Courier New", monospace;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.1rem;
}

.brand small,
.eyebrow,
.profile-field span,
.preview-head span,
.registry-row span,
.metric span,
.table-button small,
.nav-link small,
.section-tab small {
  font-family: "SF Mono", "Courier New", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 10px;
  align-content: start;
}

.nav-link,
.section-tab,
.table-button,
.icon-button,
.sidebar-foot button,
.pager button,
.login-form button {
  border: 1px solid var(--line);
  background: rgba(255, 252, 247, 0.78);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(42, 27, 16, 0.08);
}

.nav-link {
  text-decoration: none;
  padding: 12px;
  border-radius: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-link.active,
.table-button.active {
  border-color: rgba(182, 83, 35, 0.46);
  background: rgba(255, 244, 229, 0.94);
}

.nav-link.muted {
  opacity: 0.68;
}

.section-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(68, 45, 28, 0.12);
  border-radius: 20px;
  background: rgba(255, 249, 240, 0.58);
  box-shadow: 0 14px 36px rgba(42, 27, 16, 0.08);
  backdrop-filter: blur(20px) saturate(130%);
}

.section-tab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 14px;
  text-align: left;
}

.section-tab span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-tab.active {
  border-color: rgba(182, 83, 35, 0.46);
  background: rgba(255, 244, 229, 0.94);
}

.section-tab.muted {
  opacity: 0.76;
}

.sidebar-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: "SF Mono", "Courier New", monospace;
  font-size: 0.78rem;
}

.sidebar-foot button,
.pager button,
.login-form button {
  border-radius: 12px;
  padding: 9px 12px;
}

	.main {
	  margin-left: 276px;
	  width: min(1380px, calc(100vw - 276px));
	  max-width: calc(100vw - 276px);
	  min-width: 0;
	  padding: 34px;
	  display: grid;
	  gap: 22px;
	}

	.is-hidden {
	  display: none !important;
	}

.topbar,
.panel-head,
.metrics,
.database-profile,
.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar h1,
.panel h2,
.login-panel h1 {
  margin: 0;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: clamp(2rem, 4vw, 4.4rem);
  line-height: 0.94;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--rust);
  font-weight: 800;
}

.icon-button {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  font-size: 1.3rem;
}

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

.metric,
.panel,
.login-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(140%);
}

.metric {
  min-height: 106px;
  border-radius: 22px;
  padding: 20px;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 1.8rem;
}

.panel {
  border-radius: 26px;
  padding: 24px;
  min-width: 0;
}

.active-node-head {
  align-items: stretch;
  padding: 18px;
  border: 1px solid rgba(68, 45, 28, 0.12);
  border-radius: 22px;
  background: rgba(255, 252, 247, 0.78);
}

.active-node-title {
  min-width: 0;
}

.active-node-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(182, 83, 35, 0.22);
  border-radius: 999px;
  color: var(--rust);
  background: rgba(255, 244, 229, 0.9);
  font-family: "SF Mono", "Courier New", monospace;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.active-node-title h2 {
  margin-top: 12px;
  font-size: clamp(1.55rem, 2.5vw, 2.6rem);
  line-height: 1.05;
  word-break: break-word;
}

.active-node-title p {
  max-width: 720px;
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(68, 45, 28, 0.1);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255, 252, 247, 0.86);
  line-height: 1.55;
}

.active-node-state {
  min-width: 172px;
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 8px;
  font-family: "SF Mono", "Courier New", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted);
}

.status-pill {
  min-width: 92px;
  text-align: center;
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid rgba(28, 159, 153, 0.28);
  color: #105955;
  background: rgba(224, 251, 247, 0.82);
  font-family: "SF Mono", "Courier New", monospace;
  font-size: 0.76rem;
  text-transform: uppercase;
}

	.status-pill.warning,
	.status-pill.muted {
	  border-color: rgba(174, 135, 50, 0.28);
	  color: #73551a;
	  background: rgba(255, 246, 214, 0.82);
	}

	.status-pill.danger {
	  border-color: rgba(182, 83, 35, 0.34);
	  color: #8f2e1a;
	  background: rgba(255, 238, 229, 0.9);
	}

.database-profile {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 20px 0;
}

.profile-field,
.preview-head > div,
.registry-row {
  border: 1px solid rgba(68, 45, 28, 0.12);
  border-radius: 16px;
  padding: 12px;
  background: var(--panel-strong);
  min-width: 0;
}

.profile-field strong,
.preview-head strong,
.registry-row strong {
  display: block;
  margin-top: 6px;
  word-break: break-word;
}

.table-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  min-width: 0;
}

.table-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
  scrollbar-width: thin;
}

.table-button {
  flex: 0 0 auto;
  width: auto;
  min-width: 168px;
  min-height: 58px;
  border-radius: 15px;
  padding: 10px 12px;
  text-align: left;
}

.table-button span,
.table-button small {
  display: block;
}

.table-preview {
  min-width: 0;
}

.table-panel {
  padding: 28px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.table-panel .panel-head {
  margin-bottom: 18px;
}

.preview-head {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.preview-head > div {
  padding: 16px;
}

.preview-head strong {
  font-size: 1.15rem;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 252, 247, 0.94);
  max-height: 78vh;
  min-height: 420px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34), 0 18px 40px rgba(42, 27, 16, 0.08);
}

table {
  width: max-content;
  min-width: 1560px;
  border-collapse: collapse;
  font-family: "SF Mono", "Courier New", monospace;
  font-size: 0.88rem;
  line-height: 1.55;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid rgba(68, 45, 28, 0.1);
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #fff8ed;
  background: #3e3026;
}

td {
  background: rgba(255, 252, 247, 0.72);
}

tr:nth-child(even) td {
  background: rgba(250, 242, 230, 0.76);
}

.pager {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-family: "SF Mono", "Courier New", monospace;
  font-size: 0.86rem;
}

.pager button:disabled,
.icon-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.registry-list {
  display: grid;
  gap: 10px;
}

.registry-row {
  display: grid;
  grid-template-columns: 1.2fr 0.5fr 0.5fr 2fr;
  gap: 12px;
}

.empty,
.form-message {
  border: 1px solid rgba(68, 45, 28, 0.12);
  border-radius: 16px;
  padding: 14px;
  color: var(--muted);
  background: var(--panel-strong);
}

.form-message:empty {
  display: none;
}

.form-message.success {
  color: #12655f;
  border-color: rgba(28, 159, 153, 0.26);
  background: rgba(226, 251, 247, 0.88);
}

.form-message.error {
  color: #8f2e1a;
  border-color: rgba(182, 83, 35, 0.28);
  background: rgba(255, 238, 229, 0.9);
}

.manual-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) 160px 210px 150px;
  gap: 12px;
  align-items: end;
  margin: 20px 0 12px;
}

.manual-form label,
.manual-form .check-field {
  display: grid;
  gap: 6px;
}

.manual-form label span,
.manual-form .check-field > span {
  font-family: "SF Mono", "Courier New", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted);
}

.manual-form input,
.manual-form select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 252, 247, 0.92);
}

.inline-check {
  min-height: 44px;
  display: flex !important;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 252, 247, 0.92);
}

.inline-check input {
  width: auto;
  min-height: 0;
}

.manual-form__wide {
  grid-column: span 3;
}

.manual-form button {
  min-height: 44px;
  border: 1px solid rgba(49, 91, 125, 0.32);
  border-radius: 14px;
  padding: 10px 14px;
  color: #fffaf0;
  background: linear-gradient(135deg, var(--rust), var(--blue));
  box-shadow: 0 14px 28px rgba(42, 27, 16, 0.12);
}

.manual-users {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.pre-registration-users {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.manual-users__head,
.manual-user-row,
.pre-registration-users__head,
.pre-registration-row {
  display: grid;
  gap: 12px;
  align-items: center;
}

.manual-users__head,
.manual-user-row {
  grid-template-columns: minmax(260px, 1.4fr) minmax(150px, 0.7fr) minmax(280px, 1fr);
}

.pre-registration-users__head,
.pre-registration-row {
  grid-template-columns: minmax(260px, 1.4fr) minmax(150px, 0.7fr) minmax(280px, 1fr) minmax(90px, 0.4fr);
}

.manual-users__head {
  padding: 0 12px;
  font-family: "SF Mono", "Courier New", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted);
}

.pre-registration-users__head {
  padding: 0 12px;
  font-family: "SF Mono", "Courier New", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--muted);
}

.manual-user-row,
.pre-registration-row {
  width: 100%;
  border: 1px solid rgba(68, 45, 28, 0.12);
  border-radius: 16px;
  padding: 12px;
  text-align: left;
  background: var(--panel-strong);
}

.manual-user-row strong,
.manual-user-row small,
.pre-registration-row strong,
.pre-registration-row small {
  display: block;
  word-break: break-word;
}

.manual-user-row small,
.pre-registration-row small {
  margin-top: 4px;
  color: var(--muted);
}

.monitor-panel {
  display: grid;
  gap: 18px;
}

.monitor-head {
  align-items: flex-start;
}

.monitor-summary {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.monitor-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.monitor-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.monitor-card,
.monitor-chart-panel,
.monitor-chart-card,
.monitor-breakdown-card {
  min-width: 0;
  border: 1px solid rgba(68, 45, 28, 0.12);
  border-radius: 18px;
  background: rgba(255, 252, 247, 0.9);
  box-shadow: 0 14px 34px rgba(42, 27, 16, 0.08);
}

.monitor-card {
  display: grid;
  gap: 8px;
  min-height: 148px;
  padding: 16px;
}

.monitor-card span,
.monitor-card small,
.monitor-card em,
.monitor-chart-head span,
.monitor-chart-card__head span,
.monitor-breakdown-card h3,
.monitor-breakdown-row span,
.monitor-breakdown-card p span {
  font-family: "SF Mono", "Courier New", monospace;
}

.monitor-card span,
.monitor-chart-head span,
.monitor-chart-card__head span,
.monitor-breakdown-row span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.monitor-card strong {
  font-size: clamp(1.42rem, 2.1vw, 2.1rem);
  line-height: 1.05;
}

.monitor-card small {
  color: var(--ink);
  font-size: 0.8rem;
}

.monitor-card em {
  align-self: end;
  color: rgba(96, 75, 59, 0.72);
  font-size: 0.68rem;
  font-style: normal;
  line-height: 1.45;
}

.monitor-chart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.monitor-chart-panel {
  padding: 16px;
}

.monitor-chart-head,
.monitor-chart-card__head,
.monitor-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.monitor-chart-head {
  margin-bottom: 12px;
}

.monitor-chart-head strong {
  color: var(--muted);
  font-family: "SF Mono", "Courier New", monospace;
  font-size: 0.78rem;
  font-weight: 500;
  text-align: right;
}

.monitor-chart-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.monitor-chart-card {
  padding: 12px;
  overflow: hidden;
}

.monitor-chart-card__head {
  margin-bottom: 8px;
}

.monitor-chart-card__head strong {
  font-size: 1rem;
}

.monitor-bar-chart {
  display: block;
  width: 100%;
  height: auto;
  min-height: 150px;
}

.monitor-bar-chart rect {
  fill: var(--bar-color, var(--blue));
  opacity: 0.86;
}

.monitor-bar-chart text {
  fill: rgba(96, 75, 59, 0.78);
  font-family: "SF Mono", "Courier New", monospace;
  font-size: 18px;
}

.monitor-bar-chart .monitor-chart-max {
  fill: rgba(29, 23, 18, 0.72);
  font-size: 17px;
  font-weight: 700;
}

.monitor-chart-gridline {
  stroke: rgba(68, 45, 28, 0.1);
  stroke-width: 1;
}

.monitor-breakdowns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.monitor-breakdown-card {
  padding: 14px;
}

.monitor-breakdown-card--wide {
  grid-column: span 4;
}

.monitor-breakdown-card h3 {
  margin: 0 0 12px;
  color: var(--rust);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.monitor-breakdown-row {
  padding: 9px 0;
  border-top: 1px solid rgba(68, 45, 28, 0.1);
}

.monitor-breakdown-row strong {
  text-align: right;
}

.monitor-breakdown-card p {
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid rgba(68, 45, 28, 0.1);
  color: var(--muted);
  line-height: 1.55;
}

.monitor-breakdown-card p strong {
  color: var(--ink);
}

	.monitor-breakdown-card p span {
	  color: rgba(96, 75, 59, 0.72);
	  font-size: 0.76rem;
	  word-break: break-word;
	}

	.security-panel {
	  display: grid;
	  gap: 18px;
	}

	.security-cards {
	  grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.security-chart-grid {
	  grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.security-grid {
	  display: grid;
	  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
	  gap: 12px;
	}

	.security-card-wide {
	  grid-column: span 1;
	}

	.security-list-title {
	  margin: 10px 0 8px;
	  color: var(--rust);
	  font-family: "SF Mono", "Courier New", monospace;
	  font-size: 0.76rem;
	  font-weight: 800;
	  text-transform: uppercase;
	}

	.security-row,
	.security-event {
	  border-top: 1px solid rgba(68, 45, 28, 0.1);
	}

	.security-row {
	  display: grid;
	  grid-template-columns: minmax(220px, 1.2fr) minmax(140px, 0.6fr) minmax(150px, 0.7fr);
	  gap: 12px;
	  align-items: center;
	  padding: 10px 0;
	}

	.security-row strong,
	.security-row small,
	.security-event strong,
	.security-event span,
	.security-event small {
	  display: block;
	  word-break: break-word;
	}

	.security-row small,
	.security-event span,
	.security-event small {
	  margin-top: 4px;
	  color: var(--muted);
	  font-family: "SF Mono", "Courier New", monospace;
	  font-size: 0.72rem;
	}

	.security-events {
	  display: grid;
	  gap: 8px;
	}

	.security-event {
	  display: grid;
	  grid-template-columns: minmax(170px, 0.7fr) minmax(180px, 1fr) minmax(220px, 1.1fr);
	  gap: 12px;
	  align-items: center;
	  padding: 10px 0;
	}

	.security-event p {
	  margin: 0;
	  color: var(--ink);
	}

	.login-body {
	  display: grid;
	  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(460px, 100%);
}

.login-panel {
  border-radius: 26px;
  padding: 28px;
}

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

.login-form label span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
}

.login-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 252, 247, 0.9);
}

.login-form button {
  min-height: 46px;
  color: #fffaf0;
  background: linear-gradient(135deg, var(--rust), var(--blue));
}

@media (max-width: 960px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: relative;
    width: auto;
    height: auto;
  }

  .main {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
  }

  .section-tabs {
    grid-template-columns: repeat(6, minmax(132px, 1fr));
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .metrics,
  .monitor-cards,
  .monitor-chart-grid,
  .monitor-breakdowns,
  .security-grid,
  .security-row,
  .security-event,
  .database-profile,
  .preview-head,
  .registry-row,
  .manual-form,
  .manual-users__head,
  .manual-user-row,
  .pre-registration-users__head,
  .pre-registration-row,
  .table-layout {
    grid-template-columns: 1fr;
  }

  .manual-form__wide {
    grid-column: auto;
  }

  .monitor-breakdown-card--wide {
    grid-column: auto;
  }

  .security-card-wide {
    grid-column: auto;
  }

  .main {
    padding: 22px;
  }

  .topbar {
    align-items: flex-start;
  }

  .active-node-head {
    align-items: flex-start;
  }

  .active-node-state {
    justify-items: start;
  }
}

@media (max-width: 1180px) and (min-width: 961px) {
  .monitor-cards,
  .monitor-chart-grid,
  .security-cards,
  .security-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .monitor-breakdowns,
  .security-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .monitor-breakdown-card--wide {
    grid-column: span 2;
  }
}
