:root {
  --ink: #102326;
  --muted: #66787a;
  --paper: #f3f5f0;
  --panel: rgba(255, 255, 255, 0.82);
  --line: rgba(16, 35, 38, 0.12);
  --mint: #b9f34a;
  --mint-dark: #8dcc22;
  --coral: #ff694d;
  --cream: #fff9e9;
  --dark: #102326;
  --shadow: 0 24px 80px rgba(29, 60, 55, 0.09);
  --radius: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 75% -5%, rgba(185, 243, 74, 0.26), transparent 28rem),
    linear-gradient(135deg, #f8f8f2 0%, #eef2eb 48%, #f7f4ea 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  min-height: 100vh;
}

button, input, select { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(4px);
  pointer-events: none;
}

.ambient-one {
  width: 320px;
  height: 320px;
  top: 28%;
  left: -180px;
  background: rgba(255, 105, 77, 0.11);
}

.ambient-two {
  width: 360px;
  height: 360px;
  right: -220px;
  bottom: 5%;
  background: rgba(185, 243, 74, 0.13);
}

.shell {
  width: min(1400px, calc(100% - 64px));
  margin-inline: auto;
}

.topbar {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--dark);
  color: var(--mint);
  border-radius: 13px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.02em;
  transform: rotate(-5deg);
}

.brand strong,
.brand small { display: block; }
.brand strong { font-size: 13px; letter-spacing: .14em; }
.brand small { margin-top: 3px; font-size: 12px; color: var(--muted); }

.header-actions { display: flex; align-items: center; gap: 10px; }

.connection-pill {
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.connection-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a7b0b0;
  box-shadow: 0 0 0 4px rgba(167,176,176,.15);
}

.connection-pill.online { color: #3b6500; background: rgba(185,243,74,.17); border-color: rgba(141,204,34,.28); }
.connection-pill.online i { background: var(--mint-dark); box-shadow: 0 0 0 4px rgba(141,204,34,.15); }
.connection-pill.error { color: #a13b29; background: rgba(255,105,77,.1); }
.connection-pill.error i { background: var(--coral); }

.page { padding: 48px 0 80px; }

.hero {
  display: grid;
  grid-template-columns: 1fr 310px;
  min-height: 265px;
  align-items: center;
  gap: 80px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(42px, 5vw, 70px);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.05em;
}

.hero h1 em { color: var(--coral); font-style: italic; }

.hero-copy {
  max-width: 590px;
  margin: 22px 0 0;
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
}

.hero-orbit {
  position: relative;
  width: 260px;
  height: 220px;
  justify-self: center;
}

.orbit-ring {
  position: absolute;
  inset: 18px 34px;
  border: 1px solid rgba(16,35,38,.18);
  border-radius: 50%;
  transform: rotate(-16deg);
}

.ring-two { transform: rotate(52deg); border-style: dashed; }

.orbit-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 104px;
  height: 104px;
  transform: translate(-50%, -50%) rotate(5deg);
  border-radius: 34px;
  display: grid;
  place-content: center;
  text-align: center;
  background: var(--dark);
  color: white;
  box-shadow: 0 20px 50px rgba(16,35,38,.22);
}

.orbit-core span { color: var(--mint); font-size: 10px; letter-spacing: .2em; }
.orbit-core strong { font-family: Georgia, serif; font-size: 34px; }

.orbit-label {
  position: absolute;
  display: grid;
  place-items: center;
  height: 30px;
  padding: 0 12px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  box-shadow: 0 10px 24px rgba(16,35,38,.08);
}

.label-one { left: 6px; top: 42px; }
.label-two { right: -4px; top: 76px; background: var(--mint); }
.label-three { left: 44px; bottom: 23px; background: var(--cream); }

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.control-column { display: grid; gap: 16px; }

.panel,
.results-column {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel { border-radius: var(--radius); padding: 24px; }

.panel-heading { display: flex; gap: 15px; margin-bottom: 22px; }
.panel-heading h2 { margin: 1px 0 5px; font-size: 16px; }
.panel-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }

.step-number {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--dark);
  color: var(--mint);
  font-size: 11px;
  font-weight: 900;
}

.form-stack { display: grid; gap: 13px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }

.field { display: grid; gap: 7px; }
.field > span:first-child { color: #56686a; font-size: 10px; font-weight: 800; letter-spacing: .08em; }

.field input,
.field select {
  width: 100%;
  height: 45px;
  padding: 0 13px;
  border: 1px solid var(--line);
  outline: none;
  border-radius: 13px;
  color: var(--ink);
  background: rgba(247,249,245,.9);
  transition: border-color .2s, box-shadow .2s, background .2s;
  font-size: 13px;
}

.field input::placeholder { color: #9ba7a6; }
.field input:focus,
.field select:focus { border-color: var(--mint-dark); box-shadow: 0 0 0 3px rgba(185,243,74,.2); background: white; }

.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 56px; }
.password-wrap button {
  position: absolute;
  top: 0;
  right: 5px;
  height: 45px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.primary-button,
.ghost-button {
  min-height: 46px;
  border-radius: 14px;
  border: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: transform .18s, box-shadow .18s, opacity .18s;
}

.primary-button {
  margin-top: 4px;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--dark);
  color: white;
  box-shadow: 0 12px 24px rgba(16,35,38,.16);
}

.primary-button b { color: var(--mint); font-size: 17px; }
.primary-button.light { background: var(--mint); color: var(--dark); box-shadow: 0 12px 24px rgba(141,204,34,.17); }
.primary-button.light b { color: var(--dark); }
.primary-button:hover,
.ghost-button:hover { transform: translateY(-1px); }
.primary-button:disabled,
.ghost-button:disabled { opacity: .55; cursor: wait; transform: none; }

.ghost-button { border: 1px solid var(--line); background: transparent; }
.ghost-button.compact { min-height: 34px; padding: 0 12px; border-radius: 999px; font-size: 11px; }
.env-note { margin: 0; color: #638f12; font-size: 11px; }

.push-heading { position: relative; padding-right: 74px; }
.push-state {
  position: absolute;
  top: 1px;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(16,35,38,.05);
  color: var(--muted);
  font-size: 8px;
  letter-spacing: .05em;
}
.push-state i { width: 6px; height: 6px; border-radius: 50%; background: #a7b0b0; }
.push-state b { font-weight: 800; }
.push-state.ready { color: #5e8612; background: rgba(185,243,74,.16); }
.push-state.ready i { background: var(--mint-dark); box-shadow: 0 0 0 3px rgba(141,204,34,.12); }
.push-state.error { color: #a13b29; background: rgba(255,105,77,.1); }
.push-state.error i { background: var(--coral); }

.webhook-block { display: grid; gap: 7px; }
.webhook-block > span { color: #56686a; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.webhook-block small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.webhook-box { display: flex; align-items: center; min-width: 0; height: 43px; border: 1px solid var(--line); border-radius: 12px; background: #0d1b1e; overflow: hidden; }
.webhook-box code { flex: 1; min-width: 0; padding: 0 12px; color: #d8e8d4; font: 9px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.webhook-box button { align-self: stretch; padding: 0 12px; border: 0; border-left: 1px solid rgba(255,255,255,.1); background: rgba(185,243,74,.08); color: var(--mint); font-size: 9px; font-weight: 800; cursor: pointer; }

.auto-open-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; }
.auto-open-row span { display: grid; gap: 3px; }
.auto-open-row strong { font-size: 10px; }
.auto-open-row small { color: var(--muted); font-size: 9px; }
.auto-open-row input { position: absolute; opacity: 0; pointer-events: none; }
.auto-open-row > i { position: relative; flex: 0 0 auto; width: 36px; height: 20px; border-radius: 999px; background: #cbd2ce; transition: background .2s; }
.auto-open-row > i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: white; box-shadow: 0 2px 6px rgba(16,35,38,.2); transition: transform .2s; }
.auto-open-row input:checked + i { background: var(--mint-dark); }
.auto-open-row input:checked + i::after { transform: translateX(16px); }

.push-history-head { display: flex; justify-content: space-between; align-items: center; margin: 14px 0 8px; color: #56686a; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.push-history-head button { border: 0; background: transparent; color: var(--muted); font-size: 9px; cursor: pointer; }
.push-events { display: grid; gap: 6px; }
.push-events > p { margin: 2px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.push-event { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: rgba(247,249,245,.8); text-align: left; cursor: pointer; }
.push-event:hover { border-color: rgba(141,204,34,.45); background: white; }
.push-event strong { font-size: 10px; }
.push-event time { color: var(--muted); font-size: 8px; }
.push-event small { grid-column: 1 / -1; color: var(--muted); font-size: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.notice-card {
  display: flex;
  gap: 13px;
  padding: 17px 19px;
  border: 1px solid rgba(255,105,77,.16);
  background: rgba(255,249,233,.75);
  border-radius: 18px;
}

.notice-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--coral);
  color: white;
  font-family: Georgia, serif;
  font-style: italic;
}

.notice-card strong { font-size: 12px; }
.notice-card p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

.results-column {
  min-height: 720px;
  padding: 27px;
  border-radius: 30px;
}

.results-toolbar { display: flex; justify-content: space-between; align-items: flex-end; padding: 2px 3px 22px; border-bottom: 1px solid var(--line); }
.results-toolbar h2 { margin: 0; font-family: Georgia, "Noto Serif SC", serif; font-size: 27px; font-weight: 500; }
.result-count { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .1em; }

.empty-state,
.loading-state {
  min-height: 570px;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.empty-state h3,
.loading-state h3 { margin: 22px 0 7px; font-size: 16px; }
.empty-state p,
.loading-state p { max-width: 360px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }

.scanner {
  width: 126px;
  height: 126px;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 44px;
  background: linear-gradient(145deg, rgba(255,255,255,.85), rgba(233,239,229,.7));
  overflow: hidden;
}

.scanner::before,
.scanner::after { content: ""; position: absolute; border: 1px solid rgba(16,35,38,.1); border-radius: 50%; inset: 20px; }
.scanner::after { inset: 39px; }

.scanner-person {
  position: absolute;
  z-index: 2;
  width: 30px;
  height: 57px;
  left: 48px;
  top: 39px;
  border-radius: 15px 15px 12px 12px;
  background: var(--dark);
}

.scanner-person::before { content: ""; position: absolute; width: 19px; height: 19px; border-radius: 50%; left: 5px; top: -18px; background: var(--dark); }
.scanner i { position: absolute; z-index: 3; left: 12px; right: 12px; height: 2px; top: 30px; background: var(--mint); box-shadow: 0 0 14px var(--mint); animation: scan 2.4s ease-in-out infinite; }

@keyframes scan { 50% { transform: translateY(65px); } }

.flow-line { display: flex; align-items: center; gap: 10px; margin-top: 22px; color: #7a8989; font-size: 10px; }
.flow-line span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.5); }
.flow-line b { color: var(--coral); }

.loader {
  width: 64px;
  height: 64px;
  border: 5px solid rgba(16,35,38,.08);
  border-top-color: var(--mint-dark);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.report-list { display: grid; gap: 10px; padding-top: 18px; }
.report-list-item {
  width: 100%;
  padding: 16px;
  display: grid;
  grid-template-columns: 44px 1fr auto 22px;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(250,252,248,.8);
  text-align: left;
  cursor: pointer;
  transition: transform .18s, border-color .18s, background .18s;
}

.report-list-item:hover { transform: translateY(-2px); border-color: rgba(141,204,34,.5); background: white; }
.report-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--dark); color: var(--mint); font-family: Georgia, serif; font-weight: 800; }
.report-list-copy strong,
.report-list-copy small { display: block; }
.report-list-copy strong { margin-bottom: 5px; font-size: 13px; }
.report-list-copy small { color: var(--muted); font-size: 10px; }
.report-list-score { min-width: 64px; text-align: right; font-family: Georgia, serif; font-size: 20px; }
.report-list-arrow { color: var(--coral); }

.report-detail { padding-top: 20px; }
.detail-back { border: 0; background: none; padding: 3px 0 13px; color: var(--muted); font-size: 11px; cursor: pointer; }

.report-cover {
  position: relative;
  overflow: hidden;
  min-height: 188px;
  padding: 25px;
  border-radius: 22px;
  background: var(--dark);
  color: white;
}

.report-cover::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  right: -100px;
  top: -100px;
  border-radius: 50%;
  border: 55px solid rgba(185,243,74,.1);
}

.cover-top { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 20px; }
.cover-tag { color: var(--mint); font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.report-cover h3 { margin: 10px 0 8px; font-family: Georgia, "Noto Serif SC", serif; font-weight: 500; font-size: 27px; }
.cover-meta { color: rgba(255,255,255,.58); font-size: 11px; }
.score-orb { position: relative; z-index: 1; flex: 0 0 auto; width: 100px; height: 100px; display: grid; place-content: center; text-align: center; border: 1px solid rgba(185,243,74,.35); border-radius: 50%; background: rgba(185,243,74,.07); }
.score-orb strong { color: var(--mint); font-family: Georgia, serif; font-size: 38px; line-height: 1; }
.score-orb small { margin-top: 4px; color: rgba(255,255,255,.55); font-size: 8px; letter-spacing: .12em; }
.cover-chips { position: absolute; z-index: 2; left: 25px; bottom: 22px; display: flex; gap: 7px; }
.cover-chips span { padding: 6px 9px; border: 1px solid rgba(255,255,255,.12); border-radius: 7px; color: rgba(255,255,255,.72); font-size: 9px; }

.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.metric-card { min-height: 96px; padding: 15px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.72); }
.metric-card small { display: block; color: var(--muted); font-size: 9px; }
.metric-card strong { display: block; margin-top: 10px; font-family: Georgia, serif; font-size: 23px; font-weight: 500; }
.metric-card strong em { margin-left: 4px; color: var(--muted); font-family: inherit; font-size: 10px; font-style: normal; }
.metric-card .grade { display: inline-block; margin-top: 7px; color: #628912; font-size: 8px; font-weight: 800; }

.tabs { display: flex; gap: 6px; margin: 22px 0 13px; overflow-x: auto; padding-bottom: 2px; }
.tab-button { flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.tab-button.active { background: var(--dark); color: var(--mint); border-color: var(--dark); }

.detail-section { display: grid; gap: 10px; }
.data-card { padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.6); }
.data-card h4 { margin: 0 0 13px; font-size: 12px; }
.data-table { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px 20px; }
.data-row { min-width: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 7px; border-bottom: 1px solid rgba(16,35,38,.07); font-size: 10px; }
.data-row span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-row strong { text-align: right; font-size: 11px; word-break: break-all; }
.image-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.report-image { display: block; min-height: 110px; border-radius: 12px; overflow: hidden; background: #e7ebe5; }
.report-image img { display: block; width: 100%; height: 100%; min-height: 110px; object-fit: cover; }
.raw-json { margin: 0; max-height: 520px; overflow: auto; padding: 17px; border-radius: 14px; background: #0a1719; color: #d5e9d0; font: 10px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; word-break: break-word; }

.toast {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  width: min(400px, calc(100% - 48px));
  display: grid;
  grid-template-columns: 28px 1fr 24px;
  gap: 12px;
  align-items: start;
  padding: 16px;
  border-radius: 17px;
  background: var(--dark);
  color: white;
  box-shadow: 0 22px 60px rgba(16,35,38,.28);
}

.toast-icon { width: 28px; height: 28px; border-radius: 9px; background: var(--mint); }
.toast.error .toast-icon { background: var(--coral); }
.toast strong { font-size: 12px; }
.toast p { margin: 4px 0 0; color: rgba(255,255,255,.65); font-size: 11px; line-height: 1.45; }
.toast button { border: 0; background: transparent; color: rgba(255,255,255,.5); font-size: 18px; cursor: pointer; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr 220px; gap: 30px; }
  .hero-orbit { transform: scale(.82); }
  .workspace-grid { grid-template-columns: 330px minmax(0,1fr); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 30px, 640px); }
  .topbar { height: 74px; }
  .page { padding-top: 31px; }
  .hero { display: block; min-height: 270px; }
  .hero-orbit { display: none; }
  .hero h1 { font-size: 44px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .results-column { min-height: 620px; padding: 19px; }
  .empty-state, .loading-state { min-height: 470px; }
}

@media (max-width: 440px) {
  .brand small { display: none; }
  .connection-pill { padding-inline: 10px; }
  .field-pair { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .data-table { grid-template-columns: 1fr; }
  .report-list-item { grid-template-columns: 40px 1fr 18px; }
  .report-list-score { display: none; }
  .score-orb { width: 82px; height: 82px; }
  .score-orb strong { font-size: 31px; }
  .cover-chips { flex-wrap: wrap; right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
