:root {
  --ink: #14211d;
  --muted: #65726d;
  --line: #dfe6e2;
  --paper: #f4f7f5;
  --card: #ffffff;
  --green: #0d6b4f;
  --green-dark: #09503c;
  --green-soft: #e8f4ef;
  --amber: #bb6b18;
  --shadow: 0 16px 44px rgba(24, 55, 43, 0.08);
}

* { box-sizing: border-box; }
html { background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid rgba(13, 107, 79, .22);
  outline-offset: 2px;
}

.app-shell { min-height: 100vh; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(208, 220, 214, .85);
  background: rgba(249, 251, 250, .9);
  backdrop-filter: blur(18px);
}
.header-inner {
  width: min(1180px, calc(100% - 40px));
  height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 12px; }
.brand strong { display: block; font-size: 16px; letter-spacing: .02em; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--green);
  overflow: hidden;
}
.brand-mark i { position: absolute; border: 1.5px solid rgba(255,255,255,.9); border-radius: 50%; }
.brand-mark i:nth-child(1) { width: 8px; height: 8px; background: white; }
.brand-mark i:nth-child(2) { width: 20px; height: 20px; border-left-color: transparent; border-bottom-color: transparent; transform: rotate(45deg); }
.brand-mark i:nth-child(3) { width: 31px; height: 31px; border-left-color: transparent; border-bottom-color: transparent; transform: rotate(45deg); opacity: .65; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.system-state { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.system-state i { width: 7px; height: 7px; border-radius: 50%; background: #9ca7a2; box-shadow: 0 0 0 4px #e9eeeb; }
.state-succeeded i { background: #16966e; box-shadow: 0 0 0 4px #def2e9; }
.state-partial i, .state-running i { background: #dc8a27; box-shadow: 0 0 0 4px #faecd9; }
.state-failed i { background: #cf4d45; box-shadow: 0 0 0 4px #f9e3e1; }
.text-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 7px; }
.text-button:hover { color: var(--ink); }

.content { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0 70px; }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; margin-bottom: 31px; }
.eyebrow, .section-kicker { margin: 0 0 12px; color: var(--green); font-size: 10px; font-weight: 750; letter-spacing: .19em; }
.hero-row h1 { max-width: 760px; margin: 0; font-size: clamp(30px, 4.2vw, 50px); line-height: 1.13; letter-spacing: -.045em; }
.hero-copy { max-width: 680px; margin: 16px 0 0; color: var(--muted); font-size: 15px; line-height: 1.75; }
.primary-button, .filter-button, .login-button {
  border: 0;
  border-radius: 11px;
  background: var(--green);
  color: white;
  cursor: pointer;
  font-weight: 650;
  box-shadow: 0 8px 24px rgba(13, 107, 79, .18);
  transition: transform .16s ease, background .16s ease;
}
.primary-button { flex: 0 0 auto; display: flex; align-items: center; gap: 9px; padding: 13px 18px; }
.primary-button:hover, .filter-button:hover, .login-button:hover { background: var(--green-dark); transform: translateY(-1px); }
.primary-button:disabled, .login-button:disabled { cursor: wait; opacity: .65; transform: none; }
.refresh-icon, .spin { font-size: 19px; line-height: 1; }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.notice { margin: -13px 0 24px; padding: 11px 14px; border: 1px solid #cbe5da; border-radius: 10px; background: #edf8f3; color: var(--green-dark); font-size: 13px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 22px; }
.metric-card { min-height: 128px; padding: 21px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.74); }
.metric-card > span { display: block; color: var(--muted); font-size: 12px; }
.metric-card strong { display: inline-block; margin: 11px 8px 2px 0; font-size: 31px; letter-spacing: -.04em; }
.metric-card small { color: #89958f; font-size: 11px; }
.metric-primary { position: relative; overflow: hidden; border-color: var(--green); background: var(--green); color: white; }
.metric-primary::after { content: ""; position: absolute; width: 130px; height: 130px; right: -65px; bottom: -75px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; box-shadow: 0 0 0 23px rgba(255,255,255,.06), 0 0 0 47px rgba(255,255,255,.04); }
.metric-primary > span, .metric-primary small { color: rgba(255,255,255,.72); }

.results-panel { border: 1px solid var(--line); border-radius: 18px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 25px 26px 20px; }
.panel-heading .section-kicker { margin-bottom: 6px; }
.panel-heading h2 { margin: 0; font-size: 21px; letter-spacing: -.025em; }
.updated-at { color: var(--muted); font-size: 11px; }
.filter-bar { display: grid; grid-template-columns: minmax(220px, 1fr) 210px 170px auto auto; gap: 9px; padding: 13px 26px; border-top: 1px solid #edf0ee; border-bottom: 1px solid #edf0ee; background: #fafcfb; }
.filter-bar input, .filter-bar select { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink); padding: 0 12px; }
.filter-bar select { appearance: auto; }
.search-field { position: relative; }
.search-field > span:not(.visually-hidden) { position: absolute; left: 13px; top: 9px; color: #8c9892; font-size: 18px; }
.search-field input { padding-left: 38px; }
.filter-button { height: 40px; padding: 0 17px; border-radius: 9px; box-shadow: none; }
.clear-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 8px; }
.clear-button:hover { color: var(--ink); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.result-list { padding: 0 26px; }
.result-card { padding: 21px 0 20px; border-bottom: 1px solid #edf0ee; }
.result-card:last-child { border-bottom: 0; }
.result-topline { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.result-topline time { margin-left: auto; color: #8b9691; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.source-tag, .keyword-tag { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 6px; font-size: 10px; font-weight: 650; }
.source-tag { background: var(--green-soft); color: var(--green); }
.source-zcygov { background: #edf0fb; color: #4c5e9c; }
.source-ggzy { background: #f7eee4; color: #99602c; }
.keyword-tag { background: #f1f3f2; color: #69756f; }
.result-card > a { display: inline; color: var(--ink); font-size: 16px; font-weight: 650; line-height: 1.55; text-decoration: none; }
.result-card > a:hover { color: var(--green); }
.result-card > a span { display: inline-block; margin-left: 7px; color: #91a19a; font-size: 13px; }
.result-meta { display: flex; gap: 16px; margin-top: 10px; color: var(--muted); font-size: 11px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 19px; border-top: 1px solid #edf0ee; }
.pagination span { color: var(--muted); font-size: 11px; }
.pagination button, .state-box button { border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); cursor: pointer; padding: 7px 12px; }
.pagination button:disabled { opacity: .4; cursor: default; }
.state-box { display: grid; place-items: center; padding: 65px 20px; text-align: center; }
.state-box h3 { margin: 18px 0 4px; font-size: 16px; }
.state-box p { margin: 0; color: var(--muted); font-size: 12px; }
.error-box { gap: 12px; color: #a33831; }
.empty-radar { width: 46px; height: 46px; border: 1px solid #b9d4c8; border-radius: 50%; box-shadow: 0 0 0 9px #edf6f2, 0 0 0 10px #dcece5; }
.loading-list { padding: 0 26px; }
.loading-card { display: grid; gap: 11px; padding: 24px 0; border-bottom: 1px solid #edf0ee; }
.loading-card i { display: block; height: 11px; border-radius: 6px; background: linear-gradient(90deg, #edf0ee 25%, #f7f9f8 50%, #edf0ee 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
.loading-card i:nth-child(1) { width: 22%; }
.loading-card i:nth-child(2) { width: 72%; height: 16px; }
.loading-card i:nth-child(3) { width: 35%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.run-log { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.64); color: var(--muted); font-size: 12px; }
.run-log summary { cursor: pointer; padding: 13px 16px; }
.run-log pre { margin: 0; padding: 0 16px 16px; white-space: pre-wrap; font: 11px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; }
footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 25px 0 40px; display: flex; justify-content: space-between; color: #89958f; font-size: 10px; }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 1.02fr) minmax(400px, .98fr); background: white; }
.login-brand-panel { position: relative; display: grid; place-items: center; overflow: hidden; background: #0d5d47; color: white; }
.login-brand-panel::before, .login-brand-panel::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.login-brand-panel::before { width: 620px; height: 620px; right: -290px; bottom: -310px; box-shadow: 0 0 0 85px rgba(255,255,255,.025), 0 0 0 170px rgba(255,255,255,.018); }
.login-brand-panel::after { width: 260px; height: 260px; left: -150px; top: -110px; }
.login-brand-content { position: relative; z-index: 1; max-width: 520px; padding: 70px; }
.login-mark { position: relative; display: block; width: 52px; height: 52px; margin-bottom: 56px; }
.login-mark i { position: absolute; inset: 0; border: 1px solid rgba(255,255,255,.65); border-radius: 50%; }
.login-mark i:nth-child(2) { inset: 12px; }
.login-mark i:nth-child(3) { inset: 22px; background: white; }
.login-brand-content .eyebrow { color: #a8dfc9; }
.login-brand-content h1 { margin: 0; font-size: clamp(35px, 4vw, 53px); line-height: 1.12; letter-spacing: -.045em; }
.login-brand-content > p:not(.eyebrow) { max-width: 440px; margin: 24px 0 0; color: rgba(255,255,255,.7); line-height: 1.8; }
.login-signal { display: flex; align-items: flex-end; gap: 5px; height: 38px; margin-top: 54px; }
.login-signal i { width: 4px; border-radius: 4px; background: #91d7bb; }
.login-signal i:nth-child(1) { height: 9px; }.login-signal i:nth-child(2) { height: 18px; }.login-signal i:nth-child(3) { height: 29px; }.login-signal i:nth-child(4) { height: 38px; opacity: .35; }
.login-form-panel { display: grid; place-items: center; padding: 50px; }
.login-card { width: min(390px, 100%); }
.login-card .section-kicker { margin-bottom: 14px; }
.login-card h2 { margin: 0; font-size: 34px; letter-spacing: -.04em; }
.login-help { margin: 11px 0 36px; color: var(--muted); font-size: 14px; }
.login-card label span { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 650; }
.login-card input { width: 100%; height: 49px; border: 1px solid #d8e0dc; border-radius: 10px; padding: 0 14px; background: #fbfcfb; }
.login-card input:focus { border-color: var(--green); background: white; }
.login-button { width: 100%; height: 49px; margin-top: 17px; }
.login-card > small { display: block; margin-top: 18px; color: #98a19d; text-align: center; font-size: 10px; }
.login-error { margin: 10px 0 -6px; color: #b64039; font-size: 12px; }
.login-mobile-brand { display: none; }

@media (max-width: 920px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .filter-button { width: 100%; }
  .login-page { grid-template-columns: 1fr; }
  .login-brand-panel { display: none; }
  .login-form-panel { min-height: 100vh; background: var(--paper); }
  .login-card { padding: 34px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow); }
  .login-mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 45px; font-weight: 700; }
  .login-mobile-brand .brand-mark { width: 34px; height: 34px; }
}

@media (max-width: 620px) {
  .header-inner, .content, footer { width: min(100% - 28px, 1180px); }
  .header-inner { height: 66px; }
  .brand small, .system-state { display: none; }
  .content { padding-top: 34px; }
  .hero-row { align-items: stretch; flex-direction: column; gap: 22px; }
  .hero-row h1 { font-size: 34px; }
  .primary-button { justify-content: center; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card { min-height: 116px; padding: 17px; }
  .metric-card strong { font-size: 27px; }
  .source-summary { display: none; }
  .metric-grid .metric-card:nth-child(3) { grid-column: auto; }
  .panel-heading { align-items: flex-start; flex-direction: column; padding: 21px 18px 17px; }
  .filter-bar { grid-template-columns: 1fr; padding: 13px 18px; }
  .search-field { grid-column: auto; }
  .clear-button { height: 35px; }
  .result-list, .loading-list { padding: 0 18px; }
  .result-topline { flex-wrap: wrap; }
  .result-topline time { width: 100%; margin: 2px 0 0; }
  .result-card > a { font-size: 15px; }
  .result-meta { flex-direction: column; gap: 4px; }
  footer { align-items: flex-start; flex-direction: column; gap: 5px; }
  .login-form-panel { padding: 16px; }
  .login-card { padding: 28px 22px; }
}

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