:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --text: #162033;
  --muted: #61708a;
  --line: #dbe4f0;
  --primary: #1769ff;
  --primary-soft: #e8f0ff;
  --danger: #d14343;
  --success: #14905a;
  --warning: #d48806;
  --shadow: 0 18px 50px rgba(18, 42, 76, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(23, 105, 255, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(20, 144, 90, 0.08), transparent 22%),
    var(--bg);
  color: var(--text);
}

.hidden {
  display: none !important;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px 1fr;
}

.sidebar {
  padding: 28px 20px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfdff 0%, #f2f6fb 100%);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1769ff, #22a1ff);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.brand-title {
  font-size: 22px;
  font-weight: 700;
}

.brand-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.panel,
.card {
  background: var(--panel);
  border: 1px solid rgba(219, 228, 240, 0.9);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
  margin-bottom: 16px;
}

.main {
  padding: 32px;
}

.hero {
  background: linear-gradient(120deg, #0d5bd6, #1d87ff 55%, #30b0ff);
  border-radius: 28px;
  color: #fff;
  padding: 28px 30px;
  box-shadow: 0 24px 40px rgba(23, 105, 255, 0.22);
  margin-bottom: 24px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 34px;
}

.hero p {
  margin: 0;
  font-size: 15px;
  opacity: 0.92;
}

.auth-card {
  max-width: 960px;
  padding: 28px;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.tab-button,
.button {
  border: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.tab-button {
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}

.tab-button.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 16px 24px rgba(23, 105, 255, 0.22);
}

.button {
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
}

.button:hover,
.tab-button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--primary);
  color: #fff;
}

.button-secondary {
  background: var(--panel-soft);
  color: var(--text);
}

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

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

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

.dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  font-size: 14px;
  background: #fff;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(23, 105, 255, 0.12);
}

.hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.message {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
}

.message.info {
  background: #edf4ff;
  color: #2457a6;
}

.message.success {
  background: #ecfbf3;
  color: #17663f;
}

.message.error {
  background: #fff1f0;
  color: #a61d24;
}

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

.stat-card {
  padding: 20px;
}

.stat-title {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 12px;
}

.stat-value {
  font-size: 30px;
  font-weight: 700;
  word-break: break-all;
}

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

.section-header h2 {
  margin: 0;
  font-size: 20px;
}

.card {
  padding: 22px;
}

.badge {
  min-width: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

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

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

.table th,
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: top;
  text-align: left;
}

.table th {
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.table td.empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 12px;
}

.value-strong {
  font-size: 17px;
  font-weight: 700;
}

.value-muted {
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 12px;
  word-break: break-all;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-success {
  background: #ecfbf3;
  color: var(--success);
}

.status-warning {
  background: #fff8e8;
  color: var(--warning);
}

.status-danger {
  background: #fff1f0;
  color: var(--danger);
}

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

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

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

  .dashboard-grid,
  .two-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .main {
    padding: 18px;
  }

  .sidebar {
    padding: 18px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}
