/* Brand palette: warm yellow, navy ink and white data surfaces. */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; }
body {
  margin: 0;
  color: #182b40;
  background: #fbefc3;
  background: linear-gradient(140deg, #f9e49a 0%, #fff2c5 44%, #f9edc9 100%);
  font: 14px/1.5 "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  min-height: 100vh;
}
button, input, select, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button:focus, input:focus, select:focus, textarea:focus { outline: 2px solid #85630f; outline-offset: 2px; }
button, input, select, textarea { border-radius: 7px; }
button { line-height: 1.35; }
input, select, textarea {
  border: 1px solid #cfc7b2;
  background: #fffefa;
  padding: 8px 10px;
  min-height: 38px;
}
textarea { width: 100%; resize: vertical; }
input[type=date] { width: 152px; }
input[type=file] { display: block; max-width: 100%; min-width: 235px; padding: 10px; }
h1, h2, p { margin: 0; }
h1 { font-size: 36px; line-height: 1.24; font-weight: 700; letter-spacing: -.025em; }
h2 { font-size: 19px; line-height: 1.35; }
.muted { color: #5e625f; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.topbar {
  background: #fffdfa;
  box-shadow: 0 1px 0 rgba(77, 63, 28, .15), 0 5px 16px rgba(71, 55, 18, .06);
}
.topbar-inner, .page { width: 94%; max-width: 1460px; margin: 0 auto; }
.topbar-inner { display: flex; align-items: center; min-height: 79px; }
.brand { display: flex; align-items: center; margin-right: 46px; flex-shrink: 0; }
.brand-logo { width: 49px; height: auto; display: block; margin-right: 12px; }
.brand-text span { display: block; }
.brand-org { color: #796026; font-size: 11px; font-weight: bold; letter-spacing: .13em; }
.brand-title { font-size: 17px; font-weight: bold; white-space: nowrap; }
.main-nav { display: flex; align-items: center; flex-wrap: wrap; }
.nav-button {
  border: 0; background: transparent; padding: 11px 14px; margin-right: 6px; color: #425365;
  font-weight: bold; white-space: nowrap;
}
.nav-button:hover { color: #172d46; background: #f7f0da; }
.nav-button.selected { color: #182b40; background: #f8e7a2; }
.nav-badge {
  background: #ead09a; color: #604609; padding: 1px 5px; font-size: 11px;
  border-radius: 9px; margin-left: 3px;
}
.session-tools { margin-left: auto; white-space: nowrap; text-align: right; }
.manual-link { display: inline-block; text-decoration: none; margin-right: 5px; white-space: nowrap; }
.network-label { color: #536349; font-size: 12px; padding: 6px 10px; border: 1px solid #e3e8d8; border-radius: 15px; }
.network-dot { display: inline-block; width: 6px; height: 6px; margin: 0 6px 2px 0; border-radius: 50%; background: #527c55; }
.page { padding-top: 30px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 22px; }
.page-heading p { margin-top: 8px; color: #514a37; }
.eyebrow { margin-bottom: 9px; color: #6d541f; font-size: 12px; font-weight: bold; letter-spacing: .16em; }
.eyebrow span { display: inline-block; width: 18px; height: 2px; background: #9d7418; vertical-align: middle; margin-right: 9px; }
.coverage {
  border-left: 1px solid rgba(93, 71, 18, .28); padding-left: 16px; margin-left: 20px;
  color: #6a5523; font-size: 11px; white-space: nowrap;
}
.coverage strong { display: block; margin-top: 4px; color: #20324a; font-size: 14px; }
.card {
  border-radius: 13px; background: #fffdfa; border: 1px solid #e9dbac;
  box-shadow: 0 3px 12px rgba(78, 61, 19, .06); margin-bottom: 18px;
}
.filters { padding: 14px 18px; display: flex; align-items: flex-end; flex-wrap: wrap; }
.time-controls, .date-controls { display: flex; align-items: center; flex-wrap: wrap; }
.time-controls { margin-right: 26px; }
.control-label, .date-controls label { color: #574c34; font-weight: bold; font-size: 12px; }
.time-controls .control-label { margin-right: 12px; }
.segmented { border: 1px solid #e7d9ab; border-radius: 8px; background: #f8f2dc; padding: 2px; white-space: nowrap; }
.segmented button { border: 0; background: transparent; padding: 7px 9px; color: #5c533d; font-size: 13px; }
.segmented button.selected { background: #f2d36d; color: #1f2a37; font-weight: bold; }
.date-controls label, .date-controls input { margin-right: 8px; }
.date-controls .button { margin-left: 2px; min-width: 62px; }
#end-control { display: inline-block; white-space: nowrap; }
.button { border: 1px solid transparent; padding: 9px 13px; min-height: 36px; font-size: 13px; font-weight: bold; }
.primary { background: #192e46; border-color: #192e46; color: #fffefa; }
.primary:hover:not(:disabled) { background: #2d455e; }
.secondary { background: #fbf4db; border-color: #e2d3a6; color: #34445a; }
.secondary:hover:not(:disabled) { background: #f7e8ad; }
.quiet { background: transparent; color: #536274; margin-left: 5px; }
.board-nav { display: flex; flex-wrap: wrap; margin: 2px -3px 12px; }
.board-nav button {
  border: 1px solid #e2ce8e; background: #fff7db; padding: 9px 14px;
  margin: 0 3px 6px; font-weight: bold; font-size: 13px; color: #554826;
}
.board-nav button:hover { background: #f8e49a; }
.board-nav button.selected { border-color: #25384b; background: #25384b; color: #fffefa; }
.kpi-grid { display: flex; flex-wrap: wrap; margin: 0 -5px 8px; }
.kpi-card {
  position: relative; flex: 1 1 15%; min-width: 0; background: #fffdfa; padding: 14px 14px 12px;
  margin: 0 5px 10px; border: 1px solid #e8d7a0; border-radius: 11px;
}
.kpi-card.accent { background: #243850; border-color: #243850; color: #fffcf0; }
.kpi-label { font-size: 12px; font-weight: bold; color: #635a43; }
.kpi-card.accent .kpi-label { color: #f4dc8d; }
.kpi-value { margin-top: 6px; font-size: 24px; line-height: 1.16; white-space: nowrap; font-weight: bold; font-family: Arial, "Microsoft YaHei", sans-serif; }
.kpi-foot { color: #6b6557; margin-top: 6px; font-size: 11px; }
.kpi-card.accent .kpi-foot { color: #eedeba; }
.kpi-value.unavailable { font-family: inherit; font-size: 19px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.section-heading p { color: #646553; font-size: 12px; margin-top: 5px; }
.chart-card, .table-card, .upload-card, .detail-card { padding: 18px; }
.chart-legend { color: #555e62; font-size: 12px; white-space: nowrap; margin-left: 8px; }
.chart-legend span { display: inline-block; width: 11px; height: 3px; background: #254767; vertical-align: middle; margin: 0 4px 0 9px; }
.chart-legend span + span { background: #ac7411; }
.trend-chart { padding: 5px 0 0; }
.trend-chart svg { display: block; width: 100%; max-height: 250px; overflow: visible; }
.trend-chart text { font: 12px "Microsoft YaHei", Arial, sans-serif; fill: #575d58; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 575px; }
th, td { text-align: left; padding: 10px 11px; border-bottom: 1px solid #eee9db; vertical-align: middle; }
th { color: #514b3b; font-size: 12px; font-weight: bold; background: #f6f0dd; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fffae8; }
.number { text-align: right; white-space: nowrap; }
td.number { font: 14px Arial, "Microsoft YaHei", sans-serif; }
.rank-cell { width: 58px; }
.rank-number { display: inline-block; min-width: 26px; text-align: center; color: #4f523f; }
.rank-number.leading { padding: 2px 4px; border-radius: 4px; font-weight: bold; background: #f6e3a0; color: #5c4312; }
.label-cell { min-width: 132px; }
.image-cell { width: 61px; }
.product-image { width: 42px; height: 42px; border-radius: 5px; border: 1px solid #ece3c5; vertical-align: middle; }
.table-controls input { width: 150px; margin-right: 4px; }
.list-filter { display: flex; flex-wrap: wrap; align-items: center; margin: 0 -4px 10px; }
.list-filter > * { margin: 0 4px 4px; }
.list-filter label { color: #574c34; font-size: 12px; font-weight: bold; }
.pagination { display: flex; align-items: center; justify-content: flex-end; margin-top: 12px; color: #5d5c50; font-size: 12px; }
.pagination:empty { display: none; }
.pagination button { margin-left: 7px; }
.pagination .page-count { margin-left: 7px; }
.data-notice, .notification {
  background: #fff6d4; color: #614712; padding: 10px 14px; border: 1px solid #e3c66c;
  border-radius: 7px; margin-bottom: 12px; font-size: 13px;
}
.notification { color: #22472b; background: #eef5e8; border-color: #c9d7bd; }
.error { color: #852c25; background: #fff1eb; border-color: #e6a69a; }
.empty-state { padding: 26px 18px; text-align: center; color: #635c4d; }
.form-message { color: #5c522f; font-size: 13px; }
.form-message.error { background: transparent; }
.upload-card label { display: block; margin-bottom: 6px; }
.optional-field { margin-top: 13px; }
.import-field-hint { margin-top: 5px; color: #5e625f; font-size: 12px; }
.upload-card .replace-choice { margin-top: 13px; }
.cost-version-notice { overflow-wrap: break-word; word-wrap: break-word; }
.cost-version-notice strong { margin-right: 6px; }
.cost-version-notice p + p { margin-top: 4px; }
.download-link { display: inline-block; text-decoration: none; white-space: nowrap; }
.replace-controls { margin: 12px 0 0; }
.replace-controls p + p { margin-top: 4px; }
.replace-title { font-weight: bold; overflow-wrap: break-word; word-wrap: break-word; }
.replace-controls .date-controls { margin-top: 10px; }
.replace-controls label, .replace-controls input { margin-bottom: 5px; }
.upload-actions, .form-actions { margin-top: 14px; }
.upload-actions > *, .form-actions > * { margin-right: 8px; vertical-align: middle; }
#import-result, #cost-result, #cost-backfill-result, #refund-import-result { margin-top: 10px; }
#cost-backfill .date-controls > * { margin-bottom: 5px; }
.cost-reasons { margin: 12px 0; color: #654914; }
.refund-import-pending { margin-top: 18px; }
.refund-import-pending .section-heading { flex-wrap: wrap; }
.refund-platform-filter { margin: 6px 0 0; color: #5e625f; font-size: 12px; white-space: nowrap; }
.import-skipped { margin-top: 12px; color: #654914; font-size: 13px; overflow-wrap: break-word; word-wrap: break-word; }
.inline-summary { display: flex; flex-wrap: wrap; margin: 0 -5px 10px; }
.inline-summary div { border-radius: 8px; background: #fbf2d7; margin: 0 5px 5px; min-width: 100px; padding: 9px 11px; }
.inline-summary span, .inline-summary strong { display: block; }
.inline-summary span { color: #62563e; font-size: 12px; }
.inline-summary strong { margin-top: 3px; font-size: 17px; }
.warnings { padding-left: 21px; margin: 8px 0 0; color: #704613; }
.status-chip { display: inline-block; color: #665017; background: #fbefc3; border: 1px solid #ead9a0; border-radius: 7px; padding: 2px 7px; white-space: nowrap; }
.review-quantity { width: 104px; }
.refund-note-label { display: block; margin: 16px 0 6px; font-weight: bold; }
.mapping-fields { display: flex; flex-wrap: wrap; margin: 0 -6px; }
.mapping-fields label { flex: 1 1 235px; margin: 0 6px 10px; color: #574c34; font-weight: bold; font-size: 12px; }
.mapping-fields input, .mapping-fields select { display: block; margin-top: 5px; width: 100%; }
.mapping-checkbox { display: block; margin-top: 7px; font-weight: bold; }
.mapping-checkbox input { margin: 0 6px 1px 0; padding: 0; min-height: 0; vertical-align: middle; }
.mapping-guide { margin: 3px 0 0 20px; color: #5e625f; font-size: 12px; }
.action-cell button + button { margin-left: 6px; }
.footer { display: flex; justify-content: space-between; padding: 5px 0 20px; color: #665b3f; font-size: 12px; }
.login-screen { display: flex; align-items: center; justify-content: center; height: 100vh; min-height: 460px; padding: 20px; }
.login-card {
  width: 390px; max-width: 100%; padding: 28px; background: #fffdfa; border: 1px solid #e0cd92;
  border-radius: 15px; text-align: center; box-shadow: 0 15px 35px rgba(83, 61, 16, .14);
}
.login-card h1 { font-size: 28px; margin-bottom: 5px; }
.login-logo { width: 94px; height: auto; display: block; margin: 0 auto 13px; }
.login-card form { margin-top: 20px; text-align: left; }
.login-card label { display: block; font-weight: bold; margin-bottom: 6px; }
.login-card input + label { margin-top: 12px; }
.login-card input, .login-card button { width: 100%; }
.login-card button { margin-top: 13px; }
.login-card .form-message { margin-top: 6px; }

@media (max-width: 1080px) {
  .brand { margin-right: 15px; }
  .nav-button { margin-right: 2px; padding: 9px 8px; }
  .time-controls { margin-right: 16px; }
  .date-controls { margin-top: 8px; }
  .kpi-card { flex-basis: 30%; }
}
@media (max-width: 680px) {
  .topbar-inner { flex-wrap: wrap; min-height: 0; padding: 9px 0; }
  .brand { order: 1; }
  .session-tools { order: 2; max-width: 100%; white-space: normal; }
  .main-nav { order: 3; flex-basis: 100%; margin-top: 7px; }
  .page { padding-top: 20px; }
  .page-heading { display: block; margin-bottom: 16px; }
  h1 { font-size: 28px; }
  .coverage { margin: 8px 0 0; padding-left: 0; border-left: 0; }
  .coverage strong { display: inline; margin-left: 6px; }
  .filters, .chart-card, .table-card, .upload-card, .detail-card { padding: 12px; }
  .time-controls { margin: 0; }
  .date-controls label { margin-right: 4px; }
  .date-controls input { width: 141px; margin-right: 4px; }
  #end-control { margin: 3px 0; }
  .kpi-card { flex-basis: 38%; }
  .kpi-value { font-size: 22px; }
  .board-nav button { padding: 7px 9px; }
  .table-card .section-heading { align-items: flex-start; }
  #contribution-card .section-heading { display: block; }
  .table-controls { margin-top: 8px; }
  .footer { display: block; }
  .footer span { display: block; margin-bottom: 4px; }
}
