:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-strong: #e8eef7;
  --surface-soft: #f8fbff;
  --text: #102a43;
  --muted: #64748b;
  --primary: #2563eb;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;
  --border: #d1d5db;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4fb 100%);
  color: var(--text);
}
button, input, select, textarea {
  font: inherit;
}
#app {
  min-height: 100vh;
}
.auth-wrap {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}
.auth-card {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  width: min(1200px, 100%);
  background: var(--surface);
  border-radius: 24px;
  box-shadow: 0 32px 64px rgba(15, 23, 42, .1);
  overflow: hidden;
}
.auth-left {
  padding: 48px;
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
}
.brand-badge {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 24px;
  font-weight: 700;
}
.brand-badge .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
}
.hero-title {
  margin: 0 0 16px;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1.05;
}
.hero-text,
.hero-point,
.footer-note,
.sub,
.meta {
  color: var(--muted);
}
.hero-points {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}
.hero-point {
  padding: 18px 20px;
  border: 1px solid rgba(37, 99, 235, .12);
  border-radius: 16px;
  background: #f8fbff;
}
.auth-right {
  padding: 36px;
}
.panel {
  border-radius: 20px;
  background: var(--surface-soft);
}
.form-title {
  margin: 0 0 8px;
}
.form-subtitle {
  margin: 0 0 24px;
  color: var(--muted);
}
.field-grid {
  display: grid;
  gap: 18px;
}
.field {
  display: grid;
  gap: 8px;
}
.field label { font-weight: 600; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
textarea { min-height: 90px; resize: vertical; }
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
  margin-top: 4px;
}
.btn {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-secondary { background: #fff; border: 1px solid var(--border); color: var(--text); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); }
.alert {
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 20px;
}
.alert.success { background: #dcfce7; color: #166534; }
.alert.error { background: #fee2e2; color: #991b1b; }
.shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #ffffff;
  padding: 28px;
  border-right: 1px solid rgba(148, 163, 184, .16);
}
.sidebar h1 { margin: 0 0 12px; font-size: 1.35rem; }
.sidebar .sub { color: var(--muted); line-height: 1.6; }
.nav {
  display: grid;
  gap: 10px;
  margin: 28px 0;
}
.nav button {
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: var(--surface-soft);
  cursor: pointer;
}
.nav button.active,
.nav button:hover { background: rgba(37, 99, 235, .08); }
.main {
  padding: 28px;
  background: var(--bg);
}
.topbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 24px; }
.title { margin: 0; }
.section-head { display: flex; justify-content: space-between; gap: 24px; align-items: start; margin-bottom: 22px; }
.section-head h2 { margin: 0; }
.card {
  background: var(--surface);
  border-radius: 22px;
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .06);
}
.stats-grid,
.grid-2 {
  display: grid;
  gap: 18px;
}
.stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-card { padding: 20px; border-radius: 18px; background: var(--surface-soft); }
.stat-card .label { color: var(--muted); margin-bottom: 10px; }
.stat-card .value { font-size: 2rem; font-weight: 700; }
.chart { display: grid; grid-template-columns: 160px 1fr; gap: 20px; align-items: center; }
.donut { width: 160px; height: 160px; border-radius: 50%; }
.legend-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(148, 163, 184, .2); }
.kpi-list { display: grid; gap: 12px; }
.kpi-item { display: flex; justify-content: space-between; gap: 18px; padding: 12px 14px; border-radius: 14px; background: var(--surface-soft); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 12px; border-bottom: 1px solid rgba(148, 163, 184, .16); }
th { text-align: left; color: var(--muted); }
.badge { display: inline-flex; padding: 5px 10px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.badge.success { background: #dcfce7; color: #166534; }
.badge.warning { background: #fef9c3; color: #92400e; }
.badge.danger { background: #fecdd3; color: #b91c1c; }
.notice { margin-bottom: 18px; padding: 18px; border-radius: 16px; background: #f8fafc; color: var(--muted); }
.mini-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.mini-list li { padding: 12px 14px; border-radius: 16px; background: var(--surface-soft); }
@media (max-width: 1040px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 0; z-index: 1; }
}
@media (max-width: 760px) {
  .auth-card { grid-template-columns: 1fr; }
  .section-head, .grid-2 { display: block; }
  .stats-grid { grid-template-columns: 1fr; }
}
