/* UPP Finance panel — light desk, dark sidebar, purple actions */
:root {
  --soon-teal: #13171e;
  --soon-orange: #7c5ce0;
  --soon-cream: #f4f5f7;
  --soon-green: #067647;
  --soon-ink: #1a1d26;
  --soon-muted: #5c6570;
  --soon-quiet: #8b939e;
  --soon-line: #e4e7ec;
  --soon-on-teal: #c5cad3;
  --soon-gold: #fdcb0b;
  --soon-peach: #f4f0ff;
  --soon-lime: #067647;
  --soon-font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --upp-bg: #f4f5f7;
  --upp-bg-2: #eef0f3;
  --upp-card: #ffffff;
  --upp-card-2: #f7f8fa;
  --upp-accent: #7c5ce0;
  --upp-accent-deep: #6a4bd1;
  --upp-accent-soft: rgba(124, 92, 224, 0.14);
  --upp-text: #1a1d26;
  --upp-ink: #1a1d26;
  --upp-muted: #5c6570;
  --upp-quiet: #8b939e;
  --upp-gold: #e4e7ec;
  --upp-brand-gold: #fdcb0b;
  --upp-mint: #e7f6ee;
  --upp-mint-text: #067647;
  --upp-apricot: #fff6e5;
  --upp-apricot-text: #b54708;
  --upp-lime: #067647;
  --upp-err: #b42318;
  --upp-err-bg: #fde8e8;
  --upp-line: #e4e7ec;
  --upp-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  --upp-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04);
  --upp-radius: 10px;
  --upp-radius-sm: 8px;
  --upp-font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --upp-side: #13171e;
  --upp-side-text: #ffffff;
  --upp-side-muted: #c5cad3;
  --upp-side-active: #7c5ce0;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; color-scheme: light; }

body {
  margin: 0;
  font-family: var(--upp-font);
  background: var(--upp-bg);
  color: var(--upp-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.upp-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 16px;
}

.upp-card {
  width: 100%;
  max-width: 440px;
  background: var(--upp-card);
  border: 0;
  border-radius: var(--upp-radius);
  padding: 32px 28px;
  box-shadow: var(--upp-shadow);
}

.upp-banner {
  display: inline-flex;
  align-items: center;
  background: var(--upp-accent-soft);
  color: var(--upp-accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  padding: 5px 8px;
  border-radius: 99px;
  border: 1px solid var(--upp-accent);
  margin-bottom: 16px;
  white-space: nowrap;
  max-width: 100%;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
}

h1 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.upp-sub { margin: 0 0 20px; color: var(--upp-muted); font-size: 16px; }

.upp-meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 22px; }
.upp-meta dt { color: var(--upp-muted); }
.upp-meta dd { margin: 0; font-weight: 550; }

label {
  display: block;
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 550;
  color: var(--upp-text);
}

input[type=text], input[type=password], input[type=email], input[type=number],
input[type=tel], input[type=date], input[type=file], input[type=search],
input[type=url], select, textarea {
  width: 100%;
  margin-top: 6px;
  padding: 12px 14px;
  min-height: 48px;
  border: 0;
  border-radius: var(--upp-radius-sm);
  background: #ffffff;
  color: var(--upp-text);
  font-size: 16px;
  font-family: inherit;
  box-shadow: inset 0 0 0 1px var(--upp-line);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--upp-accent), 0 0 0 4px var(--upp-accent-soft);
  background: #ffffff;
}

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

.upp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

button, .upp-btn {
  width: 100%;
  margin-top: 8px;
  padding: 12px 18px;
  min-height: 48px;
  border: 0;
  border-radius: var(--upp-radius-sm);
  background: var(--upp-accent);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

button:hover, .upp-btn:hover { background: var(--upp-accent-deep); }
button:focus-visible, .upp-btn:focus-visible, .upp-btn-ghost:focus-visible,
.upp-icon-btn:focus-visible, a:focus-visible, .upp-nav a:focus-visible,
.upp-menu:focus-visible, .upp-who a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--upp-accent);
  outline-offset: 2px;
}

.upp-note { font-size: 13px; color: var(--upp-muted); margin-top: 16px; line-height: 1.5; }
.muted { color: var(--upp-muted); font-size: 13px; }

.upp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.upp-table th { text-align: left; color: var(--upp-muted); padding: 6px 10px 6px 0; vertical-align: top; font-weight: 550; white-space: nowrap; overflow-wrap: normal; }
.upp-table td { padding: 6px 0; overflow-wrap: anywhere; word-break: normal; }

.upp-shell { min-height: 100vh; padding: 36px 20px 56px; }
.upp-top { max-width: 960px; margin: 0 auto 28px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.upp-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--upp-text);
  text-decoration: none;
  line-height: 1.2;
}
.upp-lockup span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upp-mark {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #fdcb0b;
  background: #000;
}
.upp-wordmark {
  display: block;
  max-width: min(220px, calc(100vw - 48px));
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto 14px;
  border-radius: 10px;
}
.upp-brand, .upp-side-brand, .upp-onboard-brand, .upp-auth-brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
}
.upp-auth-brand { margin: 0 0 18px; }

.upp-grid { max-width: 960px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr .8fr; gap: 22px; }
@media (max-width: 720px) { .upp-grid { grid-template-columns: 1fr; } }
.upp-wide { max-width: none; }
h2 { margin: 0 0 12px; font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.upp-price { font-size: 36px; margin: 8px 0 18px; font-weight: 700; letter-spacing: -0.03em; }
.upp-api { margin: 0; padding-left: 18px; color: var(--upp-muted); font-family: ui-monospace, Menlo, monospace; font-size: 12px; line-height: 1.8; }

a { color: var(--upp-accent); }
.upp-err { color: var(--upp-err); font-weight: 550; }

.upp-app {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}
html:has(body.upp-desk) {
  height: 100%;
  overflow: hidden;
}
body.upp-desk {
  height: 100%;
  overflow: hidden;
}
body.upp-desk .upp-app {
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}
.upp-side {
  width: 260px;
  background: var(--upp-side);
  border-right: 0;
  padding: 18px 14px 36px;
  flex-shrink: 0;
  color: var(--upp-side-text);
  box-shadow: none;
  grid-column: 1;
  grid-row: 1 / -1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
}
.upp-side-brand {
  font-size: 18px;
  margin: 0 0 16px;
  color: var(--upp-side-text);
}
.upp-side .upp-lockup { color: var(--upp-side-text); }
.upp-side-brand .upp-mark { border-radius: 50%; background: #000; box-shadow: 0 0 0 2px #fdcb0b; }
.upp-side-merch { color: var(--upp-side-muted); font-size: 13px; margin: 8px 0 18px; font-weight: 550; }
.upp-side .upp-banner { margin-bottom: 8px; }
.upp-nav { display: flex; flex-direction: column; gap: 8px; }
.upp-nav-group { display: flex; flex-direction: column; gap: 2px; }
.upp-nav-label {
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--upp-side-muted);
  margin: 10px 8px 4px;
  font-weight: 700;
}
.upp-nav a {
  color: var(--upp-side-text);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  min-height: 44px;
  display: flex;
  align-items: center;
  white-space: normal;
}
.upp-nav-text {
  display: inline;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.35;
  visibility: visible;
  opacity: 1;
}
.upp-side .upp-nav a .upp-nav-text { color: #ffffff; }
.upp-side .upp-nav a.active .upp-nav-text { color: var(--upp-side); }
.upp-side .upp-nav-drop > a.active .upp-nav-text { color: #ffffff; }
.upp-side .upp-nav-label .upp-nav-text { color: #b6b6b6; }
.upp-side .upp-nav-drop[open] > summary.upp-nav-label .upp-nav-text { color: var(--upp-side-active); }
.upp-nav a:hover { background: rgba(255, 255, 255, 0.08); color: var(--upp-side-text); box-shadow: none; }
.upp-nav a.active {
  background: var(--upp-side-active);
  color: var(--upp-side);
  box-shadow: none;
  font-weight: 700;
}
.upp-nav-drop > a.active {
  background: transparent;
  color: var(--upp-side-text);
  font-weight: 700;
}
.upp-nav-drop > summary.upp-nav-label {
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--upp-side-muted);
}
.upp-nav-drop[open] > summary.upp-nav-label {
  background: rgba(198, 245, 111, 0.18);
  color: var(--upp-side-active);
}
.upp-nav-drop[open] > summary.upp-nav-label::after { color: var(--upp-side-muted); }

.upp-main {
  min-width: 0;
  grid-column: 2;
  grid-row: 2;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-gutter: stable;
}
.upp-main-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--upp-line);
  background: var(--upp-bg);
  grid-column: 2;
  grid-row: 1;
}
.upp-main-top .upp-lockup,
.upp-main-top .upp-side-brand { margin: 0; color: var(--upp-text); }
.upp-main-title { font-size: 18px; flex: 1; font-weight: 650; letter-spacing: -0.02em; color: var(--upp-text); }
.upp-who { font-size: 13px; color: var(--upp-muted); display: flex; gap: 10px; align-items: center; margin-left: auto; }
.upp-who > .upp-who-email {
  background: #ffffff;
  color: var(--upp-text);
  padding: 6px 12px;
  border-radius: 99px;
  font-weight: 600;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upp-who a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 99px;
  background: #ffffff;
  color: var(--upp-text);
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--upp-line);
  font-weight: 600;
}
.upp-menu {
  display: none;
  width: auto;
  min-width: 48px;
  min-height: 48px;
  margin: 0;
  padding: 8px 12px;
  background: #ffffff;
  color: var(--upp-text);
  box-shadow: inset 0 0 0 1px var(--upp-line);
  border-radius: var(--upp-radius-sm);
}
.upp-menu:hover { background: var(--upp-card); color: var(--upp-text); }
.upp-scrim { display: none; }
.upp-content { padding: 24px 32px 56px; max-width: 1180px; }

.upp-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 16px 0 20px; }
.upp-metric {
  background: var(--upp-card);
  border: 0;
  border-radius: var(--upp-radius);
  padding: 16px 16px 14px;
  box-shadow: inset 0 0 0 1px var(--upp-line), var(--upp-shadow-sm);
}
.upp-metric-label { color: var(--upp-muted); font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.upp-metric-val { font-size: 24px; margin: 4px 0; font-weight: 700; letter-spacing: -0.03em; }
.upp-metric-sub { color: var(--upp-muted); font-size: 12px; }

.upp-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 18px;
  padding: 14px 16px;
  background: var(--upp-card);
  border-radius: var(--upp-radius);
  box-shadow: var(--upp-shadow-sm);
}
.upp-filters label { margin: 0; }
.upp-filters button, .upp-btn, .upp-btn-ghost { width: auto; padding: 10px 16px; margin: 0; }
.upp-btn-ghost {
  background: #ffffff;
  border: 1px solid var(--upp-line);
  color: var(--upp-text);
  border-radius: var(--upp-radius-sm);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  box-shadow: none;
  font-weight: 600;
}
.upp-btn-ghost:hover { background: #e4e7ec; color: var(--upp-text); }
.upp-btn { display: inline-flex; text-decoration: none; text-align: center; }

.upp-table-wrap {
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overflow-wrap: normal;
  word-break: normal;
  max-width: 100%;
  min-width: 0;
  width: 100%;
  border: 0;
  border-radius: var(--upp-radius);
  background: var(--upp-card);
  box-shadow: var(--upp-shadow-sm);
}
.upp-grid-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  overflow-wrap: normal;
  word-break: normal;
}
.upp-grid-table th, .upp-grid-table td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--upp-line);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}
.upp-grid-table th {
  color: var(--upp-muted);
  background: #ffffff;
  position: sticky;
  top: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.upp-grid-table td { color: var(--upp-text); }
.upp-table a,
.upp-grid-table a,
.upp-grid-table .upp-text-link,
.upp-id .upp-id-link {
  color: #7c5ce0;
}
.upp-table a:hover,
.upp-grid-table a:hover,
.upp-grid-table .upp-text-link:hover,
.upp-id .upp-id-link:hover {
  color: #6a4bd1;
}
.upp-grid-table tbody tr:last-child td { border-bottom: 0; }
.upp-grid-table tbody tr:hover td { background: #e4e7ec; }
.upp-grid-table tfoot td {
  font-weight: 650;
  background: #ffffff;
  border-top: 2px solid var(--upp-line);
  color: var(--upp-text);
}

.upp-form { max-width: 640px; }
.upp-form button { width: auto; }

.upp-card-lite {
  background: var(--upp-card);
  border: 0;
  border-radius: var(--upp-radius);
  padding: 24px 22px;
  margin: 14px 0;
  box-shadow: inset 0 0 0 1px var(--upp-line), var(--upp-shadow-sm);
}
.upp-ubo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}
.upp-ubo-title { margin: 0; font-size: 18px; }
.upp-ubo-card .upp-ubo-remove[hidden] { display: none; }
#add-ubo { margin: 4px 0 8px; }

.upp-check { display: flex; align-items: center; gap: 10px; margin: 8px 0; min-height: 44px; }

.upp-ms-field { margin: 0 0 16px; }
.upp-ms-label { display: block; font-size: 14px; font-weight: 550; color: var(--upp-text); }
.upp-ms { margin-top: 6px; }
.upp-ms-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 8px 40px 8px 12px;
  background: #ffffff;
  border-radius: var(--upp-radius-sm);
  box-shadow: inset 0 0 0 1px var(--upp-line);
  cursor: pointer;
  list-style: none;
  position: relative;
}
.upp-ms-summary::-webkit-details-marker { display: none; }
.upp-ms-summary::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--upp-muted);
  border-bottom: 2px solid var(--upp-muted);
  transform: rotate(45deg);
}
.upp-ms[open] .upp-ms-summary {
  box-shadow: inset 0 0 0 2px var(--upp-accent), 0 0 0 4px var(--upp-accent-soft);
}
.upp-ms[open] .upp-ms-summary::after { transform: rotate(225deg); margin-top: -2px; }
.upp-ms-placeholder { color: var(--upp-muted); font-weight: 500; }
.upp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--upp-mint);
  color: var(--upp-mint-text);
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.upp-chip-primary {
  background: var(--upp-side);
  color: #ffffff;
}
.upp-chip-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}
.upp-ms-panel {
  margin-top: 8px;
  max-height: 280px;
  overflow: auto;
  padding: 10px 12px 8px;
  background: #ffffff;
  border-radius: var(--upp-radius-sm);
  box-shadow: inset 0 0 0 1px var(--upp-line), var(--upp-shadow-sm);
}
.upp-ms-search {
  width: 100%;
  margin: 0 0 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: var(--upp-radius-sm);
  background: var(--upp-bg-2);
  box-shadow: inset 0 0 0 1px var(--upp-line);
  font-size: 15px;
  font-family: inherit;
}
.upp-ms-opt { margin: 2px 0; padding: 4px 6px; border-radius: 8px; }
.upp-ms-opt:hover { background: var(--upp-apricot); }
.upp-ms-code { font-variant-numeric: tabular-nums; font-weight: 700; color: #7c5ce0; }
.upp-inline { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.upp-inline button { width: auto; margin: 0; padding: 10px 14px; font-size: 14px; box-shadow: none; }
.upp-kyc-override input[type="text"] { min-width: 180px; max-width: 240px; }
.upp-kyc-override-box { margin-top: 18px; }
.upp-wide-input { width: 100%; }

.upp-flash { padding: 12px 14px; border-radius: 16px; margin-bottom: 14px; }
.upp-flash.ok { background: var(--upp-mint); color: var(--upp-mint-text); box-shadow: none; }
.upp-flash.err { background: var(--upp-err-bg); color: var(--upp-err); box-shadow: none; }

.upp-kyc-banner {
  background: var(--upp-card);
  border: 0;
  border-radius: var(--upp-radius);
  padding: 20px 18px;
  margin-bottom: 18px;
  box-shadow: var(--upp-shadow-sm);
}
.upp-row-btns { display: flex; gap: 10px; flex-wrap: wrap; }

.upp-steps { padding-left: 20px; color: var(--upp-muted); font-size: 14px; }
.upp-steps .active { color: var(--upp-text); font-weight: 650; }

.upp-invoice { max-width: 560px; }
.upp-logo { max-height: 48px; }
.upp-invoice .upp-logo {
  display: block;
  max-height: 64px;
  max-width: 220px;
  width: auto;
  object-fit: contain;
  margin: 0 0 16px;
}
.upp-logo-card {
  background: var(--upp-card);
  border-radius: var(--upp-radius);
  padding: 24px 22px;
  margin: 0 0 22px;
  max-width: 640px;
  box-shadow: inset 0 0 0 1px var(--upp-line), var(--upp-shadow-sm);
}
.upp-logo-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.upp-logo-card-copy .upp-note { margin-top: 4px; }
.upp-logo-stage { margin: 16px 0 18px; }
.upp-logo-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 104px;
  max-width: 280px;
  padding: 18px 22px;
  background:
    linear-gradient(180deg, #ffffff 0%, var(--upp-card-2) 100%);
  border-radius: var(--upp-radius-sm);
  box-shadow: inset 0 0 0 1px var(--upp-line);
}
.upp-logo-preview img {
  max-height: 72px;
  max-width: 220px;
  width: auto;
  object-fit: contain;
}
.upp-logo-preview-empty {
  color: var(--upp-muted);
  font-size: 13px;
  font-weight: 550;
}
.upp-logo-form input[type="file"] {
  display: block;
  width: 100%;
  padding: 12px 12px;
  margin-top: 8px;
  border-radius: var(--upp-radius-sm);
  background: var(--upp-card-2);
  box-shadow: inset 0 0 0 1px var(--upp-line);
  font-size: 14px;
}
.upp-logo-form .upp-row-btns { margin-top: 8px; }
.upp-qr img { background: #fff; padding: 10px; border-radius: 14px; box-shadow: var(--upp-shadow-sm); }
.upp-auth-wrap {
  background:
    linear-gradient(180deg, rgba(198, 245, 111, 0.18) 0%, transparent 42%),
    var(--upp-bg);
}
.upp-auth {
  max-width: 420px;
  padding: 36px 32px 28px;
}
.upp-auth h1 {
  margin: 0 0 8px;
  font-size: 26px;
}
.upp-auth .upp-sub {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.5;
}
.upp-auth .upp-banner { display: inline-flex; margin-bottom: 16px; }
.upp-auth .upp-lockup { display: flex; width: fit-content; }
.upp-auth-foot {
  margin: 24px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--upp-line);
  color: var(--upp-muted);
  font-size: 13px;
}
.upp-auth-foot a { font-weight: 650; }
.upp-pw-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.upp-pw-wrap input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  margin-top: 0;
}
.upp-pw-wrap .upp-pw-toggle {
  width: auto;
  min-width: 4.5rem;
  margin-top: 0;
  flex: 0 0 auto;
}
.upp-pw-actions { margin: 4px 0 10px; }
.upp-form .upp-pw-actions .upp-pw-toggle,
.upp-form .upp-pw-wrap .upp-pw-toggle {
  width: auto;
  min-width: 4.5rem;
}

fieldset {
  border: 0;
  border-radius: var(--upp-radius-sm);
  margin: 0 0 12px;
  padding: 0;
}

.upp-req { color: var(--upp-err); }
.upp-phone-row {
  display: grid;
  grid-template-columns: minmax(7.2rem, 9.6rem) 1fr;
  gap: 8px;
  margin-top: 6px;
  align-items: stretch;
}
.upp-phone-row select,
.upp-phone-row input {
  margin-top: 0;
  width: 100%;
}
.upp-phone-row select {
  font-variant-numeric: tabular-nums;
  padding-left: 10px;
  padding-right: 8px;
}
label.upp-field-invalid .upp-phone-row select,
label.upp-field-invalid .upp-phone-row input {
  box-shadow: inset 0 0 0 2px var(--upp-err);
}
.upp-hint { display: block; font-size: 12px; color: var(--upp-muted); font-weight: normal; margin-top: 2px; }
.upp-field-err { display: block; color: var(--upp-err); font-size: 12px; font-weight: 550; margin-top: 4px; }
label.upp-field-invalid input,
label.upp-field-invalid textarea {
  border-color: var(--upp-err);
}
.upp-section-head { display: flex; align-items: center; gap: 8px; margin: 20px 0 8px; }
.upp-section-head h2 { margin: 0; font-size: 18px; }
.upp-verify-row {
  margin: 16px 0 8px;
  padding: 12px 14px;
  background: var(--upp-card-2);
  border-radius: var(--upp-radius-sm);
}
.upp-verify-row p { margin: 0 0 6px; }
.upp-verify-row p:last-child { margin-bottom: 0; }
.upp-col-picker { margin: 0 0 14px; }
.upp-col-picker summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; font-weight: 600; }
.upp-col-picker-list { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 8px 0 12px; }

.upp-dt-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 14px; }
.upp-dt-toolbar label { margin: 0; }
.upp-dt-toolbar .upp-col-picker { margin: 0; }
.upp-pager { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0 4px; color: var(--upp-muted); font-size: 13px; }
.upp-pager button { width: auto; min-height: 40px; padding: 8px 12px; background: #ffffff; color: var(--upp-text); border: 1px solid var(--upp-line); }
.upp-row-actions { display: inline-flex; gap: 6px; align-items: center; }
.upp-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; min-height: 40px; padding: 0; margin: 0;
  background: #ffffff; color: var(--upp-text);
  border: 1px solid var(--upp-line); border-radius: var(--upp-radius-sm);
  text-decoration: none; cursor: pointer; font-size: 16px; line-height: 1;
}
.upp-icon-btn:hover { background: #e4e7ec; color: var(--upp-text); }
.upp-modal {
  background: var(--upp-card); color: var(--upp-text);
  border: 0; border-radius: var(--upp-radius);
  padding: 22px 20px;
  width: min(520px, calc(100vw - 32px));
  max-width: min(520px, calc(100vw - 32px));
  height: fit-content;
  max-height: 90vh;
  max-height: min(90vh, calc(100dvh - 32px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  box-shadow: var(--upp-shadow);
  /* Top-layer when showModal(); position:fixed keeps the open-attribute fallback above the iPad drawer/header. */
  position: fixed;
  top: max(16px, env(safe-area-inset-top, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  left: max(16px, env(safe-area-inset-left, 0px));
  margin: auto;
  z-index: 100;
}
.upp-modal::backdrop { background: rgba(0,0,0,0.6); }
.upp-modal .upp-row-btns { margin-top: 12px; }

.upp-onboard-shell { min-height: 100vh; }
.upp-onboard-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--upp-line);
  background: var(--upp-card);
}
.upp-onboard-brand { font-size: 20px; letter-spacing: -0.03em; }
.upp-onboard-later { margin-left: auto; }
.upp-onboard { max-width: 680px; margin: 0 auto; padding: 12px 16px 96px; }
.upp-progress { font-size: 14px; color: var(--upp-muted); margin: 0 0 8px; font-weight: 600; }
.upp-progress-bar { height: 10px; background: #ffffff; border-radius: 99px; overflow: hidden; margin-bottom: 22px; box-shadow: none; }
.upp-progress-bar > span { display: block; height: 100%; background: var(--upp-accent); border-radius: 99px; }
.upp-onboard h1 { font-size: 30px; margin: 0 0 10px; }
.upp-onboard .upp-form { max-width: none; }
.upp-onboard-actions { display: flex; gap: 12px; margin-top: 24px; }
.upp-onboard-actions a, .upp-onboard-actions button {
  min-height: 48px;
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin: 0;
  text-decoration: none;
}

.upp-checklist { list-style: none; padding: 0; margin: 18px 0; display: flex; flex-direction: column; gap: 12px; }
.upp-checklist li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  min-height: 56px;
  background: var(--upp-card);
  border: 0;
  border-radius: var(--upp-radius);
  box-shadow: var(--upp-shadow-sm);
  font-weight: 550;
}

.upp-pill { font-size: 12px; letter-spacing: 0; text-transform: none; padding: 6px 10px; border-radius: 99px; font-weight: 650; }
.upp-pill.due { background: var(--upp-accent-soft); color: var(--upp-accent); box-shadow: none; }
.upp-pill.done { background: var(--upp-mint); color: var(--upp-mint-text); box-shadow: none; }

.upp-status-hero {
  background: var(--upp-card);
  border: 0;
  border-radius: var(--upp-radius);
  padding: 28px 24px;
  box-shadow: var(--upp-shadow);
}
.upp-status-hero.review { border-color: var(--upp-gold); }
.upp-status-hero.complete { border-color: var(--upp-gold); }
.upp-status-hero.restricted { border-color: var(--upp-accent); }

.upp-next { margin: 8px 0 0; padding-left: 20px; color: var(--upp-muted); line-height: 1.6; }
.upp-onboard input, .upp-onboard select, .upp-onboard textarea { min-height: 48px; font-size: 16px; }
.upp-onboard .upp-check { min-height: 48px; padding: 8px 0; }
.upp-onboard .upp-ms-opt { min-height: 40px; padding: 4px 6px; }
.upp-onboard .upp-ms-opt input[type=checkbox] { min-height: 18px; width: 18px; }
.upp-onboard .upp-ms-search { min-height: 40px; }
.upp-onboard .upp-help-btn { min-height: 22px; width: 22px; font-size: 13px; }

.upp-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 10px;
}
.upp-section-head h2 { margin: 0; font-size: 18px; }
.upp-help { position: relative; display: inline-block; vertical-align: middle; }
.upp-help-btn {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 0;
  padding: 0;
  border-radius: 99px;
  background: var(--upp-side);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
}
.upp-help-btn::-webkit-details-marker { display: none; }
.upp-help[open] .upp-help-btn {
  background: var(--upp-accent);
}
.upp-help-pop {
  position: absolute;
  z-index: 12;
  left: 0;
  top: calc(100% + 8px);
  width: min(360px, 86vw);
  padding: 12px 14px;
  background: #ffffff;
  color: var(--upp-text);
  border-radius: var(--upp-radius-sm);
  box-shadow: var(--upp-shadow), inset 0 0 0 1px var(--upp-line);
}
.upp-help-pop strong { display: block; margin: 0 0 4px; font-size: 13px; }
.upp-help-pop p { margin: 0; color: var(--upp-muted); font-size: 13px; font-weight: 450; line-height: 1.45; }
.upp-yn { margin: 0 0 16px; }
.upp-yn-label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  font-weight: 550;
  margin-bottom: 6px;
}
.upp-yn select { width: 100%; }
.upp-onboard-actions {
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, transparent, var(--upp-bg) 28%);
  padding: 16px 0 10px;
}

.upp-nav-drop { display: flex; flex-direction: column; gap: 4px; }
.upp-nav-drop > summary.upp-nav-label {
  list-style: none;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin: 6px 0 2px;
  border-radius: 8px;
  user-select: none;
  color: var(--upp-side-text);
}
.upp-nav-drop > summary.upp-nav-label::-webkit-details-marker { display: none; }
.upp-nav-drop > summary.upp-nav-label::marker { content: ""; }
.upp-nav-drop > summary.upp-nav-label::after {
  content: "›";
  display: inline-block;
  font-size: 16px;
  line-height: 1;
  color: var(--upp-side-muted);
}
.upp-nav-drop[open] > summary.upp-nav-label::after { content: "›"; transform: rotate(90deg); }
.upp-nav-drop > summary.upp-nav-label:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--upp-side-text);
  box-shadow: none;
}
.upp-nav-drop[open] > summary.upp-nav-label:hover {
  background: var(--upp-side-active);
  color: var(--upp-side);
}
.upp-nav-drop > a { margin-left: 8px; }

/* Tablet and phone (≤1024): drawer + scrollable page, not a squeezed 260px sticky sidebar */
@media (max-width: 1024px) {
  body.upp-desk { height: auto; overflow: auto; }
  body.upp-desk .upp-app { height: auto; max-height: none; overflow: visible; }
  html:has(body.upp-desk) { height: auto; overflow: auto; }
  .upp-app { display: block; }
  .upp-main, .upp-main-top, .upp-side { grid-column: auto; grid-row: auto; }
  .upp-main { overflow: visible; }
  .upp-side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 300px);
    z-index: 50;
    transform: translateX(-105%);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 16px max(36px, env(safe-area-inset-bottom, 0px));
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    display: block;
    background: var(--upp-side);
    box-shadow: var(--upp-shadow);
    visibility: hidden;
    transition: transform 0.22s ease, visibility 0s linear 0.22s;
    -webkit-overflow-scrolling: touch;
  }
  .upp-side.open { transform: translateX(0); visibility: visible; transition: transform 0.22s ease; }
  .upp-scrim {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(58, 36, 31, 0.28);
    border: 0;
    margin: 0;
    padding: 0;
    width: auto;
    min-height: 0;
    box-shadow: none;
    border-radius: 0;
  }
  .upp-side.open ~ .upp-scrim,
  .upp-scrim:not([hidden]) { display: block; }
  body:has(.upp-side.open) { overflow: hidden; }
  .upp-side-brand { margin-bottom: 10px; font-size: 20px; }
  .upp-side-merch { display: block; }
  .upp-nav {
    flex-direction: column;
    overflow: visible;
    gap: 14px;
  }
  .upp-nav-group, .upp-nav-drop { flex-direction: column; gap: 4px; }
  .upp-nav-label { display: flex; }
  .upp-nav-drop > summary.upp-nav-label { min-height: 48px; }
  .upp-nav a {
    white-space: normal;
    border-radius: 8px;
    background: transparent;
    padding: 10px 12px;
    min-height: 48px;
    box-shadow: none;
  }
  .upp-nav a:hover { background: rgba(255, 255, 255, 0.08); color: var(--upp-side-text); box-shadow: none; }
  .upp-nav a.active { background: var(--upp-side-active); color: var(--upp-side); box-shadow: none; }
  .upp-nav-drop > a.active { background: transparent; color: var(--upp-side-text); }
  .upp-menu { display: inline-flex; }
  .upp-metrics { grid-template-columns: 1fr 1fr; }
  .upp-who > .upp-who-email { display: none; }
  .upp-content { padding: 8px 14px 48px; }
  .upp-main-top {
    padding: 12px 14px;
    padding-top: max(12px, env(safe-area-inset-top, 0px));
    padding-right: max(14px, env(safe-area-inset-right, 0px));
    padding-left: max(14px, env(safe-area-inset-left, 0px));
    flex-wrap: wrap;
    row-gap: 8px;
    position: sticky;
    top: 0;
    z-index: 30;
  }
  .upp-nav a, .upp-nav-drop > summary, .upp-menu, .upp-btn, .upp-btn-ghost, .upp-filters button, .upp-form button, .upp-inline button {
    min-height: 48px;
  }
  .upp-icon-btn { width: 48px; min-height: 48px; }
  .upp-lang select, .upp-tz-summary, .upp-who a { min-height: 48px; }
  input, select, textarea { font-size: 16px; }
}

@media (max-width: 1180px) {
  .upp-wrap {
    align-items: flex-start;
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: max(28px, env(safe-area-inset-top, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    padding-bottom: max(28px, env(safe-area-inset-bottom, 0px));
    padding-left: max(16px, env(safe-area-inset-left, 0px));
  }
  .upp-auth, .upp-card {
    width: min(440px, 100%);
    max-width: 100%;
  }
  .upp-auth input, .upp-auth select,
  .upp-card input, .upp-card select, .upp-card textarea,
  .upp-pw-toggle {
    font-size: 16px;
    min-height: 48px;
  }
}
@media (max-width: 520px) {
  .upp-metrics { grid-template-columns: 1fr; }
  .upp-row { grid-template-columns: 1fr; }
  .upp-onboard { padding: 8px 12px 120px; }
  .upp-onboard h1 { font-size: 26px; }
  .upp-onboard-top { padding: 12px; }
  .upp-form { max-width: none; }
  .upp-card { padding: 26px 20px; }
  .upp-wrap {
    padding: 20px 12px;
    padding-top: max(20px, env(safe-area-inset-top, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
    padding-left: max(12px, env(safe-area-inset-left, 0px));
  }
}

@media print {
  .upp-side, .upp-menu, .upp-scrim, .upp-who, .upp-filters, .upp-col-picker, .upp-dt-toolbar, .upp-pager, .upp-icon-btn, .upp-modal, .upp-banner, .upp-kyc-banner, .upp-onboard-later { display: none !important; }
  .upp-app { display: block; }
  body.upp-desk, body.upp-desk .upp-app, .upp-main { height: auto !important; max-height: none !important; overflow: visible !important; }
  .upp-main-top { border: 0; background: transparent; }
  body { background: #fff; color: #111; }
  .upp-grid-table th, .upp-grid-table td { border: 1px solid #333; color: #111; background: #fff; }
  a { color: #111; }
}

.upp-card, .upp-content, .upp-main, .docs-main { overflow-wrap: anywhere; }
.upp-card h1, .upp-onboard h1 { overflow-wrap: anywhere; }
.upp-table-wrap, .upp-grid-table, .upp-grid-table th, .upp-grid-table td,
.docs-table-wrap, .docs-table, .docs-table th {
  overflow-wrap: normal;
  word-break: normal;
}
html, body { max-width: 100%; }
body { overflow-x: hidden; }

@media (max-width: 800px) {
  .upp-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .upp-filters label,
  .upp-filters button,
  .upp-filters .upp-btn,
  .upp-filters .upp-btn-ghost,
  .upp-filters a {
    width: 100%;
  }
  .upp-col-picker summary { width: 100%; }
  .upp-dt-toolbar { flex-direction: column; align-items: stretch; }
  .upp-dt-toolbar label, .upp-dt-toolbar .upp-btn-ghost, .upp-dt-toolbar a, .upp-dt-toolbar .upp-col-picker, .upp-dt-toolbar .upp-col-picker summary { width: 100%; }
  .upp-row-btns { flex-direction: column; align-items: stretch; }
  .upp-row-btns > a, .upp-row-btns > button { width: 100%; }
  .upp-form button, .upp-form .upp-btn, .upp-form .upp-btn-ghost { width: 100%; }
  .upp-form .upp-pw-actions .upp-pw-toggle,
  .upp-form .upp-pw-wrap .upp-pw-toggle { width: auto; }
}

@media (max-width: 640px) {
  .upp-lockup { font-size: 18px; gap: 8px; }
  .upp-mark { width: 28px; height: 28px; }
  button, .upp-btn, .upp-btn-ghost, .docs-panel, .docs-nav a {
    min-height: 48px;
  }
  input, select, textarea { min-height: 48px; font-size: 16px; }
}

input:-webkit-autofill,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--upp-text);
  caret-color: var(--upp-text);
  box-shadow: 0 0 0 1000px #ffffff inset, inset 0 0 0 1px var(--upp-line);
  transition: background-color 9999s ease-out 0s;
}
input[type=date]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: 0.7; }

input[type=checkbox], input[type=radio] { accent-color: var(--upp-accent); }

.upp-setup { display: flex; gap: 22px; align-items: flex-start; margin-top: 8px; }
.upp-setup-tabs { width: 240px; flex-shrink: 0; display: flex; flex-direction: column; gap: 2px; }
.upp-setup-tabs a {
  display: block; padding: 10px 12px; min-height: 44px; text-decoration: none;
  color: var(--upp-text); border-left: 3px solid transparent; border-radius: 0 8px 8px 0;
}
.upp-setup-tabs a.active { border-left-color: var(--upp-accent); background: var(--upp-card); color: var(--upp-accent); }
.upp-setup-body { flex: 1; min-width: 0; }
.upp-setup-body .upp-form { max-width: none; }
.upp-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 16px; }
.upp-form-row label { margin: 0; }
.upp-panel {
  background: var(--upp-card); border: 0; border-radius: var(--upp-radius);
  padding: 18px 18px 16px; margin: 14px 0; box-shadow: var(--upp-shadow-sm);
}
.upp-panel h2 { margin: 0 0 12px; font-size: 18px; letter-spacing: -0.02em; }
.upp-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.upp-bars { display: flex; flex-direction: column; gap: 8px; }
.upp-bar { display: grid; grid-template-columns: 140px 1fr minmax(72px, max-content); gap: 10px; align-items: center; font-size: 13px; }
.upp-bar b { text-align: right; white-space: normal; line-height: 1.3; }
.upp-legend div span:last-child { text-align: right; white-space: normal; }
.upp-bar i { display: block; height: 10px; background: var(--upp-side-active); border-radius: 99px; min-width: 0; }
.upp-pie {
  width: 160px; height: 160px; border-radius: 50%; margin: 8px auto 16px;
  box-shadow: inset 0 0 0 18px var(--upp-card);
  background: conic-gradient(var(--upp-side-active) 0deg, var(--upp-side) 120deg, var(--upp-accent) 240deg, var(--upp-card-2) 360deg);
}
.upp-legend { font-size: 13px; }
.upp-legend div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--upp-line); }
.upp-empty { text-align: center; color: var(--upp-muted); padding: 36px 16px; }
.upp-empty strong { display: block; color: var(--upp-text); font-size: 16px; margin-bottom: 6px; }
.upp-empty p { margin: 0; font-size: 13px; }
.upp-grid-table td.upp-empty-cell { white-space: normal; text-align: center; padding: 28px 16px; }
.upp-toggle { width: auto; min-height: 36px; padding: 6px 10px; font-size: 13px; }
.upp-note-banner {
  background: var(--upp-apricot); color: var(--upp-apricot-text);
  border: 0; border-radius: var(--upp-radius-sm);
  padding: 12px 14px; margin: 0 0 16px; font-size: 14px;
}
.upp-note-banner .upp-banner-link {
  color: var(--upp-accent);
  text-decoration: underline;
  font-weight: 700;
}
.upp-note-banner .upp-download-form {
  display: flex;
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  text-decoration: none;
}
@media (max-width: 1180px) {
  .upp-setup { flex-direction: column; }
  .upp-setup-tabs { width: 100%; }
  .upp-setup-tabs a { min-height: 48px; }
  .upp-panels { grid-template-columns: 1fr; }
  .upp-bar { grid-template-columns: 1fr; }
}

.upp-main, .upp-content { min-width: 0; max-width: 100%; }
.upp-content { overflow-x: hidden; }
.upp-panels, .upp-legend, .upp-bar, .upp-setup, .upp-setup-body { min-width: 0; max-width: 100%; }
@media (max-width: 420px) {
  .upp-banner { font-size: 10px; padding: 4px 6px; }
  .upp-content { overflow-x: hidden; }
  .upp-table-wrap { overflow-x: auto; }
}

/* —— UI polish (same brand tokens) —— */
.upp-skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 80;
  background: var(--upp-accent);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: var(--upp-radius-sm);
  text-decoration: none;
  font-weight: 600;
}
.upp-skip:focus { top: 12px; }

.upp-page-head { margin: 4px 0 22px; max-width: 52rem; }
.upp-page-head h1 {
  font-size: 28px;
  margin: 0 0 8px;
  letter-spacing: -0.035em;
}
.upp-page-lead { margin: 0; color: var(--upp-muted); font-size: 15px; line-height: 1.55; max-width: 62ch; }

.upp-badge, .upp-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  padding: 4px 10px;
  border-radius: 99px;
  line-height: 1.3;
  white-space: nowrap;
}
.upp-badge-ready, .upp-badge-ok, .upp-status-captured, .upp-status-approved, .upp-status-paid, .upp-status-accepted {
  background: var(--upp-mint); color: var(--upp-mint-text);
}
.upp-badge-partial, .upp-badge-warn, .upp-status-enrolled, .upp-status-pending {
  background: var(--upp-apricot); color: var(--upp-apricot-text);
}
.upp-badge-stub, .upp-badge-muted { background: var(--upp-card-2); color: var(--upp-muted); }
.upp-badge-err, .upp-status-declined, .upp-status-failed, .upp-status-rejected {
  background: var(--upp-err-bg); color: var(--upp-err);
}

.upp-id {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 220px;
}
.upp-id code,
.upp-id .upp-id-link {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  background: var(--upp-card-2);
  padding: 3px 8px;
  border-radius: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.upp-id .upp-id-link {
  color: #7c5ce0;
  text-decoration: none;
  font-weight: 650;
  display: inline-block;
}
.upp-id .upp-id-link:hover { color: #6a4bd1; text-decoration: underline; }
.upp-id-full code,
.upp-id-full .upp-id-link {
  max-width: none;
  overflow: visible;
  text-overflow: unset;
  word-break: break-all;
}
.upp-id .upp-icon-btn { width: 32px; min-height: 32px; font-size: 13px; }

.upp-btn-sm, .upp-inline .upp-btn-sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 13px;
  width: auto;
}

.upp-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 0;
  cursor: pointer;
  font-weight: 600;
}
.upp-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upp-switch-ui {
  width: 44px;
  height: 26px;
  border-radius: 99px;
  background: var(--upp-gold);
  position: relative;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px #c5d0cd;
}
.upp-switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: var(--upp-shadow-sm);
  transition: transform 0.16s ease;
}
.upp-switch input:checked + .upp-switch-ui { background: var(--upp-side-active); box-shadow: none; }
.upp-switch input:checked + .upp-switch-ui::after { transform: translateX(18px); }
.upp-switch input:focus-visible + .upp-switch-ui { outline: 2px solid var(--upp-accent); outline-offset: 2px; }

.upp-proc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
  margin: 8px 0 28px;
  align-items: stretch;
}
.upp-proc-card {
  background: var(--upp-card);
  border-radius: var(--upp-radius);
  padding: 16px 16px 14px;
  box-shadow: var(--upp-shadow-sm);
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-self: stretch;
  gap: 8px;
  min-width: 0;
  min-height: 100%;
  height: 100%;
  scroll-margin-top: 16px;
}
#processor-management { scroll-margin-top: 16px; }
.upp-proc-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 3.2em;
  gap: 10px;
}
.upp-proc-card h3 { margin: 0; font-size: 16px; letter-spacing: -0.02em; }
.upp-proc-id { margin: 0; color: var(--upp-muted); font-size: 12px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.upp-proc-card .upp-form { max-width: none; }
.upp-proc-card details { margin-top: 4px; }
.upp-proc-card details summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--upp-muted);
  min-height: 36px;
  display: flex;
  align-items: center;
}
.upp-proc-connect { margin-top: 6px; }
.upp-proc-creds { margin: 8px 0 0; }
.upp-proc-creds .upp-note { font-size: 12px; line-height: 1.45; }
.upp-proc-creds input[type="password"] {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}

.upp-create-fold {
  background: var(--upp-card);
  border-radius: var(--upp-radius);
  padding: 4px 16px 12px;
  margin: 0 0 20px;
  box-shadow: var(--upp-shadow-sm);
}
.upp-create-fold > summary {
  cursor: pointer;
  font-size: 16px;
  font-weight: 650;
  min-height: 48px;
  display: flex;
  align-items: center;
  list-style: none;
}
.upp-create-fold > summary::-webkit-details-marker { display: none; }
.upp-create-fold > summary::after {
  content: "New";
  margin-left: auto;
  font-size: 12px;
  font-weight: 650;
  color: #ffffff;
  background: var(--upp-accent);
  padding: 4px 10px;
  border-radius: 99px;
}
.upp-create-fold[open] > summary::after { content: "Close"; background: var(--upp-side); }

.upp-upload-card {
  background: var(--upp-card);
  border-radius: var(--upp-radius);
  padding: 18px 16px;
  margin: 12px 0 18px;
  box-shadow: var(--upp-shadow-sm), inset 0 0 0 1px var(--upp-line);
}
.upp-upload-card label { margin-bottom: 10px; }

.upp-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  max-width: 960px;
}
.upp-profile-grid section h2 {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.upp-profile-dl { display: grid; gap: 10px; margin: 0; }
.upp-profile-dl dt { color: var(--upp-muted); font-size: 12px; font-weight: 600; }
.upp-profile-dl dd { margin: 0; font-weight: 550; }

.upp-pay-amount { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.upp-pay-trust {
  margin-top: 18px;
  padding: 12px 14px;
  background: var(--upp-mint);
  color: var(--upp-mint-text);
  border-radius: var(--upp-radius-sm);
  font-size: 13px;
}
.upp-pay-trust p { margin: 0; }

.upp-filters.upp-is-loading button[type=submit] { opacity: 0.7; pointer-events: none; }
.upp-filters.upp-is-loading button[type=submit]::after {
  content: "";
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid #ffffff;
  border-right-color: transparent;
  border-radius: 50%;
  animation: upp-spin 0.6s linear infinite;
}
@keyframes upp-spin { to { transform: rotate(360deg); } }

.upp-skel {
  display: block;
  height: 12px;
  background: linear-gradient(90deg, var(--upp-card-2), #e4e7ec, var(--upp-card-2));
  background-size: 200% 100%;
  animation: upp-shimmer 1.2s ease-in-out infinite;
  border-radius: 6px;
}
@keyframes upp-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.upp-status-hero.complete { box-shadow: var(--upp-shadow-sm), inset 0 0 0 2px var(--upp-side-active); }
.upp-status-hero.review { box-shadow: var(--upp-shadow-sm), inset 0 0 0 2px var(--upp-gold); }
.upp-status-hero.restricted { box-shadow: var(--upp-shadow-sm), inset 0 0 0 2px var(--upp-accent); }

.upp-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0 0 16px;
  list-style: none;
}
.upp-steps li {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 99px;
  background: var(--upp-card);
  color: var(--upp-muted);
  box-shadow: var(--upp-shadow-sm);
}
.upp-steps li.active { background: var(--upp-accent-soft); color: var(--upp-accent); font-weight: 650; }
.upp-steps li.done { background: var(--upp-mint); color: var(--upp-mint-text); }

.upp-kyc-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.upp-kyc-banner p { margin: 0; flex: 1 1 220px; }

.upp-nav a:focus-visible { outline-color: #ffffff; }

@media (max-width: 1180px) {
  .upp-content { padding: 16px 14px 48px; }
  .upp-page-head h1 { font-size: 22px; }
  .upp-proc-grid { grid-template-columns: 1fr; }
}

.upp-banner-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  margin: 0 0 12px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--upp-side-text);
  border: 1px solid rgba(198, 245, 111, 0.5);
  border-radius: 10px;
  white-space: normal;
  max-width: 100%;
  overflow: visible;
  text-transform: none;
  letter-spacing: 0;
}
.upp-banner-side strong {
  color: var(--upp-side-active);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.upp-banner-side span { color: var(--upp-side-muted); font-size: 12px; font-weight: 500; }

.upp-dash { max-width: none; }
.upp-dash .upp-page-head { margin-bottom: 10px; }
.upp-dash-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.upp-filters-compact {
  padding: 8px 0;
  background: transparent;
  box-shadow: none;
  margin: 0;
}
.upp-actions-quiet {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.upp-text-link {
  background: none;
  color: #7c5ce0;
  font-weight: 600;
  min-height: auto;
  padding: 0;
  margin: 0;
  width: auto;
  box-shadow: none;
  text-decoration: none;
  display: inline;
}
.upp-text-link:hover { background: none; color: #6a4bd1; text-decoration: underline; }
.upp-metrics { grid-template-columns: minmax(180px, 1.4fr) repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0 0 8px; }
.upp-metric { padding: 10px 12px; }
.upp-metric-sub:empty { display: none; }
.upp-metric-primary { background: var(--upp-card); box-shadow: var(--upp-shadow); }
.upp-metric-primary .upp-metric-val { font-size: 30px; }

.upp-toolbar { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.upp-link-btn {
  background: none;
  color: var(--upp-muted);
  border: 0;
  box-shadow: none;
  min-height: 32px;
  padding: 4px 0;
  margin: 0;
  width: auto;
  font-size: 13px;
  font-weight: 600;
}
.upp-link-btn:hover { background: none; color: var(--upp-text); text-decoration: underline; }
.upp-more summary {
  cursor: pointer;
  color: var(--upp-muted);
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}
.upp-more summary::-webkit-details-marker { display: none; }
.upp-more[open] summary { color: var(--upp-text); }
.upp-th-sort { cursor: pointer; user-select: none; }
.upp-th-sort:hover { color: var(--upp-accent); }
.upp-th-sort[data-sort="asc"]::after { content: " ▲"; font-size: 10px; margin-left: 4px; }
.upp-th-sort[data-sort="desc"]::after { content: " ▼"; font-size: 10px; margin-left: 4px; }
.upp-grid-table th, .upp-grid-table td { padding: 10px 12px; }
.upp-grid-table tbody tr:nth-child(even) td { background: #ffffff; }
.upp-grid-table tbody tr:hover td { background: #e4e7ec; }

.upp-modal { max-width: min(520px, calc(100vw - 32px)); width: min(520px, calc(100vw - 32px)); }
.upp-modal .upp-form { max-width: none; }
.upp-dl-box {
  background: var(--upp-card);
  border-radius: var(--upp-radius);
  padding: 14px 16px;
  margin: 12px 0;
  box-shadow: var(--upp-shadow-sm);
}
.upp-dl-box .upp-btn { width: auto; }
.upp-profile-save { max-width: none; }
.upp-profile-save .upp-row-btns { margin-top: 8px; }
.upp-handoff { margin-top: 20px; }
.upp-handoff > summary {
  cursor: pointer;
  font-size: 18px;
  font-weight: 650;
  min-height: 44px;
  display: flex;
  align-items: center;
  list-style: none;
}
.upp-handoff > summary::-webkit-details-marker { display: none; }
.upp-handoff .upp-flash { margin: 0 0 12px; }
.upp-row-btns > button,
.upp-row-btns > .upp-btn { width: auto; margin-top: 0; }
.upp-proc-card.is-current { box-shadow: var(--upp-shadow-sm), inset 0 0 0 2px var(--upp-side-active); }
.upp-proc-card.is-off { opacity: 0.7; }
.upp-proc-manage { margin-top: 8px; }
.upp-proc-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.upp-proc-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #ffffff;
  color: var(--upp-text);
  border-radius: var(--upp-radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: inset 0 0 0 1px var(--upp-line);
}
.upp-proc-step-n {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--upp-mint);
  color: var(--upp-mint-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.upp-proc-hint { margin: 0; font-size: 13px; color: var(--upp-muted); }
.upp-proc-card {
  box-shadow: inset 0 0 0 1px var(--upp-line), var(--upp-shadow-sm);
}
.upp-proc-card .upp-badge,
.upp-proc-card form { align-self: flex-start; }
.upp-proc-body { min-height: 0; }
.upp-proc-actions {
  margin-top: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-top: 4px;
}
.upp-proc-card:has(.upp-proc-use) .upp-proc-actions {
  display: grid;
  grid-template-rows: 36px auto;
  align-items: start;
  justify-items: start;
  margin-top: 0;
}
.upp-proc-use {
  min-height: 36px;
  display: flex;
  align-items: center;
}
.upp-proc-use > p { margin: 0; }
.upp-proc-connect-slot { min-height: 36px; width: 100%; }
.upp-proc-actions > p { margin: 0; min-height: 36px; display: flex; align-items: center; }
.upp-proc-actions .upp-btn,
.upp-proc-actions button[type="submit"] { width: auto; min-width: 11.5rem; margin-top: 0; }
.upp-proc-search { display: block; margin: 0 0 14px; max-width: 420px; }
.upp-proc-search input[type="search"] {
  width: 100%;
  min-height: 48px;
  margin-top: 0;
}
.upp-proc-empty { margin: 8px 0 16px; color: var(--upp-muted); font-size: 14px; }
.upp-proc-card[hidden] { display: none !important; }
.upp-proc-connect summary {
  color: #7c5ce0;
}
.upp-acq-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.upp-acq-toggle .upp-switch { margin: 0; }
.upp-acq-back { margin: 0 0 8px; }
.upp-acq-detail {
  max-width: 720px;
}
.upp-acq-detail .upp-form { max-width: none; }
.upp-acq-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.upp-acq-meta .upp-proc-id { margin: 0 0 6px; }
.upp-acq-section {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--upp-line);
}
.upp-acq-section-first {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.upp-acq-section h2 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--upp-text);
}
.upp-acq-form .upp-row-btns { margin-top: 18px; }
@media (max-width: 1180px) {
  .upp-acq-detail { max-width: none; }
  .upp-acq-toggle { flex-wrap: wrap; min-height: 48px; }
  .upp-acq-form .upp-row-btns { flex-wrap: wrap; }
  .upp-tz-opt, .upp-find-opt, .upp-tz-search { min-height: 44px; }
}
.upp-btn, button[type="submit"] {
  transition: transform 120ms ease, filter 120ms ease;
}
.upp-btn:hover, button[type="submit"]:hover {
  filter: brightness(1.04);
}
.upp-empty { animation: upp-fade 280ms ease; }
@keyframes upp-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.upp-onboard { padding: 8px 16px 80px; }
.upp-onboard h1 { font-size: 26px; margin: 0 0 6px; }
.upp-status-hero { padding: 18px 16px; }
.upp-kyc-banner { padding: 12px 14px; margin-bottom: 12px; }
.upp-kyc-banner p { margin: 0; }

@media (max-width: 1100px) {
  .upp-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .upp-metric-primary { grid-column: 1 / -1; }
}
@media (max-width: 1180px) {
  .upp-dash-tools { flex-direction: column; align-items: stretch; }
  .upp-metrics { grid-template-columns: 1fr 1fr; }
  .upp-metric-primary { grid-column: 1 / -1; }
  .upp-proc-steps { grid-template-columns: 1fr; }
  .upp-auth { padding: 28px 22px 22px; }
}

/* —— Ledger desk (UPP Finance original product chrome) —— */
.upp-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7c5ce0;
}
.upp-page-head .upp-kicker { color: #7c5ce0; }
.upp-content {
  background:
    linear-gradient(180deg, rgba(165, 133, 255, 0.06) 0%, transparent 140px);
}
.upp-side-brand {
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(198, 245, 111, 0.35);
}
.upp-side-merch {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 6px 10px;
  background: rgba(198, 245, 111, 0.14);
  color: var(--upp-side-active);
  border-radius: 99px;
  font-size: 12px;
}
.upp-banner-side {
  background: rgba(0, 0, 0, 0.18);
  border-color: rgba(198, 245, 111, 0.45);
}
.upp-auth {
  position: relative;
  overflow: hidden;
  padding-left: 36px;
}
.upp-auth::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: var(--upp-side-active);
}
.upp-metric-primary {
  box-shadow: inset 4px 0 0 var(--upp-side-active), var(--upp-shadow);
}
.upp-grid-table th {
  background: #ffffff;
  color: var(--upp-muted);
}
.upp-ledger {
  background: var(--upp-card);
  border-radius: var(--upp-radius);
  box-shadow: var(--upp-shadow-sm);
  overflow: hidden;
  margin: 0 0 8px;
}
.upp-ledger .upp-table-wrap {
  box-shadow: none;
  border-radius: 0;
}
.upp-ledger .upp-col-picker,
.upp-ledger .upp-dt-toolbar {
  padding: 10px 14px 0;
  margin-bottom: 0;
}
.upp-ledger .upp-pager {
  padding: 4px 14px 12px;
  margin: 0;
}
.upp-filters.upp-desk-filter {
  box-shadow: none;
  border: 1px solid var(--upp-line);
  margin-bottom: 0;
  border-radius: var(--upp-radius) var(--upp-radius) 0 0;
  background: var(--upp-card);
}
.upp-filters.upp-desk-filter + .upp-ledger,
.upp-filters.upp-desk-filter + .upp-note + .upp-ledger {
  border-radius: 0 0 var(--upp-radius) var(--upp-radius);
  box-shadow: var(--upp-shadow-sm);
}
.upp-filters + .upp-dt-toolbar {
  background: var(--upp-card);
  padding: 12px 16px 0;
  margin-bottom: 0;
  border-left: 1px solid var(--upp-line);
  border-right: 1px solid var(--upp-line);
}
.upp-filters + .upp-dt-toolbar + .upp-ledger {
  border-radius: 0 0 var(--upp-radius) var(--upp-radius);
}
.upp-empty {
  padding: 48px 20px;
}
.upp-empty strong {
  font-size: 17px;
  letter-spacing: -0.02em;
}
.upp-onboard-top {
  background: var(--upp-side);
  color: var(--upp-side-text);
  border-bottom: 0;
}
.upp-onboard-top .upp-lockup,
.upp-onboard-brand { color: var(--upp-side-text); }
  .upp-onboard-top .upp-mark { background: #000; border-radius: 50%; box-shadow: 0 0 0 2px #fdcb0b; }
.upp-onboard-top .upp-banner {
  background: rgba(165, 133, 255, 0.12);
  color: var(--upp-side-active);
  border-color: rgba(198, 245, 111, 0.55);
}
.upp-onboard-later {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}
.upp-onboard-later:hover { background: rgba(255, 255, 255, 0.08); color: #ffffff; }
.upp-status-hero {
  position: relative;
  padding-left: 28px;
}
.upp-status-hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: var(--upp-side);
  border-radius: var(--upp-radius) 0 0 var(--upp-radius);
}
.upp-status-hero.complete::before { background: var(--upp-side-active); }
.upp-status-hero.restricted::before { background: var(--upp-accent); }
.upp-status-hero.review::before { background: var(--upp-gold); }
.upp-kyc-banner {
  box-shadow: inset 4px 0 0 var(--upp-accent), var(--upp-shadow-sm);
}
.upp-kyc-banner .upp-kicker { margin-bottom: 4px; color: var(--upp-accent); }
.upp-steps {
  gap: 8px;
  padding: 4px 0 8px;
  border-bottom: 1px solid var(--upp-line);
  margin-bottom: 20px;
}
.upp-steps li {
  box-shadow: inset 0 0 0 1px var(--upp-line);
}
.upp-steps li.active {
  background: var(--upp-side);
  color: #ffffff;
  box-shadow: none;
}
.upp-steps li.done {
  box-shadow: none;
}
.upp-modal {
  padding: 0 0 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.upp-modal h2 {
  background: var(--upp-side);
  color: #ffffff;
  margin: 0 0 16px;
  padding: 16px 22px;
  padding-top: max(16px, env(safe-area-inset-top, 0px));
  padding-left: max(22px, env(safe-area-inset-left, 0px));
  padding-right: max(22px, env(safe-area-inset-right, 0px));
  border-radius: 0;
  position: sticky;
  top: 0;
  z-index: 1;
}
.upp-modal > *:not(h2) {
  margin-left: max(22px, env(safe-area-inset-left, 0px));
  margin-right: max(22px, env(safe-area-inset-right, 0px));
}
.upp-modal#upp-confirm {
  padding: 22px 20px;
  padding-bottom: max(22px, env(safe-area-inset-bottom, 0px));
}
.upp-modal#upp-confirm > * {
  margin-left: 0;
  margin-right: 0;
}
/* iPad / phone: near-full-screen sheet so Create/Edit plan is fully reachable */
@media (max-width: 1180px) {
  .upp-modal {
    width: min(560px, calc(100vw - 16px));
    max-width: min(560px, calc(100vw - 16px));
  }
}
@media (max-width: 820px) {
  .upp-modal {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: 92vh;
    max-height: min(92vh, calc(100dvh - 16px));
  }
}
.upp-bar i {
  background: linear-gradient(90deg, var(--upp-side) 0%, var(--upp-side-active) 100%);
  height: 12px;
}
.upp-legend div:first-child {
  font-weight: 700;
  color: var(--upp-text);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom-color: var(--upp-line);
}
.upp-flash {
  box-shadow: inset 4px 0 0 currentColor;
}
.upp-sub-hero p { margin: 0 0 8px; }
.upp-toolbar .upp-btn { min-width: 140px; }
.upp-who a[href="/docs"] {
  background: var(--upp-side);
  color: #ffffff;
  box-shadow: none;
}
.upp-who a[href="/docs"]:hover { filter: brightness(1.06); }
.upp-who a[href="/pgui/jsp/logout"] { color: var(--upp-text); }
.upp-click-row { cursor: pointer; }
.upp-click-row:focus-visible { outline: 2px solid var(--upp-side-active); outline-offset: -2px; }
.upp-sale-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.upp-txn-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  background: var(--upp-card);
  border-radius: var(--upp-radius);
  padding: 22px 22px 18px;
  box-shadow: inset 4px 0 0 var(--upp-side-active), var(--upp-shadow);
  margin: 0 0 16px;
}
.upp-txn-hero-id { margin: 0 0 6px; font-size: 18px; }
.upp-txn-hero-sub { margin: 0; color: var(--upp-muted); font-size: 14px; }
.upp-txn-hero-right { text-align: right; }
.upp-txn-hero-amt {
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--upp-text);
  margin-bottom: 6px;
}
.upp-txn-hero-note { margin: 8px 0 0; font-size: 13px; color: var(--upp-muted); }
.upp-txn-actions { margin: 0 0 16px; }
.upp-txn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.upp-txn-panel {
  background: var(--upp-card);
  border-radius: var(--upp-radius);
  padding: 18px 18px 14px;
  box-shadow: inset 0 0 0 1px var(--upp-line), var(--upp-shadow-sm);
}
.upp-txn-panel h2 {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7c5ce0;
}
.upp-txn-dl {
  display: grid;
  grid-template-columns: minmax(120px, 38%) 1fr;
  gap: 8px 16px;
  margin: 0;
}
.upp-txn-dl dt { color: var(--upp-muted); font-size: 13px; }
.upp-txn-dl dd { margin: 0; font-weight: 550; word-break: break-word; }

.upp-ok { color: #7c5ce0; font-weight: 600; }
.upp-callout {
  padding: 14px 16px;
  border-radius: 10px;
  margin: 0 0 18px;
  border: 1px solid var(--upp-line);
  background: #ffffff;
  color: var(--upp-text);
  line-height: 1.45;
}
.upp-callout-warn {
  background: var(--upp-apricot);
  color: var(--upp-apricot-text);
  border-color: rgba(255, 194, 173, 0.28);
}
.upp-remit-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.upp-remit-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--upp-line);
  color: var(--upp-muted);
  font-size: 13px;
}
.upp-remit-steps li.is-current {
  border-color: #7c5ce0;
  color: var(--upp-ink);
  box-shadow: inset 0 0 0 1px #7c5ce0;
}
.upp-remit-steps li.is-done { color: #7c5ce0; }
.upp-remit-step-n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--upp-side);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.upp-remit-rails {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 0 18px;
}
.upp-remit-rail {
  display: block;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--upp-line);
  background: #ffffff;
  color: var(--upp-text);
  cursor: pointer;
}
.upp-remit-rail input { position: absolute; opacity: 0; pointer-events: none; }
.upp-remit-rail-k {
  display: block;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.upp-remit-rail span:last-child { color: var(--upp-muted); font-size: 13px; line-height: 1.4; }
.upp-remit-rail:has(input:checked),
.upp-remit-rail.is-on {
  border-color: #7c5ce0;
  box-shadow: inset 0 0 0 1px #7c5ce0;
}
.upp-remit-form:has([name=instrument][value=wallet]:checked) .upp-remit-bank,
.upp-remit-form.is-wallet .upp-remit-bank { display: none; }
.upp-remit-form:has([name=instrument][value=bank]:checked) .upp-remit-wallet,
.upp-remit-form.is-bank .upp-remit-wallet { display: none; }
.upp-remit-form { max-width: 860px; }
.upp-remit-quote,
.upp-remit-status,
.upp-remit-creds,
.upp-remit-recent {
  margin-bottom: 18px;
}
.upp-remit-quote header,
.upp-remit-status header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.upp-remit-quote h2,
.upp-remit-status h2,
.upp-remit-creds h2,
.upp-remit-recent h2 { margin: 0 0 10px; font-size: 18px; }

.upp-bank-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}
.upp-bank-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--upp-line);
  font-size: 12px;
  font-weight: 650;
  color: var(--upp-text);
}
.upp-bank-chip.is-soon { color: var(--upp-muted); font-weight: 550; }
.upp-bank-chip-soon {
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--upp-accent, #7c5ce0);
}
.upp-bank-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.upp-bank-steps li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--upp-line);
  color: var(--upp-muted);
  font-size: 13px;
  text-decoration: none;
  min-height: 44px;
}
.upp-bank-steps li.is-current a {
  border-color: #7c5ce0;
  color: var(--upp-ink);
  box-shadow: inset 0 0 0 1px #7c5ce0;
}
.upp-bank-steps li.is-done a { color: #7c5ce0; }
.upp-bank-step-n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--upp-side);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}
.upp-bank-form,
.upp-bank-recent,
.upp-bank-events-card,
.upp-bank-return {
  margin-bottom: 18px;
  max-width: 860px;
}
.upp-bank-form h2,
.upp-bank-recent h2,
.upp-bank-events-card h2 { margin: 0 0 10px; font-size: 18px; }
.upp-bank-events { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.upp-bank-events li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.upp-bank-event-type { font-size: 13px; color: var(--upp-muted); }
.upp-bank-funding { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }

.upp-einv-manage { margin-top: 8px; }
.upp-einv-manage h2 { margin-top: 0; }
.upp-einv-creds input[type="password"],
.upp-einv-card input[type="password"] {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  letter-spacing: 0.02em;
}
.upp-einv-seller { margin-top: 14px; }
.upp-einv-seller > summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
  min-height: 40px;
  display: flex;
  align-items: center;
  color: #7c5ce0;
}
.upp-einv-panel,
.upp-einv-card {
  background: var(--upp-card);
  border-radius: var(--upp-radius);
  padding: 18px 16px 16px;
  box-shadow: var(--upp-shadow-sm);
  margin: 18px 0;
}
.upp-einv-panel header,
.upp-einv-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.upp-einv-panel h3,
.upp-einv-card h3 { margin: 0; font-size: 17px; letter-spacing: -0.02em; }
.upp-einv-panel-off { box-shadow: var(--upp-shadow-sm), inset 0 0 0 1px rgba(33, 67, 68, 0.12); }
.upp-einv-submit { margin: 12px 0 4px; font-weight: 650; }
.upp-einv-tracks { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.upp-einv-errors { margin: 8px 0 0; padding-left: 18px; color: var(--upp-err, #9b1c1c); }
.upp-einv-err { margin: 4px 0 0; color: var(--upp-err, #9b1c1c); font-size: 12px; max-width: 28ch; }
.upp-einv-card { margin: 0; }
@media (max-width: 1180px) {
  .upp-auth { padding-left: 28px; }
  .upp-ledger .upp-col-picker,
  .upp-ledger .upp-dt-toolbar { padding-left: 12px; padding-right: 12px; }
  .upp-txn-grid { grid-template-columns: 1fr; }
  .upp-txn-hero { flex-direction: column; }
  .upp-txn-hero-right { text-align: left; }
  .upp-remit-rails,
  .upp-remit-steps,
  .upp-bank-steps,
  .upp-bank-funding { grid-template-columns: 1fr; }
}

.upp-switch.is-disabled { opacity: 0.55; cursor: not-allowed; }
.upp-switch.is-disabled input { cursor: not-allowed; }
.upp-method-manage { margin-top: 8px; }
.upp-method-list { display: grid; gap: 12px; margin: 16px 0; }
.upp-method-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--upp-radius);
  box-shadow: inset 0 0 0 1px var(--upp-line), var(--upp-shadow-sm);
  background: var(--upp-card);
}
.upp-method-row .upp-switch { grid-column: 1; }
.upp-method-row .upp-badge { justify-self: end; }
.upp-method-meta {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13px;
  color: var(--upp-muted);
  line-height: 1.45;
}
.upp-method-row.is-wired { box-shadow: inset 0 0 0 2px var(--upp-side-active), var(--upp-shadow-sm); }
.upp-pay-methods { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.upp-pay-method {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 650;
  box-shadow: inset 0 0 0 1px var(--upp-line);
}
.upp-pay-method.is-on { background: var(--upp-side-active); color: var(--upp-side); box-shadow: none; }

.upp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.upp-support {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  font-family: var(--upp-font);
}
.upp-support-bubble {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--upp-side);
  color: #fff;
  font: 650 14px/1 var(--upp-font);
  box-shadow: 0 12px 28px rgba(33, 67, 68, 0.28);
  cursor: pointer;
}
.upp-support-bubble:hover { background: #ffffff; }
.upp-support-bubble:focus-visible {
  outline: 3px solid var(--upp-accent);
  outline-offset: 3px;
}
.upp-support-bubble-icon { display: inline-flex; }
.upp-support-unread {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--upp-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.upp-support-unread[hidden],
.upp-support[data-open="1"] .upp-support-unread { display: none !important; }
.upp-support-panel {
  position: absolute;
  right: 0;
  bottom: 60px;
  width: min(380px, calc(100vw - 24px));
  height: min(520px, calc(100vh - 100px));
  display: flex;
  flex-direction: column;
  background: var(--upp-card);
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(33, 67, 68, 0.22);
  overflow: hidden;
}
.upp-support-panel[hidden] { display: none; }
.upp-support-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 16px 14px;
  background: var(--upp-side);
  color: #fff;
}
.upp-support-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--upp-side-muted);
}
.upp-support-head h2 {
  margin: 2px 0 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.upp-support-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--upp-side-active);
}
.upp-support-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.upp-support-close:hover { background: rgba(255,255,255,0.1); }
.upp-support-close:focus-visible { outline: 2px solid var(--upp-accent); outline-offset: 2px; }
.upp-support-msgs {
  flex: 1;
  overflow: auto;
  padding: 14px 14px 8px;
  background: var(--upp-bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.upp-support-empty {
  margin: auto;
  max-width: 28ch;
  text-align: center;
  color: var(--upp-muted);
  font-size: 14px;
}
.upp-support-empty p { margin: 0 0 8px; }
.upp-support-msg {
  max-width: 86%;
  padding: 8px 10px;
  border-radius: 12px;
  box-shadow: var(--upp-shadow-sm);
}
.upp-support-msg.is-mine {
  align-self: flex-end;
  background: var(--upp-side);
  color: #fff;
}
.upp-support-msg.is-theirs {
  align-self: flex-start;
  background: #ffffff;
  color: var(--upp-text);
}
.upp-support-from {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 650;
  opacity: 0.75;
}
.upp-support-text { margin: 0; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.upp-support-hint {
  margin: 0;
  padding: 6px 14px 0;
  font-size: 11px;
  color: var(--upp-quiet);
  background: var(--upp-card);
}
.upp-support-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
  padding: 10px 12px 12px;
  background: var(--upp-card);
}
.upp-support-form textarea {
  width: 100%;
  min-height: 44px;
  max-height: 96px;
  resize: none;
  border: 1px solid var(--upp-line);
  border-radius: 10px;
  padding: 8px 10px;
  font: 14px/1.4 var(--upp-font);
  background: var(--upp-bg);
  color: var(--upp-text);
}
.upp-support-form textarea:focus-visible {
  outline: 2px solid var(--upp-side);
  outline-offset: 1px;
}
.upp-support-send {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--upp-accent);
  color: #fff;
  font: 650 14px/1 var(--upp-font);
  cursor: pointer;
}
.upp-support-send:hover { background: var(--upp-accent-deep); }
.upp-support-send:focus-visible { outline: 3px solid var(--upp-side); outline-offset: 2px; }
@media (max-width: 520px) {
  .upp-support { right: 12px; bottom: 12px; }
  .upp-support-panel { width: calc(100vw - 24px); height: min(70vh, 520px); }
}

.upp-main,
.upp-side,
.upp-support-msgs {
  scrollbar-width: auto;
  scrollbar-color: #13171e #e4e7ec;
}
.upp-main::-webkit-scrollbar,
.upp-side::-webkit-scrollbar,
.upp-support-msgs::-webkit-scrollbar {
  width: 16px;
  height: 16px;
}
.upp-main::-webkit-scrollbar-track,
.upp-side::-webkit-scrollbar-track,
.upp-support-msgs::-webkit-scrollbar-track {
  background: #e4e7ec;
}
.upp-side::-webkit-scrollbar-track {
  background: #13171e;
}
.upp-main::-webkit-scrollbar-thumb,
.upp-side::-webkit-scrollbar-thumb,
.upp-support-msgs::-webkit-scrollbar-thumb {
  background: #13171e;
  border-radius: 8px;
  border: 3px solid #e4e7ec;
}
.upp-side::-webkit-scrollbar-thumb {
  background: #7c5ce0;
  border-color: #13171e;
}
.upp-main::-webkit-scrollbar-thumb:hover,
.upp-support-msgs::-webkit-scrollbar-thumb:hover {
  background: #e4e7ec;
}

.upp-rate-schemes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 12px 0 18px;
}
.upp-rate-scheme {
  margin: 0;
  padding: 16px 16px 12px;
  border-radius: var(--upp-radius-sm);
  box-shadow: inset 0 0 0 1px var(--upp-line);
  background: var(--upp-card);
  min-width: 0;
}
.upp-rate-scheme h3,
.upp-rate-scheme h4 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.upp-rate-scheme-head { margin: 0 0 10px; }
.upp-rate-scheme-meta {
  margin: 0;
  color: var(--upp-muted);
  font-size: 12px;
  font-weight: 600;
}
.upp-rate-card .upp-form-row { margin: 0; }
.upp-rate-profile h2,
.upp-rate-card h3 { color: var(--upp-text); }
.upp-rate-paytype { margin: 18px 0; }
.upp-rate-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px 12px;
  min-width: 0;
}
.upp-rate-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
  margin: 0;
  white-space: normal;
}
.upp-rate-field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--upp-muted);
  white-space: normal;
  overflow-wrap: anywhere;
}
.upp-rate-field-fixed .upp-rate-field-label,
.upp-rate-field-pct .upp-rate-field-label { letter-spacing: 0.01em; }
.upp-rate-field input[type="number"],
.upp-rate-grid input[type="number"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-top: 0;
  min-height: 44px;
  padding: 8px 10px;
}
.upp-rate-intl {
  margin: 12px 0 0;
  min-height: 40px;
  white-space: normal;
}
.upp-rate-form,
.upp-rate-form.upp-form,
form.upp-form:has(.upp-rate-card) {
  max-width: none;
}
.upp-rate-products,
.upp-rate-merchant-fees {
  margin: 12px 0 18px;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
}
.upp-rate-products-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}
.upp-rate-products-table th,
.upp-rate-products-table td {
  padding: 10px 12px;
  text-align: start;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  border-bottom: 1px solid var(--upp-line);
}
.upp-rate-products-table thead th {
  color: var(--upp-muted);
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
}
.upp-rate-products-table .upp-rate-prod-name {
  width: 34%;
  font-weight: 650;
  color: var(--upp-text);
}
.upp-rate-products-table .upp-rate-field {
  margin: 0;
  min-width: 0;
}
.upp-rate-products-table input[type="number"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.upp-rate-card .upp-grid-table th,
.upp-rate-card .upp-grid-table td {
  white-space: normal;
}
@media (max-width: 720px) {
  .upp-rate-products-table,
  .upp-rate-products-table thead,
  .upp-rate-products-table tbody,
  .upp-rate-products-table tr,
  .upp-rate-products-table th,
  .upp-rate-products-table td {
    display: block;
    width: 100%;
  }
  .upp-rate-products-table thead { display: none; }
  .upp-rate-products-table tr {
    margin: 0 0 12px;
    padding: 12px;
    border-radius: var(--upp-radius-sm);
    box-shadow: inset 0 0 0 1px var(--upp-line);
    background: var(--upp-card);
  }
  .upp-rate-products-table th,
  .upp-rate-products-table td {
    border: 0;
    padding: 6px 0;
  }
  .upp-rate-products-table .upp-rate-prod-name { width: auto; }
}
.upp-rate-grid-wrap { overflow-x: auto; }
.upp-rate-card .upp-table-wrap { max-width: 100%; }
.upp-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.upp-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  max-width: none;
}
.upp-lang-label { margin: 0; font-weight: 600; }
.upp-lang select {
  width: auto;
  min-width: 7.5rem;
  max-width: 11rem;
  margin-top: 0;
  min-height: 40px;
  padding: 6px 12px;
  border-radius: 99px;
  background: #ffffff;
  color: var(--upp-text);
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}
.upp-lang select:focus {
  box-shadow: inset 0 0 0 2px var(--upp-accent), 0 0 0 4px var(--upp-accent-soft);
}
.upp-auth .upp-lang { margin: 0 0 14px; }
.upp-who { flex-wrap: wrap; margin-inline-start: auto; }
html[lang="ar"] body {
  font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Noto Sans Arabic", Arial, var(--upp-font);
}
html[dir="rtl"] .upp-app {
  grid-template-columns: minmax(0, 1fr) 260px;
}
html[dir="rtl"] .upp-side { grid-column: 2; }
html[dir="rtl"] .upp-main,
html[dir="rtl"] .upp-main-top { grid-column: 1; }
html[dir="rtl"] .upp-nav-drop > a { margin-left: 0; margin-right: 8px; }
html[dir="rtl"] .upp-setup-tabs a {
  border-left: 0;
  border-right: 3px solid transparent;
  border-radius: 8px 0 0 8px;
}
html[dir="rtl"] .upp-setup-tabs a.active { border-right-color: var(--upp-accent); }
html[dir="rtl"] .upp-auth { padding-left: 28px; padding-right: 36px; }
html[dir="rtl"] .upp-auth::before { left: auto; right: 0; }
html[dir="rtl"] .upp-metric-primary { box-shadow: inset -4px 0 0 var(--upp-side-active), var(--upp-shadow); }
@media (max-width: 1180px) {
  html[dir="rtl"] .upp-app { grid-template-columns: none; }
  html[dir="rtl"] .upp-side,
  html[dir="rtl"] .upp-main,
  html[dir="rtl"] .upp-main-top { grid-column: auto; }
  html[dir="rtl"] .upp-side {
    left: auto;
    right: 0;
    transform: translateX(105%);
    padding-left: 16px;
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
  html[dir="rtl"] .upp-side.open { transform: translateX(0); }
}

.upp-tz { position: relative; margin: 0; }
.upp-tz-summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 4px 4px 10px;
  border-radius: 8px;
  background: transparent;
  color: var(--upp-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.upp-tz-summary::-webkit-details-marker { display: none; }
.upp-tz[open] .upp-tz-summary { background: #ffffff; }
.upp-tz-label { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upp-tz-clock { display: inline-flex; color: var(--upp-text); }
.upp-tz-panel {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 4px);
  z-index: 60;
  width: min(260px, 86vw);
  background: #ffffff;
  border: 1px solid var(--upp-line, #e4e7ec);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(33, 67, 68, 0.16);
  padding: 0;
  overflow: hidden;
}
.upp-tz-search-lab { display: block; margin: 0; border-bottom: 1px solid var(--upp-line, #e4e7ec); }
.upp-tz-search {
  width: 100%;
  min-height: 36px;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #ffffff;
  color: var(--upp-text);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
}
.upp-tz-search:focus { outline: none; box-shadow: inset 0 0 0 2px var(--upp-accent, #7c5ce0); }
.upp-tz-list {
  max-height: 220px;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.upp-tz-opt {
  width: 100%;
  text-align: start;
  background: #ffffff;
  color: var(--upp-text);
  border: 0;
  border-radius: 0;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  min-height: 34px;
}
.upp-tz-opt:hover { background: #f4f5f7; color: var(--upp-text); }
.upp-tz-opt[aria-current="true"] {
  background: #13171e;
  color: #fff;
}
.upp-dash-tools .upp-filters-compact { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.upp-dash-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  margin: 0 0 10px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  max-width: none;
}
.upp-dash-dates, .upp-dash-picks {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}
.upp-dash-dates label, .upp-dash-picks label { margin: 0; }
.upp-dash-dates input[type="date"] { margin-top: 0; min-width: 9.5rem; }
.upp-find { position: relative; margin: 0; min-width: 14rem; }
.upp-find-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  min-width: 14rem;
  max-width: 20rem;
  padding: 8px 12px;
  border-radius: 8px;
  background: #ffffff;
  color: var(--upp-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--upp-line, #e4e7ec);
}
.upp-find-summary::-webkit-details-marker { display: none; }
.upp-find-summary::after { content: "▾"; color: var(--upp-muted); font-size: 11px; }
.upp-find-drop[open] .upp-find-summary { box-shadow: inset 0 0 0 2px #7c5ce0; }
.upp-find-panel {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 4px);
  z-index: 50;
  width: min(280px, 86vw);
  background: #ffffff;
  border: 1px solid var(--upp-line, #e4e7ec);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(33, 67, 68, 0.16);
  overflow: hidden;
}
.upp-find-search-lab { display: block; margin: 0; border-bottom: 1px solid var(--upp-line, #e4e7ec); }
.upp-find-q {
  width: 100%;
  min-height: 36px;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #ffffff;
  color: var(--upp-text);
  padding: 8px 12px;
  font-size: 13px;
}
.upp-find-q:focus { outline: none; box-shadow: inset 0 0 0 2px var(--upp-accent, #7c5ce0); }
.upp-find-list { max-height: 220px; overflow: auto; display: flex; flex-direction: column; }
.upp-find-opt {
  width: 100%;
  text-align: start;
  background: #ffffff;
  color: var(--upp-text);
  border: 0;
  border-radius: 0;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  min-height: 34px;
}
.upp-find-opt:hover { background: #f4f5f7; color: var(--upp-text); }
.upp-find-opt[aria-current="true"] { background: #13171e; color: #fff; }
@media (max-width: 1180px) {
  .upp-dash-filters { flex-direction: column; align-items: stretch; }
  .upp-dash-picks, .upp-find, .upp-find-summary { width: 100%; max-width: none; }
}

/* Hosted checkout / Completing payment / response — all viewports */
.upp-pay-page {
  width: 100%;
}
.upp-pay-amount {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--upp-text);
}
.upp-wait-dots {
  display: flex;
  gap: 0.35rem;
  margin: 1.1rem 0 1.4rem;
  align-items: center;
}
.upp-wait-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #7c5ce0;
  opacity: 0.25;
  animation: upp-wait-pulse 1s ease-in-out infinite;
}
.upp-wait-dot:nth-child(2) { animation-delay: 0.15s; }
.upp-wait-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes upp-wait-pulse {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}
.upp-pay-cta,
.upp-pay-page button[type="submit"],
.upp-pay-page .upp-btn {
  width: 100%;
}
.upp-pay-result {
  box-shadow: none;
  border-radius: 0;
  background: transparent;
}
.upp-pay-result .upp-table {
  min-width: 100%;
}
.upp-pay-result .upp-table th {
  padding-right: 16px;
}
.upp-result { text-align: center; }
.upp-result .upp-lockup { justify-content: center; }
.upp-result-icon { margin: 18px auto 6px; width: 56px; height: 56px; }
.upp-result h1 { margin: 6px 0 10px; }
.upp-result .upp-result-reason { color: var(--upp-text); margin: 0 auto 6px; max-width: 34em; }
.upp-result dl.upp-meta { text-align: start; margin: 18px auto; max-width: 340px; }
.upp-result .upp-note { margin-top: 14px; }
.upp-result .upp-btn { display: inline-block; text-align: center; margin-top: 8px; }

/* Phone (≤768): iPhone Safari + Android Chrome. Tablet drawer stays at ≤1180. */
@media (max-width: 768px) {
  .upp-main-top {
    align-items: center;
    row-gap: 10px;
  }
  .upp-main-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .upp-who {
    flex: 1 1 100%;
    width: 100%;
    margin-inline-start: 0;
    justify-content: flex-start;
    gap: 8px;
  }
  .upp-who a,
  .upp-lang select,
  .upp-tz-summary {
    min-height: 44px;
  }
  .upp-tz-label { display: none; }
  .upp-lang select {
    min-width: 0;
    max-width: 9rem;
    width: auto;
  }
  .upp-content {
    padding: 10px 12px calc(88px + env(safe-area-inset-bottom, 0px));
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
  }
  .upp-page-head { max-width: none; }
  .upp-page-head h1 { font-size: 22px; }
  .upp-toolbar {
    justify-content: stretch;
    flex-wrap: wrap;
  }
  .upp-toolbar .upp-btn,
  .upp-toolbar .upp-btn-ghost {
    width: 100%;
    min-width: 0;
  }
  .upp-dash-dates {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .upp-dash-dates label,
  .upp-dash-dates input,
  .upp-dash-dates button,
  .upp-dash-dates .upp-btn {
    width: 100%;
  }
  .upp-dash-dates input[type="date"] { min-width: 0; }
  .upp-form-row { grid-template-columns: 1fr; }
  .upp-method-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }
  .upp-method-row .upp-badge { justify-self: start; }
  .upp-actions-quiet .upp-text-link,
  .upp-text-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .upp-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .upp-grid-table th:first-child,
  .upp-grid-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--upp-card);
    box-shadow: 1px 0 0 var(--upp-line);
  }
  .upp-grid-table th:first-child {
    background: #ffffff;
    z-index: 3;
    top: 0;
  }
  .upp-grid-table tbody tr:hover td:first-child { background: #e4e7ec; }
  .upp-support {
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
  }
  .upp-support-panel {
    width: calc(100vw - 24px);
    height: min(70vh, calc(100dvh - 88px));
  }
  .upp-pay-page .upp-card h1 { font-size: 24px; }
  .upp-pay-cta,
  .upp-pay-page button[type="submit"],
  .upp-pay-page .upp-btn {
    width: 100%;
    min-height: 48px;
  }
  button,
  .upp-btn,
  .upp-btn-ghost,
  .upp-filters button,
  .upp-form button {
    touch-action: manipulation;
  }
}

@media (max-width: 390px) {
  .upp-main-title { font-size: 16px; }
  .upp-page-head h1,
  .upp-auth h1,
  .upp-pay-page .upp-card h1 { font-size: 22px; }
  .upp-card { padding: 22px 16px; }
  .upp-who a { padding: 0 10px; }
}

html[dir="rtl"] .upp-support {
  right: auto;
  left: max(12px, env(safe-area-inset-left, 0px));
}
@media (max-width: 768px) {
  html[dir="rtl"] .upp-who { margin-inline-end: 0; }
  html[dir="rtl"] .upp-grid-table th:first-child,
  html[dir="rtl"] .upp-grid-table td:first-child {
    left: auto;
    right: 0;
    box-shadow: -1px 0 0 var(--upp-line);
  }
  html[dir="rtl"] .upp-support {
    left: max(12px, env(safe-area-inset-left, 0px));
    right: auto;
  }
}

.upp-totp-qr {
  display: inline-flex;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--upp-line);
  margin: 8px 0 14px;
}
.upp-totp-qr svg {
  display: block;
  width: 220px;
  height: 220px;
}
.upp-totp-manual {
  margin: 12px 0 18px;
  padding: 14px 16px;
  background: var(--upp-card);
  border: 1px solid var(--upp-line);
  border-radius: 12px;
  max-width: 28rem;
}
.upp-totp-manual p { margin: 0 0 8px; }
.upp-totp-secret {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  word-break: break-all;
}
.upp-recovery-codes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px 16px;
  padding: 12px 16px 12px 28px;
  background: var(--upp-card);
  border-radius: 12px;
  border: 1px solid var(--upp-line);
}
.upp-recovery-codes code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
}
.upp-mfa-banner { box-shadow: inset 4px 0 0 var(--upp-accent), var(--upp-shadow-sm); }

/* UPP contrast fix v7 — force readable desk chrome everywhere */
.upp-desk, .upp-desk .upp-main, .upp-desk .upp-content {
  background-color: #f4f5f7;
  color: #1a1d26;
}
.upp-desk .upp-card,
.upp-desk .upp-card-lite,
.upp-desk .upp-metric,
.upp-desk .upp-chart-card {
  background: #ffffff;
  color: #1a1d26;
  border: 1px solid #e4e7ec;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}
.upp-desk .upp-grid-table th {
  background: #f4f5f7 !important;
  color: #5c6570 !important;
}
.upp-desk .upp-grid-table td {
  background: #ffffff !important;
  color: #1a1d26 !important;
}
.upp-desk .upp-grid-table tbody tr:nth-child(even) td {
  background: #f7f8fa !important;
}
.upp-desk .upp-grid-table tbody tr:hover td {
  background: #f3f0ff !important;
}
.upp-desk .upp-btn-ghost,
.upp-desk .upp-icon-btn,
.upp-desk .upp-pager button,
.upp-desk #upp-dt-pager button {
  background: #ffffff !important;
  color: #1a1d26 !important;
  -webkit-text-fill-color: #1a1d26 !important;
  border: 1px solid #e4e7ec !important;
  box-shadow: none !important;
}
.upp-desk .upp-btn-ghost:hover,
.upp-desk .upp-icon-btn:hover,
.upp-desk .upp-pager button:hover,
.upp-desk #upp-dt-pager button:hover {
  background: #f4f5f7 !important;
  color: #1a1d26 !important;
  -webkit-text-fill-color: #1a1d26 !important;
}
.upp-desk .upp-icon-btn {
  font-size: 16px;
  line-height: 1;
}
.upp-desk button:disabled,
.upp-desk .upp-btn:disabled,
.upp-desk .upp-btn-ghost:disabled {
  opacity: 0.55 !important;
  color: #5c6570 !important;
  -webkit-text-fill-color: #5c6570 !important;
  background: #f4f5f7 !important;
}
.upp-desk .upp-id-link,
.upp-desk .upp-grid-table a,
.upp-desk .upp-table a {
  color: #7c5ce0 !important;
}
.upp-desk a.upp-btn,
.upp-desk button.upp-btn,
.upp-desk .upp-pay-cta,
.upp-desk button[type="submit"]:not(.upp-btn-ghost):not(.upp-tz-opt):not(.upp-find-opt):not(:disabled) {
  background: #7c5ce0 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border: 0 !important;
}
.upp-desk a.upp-btn:hover,
.upp-desk button.upp-btn:hover,
.upp-desk .upp-pay-cta:hover,
.upp-desk button[type="submit"]:not(.upp-btn-ghost):not(.upp-tz-opt):not(.upp-find-opt):not(:disabled):hover {
  background: #6a4bd1 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* UPP contrast fix v7 extras — form controls + filter strip */
.upp-desk .upp-filters,
.upp-desk .upp-dt-toolbar,
.upp-desk .upp-ledger,
.upp-desk .upp-table-wrap {
  background-color: #ffffff !important;
  color: #1a1d26 !important;
  border: 1px solid #e4e7ec;
}
.upp-desk input[type=text],
.upp-desk input[type=password],
.upp-desk input[type=email],
.upp-desk input[type=number],
.upp-desk input[type=tel],
.upp-desk input[type=date],
.upp-desk input[type=search],
.upp-desk input[type=url],
.upp-desk select,
.upp-desk textarea,
.upp-desk #upp-dt-length,
.upp-desk #upp-dt-search {
  background: #ffffff !important;
  color: #1a1d26 !important;
  -webkit-text-fill-color: #1a1d26 !important;
  border: 0 !important;
  box-shadow: inset 0 0 0 1px #e4e7ec !important;
  color-scheme: light;
}
.upp-desk input:focus,
.upp-desk select:focus,
.upp-desk textarea:focus,
.upp-desk #upp-dt-search:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px #7c5ce0 !important;
}
.upp-desk input::placeholder,
.upp-desk textarea::placeholder {
  color: #8b939e !important;
  -webkit-text-fill-color: #8b939e !important;
  opacity: 1 !important;
}
.upp-desk a.upp-btn-ghost {
  background: #ffffff !important;
  color: #1a1d26 !important;
  -webkit-text-fill-color: #1a1d26 !important;
  border: 1px solid #e4e7ec !important;
}
.upp-desk .upp-grid-table th:first-child,
.upp-desk .upp-grid-table td:first-child {
  background: #ffffff !important;
  color: #1a1d26 !important;
}
.upp-desk .upp-grid-table th:first-child {
  background: #f4f5f7 !important;
  color: #5c6570 !important;
}

/* UPP docs contrast fix ink8 — readable ink on light docs surfaces */
.upp-docs {
  background: #f4f5f7 !important;
  color: #1a1d26 !important;
}
.upp-docs .docs-callout {
  background: #f4f0ff !important;
  color: #1a1d26 !important;
  border-color: rgba(124, 92, 224, 0.35) !important;
}
.upp-docs .docs-callout--mint {
  background: #e7f6ee !important;
  color: #1a1d26 !important;
  border-color: rgba(6, 118, 71, 0.28) !important;
  border-left-color: #067647 !important;
}
.upp-docs .docs-cta-outline,
.upp-docs a.docs-cta-outline {
  background: #ffffff !important;
  color: #1a1d26 !important;
  -webkit-text-fill-color: #1a1d26 !important;
  box-shadow: inset 0 0 0 1px #e4e7ec !important;
}
.upp-docs .docs-cta-outline:hover,
.upp-docs a.docs-cta-outline:hover {
  background: #f4f5f7 !important;
  color: #6a4bd1 !important;
  -webkit-text-fill-color: #6a4bd1 !important;
}
.upp-docs .docs-main,
.upp-docs .docs-main p,
.upp-docs .docs-main li,
.upp-docs .docs-main dd,
.upp-docs .docs-main td,
.upp-docs .docs-main th,
.upp-docs .docs-main h1,
.upp-docs .docs-main h2,
.upp-docs .docs-main h3,
.upp-docs .docs-main h4,
.upp-docs .docs-foot {
  color: #1a1d26;
}
.upp-docs .docs-lede,
.upp-docs .docs-main .upp-sub,
.upp-docs .docs-card p,
.upp-docs .tour-pin-note {
  color: #5c6570 !important;
}
.upp-docs .docs-main a:not(.docs-cta):not(.docs-panel):not(.docs-card):not(.tour-prev):not(.tour-next) {
  color: #7c5ce0 !important;
  -webkit-text-fill-color: #7c5ce0 !important;
}
.upp-docs .docs-main a:not(.docs-cta):not(.docs-panel):not(.docs-card):not(.tour-prev):not(.tour-next):hover {
  color: #6a4bd1 !important;
  -webkit-text-fill-color: #6a4bd1 !important;
}
.upp-docs .docs-side {
  background: #13171e !important;
  color: #ffffff !important;
}
.upp-docs .docs-nav a {
  color: #c5cad3 !important;
  -webkit-text-fill-color: #c5cad3 !important;
}
.upp-docs .docs-nav a:hover {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: rgba(255, 255, 255, 0.08) !important;
}
.upp-docs .docs-nav a.active {
  background: #7c5ce0 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
.upp-docs .docs-nav-label {
  color: #c5cad3 !important;
}
.upp-docs .docs-table-wrap,
.upp-docs .docs-table {
  background: #ffffff !important;
  color: #1a1d26 !important;
}
.upp-docs .docs-table th {
  background: #f4f5f7 !important;
  color: #5c6570 !important;
}
.upp-docs .docs-table td {
  color: #1a1d26 !important;
}
.upp-docs .docs-code,
.upp-docs .docs-main pre {
  background: #f4f5f7 !important;
  color: #1a1d26 !important;
}
.upp-docs .docs-code-label {
  color: #7c5ce0 !important;
}
.upp-docs .tour-cta-card {
  background: #ffffff !important;
  color: #1a1d26 !important;
  border-color: #e4e7ec !important;
}
.upp-docs .tour-cta-card h2,
.upp-docs .tour-cta-card p {
  color: #1a1d26 !important;
}
.upp-docs .tour-outline {
  background: #ffffff !important;
  border-color: #e4e7ec !important;
}
.upp-docs .tour-outline a {
  color: #1a1d26 !important;
  -webkit-text-fill-color: #1a1d26 !important;
  background: #ffffff !important;
  border-color: #e4e7ec !important;
}
.upp-docs .tour-outline a:hover {
  border-color: #7c5ce0 !important;
  color: #6a4bd1 !important;
  -webkit-text-fill-color: #6a4bd1 !important;
}
.upp-docs .tour-outline a.is-active {
  background: #f4f0ff !important;
  color: #6a4bd1 !important;
  -webkit-text-fill-color: #6a4bd1 !important;
  border-color: #7c5ce0 !important;
}
.upp-docs .tour-metric,
.upp-docs .tour-rows {
  background: #ffffff !important;
  color: #1a1d26 !important;
  border-color: #e4e7ec !important;
}
.upp-docs .tour-metric strong,
.upp-docs .tour-rows div {
  color: #1a1d26 !important;
}
.upp-docs .tour-metric em {
  color: #8b939e !important;
}
.upp-docs .tour-rows .ok {
  color: #067647 !important;
}
.upp-docs .tour-rows .bad {
  color: #b42318 !important;
}
.upp-docs .tour-step-nav .tour-prev {
  color: #1a1d26 !important;
  -webkit-text-fill-color: #1a1d26 !important;
  background: #ffffff !important;
  box-shadow: inset 0 0 0 1px #e4e7ec !important;
}
.upp-docs .tour-step-nav .tour-next {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: #7c5ce0 !important;
}
.upp-docs .tour-mock-side span.on {
  background: #7c5ce0 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Light chrome: sidebar, top bar, page header, export, chart, switches */
.upp-main-top {
  background: #ffffff;
  border-bottom: 1px solid #e4e7ec;
}
.upp-env-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
  padding: 3px 8px;
  border-radius: 99px;
  background: #fff6e5;
  color: #b54708;
  border: 1px solid #f5d9a8;
}
.upp-env-badge.is-live {
  background: #e7f6ee;
  color: #067647;
  border-color: #abefc6;
}
.upp-docs-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 99px;
  background: #13171e;
  color: #ffffff !important;
  text-decoration: none;
  font-size: 13px;
  font-weight: 650;
}
.upp-docs-pill:hover { background: #0e1218; color: #ffffff !important; }
.upp-account { position: relative; }
.upp-account > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 99px;
  background: #ffffff;
  color: #1a1d26;
  border: 1px solid #e4e7ec;
  font-size: 13px;
  font-weight: 600;
  max-width: 220px;
}
.upp-account > summary::-webkit-details-marker { display: none; }
.upp-account-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upp-account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 180px;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
  padding: 4px;
  display: flex;
  flex-direction: column;
}
.upp-account-menu a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  color: #1a1d26;
  text-decoration: none;
  background: transparent;
  box-shadow: none;
  font-weight: 600;
}
.upp-account-menu a:hover { background: #f4f5f7; }
.upp-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  max-width: none;
}
.upp-page-copy { min-width: 0; flex: 1; }
.upp-page-head h1 { font-size: 32px; letter-spacing: -0.03em; }
.upp-page-lead { color: #5c6570; }
.upp-page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.upp-page-actions .upp-btn,
.upp-page-actions .upp-btn-ghost,
.upp-page-actions a { width: auto; margin: 0; }
.upp-kyc-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-left: 4px solid #7c5ce0;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.upp-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.upp-chart-card {
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  padding: 16px;
  margin: 8px 0 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.upp-chart-card h2 { margin: 0 0 8px; font-size: 16px; }
.upp-chart { display: block; width: 100%; height: auto; }
.upp-section-title { margin: 8px 0; font-size: 16px; }
.upp-export { position: relative; }
.upp-export > summary { list-style: none; cursor: pointer; width: auto; }
.upp-export > summary::-webkit-details-marker { display: none; }
.upp-export-menu {
  position: absolute;
  z-index: 25;
  right: 0;
  top: calc(100% + 4px);
  min-width: 160px;
  background: #ffffff;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
  padding: 4px;
  display: flex;
  flex-direction: column;
}
.upp-export-menu a,
.upp-export-menu button {
  width: 100%;
  margin: 0;
  min-height: 36px;
  justify-content: flex-start;
  background: transparent !important;
  color: #1a1d26 !important;
  -webkit-text-fill-color: #1a1d26 !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 8px;
  padding: 8px 10px;
  font-weight: 600;
  text-decoration: none;
}
.upp-export-menu a:hover,
.upp-export-menu button:hover { background: #f4f5f7 !important; }
.upp-switch-ui { background: #e4e7ec; box-shadow: inset 0 0 0 1px #d0d5dd; }
.upp-switch input:checked + .upp-switch-ui { background: #067647; }
.upp-switch input:checked + .upp-switch-ui::after { transform: translateX(18px); }
.upp-nav-drop > summary.upp-nav-label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: #ffffff;
  min-height: 40px;
  margin: 2px 0;
}
.upp-nav-drop > summary.upp-nav-label .upp-nav-text { color: #ffffff; }
.upp-nav-drop > summary.upp-nav-label::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  margin-top: -3px;
  flex: 0 0 auto;
}
.upp-nav-drop[open] > summary.upp-nav-label,
.upp-nav-drop[open] > summary.upp-nav-label:hover {
  background: transparent;
  color: #ffffff;
}
.upp-nav-drop[open] > summary.upp-nav-label::after { transform: rotate(45deg); margin-top: 2px; color: #c5cad3; }
.upp-side .upp-nav a.active,
.upp-side .upp-nav a.active .upp-nav-text {
  background: #7c5ce0;
  color: #ffffff;
}
.upp-auth-wrap { background: #f4f5f7; }
.upp-auth { padding: 32px 28px; }
.upp-auth::before { display: none; content: none; width: 0; }
.upp-card, .upp-metric, .upp-ledger {
  border: 1px solid #e4e7ec;
}
.upp-ok { color: #067647; }
button:hover, .upp-btn:hover { background: #6a4bd1; }
@media (max-width: 900px) {
  .upp-metrics { grid-template-columns: 1fr 1fr; }
  .upp-page-head { flex-direction: column; }
  .upp-page-actions { justify-content: flex-start; }
}
@media (max-width: 768px) {
  .upp-ledger .upp-grid-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .upp-ledger .upp-grid-table,
  .upp-ledger .upp-grid-table tbody { display: block; width: 100%; }
  .upp-ledger .upp-grid-table tr {
    display: block;
    margin: 0 0 8px;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
  }
  .upp-ledger .upp-grid-table td,
  .upp-ledger .upp-grid-table td:first-child {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    white-space: normal;
    border: 0;
    padding: 4px 0;
    background: transparent !important;
    color: #1a1d26 !important;
  }
  .upp-ledger .upp-grid-table td::before {
    content: attr(data-label);
    color: #5c6570;
    font-size: 12px;
    font-weight: 650;
    margin-right: 8px;
  }
}

.upp-rail-fees { max-width: none; }
.upp-fee-block { margin: 0 0 14px; border: 1px solid var(--upp-line, #e6e8ee); border-radius: 12px; padding: 12px 14px 4px; }
.upp-fee-block legend { font-weight: 700; padding: 0 6px; }
.upp-fee-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 14px; }
.upp-fee-fields label { margin: 0; }
.upp-fee-balances { list-style: none; padding: 0; margin: 8px 0 16px; display: flex; gap: 16px; flex-wrap: wrap; }
.upp-fee-balances li { background: #f6f4fc; border-radius: 10px; padding: 10px 14px; }
.upp-check { display: flex; align-items: center; gap: 8px; }
.upp-card-admin { display: grid; gap: 12px; }
.upp-card-admin-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--upp-line, #e6e8ee); }
.upp-card-admin-row .upp-note { margin-left: 8px; }
#upp-import-card { display: grid; gap: 10px; max-width: 520px; }
#upp-unlinked-cards h3 { margin: 8px 0; font-size: 16px; }

/* Chargeback case actions: keep the column narrow so the table fits at 1440px. */
.upp-cb-action { display: grid; gap: 8px; min-width: 220px; max-width: 280px; }
.upp-cb-action form.upp-inline { display: grid; grid-template-columns: 1fr; gap: 6px; margin: 0; }
.upp-cb-action select, .upp-cb-action input[type="text"], .upp-cb-action input[type="file"] { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; font-size: 13px; }
.upp-cb-action button { justify-self: start; }
.upp-cb-action .upp-note { white-space: normal; overflow-wrap: anywhere; font-size: 12px; margin: 0; }
td[data-col="action"] { vertical-align: top; }
/* Refund confirmation panel in reports and transaction detail. */
.upp-refund-fold > summary { list-style: none; cursor: pointer; display: inline-block; }
.upp-refund-fold > summary::-webkit-details-marker { display: none; }
.upp-refund-fold[open] > form { display: grid; gap: 8px; margin-top: 8px; padding: 10px; border: 1px solid var(--upp-line, #e6e8ee); border-radius: 10px; background: #fff; max-width: 260px; }
.upp-refund-fold .upp-refund-amt { display: grid; gap: 4px; font-size: 13px; margin: 0; }
.upp-refund-fold .upp-refund-amt input { width: 100%; box-sizing: border-box; }

/* Expanded menu arrow: chevron only. */
.upp-nav-drop[open] > summary.upp-nav-label::after { content: ""; }
#rpt-subs td,#rpt-subs th{padding-right:8px}#rpt-subs td[data-col=customer],#rpt-subs td[data-col=plan]{white-space:normal;overflow-wrap:anywhere;min-width:9em}#rpt-subs td[data-col=customer] .upp-note{margin:0;font-size:12px}#rpt-subs td[data-col=next],#rpt-subs td[data-col=token],#rpt-subs td[data-col=action]{white-space:nowrap}
@media (max-width:1380px){#rpt-subs [data-col=source]{display:none}#rpt-subs td,#rpt-subs th{padding-right:6px}}
.upp-desk-filter{flex-wrap:wrap;row-gap:8px}.upp-desk-filter .upp-amt-input{width:7.5em}.upp-filter-reset{align-self:flex-end}.upp-result-summary{margin:6px 0 10px}
.upp-dash-charts{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);gap:12px;margin:8px 0 16px;align-items:stretch}
.upp-dash-charts .upp-chart-card{margin:0;min-width:0}
@media (max-width:1100px){.upp-dash-charts{grid-template-columns:minmax(0,1fr)}}
.upp-chart-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:6px}
.upp-chart-head h2{margin:0;font-size:16px}
.upp-chart-sub{margin:2px 0 0;font-size:12px;color:#5c6570}
.upp-chart-total{text-align:right;display:flex;flex-direction:column;gap:2px}
.upp-chart-total strong{font-size:18px;color:#1a1d26;font-variant-numeric:tabular-nums}
.upp-chart-total span{font-size:12px;color:#5c6570}
.upp-chart-wrap{position:relative}
.upp-chart-grid{stroke:#eceef3;stroke-width:1}
.upp-chart-base{stroke:#cfd4dc}
.upp-chart-axis{fill:#6b7280;font-size:11px;font-family:inherit;font-variant-numeric:tabular-nums}
.upp-chart-unit{font-weight:600}
.upp-bar-hit{fill:transparent;cursor:default}
.upp-bar-slot:hover .upp-bar-hit,.upp-bar-slot.is-active .upp-bar-hit{fill:rgba(124,92,224,.06)}
.upp-bar{transition:fill .12s}
.upp-bar-slot:hover .upp-bar,.upp-bar-slot.is-active .upp-bar{fill:#5b3fc4}
.upp-chart-tip{position:absolute;top:4px;transform:translateX(-50%);background:#1a1d26;color:#fff;border-radius:8px;padding:6px 10px;font-size:12px;line-height:1.35;pointer-events:none;white-space:nowrap;display:flex;flex-direction:column;box-shadow:0 6px 16px rgba(16,24,40,.18);z-index:5}
.upp-chart-tip[hidden]{display:none}
.upp-chart-tip strong{font-weight:600}
.upp-chart-note{margin:6px 0 0;font-size:12px;color:#5c6570}
.upp-chart-empty{display:flex;flex-direction:column;justify-content:center;align-items:center;min-height:200px;border:1px dashed #d7dbe3;border-radius:8px;background:#fafbfc;color:#5c6570;text-align:center;padding:16px}
.upp-chart-empty p{margin:2px 0}
.upp-chart-empty strong{color:#1a1d26}
.upp-chart-empty-sm{min-height:140px;flex:1 1 auto}
.upp-outcomes-body{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding-top:6px}
.upp-donut{width:140px;height:140px;flex:0 0 140px}
.upp-donut-total{font-size:22px;font-weight:700;fill:#1a1d26}
.upp-donut-label{font-size:11px;fill:#6b7280}
.upp-legend{list-style:none;margin:0;padding:0;flex:1 1 140px;display:flex;flex-direction:column;gap:8px;min-width:140px}
.upp-legend li{display:grid;grid-template-columns:12px 1fr auto;column-gap:8px;align-items:center;font-size:13px}
.upp-dot{width:10px;height:10px;border-radius:50%;display:inline-block}
.upp-legend-value{font-weight:600;font-variant-numeric:tabular-nums;text-align:right}
.upp-legend-value em{font-style:normal;font-weight:400;color:#6b7280;margin-left:4px;font-size:12px}
.upp-legend-sub{grid-column:2 / 4;font-size:12px;color:#6b7280}
.upp-legend{max-width:340px}
.upp-page-head{flex-wrap:wrap}.upp-page-copy{flex:1 1 300px;min-width:260px}.upp-page-head h1{overflow-wrap:normal;word-break:normal}
.upp-dash-charts .upp-chart-types{grid-column:1 / -1}
.upp-types-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 32px;padding-top:4px}
@media (max-width:900px){.upp-types-body{grid-template-columns:minmax(0,1fr)}}
.upp-types-col h3{margin:0 0 8px;font-size:12px;font-weight:600;color:#5c6570;text-transform:uppercase;letter-spacing:.04em}
.upp-type-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.upp-type-top{display:flex;justify-content:space-between;align-items:baseline;gap:12px;font-size:13px}
.upp-type-label{display:inline-flex;align-items:center;gap:8px;min-width:0}
.upp-type-value{display:inline-flex;align-items:baseline;gap:8px;white-space:nowrap;font-variant-numeric:tabular-nums}
.upp-type-value em{font-style:normal;color:#6b7280;font-size:12px}
.upp-type-track{height:8px;border-radius:4px;background:#eef0f4;margin-top:5px;overflow:hidden}
.upp-type-track span{display:block;height:100%;border-radius:4px}
/* Filter bar grid (reports and lists): labels above fields, amount range as one group, actions right-aligned on the last row */
@media (min-width:801px){
.upp-filters:not(.upp-filters-compact){display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px 16px;align-items:end}
.upp-filters:not(.upp-filters-compact) > label,.upp-filters:not(.upp-filters-compact) > .upp-amt-group{display:flex;flex-direction:column;align-items:stretch;gap:6px;margin:0;min-width:0;font-size:13px;font-weight:600}
.upp-filters:not(.upp-filters-compact) > label > input,.upp-filters:not(.upp-filters-compact) > label > select,.upp-filters:not(.upp-filters-compact) > label > .upp-search-choice{width:100%;min-width:0;margin:0}
.upp-filters:not(.upp-filters-compact) > .upp-amt-group{grid-column:span 2}
.upp-filters:not(.upp-filters-compact) > .upp-filter-actions{grid-column:1/-1}
.upp-filters:not(.upp-filters-compact) > button,.upp-filters:not(.upp-filters-compact) > a.upp-filter-reset{justify-self:start}
}
.upp-field-label{display:block}
.upp-amt-pair{display:flex;align-items:center;gap:8px;min-width:0}
.upp-amt-pair .upp-amt-input,.upp-desk-filter .upp-amt-pair .upp-amt-input{flex:1 1 0;width:auto;min-width:0;margin:0}
.upp-amt-sep{color:var(--upp-muted);font-weight:400}
.upp-filter-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:10px}
.upp-filter-actions > button,.upp-filter-actions > a,.upp-filter-actions > .upp-export{margin:0;align-self:center}
.upp-filter-actions .upp-filter-reset{align-self:center}
.upp-table-tools{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;padding:10px 14px;border-bottom:1px solid var(--upp-line)}
.upp-table-tools > .upp-col-picker,.upp-ledger .upp-table-tools > .upp-col-picker{margin:0;padding:0;flex:1 1 auto;min-width:0}
.upp-table-tools > .upp-col-picker > summary{min-height:36px;font-size:14px}
.upp-table-tools > .upp-col-picker[open]{flex-basis:100%}
.upp-table-tools > .upp-dt-toolbar,.upp-ledger .upp-table-tools > .upp-dt-toolbar{margin:0 0 0 auto;padding:0;border:0!important;background:transparent!important}
.upp-dt-length{display:inline-flex!important;flex-direction:row!important;align-items:center;gap:8px;white-space:nowrap;margin:0;font-size:14px;font-weight:500}
.upp-dt-length #upp-dt-length{width:auto!important;min-width:4.5em;margin:0}
@media (max-width:800px){.upp-filter-actions{justify-content:stretch}.upp-filter-actions > *{flex:1 1 auto}.upp-amt-group{display:flex;flex-direction:column;gap:6px}}
@media print{.upp-table-tools{display:none!important}}
@media (min-width:801px){.upp-dt-toolbar{align-items:center}.upp-dt-search{display:inline-flex!important;flex-direction:row!important;align-items:center;gap:8px;white-space:nowrap;margin:0}.upp-dt-search #upp-dt-search{width:16em;margin:0}}
@media (min-width:801px){.upp-filters:not(.upp-filters-compact) > .upp-filter-actions{grid-column:-3/-1;min-height:44px}}

/* Shared list tables: fit the content area at 1024px and up (all panel pages).
   Columns shrink and wrap; long emails, IDs and names break; actions are compact
   equal-size buttons. Horizontal scroll stays only as a fallback on narrow screens. */
.upp-table-wrap { overflow-x: auto; }
.upp-grid-table {
  width: 100%;
  min-width: 0;
  table-layout: auto;
  font-size: 13px;
}
.upp-grid-table th,
.upp-grid-table td {
  padding: 8px 7px;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
  vertical-align: middle;
  min-width: 0;
}
.upp-grid-table th {
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: normal;
  word-break: normal;
}
.upp-grid-table th:first-child, .upp-grid-table td:first-child { padding-inline-start: 12px; }
.upp-grid-table th:last-child, .upp-grid-table td:last-child { padding-inline-end: 12px; }
/* Short codes, amounts and dates stay on one line where they are short anyway. */
.upp-grid-table td.upp-num, .upp-grid-table td.upp-nowrap { white-space: nowrap; }
/* Action cells: compact, equal-size buttons and links, wrapping instead of overflowing. */
.upp-grid-table td .upp-inline,
.upp-grid-table td form { display: inline-flex; margin: 0; gap: 4px; }
.upp-grid-table td button,
.upp-grid-table td .upp-btn,
.upp-grid-table td .upp-btn-ghost,
.upp-grid-table td .upp-btn-sm,
.upp-grid-table td .upp-inline button {
  width: auto;
  min-width: 64px;
  min-height: 28px;
  margin: 2px 4px 2px 0;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.2;
  border-radius: 6px;
  box-shadow: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
[dir="rtl"] .upp-grid-table td button,
[dir="rtl"] .upp-grid-table td .upp-btn,
[dir="rtl"] .upp-grid-table td .upp-btn-ghost { margin: 2px 0 2px 4px; }
.upp-grid-table td > a:not(.upp-btn):not(.upp-btn-ghost) { white-space: nowrap; display: inline-flex; align-items: center; min-height: 28px; padding: 0 4px; font-size: 12px; font-weight: 600; }
.upp-grid-table td .upp-id-link { max-width: none; }
.upp-grid-table td select,
.upp-grid-table td input:not([type=checkbox]):not([type=radio]) { min-width: 0; max-width: 100%; }
/* Never pin the first column: it hid the ID once the table scrolled. */
.upp-grid-table th:first-child,
.upp-grid-table td:first-child { position: static; box-shadow: none; }
.upp-grid-table thead th { position: sticky; top: 0; z-index: 1; }
@media (max-width: 900px) {
  .upp-grid-table { width: max-content; min-width: 100%; }
  .upp-grid-table th, .upp-grid-table td { white-space: nowrap; overflow-wrap: normal; }
}
/* Compact copy icon and status pill inside list tables. */
.upp-grid-table .upp-id { gap: 4px; }
.upp-grid-table .upp-id .upp-icon-btn { width: 24px; min-width: 24px; min-height: 24px; padding: 0; margin: 0; font-size: 12px; }
.upp-grid-table .upp-badge, .upp-grid-table .upp-status { padding: 2px 8px; font-size: 11px; white-space: nowrap; }
/* Long unbroken values (emails, IDs, references, URLs) may break anywhere; words never do. */
.upp-grid-table td.upp-brk { overflow-wrap: anywhere; }
/* Action groups wrap onto a second line instead of widening the column. */
.upp-grid-table td > div, .upp-grid-table td > span, .upp-grid-table td [class*="action"] { flex-wrap: wrap; max-width: 100%; }
.upp-grid-table td[data-col="action"], .upp-grid-table td[data-col="actions"] { min-width: 0; }
.upp-grid-table th { letter-spacing: 0; }

/* Payment links: compact expiry picker in the action cell. */
#rpt-pbl td[data-col=action] select{width:auto;min-width:0;max-width:9em;min-height:28px;margin:2px 4px 2px 0;padding:2px 6px;font-size:12px}
#rpt-pbl td[data-col=expires],#rpt-pbl td[data-col=timeLeft]{white-space:nowrap}

/* More reports hub */
.upp-more-reports { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.upp-more-report .upp-note { margin-top: 2px; }

/* ---- Report pages (.upp-report): one header, tidy filter grid, summary strip, ledger table ---- */
.upp-report { max-width: 100%; }
.upp-report .upp-page-head { margin: 0 0 18px; padding: 0 0 16px; border-bottom: 1px solid #e4e7ec; align-items: flex-end; }
.upp-report .upp-page-head h1 { font-size: 26px; line-height: 1.2; letter-spacing: -0.02em; margin: 2px 0 6px; }
.upp-report .upp-page-lead { max-width: 72ch; margin: 0; color: #5c6570; font-size: 14px; }
.upp-report .upp-kicker { margin: 0; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #7c5ce0; font-weight: 700; }

/* Filter bar: a card with a four column grid, labels above fields, actions on the right of the last row */
.upp-report .upp-filters.upp-desk-filter {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 16px; align-items: end;
  padding: 16px 18px; margin: 0 0 14px; border: 1px solid #e4e7ec !important; border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.upp-report .upp-filters.upp-desk-filter > label,
.upp-report .upp-filters.upp-desk-filter > .upp-amt-group {
  display: flex; flex-direction: column; gap: 6px; margin: 0; min-width: 0;
  font-size: 12px; font-weight: 600; color: #5c6570;
}
.upp-report .upp-filters.upp-desk-filter input,
.upp-report .upp-filters.upp-desk-filter select { width: 100%; min-width: 0; height: 40px; min-height: 40px; margin: 0; padding: 8px 12px; font-size: 14px; border-radius: 8px; }
.upp-report .upp-filters.upp-desk-filter > label:has(input[name="q"]) { grid-column: span 2; }
.upp-report .upp-filters.upp-desk-filter > .upp-amt-group { grid-column: span 2; }
.upp-report .upp-filters.upp-desk-filter > .upp-filter-actions { grid-column: 1 / -1; justify-content: flex-end; gap: 8px; padding-top: 4px; min-height: 0; }
.upp-report .upp-filter-actions > button,
.upp-report .upp-filter-actions > a,
.upp-report .upp-filter-actions .upp-export > summary { height: 40px; min-height: 40px; padding: 0 18px; display: inline-flex; align-items: center; border-radius: 8px; font-size: 14px; }
.upp-report .upp-filters + .upp-ledger,
.upp-report .upp-filters + .upp-result-summary + .upp-ledger { border-radius: 10px; }

/* Result summary strip */
.upp-report .upp-result-summary {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 6px 12px;
  background: #ffffff; border: 1px solid #e4e7ec; border-radius: 999px; color: #1a1d26; font-size: 13px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Ledger card and table */
.upp-report .upp-ledger { border: 1px solid #e4e7ec !important; border-radius: 10px; overflow: hidden; background: #ffffff; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); margin: 0 0 16px; }
.upp-report .upp-ledger .upp-table-wrap { border: 0 !important; overflow-x: auto; }
.upp-report .upp-table-tools { padding: 10px 16px; background: #ffffff; }
.upp-report .upp-grid-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.upp-report .upp-grid-table th {
  background: #f7f8fa !important; color: #5c6570 !important; font-size: 11px; font-weight: 650;
  letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; padding: 10px 14px;
  border-bottom: 1px solid #e4e7ec; text-align: start;
}
.upp-report .upp-grid-table td { padding: 11px 14px; white-space: nowrap; border-bottom: 1px solid #eef0f3; vertical-align: middle; line-height: 1.35; }
.upp-report .upp-grid-table tbody tr:nth-child(odd) td { background: #ffffff !important; }
.upp-report .upp-grid-table tbody tr:nth-child(even) td { background: #f7f8fa !important; }
.upp-report .upp-grid-table tbody tr:hover td { background: #f3f0ff !important; }
.upp-report .upp-grid-table tbody tr:last-child td { border-bottom: 0; }
.upp-report .upp-grid-table th.upp-num,
.upp-report .upp-grid-table td.upp-num { text-align: end; font-variant-numeric: tabular-nums; }
.upp-report .upp-grid-table td.upp-num { font-weight: 550; }
.upp-report .upp-grid-table td.upp-brk { overflow-wrap: normal; }
/* Long free text is clipped with an ellipsis; the full value is in the tooltip */
.upp-report .upp-grid-table td[data-col="email"],
.upp-report .upp-grid-table td[data-col="customer"],
.upp-report .upp-grid-table td[data-col="description"],
.upp-report .upp-grid-table td[data-col="merchant"],
.upp-report .upp-grid-table td[data-col="reason"] { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
/* Date with the time beneath in a quieter tone */
.upp-report .upp-grid-table .upp-date { display: block; }
.upp-report .upp-grid-table .upp-time { display: block; color: #8b939e; font-size: 12px; }
/* ID cells: value and copy icon on one line */
.upp-report .upp-grid-table .upp-id { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 6px; }
.upp-report .upp-grid-table td > div, .upp-report .upp-grid-table td > span { flex-wrap: nowrap; }
/* Action cell: Details and the refund toggle stacked, compact */
.upp-report .upp-sale-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.upp-report .upp-sale-actions .upp-refund-fold > summary { font-size: 12px; padding: 0 4px; }
.upp-report .upp-sale-actions .upp-refund-fold[open] { white-space: normal; }
.upp-report .upp-grid-table tfoot td { background: #f7f8fa !important; font-weight: 650; border-top: 1px solid #e4e7ec; }
/* Empty state */
.upp-report .upp-grid-table td.upp-empty-cell { padding: 0; background: #ffffff !important; }
.upp-report .upp-empty { padding: 44px 20px; text-align: center; }
.upp-report .upp-empty::before {
  content: ""; display: block; width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%;
  background: #f3f0ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c5ce0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3h18v18H3z'/%3E%3Cpath d='M3 9h18M9 21V9'/%3E%3C/svg%3E") center / 20px no-repeat;
}
.upp-report .upp-empty strong { display: block; color: #1a1d26 !important; font-size: 15px; margin-bottom: 4px; }
.upp-report .upp-empty p { margin: 0; color: #5c6570; font-size: 13px; }
.upp-report .upp-pager { padding: 10px 16px 12px; border-top: 1px solid #eef0f3; }
.upp-report .upp-pager:empty { display: none; }

/* Performance panels inside the report shell */
.upp-report .upp-panels { gap: 16px; margin-bottom: 16px; }
.upp-report .upp-legend > div { align-items: baseline; padding: 9px 0; font-size: 13px; }
.upp-report .upp-legend > div > span:first-child { white-space: nowrap; }
.upp-report .upp-legend > div > span:last-child { text-align: end; font-variant-numeric: tabular-nums; }
.upp-report .upp-legend .upp-legend-head { color: #5c6570; font-size: 11px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; }
.upp-report .upp-legend-amt { display: block; color: #5c6570; font-size: 12px; }
.upp-report .upp-bar b { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* More reports hub: card grid */
.upp-report .upp-more-reports { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.upp-report .upp-more-card {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 18px 16px; text-decoration: none;
  background: #ffffff; border: 1px solid #e4e7ec; border-radius: 10px; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.upp-report .upp-more-card:hover, .upp-report .upp-more-card:focus-visible { border-color: #7c5ce0; box-shadow: 0 0 0 3px rgba(124, 92, 224, 0.14); }
.upp-report .upp-more-title { color: #1a1d26; font-size: 15px; font-weight: 650; }
.upp-report .upp-more-lead { color: #5c6570; font-size: 13px; line-height: 1.45; flex: 1; }
.upp-report .upp-more-go { color: #7c5ce0; font-size: 13px; font-weight: 600; margin-top: 6px; }

@media (max-width: 1100px) {
  .upp-report .upp-filters.upp-desk-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .upp-report .upp-filters.upp-desk-filter { grid-template-columns: 1fr; }
  .upp-report .upp-filters.upp-desk-filter > label:has(input[name="q"]),
  .upp-report .upp-filters.upp-desk-filter > .upp-amt-group { grid-column: auto; }
  .upp-report .upp-grid-table td { white-space: normal; }
}
@media print {
  .upp-report .upp-grid-table tbody tr:nth-child(even) td { background: #ffffff !important; }
}
/* Report tables: the first column follows the same header and zebra colours as the rest */
.upp-report .upp-grid-table thead th:first-child { background: #f7f8fa !important; color: #5c6570 !important; }
.upp-report .upp-grid-table tbody tr:nth-child(odd) td:first-child { background: #ffffff !important; }
.upp-report .upp-grid-table tbody tr:nth-child(even) td:first-child { background: #f7f8fa !important; }
.upp-report .upp-grid-table tbody tr:hover td:first-child { background: #f3f0ff !important; }
.upp-report .upp-grid-table th, .upp-report .upp-grid-table td { padding-left: 12px; padding-right: 12px; }
.upp-report .upp-table-wrap { scrollbar-width: thin; }
/* Headings may wrap onto two lines so the column width follows the data, not the label */
.upp-report .upp-grid-table th { white-space: normal; letter-spacing: 0.03em; line-height: 1.3; vertical-align: bottom; }
.upp-report .upp-grid-table th, .upp-report .upp-grid-table td { padding-left: 10px; padding-right: 10px; }
.upp-report .upp-grid-table td[data-col="customer"], .upp-report .upp-grid-table td[data-col="merchant"] { max-width: 160px; }
.upp-report .upp-grid-table td[data-col="customer"], .upp-report .upp-grid-table td[data-col="merchant"] { max-width: 140px; }
.upp-report .upp-grid-table td[data-col="reason"] { max-width: 150px; }
/* Compact ID chips in report tables */
.upp-report .upp-grid-table .upp-id code,
.upp-report .upp-grid-table .upp-id .upp-id-link { padding: 2px 6px; font-size: 12px; }
.upp-report .upp-grid-table .upp-id .upp-icon-btn { width: 22px; min-width: 22px; min-height: 22px; height: 22px; font-size: 11px; }
/* Amount range sits in one grid cell, so a row of four filters stays full */
.upp-report .upp-filters.upp-desk-filter > .upp-amt-group { grid-column: span 1; }
@media (max-width: 1100px) { .upp-report .upp-filters.upp-desk-filter > .upp-amt-group { grid-column: span 2; } }
