/* Elite Recovery V30 — scoped administrator workspace. */

.collection-receipt-picker {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 13px;
  padding: 11px 12px;
  border: 1px dashed #dbcdbf;
  border-radius: 8px;
  background: #fffdf9;
}

.collection-receipt-picker input[type="file"] {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 12px;
}

.collection-receipt-picker small {
  color: #786d68;
  font-size: 11px;
}

.collection-receipt-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.collection-receipt-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.receipt-action {
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid #e6d9d1;
  border-radius: 6px;
  background: #fff;
  color: #64152b;
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.receipt-action:hover {
  border-color: #d4a347;
  background: #fff9ed;
}

.receipt-remove {
  min-width: 26px;
  color: #b63b3b;
  font-size: 14px;
}

.portal-page.admin-workspace .sidebar nav {
  min-height: 0;
  overflow-y: auto;
  padding-inline-end: 3px;
}

.portal-page.admin-workspace .sidebar nav::-webkit-scrollbar {
  width: 4px;
}

.portal-page.admin-workspace .sidebar nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(226, 176, 65, .45);
}

.portal-page.admin-workspace [data-page="client"],
.portal-page.admin-workspace [data-page="operations"],
.portal-page.admin-workspace [data-page="contact"] {
  display: none !important;
}

.portal-page.admin-workspace .topbar {
  gap: 22px;
}

.admin-client-context {
  display: flex;
  flex: 1 1 420px;
  min-width: 220px;
  max-width: 470px;
  flex-direction: column;
  gap: 5px;
}

.admin-client-context > label {
  margin: 0;
  color: #e8d9dc;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
}

.client-context-input {
  display: flex;
  height: 39px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid rgba(222, 181, 91, .68);
  border-radius: 9px;
  background: rgba(255, 255, 255, .08);
}

.client-context-input:focus-within {
  border-color: #edc46a;
  box-shadow: 0 0 0 3px rgba(236, 190, 84, .12);
}

.client-context-input > span {
  color: #edc46a;
  font-size: 16px;
}

.client-context-input input {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font-size: 12px;
}

.client-context-input input::placeholder {
  color: rgba(255, 255, 255, .7);
}

.client-context-input button {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
}

.workspace-view {
  width: 100%;
  margin: 0;
  direction: inherit;
}

.workspace-page-head {
  display: flex;
  min-height: 103px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
  padding: 21px 24px;
  border: 1px solid #e7dcd5;
  border-inline-start: 4px solid #d8a946;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff, #fffcf7);
  box-shadow: 0 8px 22px rgba(58, 19, 26, .04);
}

.workspace-page-head > div:first-child {
  min-width: 0;
}

.workspace-page-head small {
  display: block;
  margin-bottom: 4px;
  color: #9b777c;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.workspace-page-head h2 {
  margin: 0 0 5px;
  color: #531522;
  font-size: 25px;
  font-weight: 850;
  line-height: 1.2;
}

.workspace-page-head p {
  margin: 0;
  color: #7d6b6e;
  font-size: 12px;
  line-height: 1.55;
}

.workspace-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.workspace-primary-btn,
.workspace-secondary-btn,
.workspace-row-btn {
  min-height: 41px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.workspace-primary-btn {
  border: 1px solid #a67623;
  background: linear-gradient(180deg, #edc269, #c99536);
  color: #351406;
  padding: 9px 16px;
}

.workspace-secondary-btn,
.workspace-row-btn {
  border: 1px solid #d8c9c0;
  background: #fff;
  color: #642531;
  padding: 9px 13px;
}

.workspace-row-btn {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 10px;
}

.workspace-delete-btn {
  min-height: 32px;
  border: 1px solid #ecd1cf;
  border-radius: 8px;
  background: #fff8f7;
  color: #a23d3b;
  cursor: pointer;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.workspace-delete-btn:hover {
  border-color: #cf8a84;
  background: #fdeceb;
}

.workspace-delete-btn:disabled {
  cursor: wait;
  opacity: .55;
}

.debtor-delete-modal {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  overflow-y: auto;
  background: rgba(39, 12, 20, .62);
  padding: 24px;
}

.debtor-delete-dialog {
  width: min(620px, 100%);
  border: 1px solid #e8d9ce;
  border-radius: 16px;
  background: #fffdfa;
  box-shadow: 0 24px 76px rgba(37, 12, 20, .27);
  padding: 24px;
}

.debtor-delete-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #ece2db;
  padding-bottom: 17px;
}

.debtor-delete-heading span,
.debtor-delete-identity small,
.debtor-delete-summary small {
  display: block;
  color: #836c69;
  font-size: 11px;
}

.debtor-delete-heading h2 {
  margin: 7px 0 0;
  color: #631d30;
  font-size: 21px;
}

.debtor-delete-identity {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  margin-top: 18px;
}

.debtor-delete-identity strong {
  display: block;
  margin-top: 6px;
  color: #3f2330;
  font-size: 14px;
}

.debtor-delete-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin-top: 19px;
}

.debtor-delete-summary article {
  min-width: 0;
  border: 1px solid #ece3dc;
  border-radius: 9px;
  background: #fcf8f5;
  padding: 11px 9px;
}

.debtor-delete-summary strong,
.debtor-delete-summary em {
  display: block;
  margin-top: 7px;
  color: #692239;
  font-size: 17px;
  font-style: normal;
}

.debtor-delete-summary em {
  margin-top: 2px;
  color: #887976;
  font-size: 9px;
}

.debtor-delete-warning {
  margin: 18px 0;
  border: 1px solid #efceca;
  border-radius: 9px;
  background: #fff2f0;
  color: #953d3a;
  padding: 12px 13px;
  font-size: 12px;
  line-height: 1.7;
}

.debtor-delete-confirm-label {
  display: block;
  color: #672a39;
  font-size: 12px;
  font-weight: 750;
}

.debtor-delete-confirm-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  border: 1px solid #d9cac0;
  border-radius: 8px;
  background: #fff;
  color: #38202a;
  padding: 10px 12px;
  font: inherit;
}

.debtor-delete-confirm-input:focus {
  outline: 2px solid rgba(190, 133, 52, .24);
  border-color: #bd8b43;
}

.debtor-delete-error {
  margin: 12px 0 0;
  color: #a13d39;
  font-size: 11px;
  line-height: 1.65;
  white-space: pre-line;
}

.debtor-delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 19px;
}

.debtor-delete-submit {
  min-height: 41px;
  border: 1px solid #932b36;
  border-radius: 8px;
  background: #a33640;
  color: #fff;
  cursor: pointer;
  padding: 9px 15px;
  font-size: 11px;
  font-weight: 800;
}

.debtor-delete-submit:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.workspace-action-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.workspace-primary-btn:hover,
.workspace-secondary-btn:hover,
.workspace-row-btn:hover {
  filter: brightness(.97);
}

.workspace-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 17px;
}

.overview-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.workspace-summary-grid article {
  position: relative;
  min-height: 106px;
  padding: 17px 16px;
  border: 1px solid #eadfd8;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 7px 17px rgba(58, 19, 26, .035);
}

.workspace-summary-grid article > small {
  display: block;
  min-height: 15px;
  margin-bottom: 10px;
  color: #766367;
  font-size: 10px;
  font-weight: 700;
}

.workspace-summary-grid article > strong {
  display: block;
  overflow: hidden;
  color: #5b1c28;
  font-size: clamp(18px, 1.45vw, 25px);
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-summary-grid article > em {
  display: block;
  margin-top: 5px;
  color: #927c80;
  font-size: 9px;
  font-style: normal;
}

.workspace-summary-grid article > span {
  position: absolute;
  top: 14px;
  inset-inline-end: 15px;
  color: #c49738;
  font-size: 17px;
}

.followup-summary-grid .metric-today {
  border-top: 3px solid #dfac4c;
}

.followup-summary-grid .metric-overdue {
  border-top: 3px solid #d86c68;
}

.followup-summary-grid .metric-promise {
  border-top: 3px solid #75a979;
}

.followup-summary-grid .metric-forecast {
  border-top: 3px solid #778db4;
}

.workspace-card {
  margin-bottom: 17px;
  padding: 19px;
  border: 1px solid #e8ddd6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(58, 19, 26, .04);
}

.workspace-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 15px;
  padding-bottom: 13px;
  border-bottom: 1px solid #eee5df;
}

.workspace-card-head h3 {
  margin: 0 0 4px;
  color: #57202a;
  font-size: 17px;
  font-weight: 800;
}

.workspace-card-head p {
  margin: 0;
  color: #887579;
  font-size: 10px;
  line-height: 1.5;
}

.workspace-search,
.followup-toolbar select {
  width: min(100%, 320px);
  min-width: 0;
  height: 41px;
  border: 1px solid #dccfc7;
  border-radius: 8px;
  outline: 0;
  background: #fff;
  color: #45232a;
  padding: 0 11px;
  font-size: 11px;
}

.workspace-search:focus,
.followup-toolbar select:focus {
  border-color: #bc913e;
  box-shadow: 0 0 0 3px rgba(190, 147, 65, .1);
}

.workspace-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.workspace-table th,
.workspace-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #eee6e0;
  text-align: start;
  vertical-align: middle;
  white-space: nowrap;
}

.workspace-table th {
  background: #fbf8f5;
  color: #765b61;
  font-size: 10px;
  font-weight: 800;
}

.workspace-table tbody tr:hover {
  background: #fffaf2;
}

.workspace-table .workspace-empty {
  padding: 33px 16px;
  color: #8d7c7f;
  text-align: center;
}

.workspace-client-name,
.workspace-debtor-name {
  display: flex;
  min-width: 130px;
  flex-direction: column;
  gap: 4px;
}

.workspace-client-name strong,
.workspace-debtor-name strong {
  color: #57202a;
  font-size: 11px;
}

.workspace-client-name small,
.workspace-debtor-name small {
  color: #968387;
  font-size: 9px;
}

.workspace-scope-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #ead8ab;
  border-radius: 999px;
  background: #fff8e9;
  color: #75561b;
  padding: 5px 8px;
  font-size: 9px;
  font-weight: 750;
}

.workspace-action-tray {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 17px;
}

.workspace-action-tray > div:empty {
  display: none;
}

.workspace-action-tray .operation-form,
.workspace-composer .operation-form {
  margin: 0;
  background: #fff;
}

.workspace-composer {
  margin-bottom: 17px;
  padding: 20px;
  border: 1px solid #dfd2c9;
  border-inline-start: 4px solid #d8a946;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(58, 19, 26, .045);
}

.composer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 13px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee5df;
}

.composer-head h3 {
  margin: 0 0 4px;
  color: #57202a;
  font-size: 17px;
}

.composer-head p {
  margin: 0;
  color: #857176;
  font-size: 10px;
}

.workspace-icon-btn {
  width: 30px;
  height: 30px;
  border: 1px solid #e2d5cc;
  border-radius: 7px;
  background: #fff;
  color: #723540;
  cursor: pointer;
  font-size: 19px;
}

#followupFormSlot .operation-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  column-gap: 15px;
  border: 0;
  padding: 0;
}

#followupFormSlot .operation-title,
#followupFormSlot .operation-two,
#followupFormSlot .promise-fields,
#followupFormSlot .operation-btn,
#followupFormSlot .operation-result,
#followupFormSlot #followInvoiceHint {
  grid-column: 1 / -1;
}

#followupFormSlot label {
  align-self: end;
}

#followupFormSlot > form > label,
#followupFormSlot > form > input,
#followupFormSlot > form > select,
#followupFormSlot > form > textarea {
  grid-column: 1 / -1;
}

#followupFormSlot .operation-title {
  display: none;
}

.promise-fields {
  margin-top: 12px;
  padding: 13px;
  border: 1px solid #e5d4a8;
  border-radius: 9px;
  background: #fffaf0;
}

.promise-fields > small {
  display: block;
  margin-top: 9px;
  color: #816121;
  font-size: 10px;
}

.followup-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.followup-toolbar .workspace-search,
.followup-toolbar select {
  width: 100%;
}

.followup-table-heading {
  margin-top: 4px;
}

.workspace-count {
  display: inline-flex;
  border: 1px solid #ead9b1;
  border-radius: 999px;
  background: #fff9e8;
  color: #795713;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 750;
}

.workspace-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 9px;
  font-weight: 800;
}

.workspace-status.status-contacted {
  background: #edf3fa;
  color: #3c608a;
}

.workspace-status.status-no-response {
  background: #f3eeee;
  color: #7b666b;
}

.workspace-status.status-awaiting-documents,
.workspace-status.status-invoice-under-review {
  background: #fff4db;
  color: #8c621b;
}

.workspace-status.status-promise-to-pay,
.workspace-status.status-paid {
  background: #eaf5e8;
  color: #437843;
}

.workspace-status.status-partially-paid {
  background: #e8f2f2;
  color: #3f7276;
}

.workspace-status.status-legal-escalation,
.workspace-due.overdue {
  background: #fae9e8;
  color: #9a403e;
}

.workspace-due {
  display: inline-flex;
  border-radius: 7px;
  padding: 5px 7px;
  font-size: 10px;
  font-weight: 750;
}

.workspace-due.today {
  background: #fff0cf;
  color: #88621c;
}

.workspace-visibility {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 7px;
  font-size: 9px;
}

.workspace-visibility.client {
  background: #e9f3e7;
  color: #44683d;
}

.workspace-visibility.internal {
  background: #f1edee;
  color: #735d62;
}

.followup-workspace-table td:nth-child(6) {
  min-width: 220px;
  max-width: 340px;
  line-height: 1.55;
  white-space: normal;
}

#collectionHistorySlot .collection-history-card {
  margin-bottom: 0;
}

#collectionFormSlot .operation-form,
#forecastFormSlot .operation-form {
  max-width: 760px;
  border: 0;
  padding: 0;
}

.collection-invoice-allocation {
  margin: 3px 0 9px;
  border: 1px solid #e8ddd5;
  border-radius: 8px;
  background: #fdfaf7;
  padding: 9px 11px;
}

.collection-invoice-allocation summary {
  color: #754635;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}

.collection-invoice-allocation label {
  display: block;
  margin: 11px 0 5px;
}

.collection-invoice-allocation select {
  width: 100%;
}

.portal-page.portal-en .workspace-view,
.portal-page.portal-en .admin-client-context,
.portal-page.portal-en .workspace-table {
  direction: ltr;
  text-align: left;
}

.portal-page:not(.portal-en) .workspace-view,
.portal-page:not(.portal-en) .admin-client-context,
.portal-page:not(.portal-en) .workspace-table {
  direction: rtl;
  text-align: right;
}

@media (max-width: 1250px) {
  .overview-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .followup-toolbar .workspace-search {
    grid-column: 1 / -1;
  }

  .portal-page.admin-workspace .topbar {
    gap: 12px;
    padding-inline: 17px;
  }

  .admin-client-context {
    min-width: 185px;
  }
}

@media (max-width: 900px) {
  .workspace-summary-grid,
  .overview-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-action-tray {
    grid-template-columns: 1fr;
  }

  .workspace-page-head,
  .workspace-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .workspace-search,
  .workspace-header-actions {
    width: 100%;
  }

  .workspace-header-actions {
    flex-wrap: wrap;
  }

  .workspace-header-actions > button {
    flex: 1;
  }
}

@media (max-width: 760px) {
  .portal-page.admin-workspace .topbar {
    min-height: 106px;
    height: auto;
    flex-wrap: wrap;
    padding-block: 12px;
  }

  .admin-client-context {
    order: 3;
    width: 100%;
    min-width: 0;
    max-width: none;
    flex-basis: 100%;
  }

  .workspace-page-head {
    padding: 17px;
  }

  .workspace-card,
  .workspace-composer {
    padding: 15px;
  }
}

@media (max-width: 520px) {
  .workspace-summary-grid,
  .overview-summary-grid,
  .followup-toolbar,
  #followupFormSlot .operation-form {
    grid-template-columns: 1fr;
  }

  .workspace-header-actions {
    flex-direction: column;
  }

  .workspace-header-actions > button {
    width: 100%;
  }

  .debtor-delete-dialog {
    padding: 17px;
  }

  .debtor-delete-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .debtor-delete-actions {
    flex-wrap: wrap;
  }
}
