.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-0);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  user-select: none;
}

.btn:hover {
  background: var(--surface-2);
}

.btn:active {
  background: var(--accent-soft);
}

.btn:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

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

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

.btn-soft {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent);
}

[data-theme='dark'] .btn-soft {
  color: #9dbbe4;
}

.btn-danger {
  border-color: transparent;
  background: transparent;
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger-soft);
}

.btn-sm {
  height: 25px;
  padding: 0 8px;
  font-size: 11.5px;
}

.btn-sm svg {
  width: 13px;
  height: 13px;
}

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

.field > label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-1);
}

.input,
.select,
.textarea {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text-0);
  font-size: 13px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.textarea {
  height: auto;
  min-height: 80px;
  padding: 8px 10px;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-2);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.input:disabled,
.select:disabled {
  background: var(--surface-2);
  cursor: not-allowed;
}

.input-wrap {
  position: relative;
}

.input-wrap > svg {
  position: absolute;
  left: 9px;
  top: 50%;
  translate: 0 -50%;
  width: 15px;
  height: 15px;
  color: var(--text-2);
  pointer-events: none;
}

.input-wrap > .input {
  padding-left: 31px;
}

.input-wrap > .input-trail {
  position: absolute;
  right: 5px;
  top: 50%;
  translate: 0 -50%;
  border-color: transparent;
  background: transparent;
}

.input-wrap > .input-trail:hover {
  background: var(--surface-2);
}

.hint {
  font-size: 11.5px;
  color: var(--text-2);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}

.panel-title {
  font-size: 13px;
  font-weight: 650;
  color: var(--text-0);
}

.panel-sub {
  margin-top: 1px;
  font-size: 11.5px;
  color: var(--text-2);
}

.panel-body {
  padding: 14px;
}

.panel-body.flush {
  padding: 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.table th {
  padding: 7px 12px;
  text-align: left;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border-strong);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}

.table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-1);
  white-space: nowrap;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover {
  background: var(--surface-2);
}

.table .num,
.table th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table td.strong {
  color: var(--text-0);
  font-weight: 600;
}
