.ojf-overlay {
  position: fixed;
  z-index: 35;
  display: none;
  overflow: auto;
  background: var(--background, #fff);
  color: var(--foreground, #0a0a0a);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}
.ojf-overlay.is-open {
  display: block;
}
.ojf-wrap {
  max-width: 1320px;
  padding: 24px 28px 40px;
}
.ojf-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.ojf-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.ojf-desc {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted-foreground, #737373);
}
.ojf-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.ojf-btn {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 8px;
  background: var(--card, #fff);
  color: var(--foreground, #0a0a0a);
  font-size: 12px;
  line-height: 30px;
  cursor: pointer;
  transition: background-color 0.12s ease;
}
.ojf-btn:hover {
  background: var(--muted, #f5f5f5);
}
.ojf-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.ojf-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.ojf-card {
  padding: 14px 16px;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 10px;
  background: var(--card, #fff);
}
.ojf-card-label {
  font-size: 12px;
  color: var(--muted-foreground, #737373);
}
.ojf-card-value {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.ojf-card-sub {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted-foreground, #737373);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ojf-panel {
  margin-top: 16px;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 10px;
  background: var(--card, #fff);
  overflow: hidden;
}
.ojf-tabs {
  display: flex;
  gap: 4px;
  padding: 6px 12px 0;
  border-bottom: 1px solid var(--border, #e8e8e8);
}
.ojf-tab {
  margin-bottom: -1px;
  padding: 8px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted-foreground, #737373);
  font-size: 13px;
  cursor: pointer;
}
.ojf-tab:hover {
  color: var(--foreground, #0a0a0a);
}
.ojf-tab.is-active {
  color: var(--foreground, #0a0a0a);
  border-bottom-color: var(--primary, #2563eb);
  font-weight: 500;
}
.ojf-note {
  min-height: 18px;
  padding: 10px 16px 0;
  font-size: 12px;
  color: var(--muted-foreground, #737373);
}
.ojf-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
}
.ojf-search {
  width: 250px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 8px;
  background: var(--background, #fff);
  color: var(--foreground, #0a0a0a);
  font-size: 12.5px;
  outline: none;
}
.ojf-search:focus {
  border-color: var(--primary, #2563eb);
}
.ojf-select {
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 8px;
  background: var(--background, #fff);
  color: var(--foreground, #0a0a0a);
  font-size: 12.5px;
  outline: none;
}
.ojf-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted-foreground, #737373);
}
.ojf-table-wrap {
  overflow: auto;
}
.ojf-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.ojf-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border, #e8e8e8);
  background: var(--card, #fff);
  color: var(--muted-foreground, #737373);
  font-size: 11.5px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.ojf-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border, #e8e8e8);
  vertical-align: middle;
  white-space: nowrap;
}
.ojf-table tbody tr:hover {
  background: color-mix(in srgb, var(--muted, #f5f5f5) 55%, transparent);
}
.ojf-table tbody tr:last-child td {
  border-bottom: 0;
}
.ojf-user strong {
  font-weight: 500;
}
.ojf-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted-foreground, #737373);
  font-size: 11px;
}
.ojf-amount {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.ojf-mono {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--muted-foreground, #737373);
}
.ojf-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11.5px;
  line-height: 1;
}
.ojf-pill-success {
  color: #15803d;
  background: color-mix(in srgb, #16a34a 12%, transparent);
}
.ojf-pill-warn {
  color: #b45309;
  background: color-mix(in srgb, #f59e0b 16%, transparent);
}
.ojf-pill-danger {
  color: #b91c1c;
  background: color-mix(in srgb, #ef4444 12%, transparent);
}
.ojf-pill-info {
  color: #1d4ed8;
  background: color-mix(in srgb, #2563eb 12%, transparent);
}
.ojf-pill-neutral {
  color: var(--muted-foreground, #737373);
  background: var(--muted, #f5f5f5);
}
html.dark .ojf-pill-success { color: #4ade80; }
html.dark .ojf-pill-warn { color: #fbbf24; }
html.dark .ojf-pill-danger { color: #f87171; }
html.dark .ojf-pill-info { color: #60a5fa; }
.ojf-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border, #e8e8e8);
}
.ojf-pager span {
  font-size: 12px;
  color: var(--muted-foreground, #737373);
}
.ojf-empty {
  padding: 44px 16px;
  color: var(--muted-foreground, #737373);
  font-size: 12.5px;
  text-align: center;
}
.ojf-skel {
  padding: 44px 16px;
  color: var(--muted-foreground, #737373);
  font-size: 12.5px;
  text-align: center;
}
.ojf-error {
  padding: 32px 16px;
  color: #b91c1c;
  font-size: 12.5px;
  text-align: center;
}
.ojf-btn-primary {
  border-color: var(--primary, #2563eb);
  background: var(--primary, #2563eb);
  color: var(--primary-foreground, #fff);
}
.ojf-btn-primary:hover {
  background: color-mix(in srgb, var(--primary, #2563eb) 88%, #000);
}
.ojf-btn-danger {
  border-color: #ef4444;
  color: #b91c1c;
}
.ojf-btn-danger:hover {
  background: color-mix(in srgb, #ef4444 10%, transparent);
}
.ojf-btn-sm {
  height: 26px;
  padding: 0 9px;
  line-height: 24px;
  font-size: 11.5px;
}
.ojf-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ojf-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.ojf-modal-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(580px, 100%);
  max-height: 88vh;
  border-radius: 12px;
  background: var(--card, #fff);
  color: var(--foreground, #0a0a0a);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}
.ojf-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border, #e8e8e8);
}
.ojf-modal-title {
  font-size: 14px;
  font-weight: 600;
}
.ojf-modal-x {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted-foreground, #737373);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.ojf-modal-x:hover {
  background: var(--muted, #f5f5f5);
}
.ojf-modal-body {
  padding: 16px 18px;
  overflow: auto;
}
.ojf-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  padding-bottom: 14px;
}
.ojf-detail span {
  display: block;
  font-size: 11.5px;
  color: var(--muted-foreground, #737373);
}
.ojf-detail div {
  margin-top: 3px;
  font-size: 12.5px;
  word-break: break-all;
}
.ojf-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border, #e8e8e8);
}
.ojf-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ojf-field span {
  font-size: 11.5px;
  color: var(--muted-foreground, #737373);
}
.ojf-field input,
.ojf-field textarea {
  padding: 7px 10px;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 8px;
  background: var(--background, #fff);
  color: var(--foreground, #0a0a0a);
  font-size: 12.5px;
  outline: none;
}
.ojf-field input:focus,
.ojf-field textarea:focus {
  border-color: var(--primary, #2563eb);
}
.ojf-field textarea {
  resize: vertical;
}
.ojf-modal-error {
  min-height: 16px;
  font-size: 12px;
  color: #b91c1c;
}
.ojf-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border, #e8e8e8);
}

/* wallet invoice card */
.ojinv-card {
  padding: 18px 20px;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 12px;
  background: var(--card, #fff);
  color: var(--foreground, #0a0a0a);
}
.ojinv-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.ojinv-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.ojinv-desc {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted-foreground, #737373);
}
.ojinv-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.ojinv-btn {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 8px;
  background: var(--card, #fff);
  color: var(--foreground, #0a0a0a);
  font-size: 12px;
  cursor: pointer;
}
.ojinv-btn:hover {
  background: var(--muted, #f5f5f5);
}
.ojinv-btn:disabled {
  opacity: 0.45;
  cursor: default;
}
.ojinv-primary {
  border-color: var(--primary, #2563eb);
  background: var(--primary, #2563eb);
  color: var(--primary-foreground, #fff);
}
.ojinv-primary:hover {
  background: color-mix(in srgb, var(--primary, #2563eb) 88%, #000);
}
.ojinv-btn-sm {
  height: 26px;
  padding: 0 9px;
  font-size: 11.5px;
}
.ojinv-toplink {
  height: 30px;
  flex-shrink: 0;
}
.ojinv-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 16px 0 4px;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 10px;
  background: var(--border, #e8e8e8);
  overflow: hidden;
}
.ojinv-stats > div {
  padding: 12px 14px;
  background: var(--card, #fff);
}
.ojinv-stats span {
  display: block;
  font-size: 11.5px;
  color: var(--muted-foreground, #737373);
}
.ojinv-stats strong {
  display: block;
  margin-top: 5px;
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ojinv-stats em {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-style: normal;
  color: var(--muted-foreground, #737373);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ojinv-list {
  margin-top: 10px;
}
.ojinv-tablewrap {
  overflow-x: auto;
}
.ojinv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.ojinv-table th {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border, #e8e8e8);
  color: var(--muted-foreground, #737373);
  font-size: 11.5px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.ojinv-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--border, #e8e8e8);
  vertical-align: middle;
  white-space: nowrap;
}
.ojinv-table tbody tr:last-child td {
  border-bottom: 0;
}
.ojinv-table strong {
  font-weight: 500;
}
.ojinv-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted-foreground, #737373);
  font-size: 11px;
}
.ojinv-mobile-time {
  display: none;
}
.ojinv-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.ojinv-ops {
  display: flex;
  gap: 6px;
}
.ojinv-pill {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11.5px;
  line-height: 1;
}
.ojinv-pill-pending {
  color: #b45309;
  background: color-mix(in srgb, #f59e0b 16%, transparent);
}
.ojinv-pill-issued {
  color: #15803d;
  background: color-mix(in srgb, #16a34a 12%, transparent);
}
.ojinv-pill-rejected {
  color: #b91c1c;
  background: color-mix(in srgb, #ef4444 12%, transparent);
}
.ojinv-pill-cancelled {
  color: var(--muted-foreground, #737373);
  background: var(--muted, #f5f5f5);
}
html.dark .ojinv-pill-pending { color: #fbbf24; }
html.dark .ojinv-pill-issued { color: #4ade80; }
html.dark .ojinv-pill-rejected { color: #f87171; }
.ojinv-empty {
  padding: 26px 10px;
  border-top: 1px solid var(--border, #e8e8e8);
  color: var(--muted-foreground, #737373);
  font-size: 12.5px;
  text-align: center;
}
.ojverify-detail {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border, #e8e8e8);
  font-size: 12.5px;
}
.ojverify-detail:last-of-type {
  border-bottom: 0;
}
.ojverify-detail span {
  flex-shrink: 0;
  color: var(--muted-foreground, #737373);
}
.ojverify-detail strong {
  font-weight: 500;
  text-align: right;
  word-break: break-all;
}

.ojinv-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ojinv-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}
.ojinv-modal-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(540px, 100%);
  max-height: 88vh;
  border-radius: 12px;
  background: var(--card, #fff);
  color: var(--foreground, #0a0a0a);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}
.ojinv-modal-sm {
  width: min(380px, 100%);
}
.ojinv-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border, #e8e8e8);
}
.ojinv-modal-title {
  font-size: 14px;
  font-weight: 600;
}
.ojinv-modal-desc {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted-foreground, #737373);
}
.ojinv-modal-x {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted-foreground, #737373);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.ojinv-modal-x:hover {
  background: var(--muted, #f5f5f5);
}
.ojinv-modal-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  overflow: auto;
}
.ojinv-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border, #e8e8e8);
}
.ojinv-seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 8px;
  background: var(--muted, #f5f5f5);
  align-self: flex-start;
}
.ojinv-seg button {
  height: 26px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted-foreground, #737373);
  font-size: 12px;
  cursor: pointer;
}
.ojinv-seg button.is-active {
  background: var(--card, #fff);
  color: var(--foreground, #0a0a0a);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.ojinv-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ojinv-field span {
  font-size: 11.5px;
  color: var(--muted-foreground, #737373);
}
.ojinv-field em {
  font-size: 11px;
  font-style: normal;
  color: var(--muted-foreground, #737373);
}
.ojinv-field input,
.ojinv-field textarea {
  padding: 8px 10px;
  border: 1px solid var(--border, #e8e8e8);
  border-radius: 8px;
  background: var(--background, #fff);
  color: var(--foreground, #0a0a0a);
  font-size: 12.5px;
  outline: none;
}
.ojinv-field input:focus,
.ojinv-field textarea:focus {
  border-color: var(--primary, #2563eb);
}
.ojinv-field textarea {
  resize: vertical;
}
.ojinv-modal-error {
  min-height: 16px;
  font-size: 12px;
  color: #b91c1c;
}
.ojinv-confirm-text {
  font-size: 13px;
  line-height: 1.6;
}
.ojinv-toast {
  position: fixed;
  left: 50%;
  bottom: 36px;
  z-index: 120;
  transform: translate(-50%, 12px);
  max-width: calc(100vw - 32px);
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--foreground, #0a0a0a);
  color: var(--background, #fff);
  font-size: 12.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.ojinv-toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (max-width: 680px) {
  .ojinv-card {
    padding: 14px;
  }
  .ojinv-head {
    flex-direction: column;
  }
  .ojinv-stats strong {
    font-size: 17px;
  }
  .ojinv-stats > div {
    padding: 10px;
  }
  .ojinv-stats em {
    white-space: normal;
  }
  .ojinv-table th:nth-child(1),
  .ojinv-table td:nth-child(1) {
    display: none;
  }
  .ojinv-table {
    font-size: 12px;
  }
  .ojinv-table th,
  .ojinv-table td {
    padding: 9px 6px;
  }
  .ojinv-mobile-time {
    display: block;
    color: var(--muted-foreground, #737373);
    font-size: 10.5px;
  }
  .ojinv-table td .ojinv-sub {
    max-width: 104px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .ojverify-detail {
    gap: 10px;
  }
}

[data-ojf-nav][data-active] {
  background: var(--sidebar-accent, #eef2ff);
  color: var(--sidebar-accent-foreground, var(--foreground, #0a0a0a));
}
@media (max-width: 1100px) {
  .ojf-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .ojf-wrap {
    padding: 16px 16px 32px;
  }
  .ojf-toolbar {
    flex-wrap: wrap;
  }
  .ojf-search {
    width: 100%;
  }
  .ojf-count {
    margin-left: 0;
  }
}
