/* Responsive architecture layer
   Keep business templates on Bootstrap's grid/flex system and use this layer only
   for cross-page behavior Bootstrap does not provide out of the box. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.app-shell-inner {
  width: 100%;
}

.hz-workspace-card,
.hz-table-panel,
.panel,
.card {
  min-width: 0;
}

.hz-workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  min-width: 0;
}

.hz-workspace-head > div:first-child {
  min-width: 0;
}

.hz-workspace-head h1,
.hz-workspace-head h2 {
  margin-bottom: .45rem;
}

.hz-workspace-head p {
  max-width: 58rem;
}

.hz-workspace-actions,
.settlement-actionbar,
.receipt-hero-actions,
.station-list-hero-actions,
.account-hero-actions {
  min-width: 0;
}

.hz-workspace-actions .btn,
.hz-workspace-actions .action-btn,
.settlement-actionbar .btn,
.settlement-actionbar .action-btn {
  min-height: 44px;
}

.hz-filter-panel {
  min-width: 0;
}

.hz-filter-panel .form-control,
.hz-filter-panel .form-select {
  width: 100%;
  max-width: 100%;
}

.hz-filter-section + .hz-filter-section {
  margin-top: 1rem;
}

.table-responsive {
  border-radius: inherit;
}

.table td,
.table th {
  max-width: 26rem;
}

.table td {
  overflow-wrap: anywhere;
}

@media (min-width: 1200px) {
  .app-shell-inner {
    max-width: 1440px;
  }

  .hz-workspace-card > .card-body {
    padding: 1.45rem 1.55rem 1.55rem !important;
  }
}

@media (max-width: 991.98px) {
  .brand-nav .navbar-collapse {
    padding-top: .75rem;
  }

  .brand-nav-links {
    width: 100%;
  }

  .brand-userbar {
    width: 100%;
  }

  .brand-user-menu {
    width: 100%;
    justify-content: flex-start !important;
  }

  .hz-workspace-actions,
  .settlement-actionbar,
  .receipt-hero-actions,
  .station-list-hero-actions,
  .account-hero-actions {
    justify-content: flex-start !important;
  }

  .hz-workspace-head {
    flex-direction: column;
    align-items: stretch;
  }

  .hz-workspace-head p {
    max-width: none;
  }
}

@media (max-width: 767.98px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .app-shell {
    padding: .85rem .75rem 1.2rem !important;
  }

  .app-shell-inner {
    max-width: 100%;
  }

  .brand-system-name {
    max-width: calc(100vw - 128px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-bottom-nav {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .25rem;
    position: fixed;
    left: .75rem;
    right: .75rem;
    bottom: calc(.65rem + env(safe-area-inset-bottom));
    z-index: 1040;
    padding: .45rem;
    border: 1px solid rgba(7, 91, 136, .12);
    border-radius: 22px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 40px rgba(7, 45, 72, .18);
    backdrop-filter: blur(14px);
  }

  .mobile-bottom-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .18rem;
    min-width: 0;
    min-height: 48px;
    border-radius: 16px;
    color: #5f7788;
    font-size: .72rem;
    font-weight: 800;
    text-decoration: none;
  }

  .mobile-bottom-link.active {
    color: #075b88;
    background: #eaf7fd;
  }

  .mobile-bottom-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    background: rgba(7, 91, 136, .08);
    font-size: .72rem;
  }

  .mobile-bottom-link.active .mobile-bottom-icon {
    background: linear-gradient(135deg, #075b88, #20a9d6);
    color: #fff;
  }

  .metric-card {
    min-height: 112px !important;
  }

  .hz-workspace-card,
  .hz-table-panel,
  .station-list-table-card,
  .account-table-panel,
  .receipt-table-panel {
    border-radius: 22px !important;
  }

  .hz-workspace-card > .card-body {
    padding: 1rem !important;
  }

  .hz-workspace-head {
    gap: .85rem;
  }

  .hz-workspace-head h1,
  .hz-workspace-head h2 {
    font-size: 1.25rem !important;
    line-height: 1.25 !important;
  }

  .hz-workspace-head p {
    font-size: .92rem !important;
    line-height: 1.6 !important;
  }

  .hz-workspace-actions,
  .settlement-actionbar,
  .receipt-hero-actions,
  .station-list-hero-actions,
  .account-hero-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    width: 100%;
    gap: .55rem !important;
    overflow: visible !important;
  }

  .hz-workspace-actions .btn,
  .hz-workspace-actions .action-btn,
  .settlement-actionbar .btn,
  .settlement-actionbar .action-btn,
  .receipt-hero-actions .btn,
  .station-list-hero-actions .btn,
  .account-hero-actions .btn {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
  }

  .hz-filter-actions,


  .hz-section-title,
  .settlement-section-title,
  .receipt-section-title,
  .station-section-title,
  .account-section-title {
    font-size: .92rem !important;
  }

  .hz-section-head {
    margin-bottom: .55rem !important;
  }



}

@media (max-width: 390px) {
  .app-shell {
    padding-left: .55rem !important;
    padding-right: .55rem !important;
  }

  .mobile-bottom-nav {
    left: .5rem;
    right: .5rem;
  }

  .mobile-bottom-link {
    font-size: .68rem;
  }
}

/* Bootstrap responsive refinement layer
   Keep page templates close to Bootstrap, and centralize only cross-page fixes here. */
.login-page {
  min-width: 0;
}

.login-card {
  background: rgba(255, 255, 255, .98);
}

.entry-page,
.station-form-page,
.import-page,
.form-page,
.system-page {
  width: 100%;
  min-width: 0;
}

.entry-hero,
.station-hero,
.import-hero,
.audit-hero,
.sys-hero {
  min-width: 0;
}

.entry-hero > *,
.station-hero > *,
.import-hero > *,
.audit-hero > *,
.sys-hero > * {
  min-width: 0;
}

.entry-section,
.station-section-card,
.entry-form-card,
.station-main-card {
  min-width: 0;
}

.entry-section-header,
.station-section-header {
  min-width: 0;
}

.entry-section-header > div,
.station-section-header > div {
  min-width: 0;
}

.entry-field-col,
.station-section-card .row > [class*="col-"],
.entry-section .row > [class*="col-"] {
  min-width: 0;
}

.entry-field-col .form-control,
.entry-field-col .form-select,
.entry-field-col textarea,
.station-section-card .form-control,
.station-section-card .form-select,
.station-section-card textarea {
  width: 100%;
  max-width: 100%;
}

  .entry-form-actions,
  .entry-action-bar,
  .station-actions,
  .station-action-bar,
  .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  justify-content: flex-end;
}

.date-enhanced-wrap,
.entry-field-col .date-enhanced-wrap,
.station-section-card .date-enhanced-wrap {
  max-width: 100%;
}

.custom-date-popover {
  max-width: min(320px, calc(100vw - 2rem));
}

/* Detail/profile/system pages responsive refinement */
.page-hero,
.account-detail-hero,
.profile-hero,
.sys-hero,
.hz-page-hero {
  min-width: 0;
}

.page-hero > *,
.account-detail-hero > *,
.profile-hero > *,
.sys-hero > *,
.hz-page-hero > * {
  min-width: 0;
}

.page-hero-actions,
.account-detail-actions,
.hz-page-actions,
.sys-hero-actions {
  min-width: 0;
}

.detail-card,
.detail-panel,
.profile-card,
.profile-section,
.sys-panel,
.sys-summary-card,
.detail-summary-card {
  min-width: 0;
}

.detail-grid-clean > *,
.detail-summary-grid > *,
.profile-account-card > *,
.sys-summary-grid > * {
  min-width: 0;
}

.detail-item strong,
.profile-info-item strong,
.detail-summary-card strong,
.sys-summary-card strong {
  overflow-wrap: anywhere;
}

@media (max-width: 991.98px) {
  .entry-hero,
  .station-hero,
  .import-hero,
  .audit-hero,
  .sys-hero {
    padding: 1.25rem !important;
    border-radius: 22px !important;
  }

  .entry-form-card .card-body,
  .station-main-card .card-body {
    padding: 1.25rem !important;
  }

  .page-hero,
  .account-detail-hero,
  .profile-hero,
  .sys-hero,
  .hz-page-hero {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .page-hero-actions,
  .account-detail-actions,
  .hz-page-actions,
  .sys-hero-actions {
    justify-content: flex-start !important;
  }

  .detail-grid-clean,
  .detail-summary-grid,
  .profile-account-card,
  .sys-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767.98px) {
  .login-page {
    min-height: calc(100vh - 1.5rem) !important;
  }

  .login-card .card-body {
    padding: 1.35rem !important;
  }

  .login-brand-logo {
    width: 60px !important;
    height: 60px !important;
  }

  .entry-hero,
  .station-hero,
  .import-hero,
  .audit-hero,
  .sys-hero {
    padding: 1.1rem !important;
    margin-bottom: .8rem !important;
  }

  .entry-hero h1,
  .entry-hero h2,
  .station-hero h1,
  .station-hero h2,
  .import-hero h1,
  .audit-hero h1,
  .sys-hero h1 {
    font-size: 1.35rem !important;
    line-height: 1.25 !important;
  }

  .entry-hero .muted,
  .station-hero .muted,
  .import-hero .muted,
  .audit-hero .muted,
  .sys-hero .muted {
    font-size: .92rem !important;
    line-height: 1.65 !important;
  }

  .entry-form-card .card-body,
  .station-main-card .card-body {
    padding: 1rem !important;
  }

  .entry-section,
  .station-section-card {
    padding: 1rem !important;
    border-radius: 18px !important;
  }

  .entry-section-header,
  .station-section-header {
    align-items: flex-start !important;
    gap: .65rem !important;
    margin-bottom: 1rem !important;
  }

  .entry-section-header h5,
  .station-section-header h5 {
    font-size: 1rem !important;
  }

  .entry-guide-strip,
  .station-guide-strip {
    gap: .45rem !important;
  }

  .entry-guide-pill,
  .station-guide-pill {
    width: 100%;
    justify-content: flex-start;
    font-size: .82rem !important;
  }

.entry-form-actions,
.entry-action-bar,
.station-actions,
.station-action-bar,
.form-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .entry-form-actions .btn,
  .entry-action-bar .btn,
  .station-actions .btn,
  .station-action-bar .btn,
  .form-actions .btn {
    width: 100%;
    min-height: 44px;
  }

  .station-action-bar > .d-flex,
  .entry-action-bar > .d-flex {
    display: grid !important;
    grid-template-columns: 1fr;
    width: 100%;
    gap: .65rem !important;
  }

  .custom-date-popover {
    left: 50% !important;
    transform: translateX(-50%);
    width: min(320px, calc(100vw - 1.5rem)) !important;
  }

  .page-hero,
  .account-detail-hero,
  .profile-hero,
  .sys-hero,
  .hz-page-hero {
    padding: 1.1rem !important;
    border-radius: 20px !important;
  }

  .page-hero h1,
  .page-hero h2,
  .account-detail-hero h1,
  .account-detail-hero h2,
  .profile-hero h1,
  .profile-hero h2,
  .sys-hero h1,
  .sys-hero h2,
  .hz-page-hero h1,
  .hz-page-hero h2 {
    font-size: 1.35rem !important;
    line-height: 1.25 !important;
  }

  .page-hero-actions,
  .account-detail-actions,
  .hz-page-actions,
  .sys-hero-actions,
  .audit-tabs {
    display: grid !important;
    grid-template-columns: 1fr;
    width: 100%;
    gap: .55rem !important;
  }

  .page-hero-actions .btn,
  .account-detail-actions .btn,
  .hz-page-actions .btn,
  .sys-hero-actions .btn,
  .audit-tabs .btn {
    width: 100% !important;
    min-height: 44px;
    justify-content: center !important;
  }

  .detail-grid-clean,
  .detail-summary-grid,
  .profile-account-card,
  .sys-summary-grid {
    grid-template-columns: 1fr !important;
  }

  .detail-card .card-body,
  .detail-panel .card-body,
  .profile-card .card-body,
  .profile-section,
  .sys-filter {
    padding: 1rem !important;
  }

  .detail-section-title,
  .profile-section-header,

  .bank-info-row,
  .payer-link-row {
    padding: .85rem !important;
  }

  .table-responsive {
    margin-left: -.25rem;
    margin-right: -.25rem;
    width: calc(100% + .5rem);
  }
}

@media (max-width: 430px) {
  .entry-section-badge,
  .station-section-badge {
    font-size: .72rem !important;
    padding: .24rem .55rem !important;
  }

  .custom-date-popover {
    padding: .8rem !important;
  }

  .custom-date-cell {
    min-height: 36px !important;
  }
}

/* Settlement detail workflow selector: keep this at the end to override generic button rules. */
.workflow-pill-group {
  display: flex !important;
  flex-flow: row wrap !important;
  align-items: center !important;
  gap: .5rem !important;
  padding-top: .25rem !important;
}

.workflow-pill-group form {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  margin: 0 !important;
}


/* Dark hero text guard: keep text readable on blue gradient hero blocks. */
.sys-form-hero,
.workflow-hero {
  color: #ffffff !important;
}

.sys-form-hero h1,
.sys-form-hero h2,
.sys-form-hero h3,
.workflow-hero h1,
.workflow-hero h2,
.workflow-hero h3 {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.sys-form-hero p,
.sys-form-hero .small,
.sys-form-hero .muted,
.sys-form-hero .text-muted,
.workflow-hero p,
.workflow-hero .small,
.workflow-hero .muted,
.workflow-hero .text-muted {
  color: rgba(245, 251, 255, 0.88) !important;
  -webkit-text-fill-color: rgba(245, 251, 255, 0.88) !important;
}

.sys-form-hero .btn-light,
.workflow-hero .btn-light {
  color: #075b88 !important;
  -webkit-text-fill-color: #075b88 !important;
}

/* Settlement form result card: override global strong/text-fill rules. */
.settlement-live-card-accent small,
.settlement-live-card-accent strong,
.settlement-live-card-accent #settlement-receivable-preview {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Mobile bottom navigation: standard bottom bar with per-item active state. */
@media (max-width: 767.98px) {
  .mobile-bottom-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1045 !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: space-around !important;
    gap: .18rem !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: .42rem .58rem calc(.42rem + env(safe-area-inset-bottom, 0px)) !important;
    border: 0 !important;
    border-top: 1px solid rgba(7, 91, 136, .10) !important;
    border-radius: 0 !important;
    background: rgba(255, 255, 255, .97) !important;
    box-shadow: 0 -10px 26px rgba(15, 52, 77, .08) !important;
    backdrop-filter: saturate(160%) blur(14px) !important;
    -webkit-backdrop-filter: saturate(160%) blur(14px) !important;
  }

  .mobile-bottom-link {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 52px !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .22rem !important;
    padding: .28rem .16rem !important;
    border-radius: 16px !important;
    background: transparent !important;
    color: #334f61 !important;
    -webkit-text-fill-color: #334f61 !important;
    font-size: .72rem !important;
    font-weight: 800 !important;
    line-height: 1.08 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transition: background .16s ease, color .16s ease, transform .12s ease !important;
  }

  .mobile-bottom-link:hover,
  .mobile-bottom-link:focus-visible {
    background: rgba(17, 148, 195, .08) !important;
    color: #075b88 !important;
    -webkit-text-fill-color: #075b88 !important;
    transform: none !important;
    outline: none !important;
  }

  .mobile-bottom-link:active {
    transform: scale(.97) !important;
  }

  .mobile-bottom-link.active {
    background: #eaf7fd !important;
    color: #075b88 !important;
    -webkit-text-fill-color: #075b88 !important;
    box-shadow: none !important;
  }

  .mobile-bottom-icon {
    width: 1.62rem !important;
    height: 1.62rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    background: #eef4f8 !important;
    color: #49697c !important;
    -webkit-text-fill-color: #49697c !important;
    font-size: .76rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    box-shadow: none !important;
  }

.mobile-bottom-link.active .mobile-bottom-icon {
    background: linear-gradient(135deg, #075b88 0%, #1194c3 100%) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    box-shadow: 0 8px 16px rgba(7, 91, 136, .16) !important;
  }
}


.receipt-entry-page .entry-hero .muted,
.receipt-entry-page .entry-hero .small,
.receipt-entry-page .entry-hero p {
  color: rgba(255, 255, 255, .84) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, .84) !important;
}

/* Final account page polish: keep account type tabs readable and tactile. */
.account-page .account-tabs {
  gap: .72rem !important;
  border: 0 !important;
}

.account-page .account-tabs .nav-link {
  min-height: 52px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: .45rem !important;
  padding: .78rem 1.15rem !important;
  border: 1px solid rgba(7, 91, 136, .14) !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, #ffffff 0%, #fafdff 100%) !important;
  color: #14384d !important;
  -webkit-text-fill-color: #14384d !important;
  font-weight: 900 !important;
  box-shadow: 0 10px 24px rgba(7, 91, 136, .06) !important;
  transition:
    transform .16s var(--hz-ease),
    box-shadow .16s var(--hz-ease),
    border-color .16s var(--hz-ease),
    background .16s var(--hz-ease),
    color .16s var(--hz-ease) !important;
}

.account-page .account-tabs .nav-link:hover,
.account-page .account-tabs .nav-link:focus {
  transform: translateY(-1px) !important;
  border-color: rgba(17, 148, 195, .34) !important;
  background: linear-gradient(180deg, #f4fbff 0%, #eaf7fd 100%) !important;
  color: #075b88 !important;
  -webkit-text-fill-color: #075b88 !important;
  box-shadow: 0 14px 30px rgba(7, 91, 136, .10) !important;
}

.account-page .account-tabs .nav-link.active,
.account-page .account-tabs .nav-link.active:hover,
.account-page .account-tabs .nav-link.active:focus {
  border-color: rgba(7, 91, 136, .72) !important;
  background: linear-gradient(135deg, #075b88 0%, #1194c3 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 16px 34px rgba(7, 91, 136, .22) !important;
}

.account-page .account-tabs .nav-link .badge {
  border: 1px solid rgba(17, 148, 195, .12) !important;
  background: #eaf4f9 !important;
  color: #557184 !important;
  -webkit-text-fill-color: #557184 !important;
  font-weight: 900 !important;
}

.account-page .account-tabs .nav-link.active .badge {
  border-color: rgba(255, 255, 255, .28) !important;
  background: rgba(255, 255, 255, .18) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Final hero contrast guard: blue gradient form heroes must keep subtitle text readable. */
.entry-hero,
.station-hero,
.receipt-hero,
.import-hero,
.audit-hero,
.sys-form-hero {
  color: #ffffff !important;
}

.entry-hero .muted,
.entry-hero .small,
.entry-hero p,
.station-hero .muted,
.station-hero .small,
.station-hero p,
.receipt-hero .muted,
.receipt-hero .small,
.receipt-hero p,
.import-hero .muted,
.import-hero .small,
.import-hero p,
.audit-hero .muted,
.audit-hero .small,
.audit-hero p,
.sys-form-hero .muted,
.sys-form-hero .small,
.sys-form-hero p {
  color: rgba(245, 251, 255, .88) !important;
  -webkit-text-fill-color: rgba(245, 251, 255, .88) !important;
}

/* Station/profile page hero tag: keep badge text readable on dark blue hero. */
.page-hero .page-tag,
.page-hero .page-tag:hover,
.page-hero .page-tag:focus {
  color: rgba(255, 255, 255, .94) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, .94) !important;
  background: rgba(255, 255, 255, .16) !important;
  border: 1px solid rgba(255, 255, 255, .18) !important;
}

/* Station profile account recommendation actions: readable default and hover states. */
.account-recommend-link {
  border: 1px solid rgba(11, 92, 142, .10) !important;
  background: rgba(11, 92, 142, .08) !important;
  color: #0b5c8e !important;
  -webkit-text-fill-color: #0b5c8e !important;
}

.account-recommend-link:hover,
.account-recommend-link:focus {
  border-color: transparent !important;
  background: linear-gradient(135deg, #075b88 0%, #1194c3 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 10px 20px rgba(7, 91, 136, .18) !important;
}

/* Dashboard trend tabs: merge business and collection-rate charts into one calm card. */
.dashboard-trend-card .card-body {
  padding: 1.35rem 1.45rem 1.2rem !important;
}

.dashboard-trend-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(7, 91, 136, .08);
}

.dashboard-trend-tabs {
  display: inline-flex;
  flex: 0 0 auto;
  gap: .42rem;
  padding: .25rem;
  border: 1px solid rgba(7, 91, 136, .10);
  border-radius: 999px;
  background: #f4f9fc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .86);
}

.dashboard-trend-tabs .nav-link {
  min-height: 38px;
  padding: .5rem .95rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #496879;
  -webkit-text-fill-color: #496879;
  font-size: .92rem;
  font-weight: 800;
  line-height: 1;
  transition: color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.dashboard-trend-tabs .nav-link:hover,
.dashboard-trend-tabs .nav-link:focus {
  background: rgba(17, 148, 195, .08);
  color: #075b88;
  -webkit-text-fill-color: #075b88;
}

.dashboard-trend-tabs .nav-link.active {
  background: linear-gradient(135deg, #075b88 0%, #1194c3 100%);
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: 0 10px 22px rgba(7, 91, 136, .18);
}

.dashboard-chart-caption {
  margin-bottom: .35rem;
  color: #6b8292;
  font-size: .88rem;
}

.dashboard-trend-chart {
  width: 100%;
  height: 340px;
}

@media (max-width: 767.98px) {
  .dashboard-trend-card .card-body {
    padding: 1.05rem !important;
  }

  .dashboard-trend-head {
    flex-direction: column;
    gap: .85rem;
  }

  .dashboard-trend-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .dashboard-trend-tabs .nav-link {
    width: 100%;
    min-height: 42px;
  }

  .dashboard-trend-chart {
    height: 300px;
  }
}
/* ==========================================================================
   Receipt allocation manual form polish
   适用：到账管理 · 新增分配页 · 手动分配区
   目标：突出“本次分配金额”，让结算单、收入口径、备注形成更清晰的录入节奏。
   ========================================================================== */

.receipt-manual-panel,
.allocation-manual-panel,
.manual-allocation-panel,
.receipt-allocation-manual {
  margin-top: 1.25rem;
}

.receipt-manual-head,
.allocation-manual-head,
.manual-allocation-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.receipt-manual-title,
.allocation-manual-title,
.manual-allocation-title {
  margin: 0;
  color: var(--hz-text-strong, #0f344d);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.receipt-manual-subtitle,
.allocation-manual-subtitle,
.manual-allocation-subtitle {
  margin: 0.35rem 0 0;
  color: var(--hz-text-muted, #6b8292);
  line-height: 1.58;
}

.receipt-manual-summary,
.allocation-manual-summary,
.manual-allocation-summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  min-height: 2.25rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(17, 148, 195, 0.18);
  border-radius: 999px;
  background: linear-gradient(180deg, #f4fbff, #edf8fc);
  color: var(--hz-primary-dark, #075b88);
  font-weight: 700;
  white-space: nowrap;
}

.receipt-manual-tip,
.allocation-manual-tip,
.manual-allocation-tip {
  margin: 0.75rem 0 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(17, 148, 195, 0.14);
  border-radius: 1rem;
  background: linear-gradient(180deg, #fafdff, #f4f9fc);
  color: var(--hz-text-muted, #6b8292);
  line-height: 1.6;
}

.receipt-manual-grid,
.allocation-manual-grid,
.manual-allocation-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.75fr) minmax(260px, 0.9fr);
  gap: 1rem;
  align-items: stretch;
}

.receipt-manual-field,
.allocation-manual-field,
.manual-allocation-field {
  padding: 1rem;
  border: 1px solid rgba(7, 91, 136, 0.12);
  border-radius: 1.1rem;
  background: linear-gradient(180deg, #fff, #fafdff);
  box-shadow: 0 10px 26px rgba(7, 91, 136, 0.04);
}

.receipt-manual-field label,
.receipt-manual-field .form-label,
.allocation-manual-field label,
.allocation-manual-field .form-label,
.manual-allocation-field label,
.manual-allocation-field .form-label {
  margin-bottom: 0.45rem;
  color: var(--hz-text-strong, #0f344d);
  font-weight: 700;
}

.receipt-manual-field .form-control,
.receipt-manual-field .form-select,
.allocation-manual-field .form-control,
.allocation-manual-field .form-select,
.manual-allocation-field .form-control,
.manual-allocation-field .form-select {
  min-height: 48px;
}

.receipt-manual-field.is-primary,
.allocation-manual-field.is-primary,
.manual-allocation-field.is-primary,
.receipt-manual-amount,
.allocation-manual-amount,
.manual-allocation-amount {
  border-color: rgba(17, 148, 195, 0.28);
  background: linear-gradient(135deg, #f4fbff, #fff);
  box-shadow: 0 14px 34px rgba(7, 91, 136, 0.08);
}

.receipt-manual-field.is-primary .form-control,
.allocation-manual-field.is-primary .form-control,
.manual-allocation-field.is-primary .form-control,
.receipt-manual-amount .form-control,
.allocation-manual-amount .form-control,
.manual-allocation-amount .form-control {
  min-height: 54px;
  color: var(--hz-primary-dark, #075b88);
  font-size: 1.18rem;
  font-weight: 800;
}

.receipt-manual-note,
.allocation-manual-note,
.manual-allocation-note {
  grid-column: 1 / -1;
}

.receipt-manual-actions,
.allocation-manual-actions,
.manual-allocation-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.receipt-allocation-card,
.allocation-suggestion-card {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.receipt-allocation-card:hover,
.allocation-suggestion-card:hover {
  border-color: rgba(17, 148, 195, 0.26);
  box-shadow: 0 18px 40px rgba(7, 91, 136, 0.09);
  transform: translateY(-1px);
}

@media (max-width: 991.98px) {
  .receipt-manual-head,
  .allocation-manual-head,
  .manual-allocation-head {
    flex-direction: column;
  }

  .receipt-manual-grid,
  .allocation-manual-grid,
  .manual-allocation-grid {
    grid-template-columns: 1fr;
  }

  .receipt-manual-actions,
  .allocation-manual-actions,
  .manual-allocation-actions {
    flex-direction: column;
  }

  .receipt-manual-actions .btn,
  .allocation-manual-actions .btn,
  .manual-allocation-actions .btn {
    width: 100%;
    min-height: 44px;
  }
}
/* ==========================================================================
   Receipt allocation existing-template bridge
   适用：到账管理 · 新增分配页 · 手动分配表单
   说明：兼容现有模板 class，不改业务逻辑，只统一表单质感、金额输入和按钮反馈。
   ========================================================================== */
.manual-allocation-form,
.receipt-allocation-form,
.allocation-form,
form[action*="allocate"],
form[action*="allocation"] {
  --allocation-primary: #075b88;
  --allocation-primary-2: #1194c3;
  --allocation-text: #0f344d;
  --allocation-muted: #6b8292;
  --allocation-border: rgba(17, 148, 195, 0.18);
  --allocation-soft: #f4f9fc;
}

.manual-allocation-form .form-label,
.receipt-allocation-form .form-label,
.allocation-form .form-label,
form[action*="allocate"] .form-label,
form[action*="allocation"] .form-label {
  margin-bottom: 0.45rem;
  color: var(--allocation-text);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.manual-allocation-form .form-control,
.manual-allocation-form .form-select,
.receipt-allocation-form .form-control,
.receipt-allocation-form .form-select,
.allocation-form .form-control,
.allocation-form .form-select,
form[action*="allocate"] .form-control,
form[action*="allocate"] .form-select,
form[action*="allocation"] .form-control,
form[action*="allocation"] .form-select {
  min-height: 3rem;
  border-color: var(--allocation-border);
  border-radius: 1rem;
  color: var(--allocation-text);
  background-color: #fff;
  box-shadow: 0 0.5rem 1.4rem rgba(7, 91, 136, 0.04);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.manual-allocation-form .form-control:focus,
.manual-allocation-form .form-select:focus,
.receipt-allocation-form .form-control:focus,
.receipt-allocation-form .form-select:focus,
.allocation-form .form-control:focus,
.allocation-form .form-select:focus,
form[action*="allocate"] .form-control:focus,
form[action*="allocate"] .form-select:focus,
form[action*="allocation"] .form-control:focus,
form[action*="allocation"] .form-select:focus {
  border-color: rgba(17, 148, 195, 0.55);
  background-color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(17, 148, 195, 0.12), 0 0.75rem 1.8rem rgba(7, 91, 136, 0.06);
}

.manual-allocation-form .form-text,
.receipt-allocation-form .form-text,
.allocation-form .form-text,
form[action*="allocate"] .form-text,
form[action*="allocation"] .form-text {
  margin-top: 0.45rem;
  color: var(--allocation-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.manual-allocation-form textarea.form-control,
.receipt-allocation-form textarea.form-control,
.allocation-form textarea.form-control,
form[action*="allocate"] textarea.form-control,
form[action*="allocation"] textarea.form-control {
  min-height: 5.25rem;
  resize: vertical;
}

.manual-allocation-form input[name*="amount"],
.receipt-allocation-form input[name*="amount"],
.allocation-form input[name*="amount"],
form[action*="allocate"] input[name*="amount"],
form[action*="allocation"] input[name*="amount"] {
  min-height: 3.35rem;
  color: var(--allocation-primary);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #ffffff 0%, #f4fbff 100%);
  border-color: rgba(17, 148, 195, 0.38);
}

.manual-allocation-form input[name*="amount"]:focus,
.receipt-allocation-form input[name*="amount"]:focus,
.allocation-form input[name*="amount"]:focus,
form[action*="allocate"] input[name*="amount"]:focus,
form[action*="allocation"] input[name*="amount"]:focus {
  border-color: var(--allocation-primary-2);
  box-shadow: 0 0 0 0.22rem rgba(17, 148, 195, 0.14), 0 1rem 2.2rem rgba(7, 91, 136, 0.1);
}

.manual-allocation-form .btn-primary,
.receipt-allocation-form .btn-primary,
.allocation-form .btn-primary,
form[action*="allocate"] .btn-primary,
form[action*="allocation"] .btn-primary {
  min-height: 2.75rem;
  padding-inline: 1.35rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #075b88 0%, #1194c3 100%);
  box-shadow: 0 0.75rem 1.7rem rgba(7, 91, 136, 0.18);
}

.manual-allocation-form .btn-primary:hover,
.receipt-allocation-form .btn-primary:hover,
.allocation-form .btn-primary:hover,
form[action*="allocate"] .btn-primary:hover,
form[action*="allocation"] .btn-primary:hover {
  color: #fff;
  background: linear-gradient(135deg, #064d73 0%, #0f87b2 100%);
  transform: translateY(-1px);
  box-shadow: 0 1rem 2rem rgba(7, 91, 136, 0.22);
}

.manual-allocation-form .btn-outline-primary,
.receipt-allocation-form .btn-outline-primary,
.allocation-form .btn-outline-primary,
form[action*="allocate"] .btn-outline-primary,
form[action*="allocation"] .btn-outline-primary {
  min-height: 2.75rem;
  border-color: rgba(7, 91, 136, 0.18);
  border-radius: 999px;
  color: var(--allocation-primary);
  font-weight: 700;
  background: #fff;
}

.manual-allocation-form .btn-outline-primary:hover,
.receipt-allocation-form .btn-outline-primary:hover,
.allocation-form .btn-outline-primary:hover,
form[action*="allocate"] .btn-outline-primary:hover,
form[action*="allocation"] .btn-outline-primary:hover {
  color: #fff;
  border-color: var(--allocation-primary);
  background: var(--allocation-primary);
}

.manual-allocation-form .input-group .form-control,
.receipt-allocation-form .input-group .form-control,
.allocation-form .input-group .form-control,
form[action*="allocate"] .input-group .form-control,
form[action*="allocation"] .input-group .form-control {
  box-shadow: none;
}

.manual-allocation-form .input-group-text,
.receipt-allocation-form .input-group-text,
.allocation-form .input-group-text,
form[action*="allocate"] .input-group-text,
form[action*="allocation"] .input-group-text {
  border-color: var(--allocation-border);
  color: var(--allocation-muted);
  background: var(--allocation-soft);
  border-radius: 1rem;
}

@media (max-width: 767.98px) {
  .manual-allocation-form .btn,
  .receipt-allocation-form .btn,
  .allocation-form .btn,
  form[action*="allocate"] .btn,
  form[action*="allocation"] .btn {
    width: 100%;
    min-height: 2.9rem;
  }

  .manual-allocation-form .form-control,
  .manual-allocation-form .form-select,
  .receipt-allocation-form .form-control,
  .receipt-allocation-form .form-select,
  .allocation-form .form-control,
  .allocation-form .form-select,
  form[action*="allocate"] .form-control,
  form[action*="allocate"] .form-select,
  form[action*="allocation"] .form-control,
  form[action*="allocation"] .form-select {
    min-height: 2.9rem;
    border-radius: 0.9rem;
  }
}
