:root {
  font:
    16px/24px Geist,
    -apple-system,
    "PingFang SC",
    sans-serif;
  color: #19222c;
  background: #f5f7f9;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
.heading-5 {
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
}
.heading-6 {
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
}
.title-2 {
  font-size: 18px;
  line-height: 28px;
  font-weight: 500;
}
.title-3,
label,
th {
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}
.hint,
.caption-2 {
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: #485967;
}
p,
h1,
h2 {
  margin: 0 0 16px;
  text-wrap: pretty;
}
h1,
h2 {
  text-wrap: balance;
}
button {
  white-space: nowrap;
  flex-shrink: 0;
  font:
    600 16px/24px Geist,
    -apple-system,
    "PingFang SC",
    sans-serif;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 8px 12px;
  background: #195aaa;
  color: white;
  cursor: pointer;
  transition: opacity 300ms cubic-bezier(0.22, 1, 0.36, 1);
}
button:hover {
  background: #124983;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.secondary {
  background: #fff;
  color: #195aaa;
  border-color: #c6d0da;
}
.secondary:hover {
  background: #edf3fa;
}
.danger {
  color: #9b2d25;
  background: #fff;
  border-color: #ddb6b2;
}
.danger:hover {
  background: #fff0ee;
}
:focus-visible {
  outline: 3px solid #3c82d8;
  outline-offset: 2px;
}
label {
  display: block;
  margin: 16px 0 4px;
}
input,
select {
  font:
    400 16px/24px Geist,
    -apple-system,
    "PingFang SC",
    sans-serif;
  width: 100%;
  border: 1px solid #82909f;
  border-radius: 6px;
  padding: 8px 12px;
  background: #fff;
  color: #19222c;
}
input[readonly] {
  background: #f5f7f9;
}
.panel {
  background: #fff;
  border: 1px solid #dce1e6;
  border-radius: 12px;
  padding: 24px;
}
.auth,
.initial {
  max-width: 480px;
  margin: 80px auto;
  padding: 16px;
}
.auth button {
  width: 100%;
  margin-top: 16px;
}
.workspace {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}
aside {
  background: #fff;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.brand {
  margin-bottom: 0;
}
nav {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}
.nav {
  text-align: left;
  background: transparent;
  color: #485967;
}
.nav:hover {
  background: #edf3fa;
}
.nav[aria-current="page"] {
  background: #eaf2fc;
  color: #195aaa;
}
.account {
  margin-top: auto;
  padding-top: 32px;
  overflow-wrap: anywhere;
}
.workspace main {
  padding: 32px;
  max-width: 1280px;
  width: 100%;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}
header h1 {
  margin-bottom: 8px;
}
header p {
  margin-bottom: 0;
}
.provider-list {
  display: grid;
  gap: 16px;
}
.provider-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.provider-heading h2 {
  margin: 0;
}
.provider-actions,
.actions,
.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.provider-actions {
  margin-top: 16px;
}
.badge {
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  border-radius: 6px;
  padding: 4px 8px;
  color: #485967;
  background: #eef1f4;
}
.badge.ready {
  color: #166446;
  background: #e9f5ef;
}
.provider-note {
  margin: 12px 0 0;
}
.error {
  color: #9b2d25;
  overflow-wrap: anywhere;
}
.error:empty,
#message:empty {
  display: none;
}
#message {
  padding: 12px 16px;
  border: 1px solid #dce1e6;
  background: white;
  border-radius: 8px;
  margin-bottom: 16px;
}
.toolbar {
  justify-content: space-between;
  margin-bottom: 16px;
}
.toolbar p {
  margin: 0;
}
.table-wrap {
  padding: 8px 16px;
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th,
td {
  padding: 16px 8px;
  vertical-align: middle;
}
td {
  font-size: 14px;
  line-height: 20px;
  border-top: 1px solid #e8ecef;
  overflow-wrap: anywhere;
}
td button {
  font-size: 14px;
  line-height: 20px;
  margin: 4px;
}
dialog {
  border: 1px solid #dce1e6;
  border-radius: 12px;
  max-width: 560px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 64px);
  padding: 24px;
  color: #19222c;
  background: #fff;
}
dialog::backdrop {
  background: rgb(25 34 44 / 40%);
}
.actions {
  justify-content: flex-end;
  margin-top: 24px;
}
#editor-error {
  margin-top: 16px;
}
#editor-fields {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.field-help {
  margin: 4px 0 0;
}
.skip {
  position: absolute;
  top: 8px;
  left: 8px;
  transform: translateY(-200%);
  background: #fff;
  padding: 8px 12px;
  z-index: 2;
}
.skip:focus {
  transform: none;
}
.skeleton {
  height: 48px;
  border-radius: 8px;
  background: #e8ecef;
}
.empty {
  padding: 32px;
  text-align: center;
}
@media (max-width: 700px) {
  .workspace {
    display: block;
  }
  aside {
    padding: 16px;
    gap: 4px;
  }
  .brand {
    display: inline;
  }
  nav {
    display: flex;
    margin-top: 8px;
  }
  .account {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding-top: 8px;
  }
  .account p {
    margin: 0;
  }
  .workspace main {
    padding: 24px 16px;
  }
  .panel {
    padding: 16px;
  }
  .auth,
  .initial {
    margin: 32px auto;
  }
  .table-wrap {
    padding: 8px;
  }
  th,
  td {
    padding: 12px 8px;
  }
  header {
    gap: 8px;
  }
  .provider-heading {
    gap: 8px;
  }
  dialog {
    padding: 24px 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
}
.terminal-summary {
  margin: 16px 0 0;
  overflow-wrap: anywhere;
  max-height: 80px;
  overflow: auto;
}
.personal-services {
  margin: 12px 0 0;
  padding-inline-start: 24px;
}
.personal-services li {
  padding: 4px 0;
  overflow-wrap: anywhere;
}
.personal-services li .hint {
  display: inline-block;
  margin-inline-start: 12px;
}
dialog.terminal-editor {
  max-width: 880px;
}
.terminal-count {
  margin: 16px 0 8px;
}
.terminal-selected {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.terminal-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid #c6d0da;
  border-radius: 6px;
  background: #edf3fa;
  font-size: 14px;
  line-height: 20px;
  overflow-wrap: anywhere;
}
.terminal-choice label {
  margin: 0;
  font-size: 14px;
}
.terminal-choice input {
  margin-top: 4px;
}
.terminal-choice button {
  font-size: 14px;
  line-height: 20px;
  padding: 4px 8px;
}
.personal-choice {
  grid-template-columns: minmax(0, 1fr) auto;
}
.service-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.service-actions button:disabled {
  cursor: default;
}
.terminal-services {
  max-height: 320px;
  overflow: auto;
  border: 1px solid #dce1e6;
  border-radius: 8px;
  padding: 8px;
}
.terminal-service {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px;
  margin: 0;
  border-radius: 6px;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.terminal-service:hover {
  background: #edf3fa;
}
.terminal-service input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin: 4px 0 0;
  accent-color: #195aaa;
}
.terminal-service > span {
  min-width: 0;
}
.terminal-service span span {
  display: block;
}
.terminal-service:has(input:disabled) {
  color: #485967;
}
@media (max-width: 700px) {
  nav { flex-wrap: wrap; }
  .terminal-choice { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; }
  .terminal-choice-source { grid-column: 1; }
  .terminal-choice .service-actions { grid-column: 2; grid-row: 1; }
  .terminal-choice label { grid-column: 1 / -1; grid-row: 2; }
}
#wallet-list {
  display: grid;
  gap: 16px;
}
#wallet-list th {
  white-space: nowrap;
}
#price-search {
  margin-bottom: 16px;
}
#users-section table {
  min-width: 640px;
}
#users-section th,
#users-section td {
  white-space: nowrap;
}

.auth-links{margin-top:16px;margin-bottom:0;text-align:center}.auth-links a{color:#195aaa;text-underline-offset:4px}

.service-group summary { cursor: pointer; font-weight: 600; }
.service-group[open] summary { margin-bottom: 1rem; }

.service-search { flex: 1; max-width: 480px; margin: 0 20px; }
.group-search { display: block; max-width: 480px; margin: 16px 0; }
.history-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px 16px;
  margin-bottom: 16px;
}
.history-filters label { margin: 0; }
.history-filters input, .history-filters select { display: block; margin-top: 4px; }
.history-filters label:first-child { flex: 1 1 210px; }
.history-filter-actions, .history-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.history-pager { margin-top: 16px; justify-content: flex-end; }
.history-pager span { margin-right: auto; }
.history-pager button:disabled { cursor: default; }
.history-table th { white-space: nowrap; }
.history-table td:first-child { min-width: 104px; }
.history-table td { min-width: 70px; }
.history-table td:nth-child(2), .history-table td:nth-child(3) { min-width: 120px; }
.history-facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 16px;
  margin: 0 0 16px;
}
.history-facts dt { color: #485967; }
.history-facts dd { margin: 0; overflow-wrap: anywhere; }
#history-detail h3 { margin: 16px 0 8px; font-size: 16px; }
.history-report { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 12px; }
.lock-present { color: #a72828; }
.lock-absent { color: #167247; }
.lock-unknown { color: #111; }
.related-order { border-top: 1px solid #e8ecef; }
.related-order summary { padding: 8px 0; cursor: pointer; }
.related-order .order-detail { padding: 6px 0 12px; }
#batch-filter button { margin-left: 8px; }
.service-search input, .group-search input { display: block; width: 100%; margin-top: 6px; }
@media (max-width: 640px) {
  main > header { flex-wrap: wrap; gap: 12px; }
  .service-search { flex-basis: 100%; margin: 0; max-width: none; order: 3; }
}
