/* Starkwood ONE v2.1.58 — updated Cancellation Accounts report control */
.sw-cancel-header-v2158 {
  position: relative !important;
  min-height: 58px;
  padding-right: 258px !important;
  box-sizing: border-box;
}

.sw-cancel-report-controls-v2158 {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  z-index: 2;
}

.sw-cancel-period-select,
.sw-cancel-generate-button,
.sw-cancel-print-button,
.sw-cancel-close-button {
  box-sizing: border-box;
  min-height: 36px;
  border-radius: 9px;
  font: 600 12px/16px Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.sw-cancel-period-select {
  width: 105px;
  padding: 8px 28px 8px 10px;
  border: 1px solid #d7deea;
  background: #fff;
  color: #334155;
  outline: none;
}
.sw-cancel-period-select:focus { border-color: #8ea7fa; box-shadow: 0 0 0 3px rgba(41,84,229,.08); }

.sw-cancel-generate-button,
.sw-cancel-print-button,
.sw-cancel-close-button {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  cursor: pointer;
  white-space: nowrap;
}

.sw-cancel-generate-button,
.sw-cancel-print-button {
  border: 1px solid #2954e5;
  background: #2954e5;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 7px 16px rgba(41,84,229,.14);
}
.sw-cancel-generate-button:hover,
.sw-cancel-print-button:hover { transform: translateY(-1px); box-shadow: 0 9px 20px rgba(41,84,229,.20); }
.sw-cancel-generate-button:disabled { opacity: .72; cursor: wait; transform: none; }

.sw-cancel-button-spinner {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: swCancelSpin .7s linear infinite;
}
@keyframes swCancelSpin { to { transform: rotate(360deg); } }

.sw-cancel-modal {
  position: fixed;
  inset: 0;
  z-index: 1000300;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(11,23,57,.65);
  overflow: hidden;
  isolation: isolate;
}

.sw-cancel-doc-toolbar {
  width: min(842px, 100vw);
  min-height: 50px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  box-sizing: border-box;
}
.sw-cancel-doc-title {
  min-width: 0;
  color: #fff;
  font: 700 14px/20px Arial, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sw-cancel-doc-title span { margin-left: 7px; color: rgba(255,255,255,.62); font-size: 10px; font-weight: 400; }
.sw-cancel-doc-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.sw-cancel-print-button, .sw-cancel-close-button { min-height: 34px; padding: 7px 11px; }
.sw-cancel-close-button { border: 1px solid rgba(255,255,255,.55); background: #fff; color: #334155; }

.sw-cancel-doc-area {
  width: min(842px, calc(100vw - 24px));
  flex: 1 1 auto;
  overflow: auto;
  background: #cfd5df;
  padding: 22px 16px 46px;
  box-sizing: border-box;
}
.sw-cancel-a4-page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 22mm 20mm 18mm;
  background: #fff;
  color: #17223b;
  box-shadow: 0 3px 14px rgba(15,23,42,.17);
  font-family: Arial, sans-serif;
}
.sw-cancel-report-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.sw-cancel-report-head h2 { margin: 0; color: #0b1739; font: 700 16px/22px Arial, sans-serif; }
.sw-cancel-report-period { margin-top: 2px; color: #94a3b8; font: 400 10px/14px Arial, sans-serif; }
.sw-cancel-report-head time { color: #94a3b8; font: 600 10px/16px Arial, sans-serif; white-space: nowrap; }
.sw-cancel-summary-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.sw-cancel-summary-chip { min-width: 100px; padding: 6px 12px; border-radius: 8px; background: #f7f9fc; }
.sw-cancel-summary-chip div { color: #94a3b8; text-transform: uppercase; letter-spacing: .3px; font: 400 8.5px/12px Arial, sans-serif; }
.sw-cancel-summary-chip strong { display: block; margin-top: 1px; color: #0b1739; font: 700 13px/17px Arial, sans-serif; }
.sw-cancel-report-table { width: 100%; border-collapse: collapse; table-layout: auto; font: 400 9px/13px Arial, sans-serif; }
.sw-cancel-report-table th { padding: 3px 4px; border-bottom: 1.5px solid #1e293b; color: #334155; text-align: left; font-weight: 700; vertical-align: bottom; }
.sw-cancel-report-table td { padding: 3px 4px; border-bottom: 1px solid #f1f5f9; color: #334155; vertical-align: top; overflow-wrap: anywhere; }
.sw-cancel-report-table th:nth-child(1) { width: 14%; }
.sw-cancel-report-table th:nth-child(2) { width: 25%; }
.sw-cancel-report-table th:nth-child(3),
.sw-cancel-report-table th:nth-child(4) { width: 15%; }
.sw-cancel-report-table th:nth-child(5) { width: 31%; }
.sw-cancel-empty-report { padding: 8px 0; color: #cbd2e0; font: 400 11px/16px Arial, sans-serif; }
.sw-cancel-report-footer { margin-top: 12px; padding-top: 6px; border-top: 1px solid #e2e8f0; color: #94a3b8; text-align: center; font: 400 8.5px/12px Arial, sans-serif; }

@media (max-width: 900px) {
  .sw-cancel-header-v2158 { padding-right: 0 !important; padding-bottom: 50px !important; }
  .sw-cancel-report-controls-v2158 { top: auto; bottom: 0; left: 0; right: auto; justify-content: flex-start; }
}

@media (max-width: 520px) {
  .sw-cancel-header-v2158 { padding-bottom: 88px !important; }
  .sw-cancel-report-controls-v2158 { width: 100%; display: grid; grid-template-columns: 1fr; gap: 6px; }
  .sw-cancel-period-select, .sw-cancel-generate-button { width: 100%; }
  .sw-cancel-doc-toolbar { align-items: flex-start; padding-top: 8px; padding-bottom: 8px; }
  .sw-cancel-doc-title span { display: none; }
  .sw-cancel-doc-actions { gap: 5px; }
  .sw-cancel-print-button span { display: none; }
}

@media print {
  body * { visibility: hidden !important; }
  #sw-cancellation-report-modal-v2158,
  #sw-cancellation-report-modal-v2158 * { visibility: visible !important; }
  #sw-cancellation-report-modal-v2158 { position: static !important; inset: auto !important; display: block !important; background: #fff !important; overflow: visible !important; }
  #sw-cancellation-report-modal-v2158 .sw-cancel-doc-toolbar { display: none !important; }
  #sw-cancellation-report-modal-v2158 .sw-cancel-doc-area { width: auto !important; height: auto !important; overflow: visible !important; padding: 0 !important; background: #fff !important; }
  #sw-cancellation-report-modal-v2158 .sw-cancel-a4-page { width: 210mm !important; min-height: 297mm !important; margin: 0 !important; box-shadow: none !important; }
  #sw-cancellation-report-modal-v2158 .sw-cancel-report-table thead { display: table-header-group; }
  #sw-cancellation-report-modal-v2158 .sw-cancel-report-table tr { break-inside: avoid; page-break-inside: avoid; }
  @page { size: A4 portrait; margin: 0; }
}
