:root {
  color-scheme: dark;
  --bg: #080b0f;
  --panel: #10151b;
  --panel-2: #151b22;
  --panel-3: #1b232c;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f7fbff;
  --muted: rgba(247, 251, 255, 0.66);
  --soft: rgba(247, 251, 255, 0.46);
  --accent: #31d3a5;
  --accent-2: #ffcb66;
  --danger: #ff6b7a;
}

* {
  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", "Microsoft YaHei", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.login-panel,
.work-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.login-panel {
  width: min(440px, 100%);
  padding: 34px;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: #ffffff;
  color: #06080b;
  font-size: 12px;
  font-weight: 800;
}

.eyebrow {
  margin: 20px 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.12em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 34px;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 18px;
}

.muted,
.message,
.sidebar-block p,
.status-strip,
.panel-heading span {
  color: var(--muted);
}

label {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

input,
select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090d12;
  color: var(--text);
  outline: none;
  padding: 0 12px;
}

input:focus,
select:focus {
  border-color: rgba(49, 211, 165, 0.55);
}

button,
.ghost-button,
.danger-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0 14px;
}

button:hover,
.upload-button:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.07);
}

.primary-button {
  border-color: rgba(49, 211, 165, 0.35);
  background: rgba(49, 211, 165, 0.18);
  color: #dcfff6;
}

.login-panel .primary-button {
  width: 100%;
  margin-top: 22px;
}

.admin-captcha-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 12px;
  align-items: end;
}

.admin-captcha-field label {
  margin-top: 18px;
}

.admin-captcha-field > button {
  display: grid;
  height: auto;
  justify-items: center;
  gap: 4px;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.admin-captcha-field img {
  display: block;
  width: 150px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-captcha-field small {
  font-size: 11px;
}

.message {
  min-height: 22px;
  margin: 16px 0 0;
  font-size: 14px;
}

.admin-mfa-stage {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(49, 211, 165, 0.24);
  border-radius: 10px;
  background: rgba(49, 211, 165, 0.06);
}

.admin-mfa-stage p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.admin-mfa-stage label {
  margin-top: 10px;
}

.admin-mfa-stage button {
  width: 100%;
  margin-top: 12px;
}

.admin-legal-note {
  margin: 16px 0 0;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.6;
}

.admin-legal-note a {
  color: var(--accent);
}

.console-view {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100vh;
  border-right: 1px solid var(--line);
  background: #070a0e;
  padding: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 760;
  text-decoration: none;
}

.module-nav,
.table-list {
  display: grid;
  gap: 8px;
}

.module-nav {
  margin-top: 12px;
}

.module-link,
.table-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.module-link.is-active,
.table-tab.is-active {
  border-color: rgba(49, 211, 165, 0.3);
  background: rgba(49, 211, 165, 0.13);
  color: var(--text);
}

.module-link small,
.table-tab small {
  color: var(--soft);
}

.sidebar-block {
  margin-top: 10px;
  min-height: 0;
  overflow: auto;
}

.ghost-button,
.danger-button,
.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.upload-button input {
  display: none;
}

.danger-button {
  margin-top: auto;
  border-color: rgba(255, 107, 122, 0.3);
  color: #ffdce0;
}

.workspace {
  min-width: 0;
  padding: 26px;
}

.workspace-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 22px;
}

.workspace-header .eyebrow {
  margin-top: 0;
}

.header-tools,
.toolbar-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.header-tools input {
  width: 220px;
}

.module-panel {
  margin-top: 18px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
}

.stat-card {
  min-height: 112px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
}

.stat-card strong {
  display: block;
  margin-top: 16px;
  font-size: 30px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 14px;
  margin-top: 14px;
}

.work-panel {
  padding: 18px;
}

.panel-heading,
.section-toolbar,
.status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.module-panel[data-panel="people"] > .section-toolbar:not(.people-toolbar),
.module-panel[data-panel="people"] > .table-shell.compact {
  display: none;
}

.people-toolbar {
  align-items: center;
}

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

.people-actions input {
  min-width: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  background: #090d12;
  color: var(--text);
  font: inherit;
  outline: none;
}

.people-actions input:focus {
  border-color: rgba(49, 211, 165, 0.46);
  box-shadow: 0 0 0 3px rgba(49, 211, 165, 0.1);
}

.people-workspace {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(420px, 1.08fr);
  gap: 16px;
  margin-top: 18px;
}

.people-list-panel,
.person-detail-panel {
  min-height: 540px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
  overflow: hidden;
}