:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #1c2940;
  background: #f4f6f9;
  font-synthesis: none;
  line-height: 1.55;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; letter-spacing: 0; }
button, select { cursor: pointer; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 68px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid #dfe4eb;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #17233b;
  text-decoration: none;
  font-size: 19px;
  font-weight: 800;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #245fce;
}

.header-title { text-align: center; }
.header-title strong { display: block; font-size: 16px; }
.header-title span { display: block; color: #8290a4; font-size: 11px; }
.back-link { justify-self: end; color: #2f61b7; font-size: 13px; text-decoration: none; }
.back-link:hover { text-decoration: underline; }

.page-shell { width: min(1440px, 100%); margin: 0 auto; padding: 24px 28px 48px; }

.summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid #dfe4eb;
  border-radius: 8px;
  background: #fff;
}

.summary-strip div { min-height: 78px; padding: 15px 20px; }
.summary-strip div + div { border-left: 1px solid #e7eaf0; }
.summary-strip span { display: block; color: #758297; font-size: 12px; }
.summary-strip strong { display: block; margin-top: 2px; color: #17233b; font-size: 25px; }
.summary-strip div:nth-child(2) strong { color: #25714c; }
.summary-strip div:nth-child(3) strong { color: #9b6619; }
.summary-strip div:nth-child(4) strong { color: #a84848; }
.summary-strip div:nth-child(5) strong { color: #245fce; }

.filter-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #dfe4eb;
  border-radius: 8px;
  background: #fff;
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(190px, 1fr) minmax(280px, 1.6fr) auto;
  gap: 12px;
  align-items: end;
}

.filter-grid label > span {
  display: block;
  margin-bottom: 5px;
  color: #56657b;
  font-size: 12px;
  font-weight: 700;
}

.filter-grid select,
.filter-grid input {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #cfd6e1;
  border-radius: 6px;
  outline: none;
  color: #26344a;
  background: #fff;
}

.filter-grid select:focus,
.filter-grid input:focus { border-color: #3973d8; box-shadow: 0 0 0 3px #3973d817; }
.filter-grid input::placeholder { color: #9aa5b5; }

.reset-button {
  height: 40px;
  padding: 0 18px;
  border: 1px solid #cfd6e1;
  border-radius: 6px;
  color: #4d5c72;
  background: #f7f8fa;
}
.reset-button:hover { border-color: #aab4c3; background: #f0f2f5; }

.status-filter { display: flex; gap: 0; margin-top: 13px; overflow-x: auto; }
.status-filter button {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid #d5dbe5;
  color: #617086;
  background: #fff;
}
.status-filter button:first-child { border-radius: 6px 0 0 6px; }
.status-filter button:last-child { border-radius: 0 6px 6px 0; }
.status-filter button + button { margin-left: -1px; }
.status-filter button.is-active { position: relative; border-color: #2f68c9; color: #2359b2; background: #edf4ff; }
.status-filter button span { margin-left: 3px; color: inherit; font-size: 11px; }

.state-panel {
  min-height: 280px;
  display: grid;
  place-content: center;
  margin-top: 14px;
  border: 1px solid #dfe4eb;
  border-radius: 8px;
  color: #748196;
  background: #fff;
  text-align: center;
}
.state-panel strong, .state-panel span { display: block; }
.state-error strong { color: #a43d3d; }

.workspace {
  display: grid;
  grid-template-columns: minmax(330px, .75fr) minmax(0, 1.55fr);
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

.results-pane,
.detail-pane {
  border: 1px solid #dfe4eb;
  border-radius: 8px;
  background: #fff;
}

.results-pane { overflow: hidden; }
.pane-heading {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid #e5e8ee;
}
.pane-heading strong { font-size: 14px; }
.pane-heading span { color: #7d899b; font-size: 12px; }

.card-list { max-height: 700px; overflow-y: auto; }
.card-row {
  width: 100%;
  min-height: 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid #edf0f4;
  color: inherit;
  background: #fff;
  text-align: left;
}
.card-row:hover { background: #f7f9fc; }
.card-row.is-active { background: #edf4ff; box-shadow: inset 3px 0 #2f68c9; }
.card-row-main { min-width: 0; }
.card-row-bank { color: #66748a; font-size: 11px; }
.card-row-name { margin-top: 2px; overflow: hidden; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.card-row-meta { margin-top: 4px; color: #8a96a8; font-size: 11px; }

.status-badge {
  align-self: start;
  padding: 3px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.status-verified { color: #236b48; background: #e9f5ee; }
.status-partial { color: #8c5d16; background: #fff3dc; }
.status-not_found { color: #944141; background: #faeaea; }

.empty-state { min-height: 240px; place-content: center; padding: 24px; color: #7d899b; text-align: center; }
.empty-state:not([hidden]) { display: grid; }
.empty-state strong, .empty-state span { display: block; }
.empty-state strong { color: #4f5d71; }

.pagination {
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-top: 1px solid #e5e8ee;
}
.pagination:not([hidden]) { display: flex; }
.pagination button {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #cfd6e1;
  border-radius: 5px;
  color: #435169;
  background: #fff;
  font-size: 20px;
  line-height: 1;
}
.pagination button:disabled { cursor: default; opacity: .35; }
.pagination span { color: #77849a; font-size: 12px; }

.detail-pane { position: sticky; top: 82px; min-height: 420px; overflow: hidden; }
.detail-placeholder { min-height: 420px; display: grid; place-content: center; color: #8793a5; }

.detail-header { padding: 22px 24px 20px; border-bottom: 1px solid #e5e8ee; }
.detail-header-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.detail-header h1 { margin: 3px 0 0; font-size: 24px; line-height: 1.35; }
.detail-bank { color: #2f61b7; font-size: 13px; font-weight: 700; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 15px; color: #6f7d91; font-size: 12px; }
.detail-meta strong { color: #344258; font-weight: 600; }

.detail-section { padding: 20px 24px; }
.detail-section + .detail-section { border-top: 1px solid #e7eaf0; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.section-title h2 { margin: 0; font-size: 15px; }
.verification-mark { color: #7d899b; font-size: 11px; }

.fee-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid #e0e5ec; border-radius: 7px; }
.fee-item { min-height: 74px; padding: 13px 15px; }
.fee-item:nth-child(even) { border-left: 1px solid #e7eaf0; }
.fee-item:nth-child(n+3) { border-top: 1px solid #e7eaf0; }
.fee-item span { display: block; color: #7c899d; font-size: 11px; }
.fee-item strong { display: block; margin-top: 3px; color: #25334a; font-size: 14px; }
.fee-note { margin: 12px 0 0; color: #66748a; font-size: 12px; }

.benefit-list { display: grid; gap: 10px; }
.benefit-item { padding: 14px 15px; border-left: 3px solid #5382d2; background: #f6f8fb; }
.benefit-heading { display: flex; align-items: baseline; gap: 9px; }
.benefit-heading strong { font-size: 14px; }
.benefit-category { color: #607ea9; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.benefit-item p { margin: 6px 0 0; color: #536177; font-size: 13px; }
.benefit-conditions { color: #7d899b !important; font-size: 11px !important; }
.activity-list { display: grid; gap: 10px; }
.activity-item { padding: 14px 15px; border: 1px solid #dce5d9; border-left: 3px solid #4f8a58; background: #f7faf6; }
.activity-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.activity-heading strong { color: #263a2a; font-size: 14px; }
.activity-heading span { flex: 0 0 auto; padding: 2px 6px; border-radius: 4px; color: #477650; background: #e6f1e4; font-size: 10px; font-weight: 700; }
.activity-period { margin-top: 5px; color: #758477; font-size: 11px; }
.activity-item p { margin: 7px 0 0; color: #536456; font-size: 13px; white-space: pre-line; }
.activity-item a { display: inline-block; margin-top: 8px; color: #327044; font-size: 12px; text-decoration: none; }
.activity-item a:hover { text-decoration: underline; }
.missing-block { padding: 18px; border: 1px dashed #d6dce5; border-radius: 7px; color: #8793a5; font-size: 13px; text-align: center; background: #fafbfc; }

.note-block { padding: 13px 15px; border-left: 3px solid #d59a3d; color: #62543d; background: #fff8eb; font-size: 12px; }
.source-list { margin: 0; padding: 0; list-style: none; }
.source-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 10px 0; }
.source-list li + li { border-top: 1px solid #edf0f4; }
.source-list a { min-width: 0; overflow-wrap: anywhere; color: #2d63bb; font-size: 13px; text-decoration: none; }
.source-list a:hover { text-decoration: underline; }
.source-list span { color: #8b97a8; font-size: 11px; white-space: nowrap; }

@media (max-width: 860px) {
  .site-header { grid-template-columns: 1fr auto; padding: 0 18px; }
  .header-title { display: none; }
  .page-shell { padding: 18px 14px 36px; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
  .reset-button { grid-column: 1 / -1; }
  .workspace { grid-template-columns: 1fr; }
  .card-list { max-height: 460px; }
  .detail-pane { position: static; }
}

@media (max-width: 520px) {
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-strip div:nth-child(3) { border-left: 0; border-top: 1px solid #e7eaf0; }
  .summary-strip div:nth-child(4) { border-top: 1px solid #e7eaf0; }
  .summary-strip div:nth-child(5) { border-left: 0; border-top: 1px solid #e7eaf0; }
  .filter-grid { grid-template-columns: 1fr; }
  .search-field, .reset-button { grid-column: auto; }
  .status-filter { padding-bottom: 2px; }
  .status-filter button { flex: 0 0 auto; }
  .detail-header, .detail-section { padding-left: 17px; padding-right: 17px; }
  .detail-header h1 { font-size: 20px; }
  .detail-header-top { display: block; }
  .detail-header-top .status-badge { display: inline-block; margin-top: 10px; }
  .fee-grid { grid-template-columns: 1fr; }
  .fee-item:nth-child(even) { border-left: 0; }
  .fee-item + .fee-item { border-top: 1px solid #e7eaf0; }
  .source-list li { grid-template-columns: 1fr; gap: 3px; }
  .activity-heading { display: block; }
  .activity-heading span { display: inline-block; margin-top: 6px; }
}
.legal-footer { max-width: 1440px; margin: 0 auto; padding: 20px 28px 32px; display: flex; justify-content: space-between; gap: 18px; color: #8993a6; font-size: 12px; }
.legal-footer nav { display: flex; gap: 14px; }
.legal-footer a { color: #6f7b91; text-decoration: none; }
.legal-footer a:hover { color: #315cff; }
@media (max-width: 520px) { .legal-footer { padding: 18px 16px 28px; display: block; } .legal-footer nav { margin-top: 7px; } }
