:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #eef4ff;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --line: #dfe7f4;
  --text: #10213a;
  --muted: #5c6b82;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(180deg, #eff6ff 0%, var(--bg) 100%);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
}

body {
  min-height: 100vh;
}

button, input, select {
  font: inherit;
}

.app-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-card {
  width: min(440px, 100%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 32px 28px;
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1d4ed8, #60a5fa);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

.brand h1 {
  font-size: 1.3rem;
  margin: 0;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.input-group label {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 600;
}

.input-group input,
.input-group select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbff;
  padding: 12px 14px;
  font-size: 1rem;
  color: var(--text);
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.tab-btn {
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  width: 100%;
  padding: 12px 16px;
  font-weight: 600;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.2);
}

.primary-btn:hover {
  transform: translateY(-1px);
}

.secondary-btn {
  background: #eef2ff;
  color: var(--primary);
  padding: 10px 14px;
  font-weight: 600;
}

.ghost-btn {
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
}

.login-footer {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.87rem;
}

.topbar {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-badge {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1d4ed8, #60a5fa);
  color: #fff;
  font-weight: 700;
}

.topbar h2 {
  margin: 0;
  font-size: 1.15rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-pill {
  background: #eff6ff;
  border: 1px solid #dbeafe;
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 600;
}

.main-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
}

.sidebar {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 18px 12px;
  height: fit-content;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}

.tab-btn.active {
  background: linear-gradient(135deg, #ebf2ff, #dbeafe);
  color: var(--primary-dark);
  border: 1px solid #bfdbfe;
}

.content-panel {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.metric-card {
  background: linear-gradient(135deg, #ffffff, #f6f9ff);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}

.metric-card .label {
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 12px;
  display: block;
}

.metric-card .value {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0;
}

.metric-card .sub {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 26px 0 16px;
}

.section-header h3 {
  margin: 0;
  font-size: 1.08rem;
}

.table-wrap {
  overflow: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255,255,255,0.9);
}

th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

th {
  background: #f8fbff;
  color: var(--muted);
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge.success {
  background: #dcfce7;
  color: #166534;
}

.badge.warning {
  background: #fef3c7;
  color: #92400e;
}

.badge.danger {
  background: #fee2e2;
  color: #991b1b;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-card {
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
}

.info-card h4 {
  margin: 0 0 8px;
  font-size: 0.98rem;
}

.muted {
  color: var(--muted);
}

@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 12px;
  }

  .nav-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .tab-btn {
    flex: 1 1 150px;
  }
}
