.field {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  margin-bottom: var(--space-row);
}

.field > label {
  width: var(--label);
  flex-shrink: 0;
  font-size: var(--fs-label);
  color: var(--muted);
}

input[type="text"] {
  flex: 1;
  min-width: 0;
  height: var(--control);
  padding: 0 var(--space-s);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-family: inherit;
  font-size: var(--fs-body);
  color: var(--text);
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--selected);
}

input::placeholder {
  color: var(--faint);
}

.actions {
  margin-top: var(--space-m);
  display: flex;
  align-items: center;
  gap: var(--space-row);
  justify-content: flex-end;
}

.status {
  flex: 1;
  font-size: var(--fs-label);
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--control);
  padding: var(--btn-pad);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-family: inherit;
  font-size: var(--fs-body);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.btn:hover {
  background: var(--hover);
  border-color: var(--muted);
}

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.btn.primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn:disabled {
  background: var(--base);
  border-color: var(--line);
  color: var(--disabled-text);
  cursor: default;
}

.empty {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: var(--fs-body);
}

.empty[hidden],
.tableblock[hidden] {
  display: none;
}

.tableblock {
  position: relative;
}

.tablecopy {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  place-items: center;
  width: var(--copy-hit);
  height: var(--copy-hit);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  opacity: 0;
  color: var(--text);
}

.tableblock:hover .tablecopy,
.tablecopy:focus-visible {
  opacity: 1;
}

.tablewrap {
  overflow-x: auto;
}

.tablewrap table {
  border-collapse: collapse;
  font-size: var(--fs-label);
  background: var(--surface);
  width: 100%;
}

.tablewrap th,
.tablewrap td {
  padding: var(--cell-pad);
  border: 0.5px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.tablewrap th {
  position: sticky;
  top: 0;
  z-index: 1;
  font-weight: 600;
  color: var(--muted);
  background: var(--base);
}

.tablewrap tbody tr:hover td {
  background: var(--hover);
}

.tablewrap .cell {
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}

.tablewrap .cell:hover {
  background: var(--selected);
}

.toasts {
  position: fixed;
  top: var(--space-m);
  right: var(--space-m);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  padding: var(--toast-pad);
  background: var(--surface);
  border: 0.5px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  font-size: var(--fs-body);
}

.toast.bad {
  color: var(--fail);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--scroll);
  border-radius: 5px;
  border: 3px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-hover);
  background-clip: content-box;
}
