:root {
  --bg: #f5f8fc;
  --panel: #ffffff;
  --text: #10203a;
  --muted: #60708a;
  --line: #e2eaf3;
  --blue: #2563eb;
  --teal: #0f8b8d;
  --shadow: 0 24px 70px rgba(16, 32, 58, 0.14);
  --radius: 24px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1.08fr) minmax(420px, 0.92fr);
  gap: 70px;
  align-items: center;
  padding: 64px 8vw;
  background:
    radial-gradient(circle at 16% 22%, rgba(37,99,235,.12), transparent 26%),
    radial-gradient(circle at 82% 12%, rgba(15,139,141,.13), transparent 28%),
    linear-gradient(135deg, #f8fbff, #edf5ff);
}

.brand-row { display: flex; align-items: center; gap: 16px; }
.brand-row h1 { font-size: 22px; margin: 0; letter-spacing: -0.03em; }
.brand-row p { margin: 3px 0 0; color: var(--muted); }
.brand-row.small h1 { font-size: 18px; }

.logo {
  width: 62px;
  height: 62px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  color: #fff;
  font-weight: 900;
  display: grid;
  place-items: center;
  box-shadow: 0 15px 28px rgba(37,99,235,.18);
}

.hero-copy { margin-top: 86px; max-width: 760px; }
.eyebrow { color: var(--teal); font-size: 13px; font-weight: 900; letter-spacing: .1em; }
.hero-copy h2 { font-size: clamp(42px, 5.2vw, 72px); line-height: 1; letter-spacing: -0.065em; margin: 16px 0 24px; }
.hero-copy p { color: var(--muted); font-size: 19px; line-height: 1.85; max-width: 680px; }

.feature-grid {
  margin-top: 46px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 700px;
}
.feature-grid article {
  background: rgba(255,255,255,.76);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 10px 30px rgba(16,32,58,.05);
}
.feature-grid strong { display: block; margin-bottom: 8px; font-size: 16px; }
.feature-grid span { color: var(--muted); font-size: 14px; }

.auth-card {
  width: min(560px, 100%);
  justify-self: end;
  background: rgba(255,255,255,.93);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.tab-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: #f4f8fd;
  padding: 7px;
  border-radius: 18px;
  margin-bottom: 34px;
}
.tab {
  border: 0;
  background: transparent;
  border-radius: 13px;
  padding: 16px;
  font-weight: 900;
  color: var(--muted);
}
.tab.active { background: #fff; color: var(--text); box-shadow: 0 10px 24px rgba(16,32,58,.09); }

.auth-form h3 { font-size: 34px; margin: 0 0 10px; letter-spacing: -0.04em; }
.auth-form p { margin: 0 0 28px; color: var(--muted); }

.field { margin-bottom: 20px; }
.field label, label { display: block; font-weight: 850; margin-bottom: 9px; }

input, select {
  width: 100%;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 0 17px;
  background: #fff;
  color: var(--text);
  outline: none;
  font-size: 16px;
}
input::placeholder { color: #97a6bb; }
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37,99,235,.11); }

.primary-btn {
  border: 0;
  width: 100%;
  border-radius: 15px;
  padding: 17px 22px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  color: #fff;
  font-weight: 950;
  box-shadow: 0 16px 34px rgba(37,99,235,.24);
}
.primary-btn.compact { width: auto; padding: 15px 24px; margin-top: 8px; }
.primary-btn:disabled { opacity: .68; cursor: not-allowed; }

.help-text { margin: 16px 0 0 !important; font-size: 13px; color: var(--muted); }

.ghost-btn { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 18px; font-weight: 850; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 280px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; background: #fff; border-right: 1px solid var(--line); padding: 28px 24px; display: flex; flex-direction: column; }
.side-nav { margin-top: 44px; display: grid; gap: 10px; }
.nav-item { border: 0; background: transparent; text-align: left; padding: 15px 18px; border-radius: 14px; color: var(--muted); font-weight: 850; }
.nav-item.active { background: #eef5ff; color: var(--text); }

.user-card { margin-top: auto; display: flex; gap: 12px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 16px; }
.user-card strong { display: block; max-width: 165px; overflow: hidden; text-overflow: ellipsis; }
.user-card span { color: var(--muted); font-size: 13px; }
.avatar { width: 42px; height: 42px; border-radius: 999px; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 900; }

.workspace { padding: 40px 48px; }
.workspace-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.workspace-header h2 { margin: 6px 0 0; font-size: 34px; letter-spacing: -0.04em; }

.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.stat-card, .view-panel { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 12px 34px rgba(16,32,58,.06); }
.stat-card { padding: 22px; }
.stat-card span { color: var(--muted); font-weight: 750; }
.stat-card strong { display: block; font-size: 34px; margin: 8px 0; }
.stat-card small { color: var(--muted); }
.view-panel { padding: 30px; }
.panel-head h3 { margin: 0 0 8px; font-size: 27px; letter-spacing: -0.04em; }
.panel-head p { margin: 0 0 26px; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
.list-box { border: 1px solid var(--line); border-radius: 16px; min-height: 180px; padding: 18px; color: var(--muted); }

.report-item { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding: 15px 4px; }
.report-item:last-child { border-bottom: 0; }
.report-item p { color: var(--muted); margin: 5px 0 0; }
.status-pill { height: fit-content; padding: 6px 10px; border-radius: 999px; background: #eef5ff; color: var(--blue); font-weight: 850; font-size: 12px; }
.status-pill.completed { background: #e8fbf2; color: #0f8b55; }
.status-pill.failed { background: #fff1f2; color: #e11d48; }

.pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pricing-grid article, .settings-box { border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: #f8fbff; }
.pricing-grid h4 { margin: 0 0 10px; }
.pricing-grid strong { font-size: 30px; }
.pricing-grid p, .settings-box span { color: var(--muted); }
.settings-box strong { display: block; margin-top: 8px; font-size: 18px; }

.toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 50;
  max-width: 460px;
  padding: 15px 18px;
  border-radius: 15px;
  color: #fff;
  background: #0f8b55;
  box-shadow: var(--shadow);
  line-height: 1.5;
}
.toast.error { background: #dc2626; }
[hidden] { display: none !important; }

@media (max-width: 1020px) {
  .auth-screen, .app-shell { grid-template-columns: 1fr; }
  .auth-screen { padding: 32px 18px; gap: 34px; }
  .auth-card { justify-self: stretch; }
  .sidebar { position: relative; height: auto; }
  .workspace { padding: 24px 18px; }
  .stats-grid, .form-grid, .pricing-grid, .feature-grid { grid-template-columns: 1fr; }
}
