/* Four finance record views share a toolbar; registration and navigation remain untouched. */
#appView :is(.cf-record-report, .af-record-filters) [hidden] {
  display: none !important;
}
#appView .cf-record-report [data-fr-auto],
#appView .af-record-filters {
  display: block;
  margin: 0 0 22px;
  padding: 22px;
  border: 1px solid #e5dfd5;
  border-radius: 14px;
  background: #fff;
  min-width: 0;
}
#appView .cf-record-report {
  border: 0;
  background: transparent;
}
.fr-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 22px;
}
.fr-source-tabs,
.fr-export,
.fr-format-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.fr-source-tabs > span,
.fr-export > span {
  font-size: 14px;
  color: #778391;
  margin-inline-end: 5px;
}
#appView :is(.fr-source-tabs, .fr-format-tabs) button {
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid #e5dfd5;
  border-radius: 8px;
  background: #fff;
  color: #5b6874;
  font: inherit;
  cursor: pointer;
}
#appView .fr-source-tabs button.is-active {
  background: linear-gradient(110deg, #e9c66b, #bd892f);
  color: #fff;
  border-color: #bd892f;
}
.fr-format-tabs {
  gap: 0;
  border: 1px solid #e5dfd5;
  border-radius: 8px;
  overflow: hidden;
  flex-wrap: nowrap;
}
#appView .fr-format-tabs button {
  border: 0;
  border-radius: 0;
}
#appView .fr-format-tabs button.is-active {
  color: #a47120;
  background: #fff2d4;
}
#appView .fr-export-button {
  min-height: 42px;
  padding: 9px 22px;
  border: 1px solid #bd892f;
  border-radius: 8px;
  background: linear-gradient(110deg, #e9c66b, #bd892f);
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.fr-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 20px;
}
#appView .fr-fields > label,
#appView .fr-fields > .compact-date-range {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  color: #778391;
  font-size: 14px;
}
#appView .fr-fields :is(input, select) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #ded7ce;
  border-radius: 8px;
  background: #fff;
  color: #243747;
  font: inherit;
}
#appView [data-fr-auto] > :is(.cf-error, .fr-error, [data-cf-report-message]):empty {
  display: none;
}
.fr-error {
  color: #b84b43;
}
#appView .cf-platform-receipt-slot {
  min-width: 0;
}
@media (min-width: 1101px) {
  #appView :is(.cf-platform-receipt-head, .cf-platform-receipt-row) {
    grid-template-columns:
      minmax(90px, 1fr) minmax(70px, 0.8fr) 52px 52px minmax(95px, 1fr) minmax(110px, 1.2fr)
      minmax(110px, 1.2fr) 100px;
  }
  .cf-platform-receipt-head > :nth-child(3),
  .cf-platform-receipt-head > :nth-child(4),
  .cf-platform-receipt-row > [data-label='人数'],
  .cf-platform-receipt-row > [data-label='天数'] {
    text-align: center;
  }
  .cf-platform-receipt-head > :nth-child(5) {
    text-align: right;
  }
}
@media (max-width: 900px) {
  .fr-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fr-toolbar {
    align-items: start;
  }
}
@media (max-width: 560px) {
  #appView .cf-record-report [data-fr-auto],
  #appView .af-record-filters {
    padding: 15px;
  }
  .fr-toolbar {
    gap: 14px;
  }
  .fr-source-tabs {
    width: 100%;
    gap: 5px;
  }
  .fr-source-tabs > span {
    width: 100%;
  }
  #appView .fr-source-tabs button {
    flex: 1;
    padding: 8px 6px;
  }
  .fr-export {
    width: 100%;
    justify-content: end;
  }
  .fr-fields {
    gap: 14px 12px;
  }
  #appView .fr-fields :is(input, select) {
    padding: 9px 6px;
    font-size: 14px;
  }
}

#appView .fr-fields > .compact-date-range {
  width: 100%;
  min-width: 0;
}
#appView .fr-fields .compact-range-trigger {
  width: 100%;
  min-height: 46px;
}

/* Two rows on all four history pages; narrower screens scroll within each row. */
#appView .cf-record-report {
  padding: 0;
}
#appView .cf-record-report [data-fr-auto],
#appView .af-record-filters {
  padding: 0;
  border: 0;
  background: transparent;
}
#appView .fr-record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 24px;
  overflow-x: auto;
  padding: 4px 0;
  margin-bottom: 22px;
}
#appView .fr-record-head > :is(.cf-cash-entry-tabs, .af-tabs),
#appView .fr-record-actions,
#appView .fr-record-head .fr-export {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 12px;
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}
#appView .fr-record-head > :is(.fr-export, .fr-record-actions) {
  margin-inline-start: auto;
}
#appView .fr-record-head .af-shortcuts {
  margin: 0;
}
#appView .fr-export > select {
  box-sizing: border-box;
  min-height: 46px;
  width: 106px;
  padding: 10px 12px;
  border: 1px solid #ded7ce;
  border-radius: 8px;
  background: #fff;
  color: #243747;
  font: inherit;
}
#appView .fr-record-head button {
  min-height: 46px;
}
#appView :is(.cf-record-report, .af-record-filters) .fr-fields {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(145px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding: 22px;
  border: 1px solid #e5dfd5;
  border-radius: 14px;
  background: #fff;
  margin-bottom: 22px;
}
#appView :is(.cf-record-report, .af-record-filters) .fr-fields > :is(label, .compact-date-range) {
  display: grid;
  line-height: 20px;
  white-space: nowrap;
  margin: 0;
}
#appView #mainContent :is(.cf-record-report, .af-record-filters) .fr-fields > .compact-date-range {
  display: grid;
  align-items: stretch;
  gap: 8px;
  grid-column: auto;
  width: 100%;
}

#appView #mainContent :is(.cf-record-report, .af-record-filters) .fr-fields .compact-range-trigger {
  block-size: 46px;
  min-block-size: 46px;
}
#appView #mainContent :is(.cf-record-report, .af-record-filters) .fr-fields :is(input, select) {
  min-height: 46px;
}
#appView #mainContent :is(.cf-record-report, .af-record-filters) .fr-fields .compact-range-label {
  font: inherit;
}
#appView
  :is(.cf-record-report, .af-record-filters)
  .fr-fields
  .compact-range-trigger
  > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 往月待处理提醒条（老板 2026-10-19）：工具栏下方单行，窄屏在条内横滑。 */
#appView #mainContent .fr-month-bar {
  align-items: center !important;
  gap: 12px;
  margin: 0 0 12px;
  font-size: 14px;
  white-space: nowrap;
}
#appView #mainContent .fr-month-bar > * {
  flex: 0 0 auto;
}
#appView #mainContent .fr-pending-link {
  border: 1px solid var(--archive-gold-300, #ecd294);
  border-radius: 999px;
  background: var(--archive-gold-100, #fff3d4);
  color: var(--archive-gold-700, #997027);
  padding: 6px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
#appView #mainContent .fr-pending-state {
  color: var(--archive-gold-700, #997027);
  font-weight: 700;
}
#appView #mainContent .fr-back-month {
  min-height: 36px;
}
#appView #mainContent .fr-export-note {
  color: #64748b;
  font-size: 13px;
}
