:root {
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #14243a;
  background: #f5f7f9;
  font-size: 16px;
  --ink: #14243a;
  --muted: #6d7b8d;
  --line: #dfe5ea;
  --teal: #087f73;
  --teal-dark: #075f58;
  --teal-soft: #e5f5f1;
  --orange: #d66f25;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.kicker { margin: 0 0 8px; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .16em; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 15% 10%, #d9efe9 0, transparent 35%),
    linear-gradient(145deg, #f8faf9, #eef3f4);
}
.login-card {
  width: min(430px, calc(100% - 32px));
  padding: 38px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 28px 80px #20384c1a;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand > span {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 10px; color: #fff; background: var(--teal); font-weight: 900;
}
.brand strong { font-size: 17px; }
.brand small { color: var(--muted); padding-left: 8px; border-left: 1px solid var(--line); }
.login-card .kicker { margin-top: 34px; }
.login-card h1 { margin: 6px 0 10px; font-size: 30px; letter-spacing: -.03em; }
form { display: grid; gap: 16px; margin-top: 26px; }
label { display: grid; gap: 7px; color: #526175; font-size: 13px; font-weight: 700; }
input {
  width: 100%; padding: 13px 14px; color: var(--ink); background: #fff;
  border: 1px solid #cfd8df; border-radius: 10px; outline: none;
}
input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px #087f7318; }
button {
  padding: 12px 16px; border: 0; border-radius: 10px;
  color: #fff; background: var(--teal); font-weight: 800;
}
button:hover { background: var(--teal-dark); }
.error { min-height: 18px; margin: 0; color: #b43b35; font-size: 13px; }

.app-shell { max-width: 1180px; margin: 0 auto; padding: 24px 28px 70px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.top-actions { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 13px; }
.text-button { padding: 7px 10px; color: var(--teal); background: transparent; }
.text-button:hover { color: var(--teal-dark); background: var(--teal-soft); }
.public-notice {
  display: flex; gap: 10px; align-items: center; margin-bottom: 16px; padding: 12px 16px;
  color: #674316; background: #fff6df; border: 1px solid #efd69a; border-radius: 12px;
  font-size: 13px;
}
.public-notice strong { flex: 0 0 auto; }
.hero {
  padding: 38px 40px; color: #fff; border-radius: 22px;
  background: linear-gradient(120deg, #0b4f4a, #087f73 65%, #2e9787);
  box-shadow: 0 20px 45px #075f5825;
}
.hero .kicker { color: #98e5d5; }
.hero h1 { margin: 4px 0 10px; font-size: clamp(28px, 4vw, 43px); letter-spacing: -.04em; }
.hero > p:not(.kicker) { margin: 0; color: #d8efea; }
.snapshot-line { display: flex; gap: 28px; margin-top: 28px; color: #d8efea; font-size: 13px; }
.snapshot-line b { color: #fff; font-size: 20px; margin-right: 5px; }

.workspace { margin-top: 18px; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.step-head { display: flex; gap: 12px; align-items: center; }
.step-head > span {
  width: 28px; height: 28px; display: grid; place-items: center;
  color: #fff; background: var(--teal); border-radius: 50%; font-size: 13px; font-weight: 900;
}
.step-head div { display: grid; }
.step-head small { margin-top: 3px; color: var(--muted); }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 26px 40px; }
.product-card {
  display: grid; gap: 5px; text-align: left; color: var(--ink);
  background: #f8fafb; border: 1px solid var(--line); padding: 16px;
}
.product-card:hover { background: #f2f8f6; border-color: #9bcac0; }
.product-card.selected { color: var(--teal-dark); background: var(--teal-soft); border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.product-card span { font-size: 18px; font-weight: 900; }
.product-card small { color: var(--muted); font-weight: 500; }
.product-card b { margin-top: 6px; font-size: 12px; }
.search-step { padding-top: 20px; border-top: 1px solid #edf0f2; }
.search-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; margin: 16px 0 0 40px; }
.secondary { color: #516477; background: #eef2f4; }
.secondary:hover { color: var(--ink); background: #e4e9ec; }

.result-section { margin-top: 32px; }
.section-head { display: flex; align-items: end; justify-content: space-between; }
.section-head h2 { margin: 4px 0; font-size: 25px; }
#result-count { color: var(--muted); font-size: 13px; }
.result-card {
  margin-top: 10px; padding: 20px 22px; background: #fff;
  border: 1px solid var(--line); border-radius: 14px;
}
.result-card:hover { border-color: #b9c8ce; box-shadow: 0 10px 30px #14243a0d; }
.result-top, .meta, .result-bottom { display: flex; align-items: center; gap: 12px; }
.result-top { justify-content: space-between; color: var(--muted); font-size: 12px; }
.source-badge { color: var(--teal-dark); background: var(--teal-soft); padding: 5px 8px; border-radius: 7px; font-weight: 700; }
.result-card h3 { margin: 13px 0 10px; font-size: 17px; line-height: 1.55; }
.meta { color: var(--muted); font-size: 12px; }
.result-bottom { justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid #edf0f2; }
.result-bottom a { color: var(--teal); font-size: 13px; font-weight: 800; text-decoration: none; }
.match, .search-hit { padding: 6px 8px; border-radius: 7px; color: #17684f; background: #e8f6ef; font-size: 12px; }
.search-hit { color: #89531e; background: #fff3e5; }
.empty { padding: 50px; margin-top: 12px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed #cbd5db; border-radius: 14px; }
.empty strong { color: var(--ink); font-size: 18px; }
.empty p { margin: 8px auto 0; max-width: 520px; font-size: 13px; line-height: 1.7; }

.source-panel { margin-top: 28px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.source-panel summary { display: flex; justify-content: space-between; padding: 18px 20px; cursor: pointer; font-weight: 800; }
.source-panel summary small { color: var(--muted); font-weight: 500; }
.source-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 20px 20px; }
.source-card { display: grid; grid-template-columns: 1fr auto; gap: 7px; padding: 14px; background: #f7f9fa; border-radius: 10px; }
.source-card > div { display: flex; align-items: center; gap: 8px; }
.source-card small { grid-column: 1 / -1; color: var(--muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #b7c0c7; }
.status-dot.active { background: #20a46f; }
.status-dot.paused, .status-dot.blocked { background: #d36c43; }

.detail-card { position: relative; margin-top: 22px; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.detail-card h2 { max-width: 900px; line-height: 1.5; }
.detail-close { position: absolute; top: 15px; right: 15px; color: var(--muted); background: transparent; font-size: 25px; }
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 20px 0; }
.detail-grid > div { display: grid; gap: 5px; padding: 12px; background: #f7f9fa; border-radius: 9px; }
.detail-grid small { color: var(--muted); }
.explanation { padding: 12px; color: #17684f; background: #e8f6ef; border-radius: 9px; }
.primary-link { display: inline-block; margin-top: 5px; padding: 12px 16px; color: #fff; background: var(--teal); border-radius: 9px; text-decoration: none; font-weight: 800; }
.safety { color: var(--muted); font-size: 12px; }

@media (max-width: 760px) {
  .app-shell { padding: 16px 12px 50px; }
  .topbar { align-items: flex-start; }
  .brand small { display: none; }
  .public-notice { align-items: flex-start; flex-direction: column; }
  .hero { padding: 28px 22px; }
  .snapshot-line { flex-wrap: wrap; gap: 12px 20px; }
  .product-grid, .search-row { margin-left: 0; grid-template-columns: 1fr; }
  .product-grid { margin-top: 16px; }
  .source-grid, .detail-grid { grid-template-columns: 1fr; }
  .result-bottom { align-items: flex-start; flex-direction: column; }
  .source-panel summary small { display: none; }
}
