/* Holiday Payments M3 polish layer
 * Readable source overrides for customer/admin experience.
 * app.css remains the legacy baseline until the stylesheet is fully modularized.
 */

:root {
  --content-gap: 20px;
  --panel-radius: 16px;
  --shadow-soft: 0 10px 28px rgba(17, 24, 39, .065);
  --shadow-hover: 0 14px 32px rgba(17, 24, 39, .10);
}

body {
  background: #f4f5f7;
}

.main-content {
  padding-bottom: 10px;
}

.panel,
.kpi-card,
.side-nav,
.help-card {
  border-color: #e8e9ed;
  border-radius: var(--panel-radius);
  box-shadow: var(--shadow-soft);
}

.page-heading {
  min-height: 74px;
  margin: 4px 2px 18px;
}

.page-heading h1 {
  font-size: 36px;
  letter-spacing: -.01em;
}

.page-heading p {
  max-width: 760px;
}

.panel-heading {
  padding: 20px 22px;
}

.panel-heading h2 {
  font-size: 23px;
}

.kpi-grid {
  gap: 16px;
  margin-bottom: 18px;
}

.kpi-card {
  min-height: 112px;
  padding: 18px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: #dedfe4;
  box-shadow: var(--shadow-hover);
}

.kpi-card strong {
  font-size: 29px;
}

.data-table th {
  letter-spacing: .015em;
}

.data-table td {
  padding-top: 15px;
  padding-bottom: 15px;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.invoice-table .primary-button {
  min-width: 112px;
}

.invoice-table td:last-child {
  padding-right: 18px;
}

.status {
  border-radius: 999px;
  padding: 6px 10px;
}

.breadcrumb-trail {
  margin-bottom: 16px;
}

.invoice-detail-grid {
  gap: 20px;
}


.invoice-detail-grid-paid {
  grid-template-columns: minmax(0, 1fr);
}

.invoice-document {
  overflow: visible;
}

.invoice-title-row {
  gap: 20px;
  padding: 26px;
}

.invoice-title-row h1 {
  font-size: 38px;
}

.invoice-title-row p {
  font-size: 15px;
}

.meta-dot {
  margin: 0 5px;
  color: #b1b5bd;
}

.invoice-title-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.invoice-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.invoice-meta {
  margin: 0 26px 22px;
  background: #fbfbfc;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.invoice-meta-balance {
  color: var(--holiday-burgundy);
  font: 600 18px var(--font-heading);
}

.invoice-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin: 0 26px 12px;
}

.invoice-section-heading h2 {
  margin: 2px 0 0;
  font: 600 21px/1.2 var(--font-heading);
  color: #16213b;
}

.invoice-section-heading > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.invoice-document .table-wrap {
  margin: 0 26px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.line-items thead {
  background: #f7f0f2;
  color: #4b2830;
}

.line-items th {
  color: #5f2734;
}

.line-item-type {
  font-size: 14px;
}

.line-item-details {
  gap: 6px;
}

.line-item-extra {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 6px;
  color: #667085;
  background: #f6f7f9;
  border: 1px solid #eaecf0;
  border-radius: 999px;
  padding: 4px 8px;
}

.line-item-extra i {
  color: var(--holiday-burgundy);
}

.invoice-totals {
  max-width: 360px;
  margin: 22px 26px 0 auto;
  padding: 14px 18px;
  background: #fbfbfc;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.invoice-totals .grand-total {
  margin-top: 8px;
}

.payment-card {
  border-top: 4px solid var(--holiday-burgundy);
  overflow: visible;
}

.payment-card .panel-heading {
  padding-top: 18px;
}

.payment-lock {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f7ecef;
}

.balance-callout {
  margin: 18px;
  padding: 20px;
  background: linear-gradient(145deg, #fbf4f6, #fff);
}

.balance-callout strong {
  font-size: 38px;
}

.balance-callout small {
  margin-top: 3px;
  color: var(--muted);
}

.choice-group {
  padding: 18px;
}

.radio-choice {
  display: grid !important;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 10px;
  padding: 10px;
  margin: 4px -10px !important;
  border-radius: 10px;
}

.radio-choice:hover {
  background: #fff8f9;
}

.radio-choice input {
  margin-top: 3px;
  accent-color: var(--holiday-burgundy);
}

.radio-choice > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.radio-choice small {
  color: var(--muted);
  font-weight: 400;
}

.full-date {
  width: 100%;
  margin-top: 8px;
}

.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

.method-grid {
  gap: 16px;
  padding: 22px;
}

.method-card {
  position: relative;
  min-height: 148px;
  border-radius: 14px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.method-card:hover {
  transform: translateY(-2px);
  border-color: #d9c4c8;
  box-shadow: var(--shadow-hover);
}

.method-card.is-default {
  border-color: #d6aeb7;
  box-shadow: inset 0 3px 0 var(--holiday-burgundy), var(--shadow-soft);
}

.method-card-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.method-card-copy strong {
  font-size: 16px;
}

.method-actions {
  justify-content: flex-end;
}

.text-action:disabled {
  color: var(--muted);
  cursor: default;
  opacity: .65;
}

.wallet-security-note {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 22px 22px;
  padding: 14px 16px;
  border: 1px solid #dcebe1;
  background: #f5fbf7;
  border-radius: 12px;
  color: #245d36;
}

.wallet-security-note > i {
  font-size: 22px;
}

.wallet-security-note > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wallet-security-note span {
  color: #52715c;
  font-size: 12px;
}

.history-table {
  min-width: 820px;
}

.admin-payments-table {
  min-width: 980px;
}

.customer-name {
  color: #172033;
  font-size: 14px;
}

.admin-grid {
  gap: 18px;
}

.admin-primary,
.admin-rail {
  gap: 18px;
}

.compact-panel .panel-heading h3 small {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 1180px) {
  .customer-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .invoice-title-row {
    flex-direction: column;
  }

  .invoice-title-actions {
    align-items: flex-start;
  }

  .invoice-action-buttons {
    justify-content: flex-start;
  }

  .invoice-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .customer-kpis,
  .admin-kpis {
    grid-template-columns: 1fr;
  }

  .invoice-meta {
    grid-template-columns: 1fr;
  }

  .invoice-meta > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .invoice-meta > div:last-child {
    border-bottom: 0;
  }

  .invoice-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .method-grid {
    grid-template-columns: 1fr;
  }
}
.breadcrumb-trail {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
}

.breadcrumb-trail a,
.breadcrumb-trail span {
  display: inline-flex;
  align-items: center;
}

.breadcrumb-link-with-icon {
  gap: 7px;
}

.breadcrumb-separator {
  color: #a8adb6;
  font-size: 11px;
}
.table-summary {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 28px;
  padding: 18px 20px;
}

.table-summary-count {
  justify-self: start;
}

.table-summary-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  white-space: nowrap;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
}

.pagination[hidden] {
  display: none;
}

/* M4 customer receipts and profile */
.receipts-table {
  min-width: 900px;
}

.receipt-reference,
.payment-reference {
  color: var(--holiday-burgundy);
  font-weight: 900;
}

.receipt-page-heading {
  align-items: center;
}

.receipt-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.receipt-document {
  max-width: 920px;
  margin: 0 auto;
  padding: 30px;
  overflow: visible;
}

.receipt-brand-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.receipt-brand-row h2 {
  margin: 4px 0 5px;
  font: 600 30px/1.2 var(--font-heading);
  color: #172033;
}

.receipt-brand-row p {
  margin: 0;
  color: var(--muted);
}

.receipt-branding {
  display: flex;
  align-items: center;
  gap: 20px;
}

.receipt-logo {
  width: 220px;
  max-height: 74px;
  object-fit: contain;
  object-position: left center;
}

.receipt-company-name {
  display: block;
  margin-bottom: 3px;
  color: var(--holiday-burgundy);
  font: 600 20px/1.2 var(--font-heading);
}

.receipt-amount-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 28px 0;
  padding: 28px;
  border: 1px solid #edd9de;
  border-radius: 16px;
  background: linear-gradient(145deg, #fbf4f6, #fff);
}

.receipt-amount-block > span {
  color: var(--muted);
  font-weight: 800;
}

.receipt-amount-block strong {
  margin: 4px 0;
  font: 600 44px/1.1 var(--font-heading);
  color: var(--holiday-burgundy);
}

.receipt-amount-block small {
  color: var(--muted);
}

.receipt-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.receipt-details > div {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.receipt-details > div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.receipt-details > div:nth-last-child(-n+2) {
  border-bottom: 0;
}

.receipt-details dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.receipt-details dd {
  margin: 0;
  font-weight: 800;
}

.receipt-refund-note,
.receipt-footer-note,
.managed-note {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 12px;
}

.receipt-refund-note {
  border: 1px solid #f0d5d9;
  background: #fff5f6;
  color: #8f2436;
}

.receipt-footer-note {
  border: 1px solid #dcebe1;
  background: #f5fbf7;
  color: #245d36;
}

.receipt-refund-note > div,
.managed-note > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.receipt-refund-note span,
.managed-note span {
  color: var(--muted);
}

.status.refunded {
  background: #f5e9ec;
  color: #8f2436;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 18px;
}

.profile-card {
  overflow: visible;
}

.profile-notifications-card {
  grid-column: 1 / -1;
}

.profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 22px;
}

.profile-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfbfc;
}

.profile-field-wide {
  grid-column: 1 / -1;
}

.profile-field span,
.profile-field small {
  color: var(--muted);
}

.profile-field > span {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.profile-field strong {
  font-size: 15px;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 22px 22px;
}

.access-list {
  display: flex;
  flex-direction: column;
  padding: 10px 22px 0;
}

.access-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.access-row:last-child {
  border-bottom: 0;
}

.access-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #f7ecef;
  color: var(--holiday-burgundy);
  font-size: 18px;
}

.access-row > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.access-row span {
  color: var(--muted);
  font-size: 12px;
}

.managed-note {
  margin: 10px 22px 22px;
  border: 1px solid #e4e7ec;
  background: #f8f9fb;
  color: #475467;
}

.notification-list {
  padding: 8px 22px;
}

.notification-list label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.notification-list label:last-child {
  border-bottom: 0;
}

.notification-list label > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.notification-list label span {
  color: var(--muted);
  font-size: 12px;
}

.notification-list input {
  width: 18px;
  height: 18px;
  accent-color: var(--holiday-burgundy);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 16px;
  border-radius: 10px;
  background: #172033;
  color: white;
  box-shadow: 0 12px 30px rgba(17,24,39,.2);
}

.toast[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-notifications-card {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .receipt-page-actions {
    width: 100%;
  }

  .receipt-page-actions .secondary-button {
    flex: 1 1 auto;
  }

  .receipt-document {
    padding: 20px;
  }

  .receipt-brand-row {
    flex-direction: column;
  }

  .receipt-details,
  .profile-fields {
    grid-template-columns: 1fr;
  }

  .receipt-details > div,
  .receipt-details > div:nth-child(odd),
  .receipt-details > div:nth-last-child(-n+2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .receipt-details > div:last-child {
    border-bottom: 0;
  }

  .profile-field-wide {
    grid-column: auto;
  }
}

@media print {
  .receipt-detail-page .app-header,
  .receipt-detail-page .sidebar,
  .receipt-detail-page .breadcrumb,
  .receipt-detail-page .page-heading,
  .receipt-detail-page .app-footer,
  .receipt-detail-page .toast {
    display: none !important;
  }

  .receipt-detail-page,
  .receipt-detail-page .site-frame,
  .receipt-detail-page .app-shell,
  .receipt-detail-page .main-content {
    display: block;
    margin: 0;
    padding: 0;
    background: white;
  }

  .receipt-detail-page .receipt-document {
    max-width: none;
    border: 0;
    box-shadow: none;
    margin: 0;
  }
}
