:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #dfe4ea;
  --text: #17202a;
  --muted: #657282;
  --brand: #0f766e;
  --brand-weak: #e6f4f1;
  --accent: #b45309;
  --danger: #b91c1c;
  --ok: #166534;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.sidebar {
  background: #10231f;
  color: #ecfdf5;
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.brand {
  display: grid;
  gap: 6px;
  padding: 0 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand strong {
  font-size: 18px;
}

.brand span {
  color: #a7f3d0;
  font-size: 12px;
}

.nav-group {
  margin: 18px 0;
}

.nav-title {
  color: #8bb8a9;
  font-size: 12px;
  margin: 0 8px 8px;
}

.nav-link {
  display: block;
  padding: 9px 10px;
  border-radius: 6px;
  color: #d1fae5;
  margin-bottom: 3px;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.12);
}

.main {
  min-width: 0;
}

.topbar {
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 5;
}

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

.topbar .meta {
  color: var(--muted);
  font-size: 13px;
}

.content {
  padding: 26px 28px 42px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.panel h2,
.panel h3 {
  margin: 0 0 14px;
  font-size: 16px;
}

.metric {
  display: grid;
  gap: 8px;
}

.metric span {
  color: var(--muted);
}

.metric strong {
  font-size: 28px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

button,
.button {
  border: 1px solid transparent;
  background: var(--brand);
  color: white;
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
}

button.secondary,
.button.secondary {
  background: white;
  color: var(--text);
  border-color: var(--line);
}

button.warning {
  background: var(--accent);
}

button.danger {
  background: var(--danger);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  font: inherit;
  background: white;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

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

th,
td {
  text-align: left;
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
  background: #fbfcfd;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--brand-weak);
  color: var(--brand);
  margin: 2px;
  font-size: 12px;
}

.tag.gray {
  background: #eef2f7;
  color: #475569;
}

.tag.orange {
  background: #fff7ed;
  color: var(--accent);
}

.tag.red {
  background: #fee2e2;
  color: var(--danger);
}

.empty,
.hint {
  color: var(--muted);
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f6f7f9 0%, #e6f4f1 100%);
  padding: 24px;
}

.login-box {
  width: min(420px, 100%);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 26px;
}

.login-box h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

.login-box p {
  color: var(--muted);
  margin: 0 0 22px;
}

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

.passport {
  display: grid;
  gap: 14px;
}

.passport-head {
  background: #10231f;
  color: white;
  padding: 18px;
  border-radius: 8px;
}

.passport-head p {
  color: #a7f3d0;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #10231f;
  color: white;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 20;
}

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

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

  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4 {
    grid-template-columns: 1fr;
  }
}
