/* AQUILA_FINANCE_F4_R5_R2_R1_COMMERCIAL_AP_WORKSPACE */

.aq-ap-launcher {
  position: fixed;
  top: 118px;
  right: 22px;
  z-index: 2147482000;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  background: #fff;
  color: #172033;
  box-shadow: 0 10px 28px rgba(15,23,42,.13);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.aq-ap-launcher-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 0 0 4px rgba(37,99,235,.1);
}

.aq-ap-launcher strong,
.aq-ap-launcher small {
  display: block;
}

.aq-ap-launcher strong {
  font-size: 13px;
}

.aq-ap-launcher small {
  margin-top: 2px;
  color: #64748b;
  font-size: 10px;
}

.aq-ap-overlay {
  position: fixed;
  top: 112px;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147482100;
  display: none;
  overflow: auto;
  background: #f5f7fb;
  color: #172033;
}

.aq-ap-overlay.is-open {
  display: block;
}

.aq-ap-shell {
  min-height: 100%;
  padding: 24px 28px 56px;
}

.aq-ap-header,
.aq-ap-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: 1500px;
  margin: 0 auto;
}

.aq-ap-header h2 {
  margin: 0;
  font-size: clamp(27px,3vw,38px);
  letter-spacing: -.035em;
}

.aq-ap-header p,
.aq-ap-toolbar p {
  max-width: 760px;
  margin: 8px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.55;
}

.aq-ap-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #50677c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.aq-ap-header-actions,
.aq-ap-toolbar-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.aq-ap-primary,
.aq-ap-secondary,
.aq-ap-close {
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.aq-ap-primary {
  padding: 10px 14px;
  border: 1px solid #1d4ed8;
  background: #1d4ed8;
  color: #fff;
}

.aq-ap-secondary {
  padding: 10px 14px;
  border: 1px solid #d7dfe8;
  background: #fff;
  color: #334155;
}

.aq-ap-close {
  width: 40px;
  height: 40px;
  border: 1px solid #d7dfe8;
  background: #fff;
  color: #475569;
  font-size: 22px;
}

.aq-ap-tabs {
  display: flex;
  gap: 4px;
  max-width: 1500px;
  margin: 22px auto 0;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid #e2e8ef;
  border-radius: 14px;
  background: #fff;
}

.aq-ap-tabs button {
  flex: 0 0 auto;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.aq-ap-tabs button.is-active {
  background: #edf4ff;
  color: #1d4ed8;
}

.aq-ap-content {
  max-width: 1500px;
  margin: 18px auto 0;
}

.aq-ap-summary-grid {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 12px;
}

.aq-ap-card,
.aq-ap-panel,
.aq-ap-aging-cards article {
  border: 1px solid #e1e7ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(15,23,42,.035);
}

.aq-ap-card {
  min-height: 112px;
  padding: 18px;
}

.aq-ap-card span,
.aq-ap-card strong,
.aq-ap-card small {
  display: block;
}

.aq-ap-card span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.aq-ap-card strong {
  margin-top: 12px;
  font-size: clamp(20px,2vw,28px);
  letter-spacing: -.035em;
}

.aq-ap-card small {
  margin-top: 7px;
  color: #94a3b8;
  font-size: 10px;
  line-height: 1.4;
}

.aq-ap-alert-card {
  border-color: #efd6c8;
}

.aq-ap-two {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 14px;
  margin-top: 14px;
}

.aq-ap-panel {
  padding: 20px;
}

.aq-ap-panel h3,
.aq-ap-toolbar h3,
.aq-ap-dialog h3 {
  margin: 0;
  font-size: 20px;
}

.aq-ap-aging-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid #edf1f5;
  font-size: 12px;
}

.aq-ap-actions {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.aq-ap-actions button {
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fbfcfe;
  color: #172033;
  cursor: pointer;
  text-align: left;
}

.aq-ap-actions strong,
.aq-ap-actions small {
  display: block;
}

.aq-ap-actions small {
  margin-top: 4px;
  color: #7b8798;
  font-size: 10px;
}

.aq-ap-toolbar {
  align-items: flex-start;
  padding: 14px 0 18px;
}

.aq-ap-table-wrap {
  overflow-x: auto;
  border: 1px solid #e1e7ee;
  border-radius: 16px;
  background: #fff;
}

.aq-ap-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
}

.aq-ap-table th,
.aq-ap-table td {
  padding: 13px 15px;
  border-bottom: 1px solid #edf1f5;
  text-align: left;
  font-size: 12px;
}

.aq-ap-table th {
  background: #fafbfc;
  color: #64748b;
  font-size: 10px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.aq-ap-table td strong,
.aq-ap-table td small {
  display: block;
}

.aq-ap-table td small {
  margin-top: 3px;
  color: #94a3b8;
}

.aq-ap-status {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: #475569;
  font-size: 10px;
  font-weight: 750;
  text-transform: capitalize;
}

.aq-ap-status-posted,
.aq-ap-status-approved,
.aq-ap-status-paid,
.aq-ap-status-applied {
  background: #e8f6ef;
  color: #18794e;
}

.aq-ap-status-partially_paid,
.aq-ap-status-partially_applied {
  background: #fff4dd;
  color: #9a6700;
}

.aq-ap-aging-cards {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.aq-ap-aging-cards article {
  padding: 15px;
}

.aq-ap-aging-cards span,
.aq-ap-aging-cards strong {
  display: block;
}

.aq-ap-aging-cards span {
  color: #64748b;
  font-size: 10px;
}

.aq-ap-aging-cards strong {
  margin-top: 7px;
  font-size: 17px;
}

.aq-ap-input,
.aq-ap-form input,
.aq-ap-form select,
.aq-ap-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d5dee8;
  border-radius: 10px;
  background: #fff;
  color: #172033;
  font: inherit;
  font-size: 12px;
}

.aq-ap-input,
.aq-ap-form input,
.aq-ap-form select {
  min-height: 40px;
  padding: 8px 10px;
}

.aq-ap-form textarea {
  padding: 10px;
  resize: vertical;
}

.aq-ap-form label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}

.aq-ap-loading,
.aq-ap-empty {
  display: flex;
  min-height: 140px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  color: #64748b;
  text-align: center;
}

.aq-ap-empty-large {
  min-height: 300px;
  border: 1px dashed #d5dde6;
  border-radius: 16px;
  background: #fff;
}

.aq-ap-spinner {
  width: 22px;
  height: 22px;
  border: 3px solid #d9e5f5;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: aq-ap-spin .8s linear infinite;
}

@keyframes aq-ap-spin {
  to {
    transform: rotate(360deg);
  }
}

.aq-ap-notice {
  max-width: 1500px;
  margin: 14px auto 0;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.aq-ap-notice-info {
  background: #edf5ff;
  color: #235b9f;
}

.aq-ap-notice-success {
  background: #e9f7ef;
  color: #18794e;
}

.aq-ap-notice-error {
  background: #fff0ef;
  color: #b42318;
}

.aq-ap-dialog-layer {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.aq-ap-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(2px);
}

.aq-ap-dialog {
  position: relative;
  width: min(880px,100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid #dce3eb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15,23,42,.24);
}

.aq-ap-dialog > header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid #edf1f5;
  background: rgba(255,255,255,.97);
}

.aq-ap-dialog > header p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 11px;
}

.aq-ap-dialog-body {
  padding: 22px;
}

.aq-ap-form {
  display: grid;
  gap: 18px;
}

.aq-ap-form-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}

.aq-ap-line-card {
  display: grid;
  grid-template-columns: 2fr 100px 130px 110px;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e4eaf0;
  border-radius: 13px;
  background: #fafbfc;
}

.aq-ap-check {
  grid-column: 1 / -1;
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.aq-ap-check input {
  width: auto;
}

.aq-ap-warning {
  padding: 12px 13px;
  border: 1px solid #f0d6b7;
  border-radius: 11px;
  background: #fffaf3;
  color: #805b32;
  font-size: 11px;
  line-height: 1.45;
}

.aq-ap-form footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.aq-ap-statement-table {
  margin-top: 14px;
}

@media (max-width: 1100px) {
  .aq-ap-summary-grid,
  .aq-ap-aging-cards {
    grid-template-columns: repeat(3,minmax(0,1fr));
  }

  .aq-ap-line-card {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media (max-width: 768px) {
  .aq-ap-overlay {
    top: 100px;
  }

  .aq-ap-launcher {
    top: 104px;
    right: 12px;
  }

  .aq-ap-shell {
    padding: 18px 14px 40px;
  }

  .aq-ap-header,
  .aq-ap-toolbar {
    flex-direction: column;
  }

  .aq-ap-two {
    grid-template-columns: 1fr;
  }

  .aq-ap-summary-grid,
  .aq-ap-aging-cards {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .aq-ap-form-grid,
  .aq-ap-line-card {
    grid-template-columns: 1fr;
  }

  .aq-ap-dialog-layer {
    padding: 8px;
  }
}

@media (max-width: 430px) {
  .aq-ap-overlay {
    top: 94px;
  }

  .aq-ap-launcher {
    top: 98px;
    right: 8px;
    padding: 9px 11px;
  }

  .aq-ap-launcher > span:last-child {
    display: none;
  }

  .aq-ap-summary-grid,
  .aq-ap-aging-cards {
    grid-template-columns: 1fr;
  }

  .aq-ap-shell {
    padding-right: 10px;
    padding-left: 10px;
  }

  .aq-ap-dialog-body,
  .aq-ap-dialog > header {
    padding: 16px;
  }

  .aq-ap-form footer {
    flex-direction: column-reverse;
  }

  .aq-ap-form footer button {
    width: 100%;
  }
}
