/* ==========================================================================
   Интеграция с 1С (S6, db/54) — экран #/integrations и вкладка «Счета».
   Отдельным файлом, а не в app.css: этих правил немного и они все относятся
   к одному разделу, а app.css и так длинный.
   ========================================================================== */

.int-table td {
  vertical-align: middle;
}

.int-table code {
  font-size: 12px;
}

.int-scope-cell {
  white-space: nowrap;
}

.int-scope-badge {
  display: inline-block;
  padding: 1px 6px;
  margin-right: 4px;
  border-radius: 4px;
  background: #eef2f7;
  font-size: 11px;
  color: #475569;
}

.int-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.int-filters {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.int-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

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

.int-field .input {
  width: 100%;
}

.int-scopes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 12px;
}

.int-scope {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.int-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.int-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.int-hint {
  margin-top: 8px;
  font-size: 12px;
}

/* Токен показывается один раз — блок должен бросаться в глаза. */
.int-token {
  border: 1px solid #f59e0b;
  background: #fff7ed;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
}

.int-token-head {
  font-weight: 600;
  margin-bottom: 8px;
}

.int-token-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px;
}

.int-token-actions {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}

.int-token-warn {
  font-size: 12px;
  color: #92400e;
}

.int-log-row {
  cursor: pointer;
}

.int-log-row:hover {
  background: #f8fafc;
}

.int-log-error {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: #b91c1c;
}

.int-log-modal {
  max-width: 900px;
  width: 92vw;
}

.int-log-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  margin-bottom: 10px;
}

.int-log-section {
  margin-top: 12px;
}

.int-json {
  background: #0f172a;
  color: #e2e8f0;
  padding: 10px;
  border-radius: 6px;
  max-height: 280px;
  overflow: auto;
  font-size: 12px;
}

.int-invoice-error {
  color: #b91c1c;
}

.int-row-actions {
  white-space: nowrap;
}

.btn-sm {
  padding: 3px 8px;
  font-size: 12px;
}
