input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cfd7e3;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 7px 9px;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

textarea {
  min-height: 78px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: var(--focus);
}

input[data-money-input="1"] {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

label {
  display: grid;
  gap: 5px;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

button,
.primary,
.ghost,
.table-link,
.link-danger {
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  font-weight: 850;
  text-decoration: none;
}

.primary,
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

.primary {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 55%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
}

.primary:hover {
  background: linear-gradient(135deg, #0284c7 0%, #1d4ed8 55%, #1e40af 100%);
}

.ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: #344054;
  box-shadow: 0 3px 8px rgba(20, 30, 60, .035);
}

.ghost:hover {
  border-color: #b9c5d5;
  background: #f8fafc;
}

.table-link {
  color: var(--blue-strong);
  font-size: 13px;
}

.link-danger {
  color: var(--red);
  font-size: 13px;
}

.is-busy {
  opacity: .72;
  pointer-events: none;
}

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

.inline-search,
.order-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.order-filter input,
.order-filter select {
  width: auto;
  min-width: 148px;
}

.money-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.form-section {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #fbfcfe);
  padding: 12px;
}

.form-section legend {
  padding: 0 6px;
  color: #344054;
  font-size: 12px;
  font-weight: 900;
}

details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 10px;
}

details + details {
  margin-top: 8px;
}

summary {
  cursor: pointer;
  color: #344054;
  font-weight: 900;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

.table-wrap.compact table {
  min-width: 680px;
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  border-bottom: 1px solid var(--line-soft);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, #f8fafc, #eef3f8);
  color: #475467;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

tbody tr:hover td {
  background: #eef6ff;
}

td {
  color: #253245;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  white-space: nowrap;
}

.row-actions form {
  display: inline;
}

.table-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 8px;
}

.table-tools input {
  width: min(340px, 100%);
  min-height: 36px;
}

.table-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.pager-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.pager-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 0 9px;
  color: #344054;
  font-weight: 850;
}

.pager-link.active {
  border-color: var(--blue);
  background: #eaf1ff;
  color: var(--blue-strong);
}

.pager-link.disabled {
  background: #f8fafc;
  color: #98a2b3;
}

.pager-gap {
  padding: 0 3px;
}

.bulk-table-form {
  margin: 0;
}
