.form-grid {
  display: grid;
  gap: 12px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.check-row input {
  width: 18px;
  height: 18px;
}

.inline-input,
.inline-select,
.input {
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel-soft);
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.inline-input:focus,
.inline-select:focus,
.input:focus {
  border-color: rgba(14, 116, 144, 0.4);
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.08);
}

select.conflict-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  border-radius: 10px;
  min-height: 42px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: var(--subtle-bg);
  color: var(--muted);
}

.badge-success {
  background: rgba(24, 121, 78, 0.1);
  color: #18794e;
}

.badge-warning {
  background: rgba(183, 110, 17, 0.1);
  color: #b76e11;
}

.badge-error {
  background: rgba(192, 57, 43, 0.1);
  color: #c0392b;
}

.badge-info {
  background: rgba(14, 116, 144, 0.1);
  color: #0e7490;
}

.filter-panel {
  padding: 12px 16px;
  margin-bottom: 12px;
  background: var(--panel);
  border-radius: 12px;
  border: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-label {
  font-size: 12px;
  color: var(--muted);
}

.filter-input {
  padding: 4px 8px;
  font-size: 13px;
}

.helper-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.error-text {
  color: var(--danger);
  font-size: 13px;
  line-height: 1.6;
}

.filter-popup-wrap {
  position: relative;
  display: inline-block;
}

.filter-popup-trigger {
  min-width: 72px;
}

.filter-popup {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 140px;
  padding: 6px;
  border-radius: var(--radius-md);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.filter-popup-item {
  display: block;
  width: 100%;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease;
}

.filter-popup-item:hover {
  background: var(--bg);
}

.filter-popup-item.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.spinner-icon {
  animation: spin 0.8s linear infinite;
}

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