.parties-preview-shell {
  display: grid;
  gap: 18px;
  width: 100%;
  max-width: none;
  min-width: 0;
}

.parties-preview-shell > article,
.parties-preview-shell > section,
.parties-preview-shell > div,
.parties-preview-kpis,
.parties-preview-head,
.parties-preview-banner,
.parties-preview-table-card,
.parties-preview-filter-bar,
.parties-preview-table,
.parties-preview-table-card .table-wrap {
  width: 100%;
  max-width: none;
  min-width: 0;
  justify-self: stretch;
  align-self: stretch;
}

.parties-preview-head {
  align-items: flex-start;
}

.parties-preview-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.parties-preview-title-row h2 {
  margin: 0;
}

.parties-preview-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  padding: 6px 10px;
  background: #e8f7ed;
  color: #2f8f5b;
  font-size: 0.85rem;
  font-weight: 700;
}

.parties-preview-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #d4e4ff;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f8ff 100%);
}

.parties-preview-banner-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1d67d8;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}

.parties-preview-banner-copy {
  color: #304766;
  font-weight: 500;
}

.parties-preview-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.parties-preview-kpi-card {
  border: 1px solid #e6edf7;
  box-shadow: 0 14px 34px rgba(17, 40, 82, 0.06);
}

.parties-preview-kpi-card .members-summary-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #edf4ff;
  color: #2062d4;
}

.parties-preview-kpi-card.tone-green .members-summary-icon {
  background: #ebf9ef;
  color: #2f8f5b;
}

.parties-preview-kpi-card.tone-red .members-summary-icon {
  background: #fff2ef;
  color: #d4553a;
}

.parties-preview-filter-bar {
  display: grid;
  grid-template-columns: minmax(320px, 1.8fr) repeat(4, minmax(150px, 1fr)) minmax(110px, 0.55fr);
  gap: 16px;
  width: 100%;
  align-items: end;
}

.parties-preview-filter-bar > * {
  min-width: 0;
}

.parties-preview-filter-bar label,
.parties-preview-filter-bar .members-filter-search {
  width: 100%;
}

.parties-preview-filter-bar input,
.parties-preview-filter-bar select,
.parties-preview-filter-bar button {
  width: 100%;
}

.parties-preview-table-card {
  border: 1px solid #e6edf7;
  box-shadow: 0 18px 44px rgba(17, 40, 82, 0.06);
  width: 100%;
  overflow: hidden;
}

.parties-preview-table-card .table-wrap {
  width: 100%;
}

.parties-preview-table thead th,
.parties-preview-table th {
  background: #f7faff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: normal;
  vertical-align: middle;
}

.parties-preview-table thead th .parties-preview-sort-btn,
.parties-preview-table thead th button.parties-preview-sort-btn,
.parties-preview-table th .parties-preview-sort-btn,
.parties-preview-table th button.parties-preview-sort-btn {
  appearance: none;
  width: auto;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-transform: none;
  padding: 0;
  margin: 0;
  min-width: 0;
  cursor: pointer;
  vertical-align: middle;
  color: var(--navy) !important;
  opacity: 1;
}

.parties-preview-table thead th .parties-preview-sort-btn > span:first-child,
.parties-preview-table thead th button.parties-preview-sort-btn > span:first-child,
.parties-preview-table th .parties-preview-sort-btn > span:first-child,
.parties-preview-table th button.parties-preview-sort-btn > span:first-child {
  color: var(--navy) !important;
  font-family: inherit;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  letter-spacing: normal !important;
  opacity: 1 !important;
}

.parties-preview-table thead th .parties-preview-sort-btn.is-active,
.parties-preview-table thead th button.parties-preview-sort-btn.is-active,
.parties-preview-table thead th .parties-preview-sort-btn:hover,
.parties-preview-table thead th button.parties-preview-sort-btn:hover,
.parties-preview-table thead th .parties-preview-sort-btn:focus-visible,
.parties-preview-table thead th button.parties-preview-sort-btn:focus-visible,
.parties-preview-table thead th .parties-preview-sort-btn:active,
.parties-preview-table thead th button.parties-preview-sort-btn:active,
.parties-preview-table th .parties-preview-sort-btn.is-active,
.parties-preview-table th button.parties-preview-sort-btn.is-active,
.parties-preview-table th .parties-preview-sort-btn:hover,
.parties-preview-table th button.parties-preview-sort-btn:hover,
.parties-preview-table th .parties-preview-sort-btn:focus-visible,
.parties-preview-table th button.parties-preview-sort-btn:focus-visible,
.parties-preview-table th .parties-preview-sort-btn:active,
.parties-preview-table th button.parties-preview-sort-btn:active {
  color: var(--navy) !important;
}

.parties-preview-table th .parties-preview-sort-indicator {
  flex: 0 0 12px;
  min-width: 12px;
  color: #7c8faa;
  transition: color 0.15s ease;
  text-align: center;
}

.parties-preview-table th .parties-preview-sort-btn:hover .parties-preview-sort-indicator,
.parties-preview-table th .parties-preview-sort-btn:focus-visible .parties-preview-sort-indicator,
.parties-preview-table th .parties-preview-sort-btn.is-active .parties-preview-sort-indicator {
  color: #1e4fa8;
}

.parties-preview-table th .parties-preview-sort-btn:focus-visible {
  outline: 2px solid #2a68d7;
  outline-offset: 2px;
  border-radius: 8px;
}

.parties-preview-table {
  width: 100%;
  min-width: 100%;
}

.parties-preview-table th,
.parties-preview-table td {
  padding: 9px 10px;
  font-size: 12.5px;
  white-space: normal;
  vertical-align: top;
}

.parties-preview-table th:nth-child(1),
.parties-preview-table td:nth-child(1) {
  width: 22%;
}

.parties-preview-table th:nth-child(2),
.parties-preview-table td:nth-child(2) {
  width: 10%;
}

.parties-preview-table th:nth-child(3),
.parties-preview-table td:nth-child(3) {
  width: 11%;
}

.parties-preview-table th:nth-child(4),
.parties-preview-table td:nth-child(4) {
  width: 15%;
}

.parties-preview-table th:nth-child(5),
.parties-preview-table td:nth-child(5) {
  width: 12%;
}

.parties-preview-table th:nth-child(6),
.parties-preview-table td:nth-child(6),
.parties-preview-table th:nth-child(7),
.parties-preview-table td:nth-child(7),
.parties-preview-table th:nth-child(8),
.parties-preview-table td:nth-child(8),
.parties-preview-table th:nth-child(9),
.parties-preview-table td:nth-child(9) {
  white-space: nowrap;
}

.parties-preview-table th:nth-child(9),
.parties-preview-table td:nth-child(9) {
  width: 48px;
  text-align: center;
}

.parties-preview-table tbody tr:hover {
  background: #fbfdff;
}

.parties-preview-party-cell {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.parties-preview-party-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1e4fa8;
  background: #edf4ff;
  border: 1px solid #d8e5fb;
  flex-shrink: 0;
  margin-top: 1px;
}

.parties-preview-party-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.parties-preview-primary-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.parties-preview-primary-cell strong {
  color: #183153;
  line-height: 1.25;
}

.parties-preview-primary-cell small,
.parties-preview-status-stack small,
.parties-preview-inline-note {
  color: #6d7f99;
}

.parties-preview-primary-cell small {
  line-height: 1.2;
}

.parties-preview-type-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  padding: 5px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.tone-supplier {
  background: #eef5ff;
  color: #2a68d7;
  border-color: #d9e7ff;
}

.tone-contractor {
  background: #f1ecff;
  color: #7a53d6;
  border-color: #e2d8ff;
}

.tone-labour {
  background: #fff1e8;
  color: #db7a2b;
  border-color: #ffd9bf;
}

.tone-professional {
  background: #ebf8fb;
  color: #1d7d98;
  border-color: #cdeef5;
}

.tone-service-provider {
  background: #eef5ff;
  color: #2a68d7;
  border-color: #d9e7ff;
}

.tone-transporter {
  background: #fff6e7;
  color: #c27a11;
  border-color: #ffe0a9;
}

.tone-other {
  background: #fff4f1;
  color: #c65d42;
  border-color: #ffd7cb;
}

.parties-preview-status-stack {
  display: flex;
  align-items: flex-start;
}

.parties-preview-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.parties-preview-detail-card,
.parties-preview-workflow-card {
  padding: 14px 16px;
}

.parties-preview-detail-card h4,
.parties-preview-workflow-card h4 {
  margin: 0;
  color: #183153;
}

.parties-preview-detail-rows {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.parties-preview-detail-row {
  display: flex;
  align-items: start;
  gap: 12px;
  min-width: 0;
}

.parties-preview-detail-label {
  flex: 0 0 110px;
  color: #66788f;
  font-size: 12px;
  line-height: 1.4;
}

.parties-preview-detail-value {
  flex: 1 1 auto;
  min-width: 0;
  color: #122743;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 700;
  word-break: break-word;
}

.parties-preview-detail-value.is-nowrap {
  white-space: nowrap;
  word-break: normal;
}

.parties-preview-detail-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.parties-preview-detail-section-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.parties-preview-detail-section-icon svg {
  width: 18px;
  height: 18px;
}

.parties-preview-empty-copy {
  margin: 0;
  color: #61748f;
}

.parties-preview-modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.parties-preview-modal-title-cluster {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.parties-preview-modal-type-icon {
  flex-shrink: 0;
}

.parties-preview-modal-title-copy {
  min-width: 0;
}

.parties-preview-modal-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.parties-preview-modal-title-line h2 {
  margin: 0;
  color: #183153;
}

.parties-preview-modal-title-copy p {
  margin: 4px 0 0;
  color: #61748f;
  line-height: 1.35;
}

.parties-preview-modal-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.parties-preview-header-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.parties-preview-header-action-icon {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.parties-preview-header-action-icon svg {
  width: 16px;
  height: 16px;
}

.parties-preview-modal-body {
  display: grid;
  gap: 12px;
}

.parties-preview-details-body {
  max-height: min(66vh, 700px);
  overflow: auto;
  padding-right: 2px;
  overscroll-behavior: contain;
}

.parties-preview-bank-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "head actions"
    "grid grid";
  gap: 14px 18px;
  align-items: start;
  padding: 14px 18px;
}

.parties-preview-bank-strip-head {
  grid-area: head;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 360px;
}

.parties-preview-bank-strip-head h4 {
  margin: 0;
  color: #183153;
}

.parties-preview-bank-strip-head p {
  margin: 4px 0 0;
  color: #61748f;
  line-height: 1.35;
}

.parties-preview-bank-strip-grid {
  grid-area: grid;
  display: grid;
  grid-template-columns:
    minmax(150px, 1.15fr)
    minmax(150px, 1.15fr)
    minmax(165px, 1.2fr)
    minmax(130px, 1fr)
    minmax(92px, 0.72fr);
  gap: 10px 16px;
  min-width: 0;
  align-items: start;
}

.parties-preview-bank-field {
  min-width: 0;
}

.parties-preview-bank-field span {
  display: block;
  color: #66788f;
  font-size: 12px;
  line-height: 1.35;
}

.parties-preview-bank-field strong {
  display: block;
  margin-top: 4px;
  color: #122743;
  font-size: 13px;
  line-height: 1.4;
  word-break: normal;
  overflow-wrap: break-word;
}

.parties-preview-bank-field.is-account-holder strong,
.parties-preview-bank-field.is-bank-name strong {
  word-break: keep-all;
}

.parties-preview-bank-field.is-account-number strong,
.parties-preview-bank-field.is-ifsc strong,
.parties-preview-bank-field.is-status strong {
  white-space: nowrap;
}

.parties-preview-bank-strip-actions .ghost-btn {
  white-space: nowrap;
}

.parties-preview-bank-strip-actions {
  grid-area: actions;
  display: flex;
  justify-content: flex-end;
  align-self: center;
}

.parties-preview-detail-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.parties-preview-invoice-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.parties-preview-invoice-summary .content-card {
  padding: 12px 14px;
}

.parties-preview-invoice-summary span {
  display: block;
  color: #66788f;
  font-size: 12px;
}

.parties-preview-invoice-summary strong {
  display: block;
  margin-top: 4px;
  color: #183153;
}

.parties-preview-invoice-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(0, 1fr)) auto;
  gap: 10px 12px;
  align-items: end;
}

.parties-preview-invoice-filter-actions {
  display: flex;
  justify-content: flex-end;
}

.parties-preview-invoice-table-wrap {
  width: 100%;
}

.parties-preview-invoice-table {
  width: 100%;
  min-width: 100%;
}

.parties-preview-invoice-table th,
.parties-preview-invoice-table td {
  padding: 9px 10px;
  font-size: 12.5px;
  vertical-align: top;
}

.parties-preview-invoice-actions-cell {
  width: 54px;
  text-align: center;
}

.parties-preview-inline-menu {
  display: inline-flex;
}

.parties-preview-invoice-menu-portal {
  position: fixed;
  inset: 0;
  z-index: 2300;
  pointer-events: none;
}

.parties-preview-invoice-floating-menu {
  position: fixed;
  min-width: 150px;
  border: 1px solid #dce6f4;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(17, 40, 82, 0.16);
  padding: 6px;
  pointer-events: auto;
}

.parties-preview-invoice-floating-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  text-align: left;
  color: #183153;
  border-radius: 10px;
}

.parties-preview-invoice-floating-menu button:hover,
.parties-preview-invoice-floating-menu button:focus-visible {
  background: #f6f9ff;
  outline: none;
}

.parties-preview-invoice-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.parties-preview-detail-footer-actions .link-btn {
  border: 0;
  background: transparent;
  color: #2a68d7;
  padding: 0;
  font-weight: 600;
  cursor: pointer;
}

.parties-preview-detail-footer-actions .link-btn:hover {
  color: #1e4fa8;
}

.parties-preview-editor-body {
  max-height: min(62vh, 640px);
  overflow: auto;
  overscroll-behavior: contain;
}

.parties-preview-editor-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #fff;
}

.parties-preview-editor-section,
.parties-preview-editor-summary {
  display: grid;
  gap: 10px;
}

.parties-preview-editor-section-head h3,
.parties-preview-editor-readonly-card h4 {
  margin: 0;
  color: #183153;
}

.parties-preview-editor-section-head p,
.parties-preview-editor-placeholder p,
.parties-preview-editor-readonly-card li {
  color: #61748f;
}

.parties-preview-editor-section-head p,
.parties-preview-editor-placeholder p {
  margin: 6px 0 0;
}

.parties-preview-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 14px;
}

.parties-preview-bank-grid-create {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.parties-preview-bank-grid-edit {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.parties-preview-bank-info-section {
  gap: 8px;
}

.parties-preview-bank-summary-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #e6edf7;
  border-radius: 18px;
  padding: 12px 14px;
  background: #fbfdff;
}

.parties-preview-bank-summary-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.parties-preview-bank-summary-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.parties-preview-bank-summary-copy span {
  color: #61748f;
  font-size: 12px;
  font-weight: 600;
}

.parties-preview-bank-summary-copy strong {
  color: #183153;
  font-size: 16px;
  line-height: 1.35;
}

.parties-preview-bank-summary-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.parties-preview-bank-replace-section {
  border: 1px solid #e6edf7;
  border-radius: 18px;
  padding: 12px 14px;
  background: #fbfdff;
}

.parties-preview-bank-replace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.parties-preview-bank-replace-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.parties-preview-add-grid {
  align-items: start;
}

.parties-preview-editor-subgrid {
  padding-top: 2px;
}

.parties-preview-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.parties-preview-field > span {
  color: #26415f;
  font-weight: 600;
}

.parties-preview-field-double {
  grid-column: span 2;
}

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

.parties-preview-field input,
.parties-preview-field select,
.parties-preview-field textarea {
  width: 100%;
  min-height: 42px;
}

.parties-preview-field textarea {
  min-height: 92px;
}

.parties-preview-type-select {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.parties-preview-type-select-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.parties-preview-inline-type-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
}

.parties-preview-inline-type-icon svg {
  width: 18px;
  height: 18px;
}

.parties-preview-readonly-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0;
}

.parties-preview-readonly-type-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
}

.parties-preview-type-readonly-wrap {
  align-content: start;
}

.parties-preview-field input.is-invalid,
.parties-preview-field select.is-invalid,
.parties-preview-field textarea.is-invalid {
  border-color: #d4553a;
  box-shadow: 0 0 0 3px rgba(212, 85, 58, 0.12);
}

.parties-preview-field-error {
  color: #c4472d;
  font-size: 0.8rem;
  display: none;
}

.parties-preview-field-note {
  color: #6d7f99;
  font-size: 0.8rem;
  display: none;
}

.parties-preview-field-note[data-tone="warning"] {
  color: #b96d13;
}

.parties-preview-field-note[data-tone="info"] {
  color: #2a68d7;
}

.parties-preview-field-note.is-visible,
.parties-preview-field-error.is-visible {
  display: block;
}

.parties-preview-editor-placeholder,
.parties-preview-editor-readonly-card {
  border: 1px solid #e6edf7;
  border-radius: 18px;
  padding: 12px 14px;
  background: #fbfdff;
}

.parties-preview-editor-placeholder strong {
  color: #183153;
}

.parties-preview-editor-readonly-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.parties-preview-workflow-card p {
  margin: 0 0 12px;
  color: #5c708e;
}

.parties-preview-duplicate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.parties-preview-create-footer {
  gap: 10px;
}

.parties-preview-create-summary {
  color: #29486f;
  font-weight: 700;
}

.parties-preview-create-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.parties-preview-party-form-grid {
  width: 100%;
}

.parties-preview-workflow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.parties-preview-modal-form {
  display: grid;
  gap: 16px;
}

.parties-preview-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.parties-preview-association-box {
  border: 1px solid #e4ebf5;
  border-radius: 18px;
  padding: 16px;
  background: #fafcff;
}

.parties-preview-association-grid {
  margin-top: 12px;
}

@media (max-width: 1100px) {
  .parties-preview-filter-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .parties-preview-editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .parties-preview-bank-strip {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "grid"
      "actions";
  }

  .parties-preview-bank-strip-actions {
    justify-content: flex-start;
  }

  .parties-preview-bank-strip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .parties-preview-bank-summary-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .parties-preview-bank-summary-actions {
    width: 100%;
    justify-content: flex-start;
  }

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

  .parties-preview-invoice-filter-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .parties-preview-detail-grid,
  .parties-preview-form-grid,
  .parties-preview-editor-grid {
    grid-template-columns: 1fr;
  }

  .parties-preview-bank-grid-edit,
  .parties-preview-bank-replace-grid {
    grid-template-columns: 1fr;
  }

  .parties-preview-invoice-summary,
  .parties-preview-invoice-filters {
    grid-template-columns: 1fr;
  }

  .parties-preview-detail-rows {
    gap: 8px;
  }

  .parties-preview-detail-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .parties-preview-detail-label {
    flex: initial;
  }

  .parties-preview-field-double {
    grid-column: auto;
  }

  .parties-preview-bank-strip-grid {
    grid-template-columns: 1fr;
  }

  .parties-preview-create-footer,
  .parties-preview-duplicate-row {
    flex-direction: column;
    align-items: stretch;
  }

  .parties-preview-create-actions {
    margin-left: 0;
    justify-content: flex-end;
  }

  .parties-preview-bank-replace-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .parties-preview-filter-bar {
    grid-template-columns: 1fr;
  }

  .parties-preview-party-cell {
    align-items: flex-start;
  }

  .parties-preview-title-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .parties-preview-modal-header {
    flex-direction: column;
  }

  .parties-preview-modal-header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .parties-preview-detail-footer-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}
