/* ============================================================================
   ar-terms.css — Payment Terms rules page (Money section)
   The default net days, the per-customer exceptions, an add box and the change log.
   ============================================================================ */

.apt-head { margin-bottom: 20px; }
.apt-head h1 { margin: 0 0 4px; }
.apt-muted { color: var(--text-secondary); font-size: 14px; }

.apt-error {
  border: 1px solid var(--danger, #c0392b);
  background: var(--danger-bg, #fdf0ef);
  color: var(--danger, #c0392b);
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}
.apt-ok {
  border: 1px solid var(--success, #2e7d32);
  background: var(--success-bg, #eef7ee);
  color: var(--success, #2e7d32);
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.apt-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  background: var(--surface, #fff);
  margin-bottom: 24px;
}
.apt-card h2 { font-size: 16px; margin: 0 0 4px; }
.apt-card p { margin: 0 0 12px; }

.apt-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.apt-days { width: 90px; }
.apt-note-input { min-width: 220px; flex: 1; }
.apt-search { min-width: 260px; flex: 1; }

.apt-h2 { font-size: 16px; margin: 0 0 10px; }
.apt-tablewrap { overflow-x: auto; margin-bottom: 24px; }
.apt-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.apt-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.apt-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.apt-table tbody tr:hover { background: var(--surface-hover, #fafaf8); }
.apt-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.apt-when { white-space: nowrap; color: var(--text-secondary); }

.apt-results {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 8px;
  max-height: 220px;
  overflow-y: auto;
  background: var(--surface, #fff);
}
.apt-result {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: none;
  cursor: pointer;
  font: inherit;
}
.apt-result:last-child { border-bottom: 0; }
.apt-result:hover { background: var(--surface-hover, #fafaf8); }
.apt-picked { font-weight: 700; margin: 8px 0; }

.apt-foot { color: var(--text-secondary); font-size: 12px; margin-top: 8px; }
