:root {
  --ts-orange: #ff5a00;
  --ts-orange-dark: #e95000;
  --ts-bg: #f6f8fa;
  --ts-card: #ffffff;
  --ts-text: #0f172a;
  --ts-muted: #64748b;
  --ts-border: #e2e8f0;
  --ts-success: #16a34a;
  --ts-warning: #d97706;
  --ts-danger: #dc2626;
}

.ts-sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.ts-page {
  max-width: 1040px;
  margin: 0 auto;
  padding: 16px;
  background: var(--ts-bg);
  color: var(--ts-text);
}

.ts-card {
  background: var(--ts-card);
  border: 1px solid var(--ts-border);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.ts-section { margin-bottom: 16px; }

.ts-button-primary,
.btn-add-device,
.add-device-btn {
  background: var(--ts-orange);
  color: #fff;
  border: 1px solid var(--ts-orange);
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(255, 90, 0, 0.18);
}

.ts-button-primary:hover,
.btn-add-device:hover,
.add-device-btn:hover {
  background: var(--ts-orange-dark);
  border-color: var(--ts-orange-dark);
  color: #fff;
}

.ts-button-secondary {
  background: #fff;
  color: var(--ts-text);
  border: 1px solid var(--ts-border);
  font-weight: 700;
}

.ts-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--ts-muted);
  border: 1px solid var(--ts-border);
  font-size: 12px;
  font-weight: 800;
}

.ts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ts-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--ts-border);
  border-radius: 10px;
}

.ts-form-control {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--ts-border);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--ts-text);
  background: #fff;
  box-sizing: border-box;
}

.phone-otp-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  font-size: 12px;
  color: var(--ts-muted);
}

.phone-otp-badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--ts-border);
  background: #f8fafc;
  color: var(--ts-muted);
  font-size: 11px;
  font-weight: 800;
}

.phone-otp-badge--verified {
  border-color: rgba(22, 163, 74, 0.24);
  background: #f0fdf4;
  color: var(--ts-success);
}

.phone-otp-badge--sent,
.phone-otp-badge--skipped {
  border-color: rgba(217, 119, 6, 0.28);
  background: #fffbeb;
  color: var(--ts-warning);
}

.phone-otp-badge--failed {
  border-color: rgba(220, 38, 38, 0.22);
  background: #fef2f2;
  color: var(--ts-danger);
}

.phone-otp-card {
  margin-top: 12px;
}

.phone-otp-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.phone-otp-card__head h2 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--ts-text);
}

.phone-otp-card__head p {
  margin: 0;
  font-size: 12px;
  color: var(--ts-muted);
  line-height: 1.4;
}

.phone-otp-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  margin-top: 12px;
  align-items: stretch;
}

.phone-otp-actions form {
  margin: 0;
}

.phone-otp-verify {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.phone-otp-verify input {
  min-height: 44px;
  border: 1px solid var(--ts-border);
  border-radius: 10px;
  padding: 9px 12px;
  font: inherit;
  box-sizing: border-box;
}

@media (max-width: 430px) {
  .phone-otp-card__head,
  .phone-otp-actions,
  .phone-otp-verify {
    grid-template-columns: 1fr;
  }

  .phone-otp-card__head {
    flex-direction: column;
  }
}

.app-topbar,
.mobile-header {
  min-height: 58px;
}

.ts-logo-wordmark,
img.ts-logo-wordmark {
  max-height: 40px;
  max-width: 190px;
}

.icon-button,
.mh-icon-btn {
  width: 38px;
  height: 38px;
}

.notification-count,
.mh-badge {
  top: -3px;
  right: -3px;
}

.merchant-home-simple,
.uw-home-simple {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.merchant-home-head,
.uw-home-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ts-country-pill-simple,
.ts-country-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--ts-border);
  color: var(--ts-muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.merchant-status-card,
.uw-queue-status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--ts-border);
  border-radius: 14px;
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.05);
}

.merchant-status-kicker,
.uw-queue-status-card span {
  display: block;
  color: var(--ts-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.merchant-status-card strong,
.uw-queue-status-card strong {
  display: block;
  margin-top: 3px;
  color: var(--ts-text);
  font-size: 18px;
  font-weight: 900;
}

.merchant-status-card p {
  margin: 4px 0 0;
  color: var(--ts-muted);
  font-size: 13px;
}

.merchant-status-link {
  color: var(--ts-orange);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.merchant-mini-finance {
  background: #fff;
  border: 1px solid var(--ts-border);
  border-radius: 14px;
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.05);
  display: grid;
  gap: 10px;
  padding: 13px 14px;
}

.merchant-mini-finance > div:first-child {
  align-items: baseline;
  display: flex;
  gap: 8px;
}

.merchant-mini-finance span {
  color: var(--ts-text);
  font-weight: 850;
}

.merchant-mini-finance small,
.merchant-mini-metrics span {
  color: var(--ts-muted);
  font-size: 12px;
}

.merchant-mini-metrics {
  display: grid;
  gap: 5px;
}

.merchant-mini-metrics strong {
  color: var(--ts-text);
  font-weight: 850;
}

.new-contract-cta--simple {
  min-height: 92px;
  border-radius: 16px;
  font-size: 21px;
  letter-spacing: 0;
  box-shadow: 0 12px 28px rgba(255, 90, 0, 0.24);
}

.simple-menu-block {
  background: #fff;
  border: 1px solid var(--ts-border);
  border-radius: 14px;
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}

.simple-menu-block h2 {
  margin: 0;
  padding: 12px 14px 8px;
  color: var(--ts-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.simple-menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
  border-top: 1px solid #eef2f7;
  color: var(--ts-text);
  text-decoration: none;
  font-weight: 800;
}

.simple-menu-row small,
.simple-menu-row strong {
  color: var(--ts-muted);
  font-size: 13px;
  font-weight: 900;
}

.uw-primary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.uw-primary-form {
  margin: 0;
}

.uw-primary-action {
  width: 100%;
  min-height: 68px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 16px;
  border: 0;
  border-radius: 17px;
  background: #16a34a;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(22, 163, 74, 0.22);
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
  max-width: 100%;
}

.uw-primary-action--dark {
  background: #1d4ed8;
  box-shadow: 0 12px 26px rgba(29, 78, 216, 0.22);
}

.uw-primary-action span {
  font-size: 13px;
  font-weight: 800;
  opacity: 0.9;
}

.uw-primary-action strong {
  font-size: 20px;
  font-weight: 950;
  line-height: 1.1;
}

.uw-compact-row {
  min-height: 54px;
  box-shadow: none;
}

.deal-lock-note {
  margin: 12px 0 0;
  color: var(--ts-muted);
  font-size: 13px;
  line-height: 1.45;
}

.deal-continue-btn {
  min-height: 64px;
  font-size: 16px;
}

@media (max-width: 430px) {
  .uw-primary-grid {
    grid-template-columns: 1fr;
  }

  .new-contract-cta--simple {
    min-height: 84px;
  }
}

/**
 * tengasale.css — TengaSale mobile UI
 * Version: 1.0.2
 *
 * Provides the compact mobile shell used by /sales/ pages.
 * All class names are prefixed ts- to avoid clashes with base style.css.
 */

/* ── Logo sizing ─────────────────────────────────────────────────── */

.ts-header-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 8px;
}

.ts-logo-icon,
img.ts-logo-icon {
  width: 44px;
  height: 44px;
  max-width: 44px;
  max-height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.ts-logo-wordmark,
img.ts-logo-wordmark {
  max-height: 36px;
  max-width: 180px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.ts-header-logo {
  height: 34px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}

/* ── Mobile Header ────────────────────────────────────────────────── */

.mobile-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid #e4e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  min-height: 60px;
  gap: 12px;
}

.mobile-header__left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.mobile-header__logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

.mobile-header__title {
  font-size: 17px;
  font-weight: 800;
  color: #111111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-header__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Mobile header icon buttons */
.mh-icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  position: relative;
  border: 1.5px solid #e4e7eb;
  border-radius: 12px;
  background: #ffffff;
  color: #60758a;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.14s, border-color 0.14s;
  padding: 0;
}

.mh-icon-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mh-icon-btn:hover {
  border-color: #60758a;
  background: #f5f6f8;
}

.mh-btn-whatsapp { color: #168a45; }
.mh-btn-whatsapp svg { fill: currentColor; stroke: none; }
.mh-btn-whatsapp:hover { border-color: #168a45; background: #e8f6ee; }

.mh-btn-logout:hover { border-color: #d93025; background: #fdeceb; color: #d93025; }

.mh-badge {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  position: absolute;
  top: -4px;
  right: -4px;
  border-radius: 999px;
  background: #d93025;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

/* ── Sales Main Content Area ─────────────────────────────────────── */

.sales-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 80px;
  box-sizing: border-box;
}

/* ── Review page desktop centering ───────────────────────────────── */
.ts-review-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px 80px;
  box-sizing: border-box;
}

/* Guarantee review body is never invisible regardless of JS/CSS state */
[data-review-application-body] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.ts-review-loading {
  padding: 24px 16px;
}

.ts-review-loading[hidden] {
  display: none !important;
}

.ts-review-loading__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 20px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
  color: #667085;
  font-size: 14px;
  font-weight: 600;
}

.ts-review-skeleton {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 0 16px;
}

.ts-review-skeleton__card {
  height: 88px;
  border-radius: 16px;
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: ts-skeleton-shimmer 1.2s ease-in-out infinite;
}

.ts-review-skeleton__card--short { height: 56px; }

@keyframes ts-skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.ts-review-state__card {
  margin: 16px;
  padding: 24px 20px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

.ts-review-state__card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
  color: #101828;
}

.ts-review-state__card p {
  margin: 0 0 16px;
  color: #667085;
  font-size: 14px;
  line-height: 1.45;
}

.ts-review-state__actions {
  display: grid;
  gap: 10px;
}

.ts-review-call-copy {
  margin: 0 0 12px;
  color: #667085;
  font-size: 13px;
  line-height: 1.45;
}

.ts-review-call-actions {
  display: grid;
  gap: 10px;
}

.ts-missing-field {
  color: #94a3b8;
  font-weight: 700;
}

.uw-action-btn,
.uw-claim-btn {
  min-height: 68px;
  border-radius: 17px;
  box-sizing: border-box;
  max-width: 100%;
}

.uw-action-btn--disabled {
  opacity: 0.55;
  pointer-events: none;
}

.id-preview,
.kyc-smart-card__frame--id_front,
.kyc-smart-card__frame--id_back {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.id-preview img,
.kyc-smart-card__frame--id_front img,
.kyc-smart-card__frame--id_back img,
.kyc-smart-card__img--contain {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* ── Greeting Row ─────────────────────────────────────────────────── */

.ts-greeting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px 4px;
  gap: 12px;
}

.ts-greeting {
  font-size: 26px;
  font-weight: 900;
  color: #111111;
  margin: 0 0 2px;
  line-height: 1.1;
}

.ts-greeting-sub {
  font-size: 13px;
  color: #7a828c;
  margin: 0;
}

.ts-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: rgba(255,107,26,0.10);
  color: #ff5a00;
  border: 1.5px solid rgba(255,107,26,0.25);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.ts-report-btn:hover {
  background: rgba(255,107,26,0.18);
}

.ts-country-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #f0f4f8;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  color: #111111;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Claim Card ───────────────────────────────────────────────────── */

.ts-claim-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 14px 18px 6px;
  padding: 22px 18px;
  min-height: 88px;
  border-radius: 20px;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  width: calc(100% - 36px);
  text-align: center;
  transition: opacity 0.15s, transform 0.12s;
}

.ts-claim-card:active { transform: scale(0.98); }

.ts-claim-ready {
  background: #168a45;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(22, 138, 69, 0.25);
}

.ts-claim-ready:hover { background: #127a3d; }

.ts-claim-disabled {
  background: #d7dde3;
  color: #7a828c;
  cursor: not-allowed;
}

.ts-claim-empty {
  background: #f0f4f8;
  color: #9ca3af;
  cursor: default;
  border: 2px dashed #d1d5db;
  box-shadow: none;
}

.ts-claim-icon {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ── MY ACTIVE Card ───────────────────────────────────────────────── */

.ts-active-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 18px 4px;
  padding: 18px 22px;
  background: #2367c7;
  border-radius: 18px;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(35, 103, 199, 0.22);
  transition: opacity 0.14s;
}

.ts-active-card:hover { opacity: 0.92; }

.ts-active-card__left { display: flex; flex-direction: column; gap: 3px; }

.ts-active-card__label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.07em;
  opacity: 0.85;
  text-transform: uppercase;
}

.ts-active-card__hint { font-size: 12px; opacity: 0.7; }

.ts-active-card__count {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.ts-active-card__num {
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.ts-active-card__sep {
  font-size: 22px;
  font-weight: 700;
  opacity: 0.55;
}

.ts-active-card__max { font-size: 22px; font-weight: 700; opacity: 0.7; }

/* ── Section Labels ───────────────────────────────────────────────── */

.ts-section-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a828c;
  padding: 18px 18px 6px;
}

/* ── Application Rows (in-progress quick list) ────────────────────── */

.ts-app-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #ffffff;
  border-bottom: 1px solid #f0f4f8;
  text-decoration: none;
  color: #111111;
  transition: background 0.12s;
  min-height: 64px;
}

.ts-app-row:hover { background: #f8fafb; }

.ts-app-row__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #edf3f7;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #60758a;
}

.ts-app-row__icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.ts-app-row__body { flex: 1; min-width: 0; }

.ts-app-row__name {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ts-app-row__meta { font-size: 12px; color: #7a828c; }

/* ── Menu Section ─────────────────────────────────────────────────── */

.ts-menu-section {
  background: #ffffff;
  border-radius: 16px;
  margin: 0 18px 4px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.05);
}

.ts-menu-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  min-height: 64px;
  text-decoration: none;
  color: #111111;
  border-bottom: 1px solid #f0f4f8;
  transition: background 0.12s;
  position: relative;
}

.ts-menu-row:last-child { border-bottom: none; }
.ts-menu-row:hover { background: #f8fafb; }

.ts-menu-row__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ts-menu-row__icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ts-icon-orange { background: rgba(255, 106, 0, 0.12); color: #ff5a00; }
.ts-icon-blue   { background: rgba(35, 103, 199, 0.10); color: #2367c7; }
.ts-icon-green  { background: rgba(22, 138, 69, 0.10); color: #168a45; }

.ts-menu-row__label {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
}

.ts-menu-row__sub {
  font-size: 12px;
  color: #7a828c;
  margin-right: 4px;
}

.ts-menu-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: #edf3f7;
  color: #60758a;
  margin-right: 4px;
}

.ts-badge-pending { background: rgba(255, 106, 0, 0.12); color: #ff5a00; }
.ts-badge-success { background: rgba(22, 138, 69, 0.10); color: #168a45; }

.ts-row-arrow {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #c0cad4;
  stroke-width: 2;
  stroke-linecap: round;
  flex-shrink: 0;
}

/* ── Toast ────────────────────────────────────────────────────────── */

.ts-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #111111;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  z-index: 999;
  pointer-events: none;
}

/* ── Back Row ─────────────────────────────────────────────────────── */

.ts-back-row {
  display: flex;
  align-items: center;
  padding: 12px 18px 4px;
}

.ts-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  color: #ff5a00;
  text-decoration: none;
  padding: 6px 0;
}

.ts-back-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}

.ts-back-btn:hover { color: #e64d00; }

/* ── Section Desc / Hints ─────────────────────────────────────────── */

.ts-section-desc {
  padding: 8px 18px 4px;
  font-size: 14px;
  color: #7a828c;
  margin: 0;
}

.ts-app-hint {
  padding: 12px 18px;
  font-size: 12px;
  color: #9ca3af;
  margin: 0;
}

/* ── App Number ───────────────────────────────────────────────────── */

.ts-app-num {
  padding: 6px 18px;
  font-size: 13px;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: 0.04em;
}

/* ── Review Cards ─────────────────────────────────────────────────── */

.ts-review-card {
  background: #ffffff;
  border-radius: 16px;
  margin: 10px 0;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.05);
}

.ts-review-card__title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #7a828c;
  margin-bottom: 12px;
}

.ts-review-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f5f6f8;
  font-size: 14px;
  gap: 8px;
}

.ts-review-row:last-child { border-bottom: none; }
.ts-review-row span { color: #7a828c; flex-shrink: 0; }
.ts-review-row strong { text-align: right; word-break: break-word; }

.ts-money {
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.ts-money--deposit,
.ts-money--due,
.cpd-money-grid--deposit strong,
.cpd-next-payment-card strong {
  color: #d97706 !important;
}

.ts-money--daily,
.cpd-meta-grid strong {
  color: #334155;
}

.ts-money--monthly {
  color: #1d4ed8;
}

.ts-money--total,
.ts-money--cash,
.cpd-money-grid strong {
  color: #0f172a;
  font-weight: 900;
}

.wallet-amount,
.amount-positive,
.cpd-val--green {
  color: #15803d !important;
}

/* ── KYC Images ───────────────────────────────────────────────────── */

.ts-kyc-row {
  display: flex;
  gap: 10px;
  padding: 10px 18px;
  overflow-x: auto;
}

.ts-kyc-img {
  flex-shrink: 0;
  width: 100px;
  border-radius: 12px;
  overflow: hidden;
  background: #f0f4f8;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ts-kyc-img img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.ts-kyc-img span {
  font-size: 11px;
  font-weight: 700;
  color: #7a828c;
  padding: 4px;
  text-align: center;
}

.ts-kyc-img--missing {
  height: 100px;
  justify-content: center;
  border: 2px dashed #e4e7eb;
}

/* ── Call Script ──────────────────────────────────────────────────── */

.ts-call-script {
  margin: 8px 18px;
  padding: 14px 16px;
  background: #edf3f7;
  border-radius: 12px;
  border-left: 4px solid #2367c7;
}

.ts-call-script__label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: #2367c7;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.ts-call-script__text {
  font-size: 14px;
  color: #3a3f45;
  margin: 0;
  line-height: 1.5;
}

/* ── Yes/No Buttons ───────────────────────────────────────────────── */

.yes-no-field {
  padding: 12px 0;
  border-bottom: 1px solid #f5f6f8;
}

.yes-no-field:last-child { border-bottom: none; }

.yes-no-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #111111;
  margin-bottom: 10px;
  line-height: 1.4;
}

.yes-no-buttons {
  display: flex;
  gap: 10px;
}

.btn-yn {
  flex: 1;
  padding: 12px 8px;
  border-radius: 12px;
  border: 2px solid #e4e7eb;
  background: #ffffff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.14s;
  text-align: center;
}

.btn-yn--yes.btn-yn--active {
  background: #168a45;
  border-color: #168a45;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(22, 138, 69, 0.25);
}

.btn-yn--no.btn-yn--active {
  background: #d93025;
  border-color: #d93025;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(217, 48, 37, 0.2);
}

.btn-yn:not(.btn-yn--active):hover { border-color: #60758a; background: #f8fafb; }

/* ── Step Bar ─────────────────────────────────────────────────────── */

.step-bar {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  gap: 0;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  background: #e4e7eb;
  color: #7a828c;
  flex-shrink: 0;
}

.step-dot--active {
  background: #ff5a00;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(255, 106, 0, 0.3);
}

.step-dot--done {
  background: #168a45;
  color: #ffffff;
}

.step-dot svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.step-line {
  flex: 1;
  height: 2px;
  background: #e4e7eb;
}

.step-line--done { background: #168a45; }

/* ── Completeness Score Ring ──────────────────────────────────────── */

.ts-score-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
}

.ts-score-ring {
  position: relative;
  width: 68px;
  height: 68px;
  flex-shrink: 0;
}

.ts-score-ring svg { transform: rotate(-90deg); width: 68px; height: 68px; }
.ts-score-bg { fill: none; stroke: #e4e7eb; stroke-width: 3; }
.ts-score-fill { fill: none; stroke-width: 3; stroke-linecap: round; }
.score-green { stroke: #168a45; }
.score-orange { stroke: #ff5a00; }
.score-red { stroke: #d93025; }

.ts-score-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 13px;
  font-weight: 900;
  color: #111111;
}

.ts-score-text p { margin: 2px 0; font-size: 13px; color: #7a828c; }
.ts-score-text strong { font-size: 15px; }

/* ── Checklist rows ───────────────────────────────────────────────── */

.ts-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid #f5f6f8;
}

.ts-check-row:last-child { border-bottom: none; }

.ts-check-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #e4e7eb;
}

.ts-check-yes { background: #168a45; }
.ts-check-yes::after { content: "✓"; display: grid; place-items: center; color: #fff; font-size: 11px; height: 100%; }
.ts-check-no { background: #d93025; }
.ts-check-no::after { content: "✕"; display: grid; place-items: center; color: #fff; font-size: 11px; height: 100%; }

/* ── Decision Buttons ─────────────────────────────────────────────── */

.ts-decision-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 18px;
}

.ts-btn-approve,
.ts-btn-reject {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 8px;
  border-radius: 14px;
  border: none;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition: opacity 0.14s;
}

.ts-btn-approve {
  background: #168a45;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(22, 138, 69, 0.25);
}

.ts-btn-reject {
  background: #d93025;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(217, 48, 37, 0.2);
}

.ts-btn-approve:hover { opacity: 0.9; }
.ts-btn-reject:hover { opacity: 0.9; }

.ts-btn-approve svg,
.ts-btn-reject svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}

.ts-btn-big { min-height: 56px; font-size: 18px; }

/* ── Primary / Secondary buttons ─────────────────────────────────── */

.ts-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 68px;
  padding: 15px 20px;
  border-radius: 17px;
  border: none;
  background: #ff5a00;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.14s;
  box-sizing: border-box;
  max-width: 100%;
}

.ts-btn-primary:hover { background: #e64d00; }

.ts-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px 20px;
  border-radius: 14px;
  border: 2px solid #e4e7eb;
  background: #ffffff;
  color: #3a3f45;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.14s;
}

.ts-btn-secondary:hover { border-color: #60758a; }

.ts-btn-full { width: 100%; max-width: 100%; margin-left: 0; margin-right: 0; box-sizing: border-box; }

/* ── Form elements ────────────────────────────────────────────────── */

.ts-textarea,
.ts-select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e4e7eb;
  border-radius: 10px;
  font-size: 14px;
  background: #f8fafb;
  color: #111111;
  font-family: inherit;
  transition: border-color 0.14s;
  box-sizing: border-box;
}

.ts-textarea:focus,
.ts-select:focus {
  outline: none;
  border-color: #ff5a00;
}

.ts-field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #111111;
  margin-bottom: 6px;
}

/* ── Rule Cards ───────────────────────────────────────────────────── */

.ts-rule-card {
  display: flex;
  gap: 14px;
  margin: 10px 18px;
  padding: 16px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.05);
}

.ts-rule-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.ts-rule-card__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.ts-rule-card__body { flex: 1; }

.ts-rule-card__title {
  font-size: 15px;
  font-weight: 800;
  color: #111111;
  margin-bottom: 6px;
}

.ts-rule-card__body p {
  font-size: 14px;
  color: #3a3f45;
  margin: 0;
  line-height: 1.5;
}

/* ── Confirm / Success / Reject screens ───────────────────────────── */

.ts-confirm-screen,
.ts-success-screen {
  padding: 32px 18px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ts-confirm-icon,
.ts-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #e8f6ee;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.ts-confirm-approve { background: #e8f6ee; color: #168a45; }
.ts-success-icon--reject { background: #fdeceb; color: #d93025; }

.ts-confirm-icon svg,
.ts-success-icon svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}

.ts-confirm-heading,
.ts-success-heading {
  font-size: 22px;
  font-weight: 900;
  color: #111111;
  margin: 0 0 10px;
}

.ts-confirm-body,
.ts-success-body {
  font-size: 15px;
  color: #3a3f45;
  margin: 0 0 8px;
}

.ts-success-sub { font-size: 14px; color: #7a828c; margin: 0 0 24px; }

.ts-confirm-summary { width: 100%; text-align: left; }

/* ── Sales Footer ─────────────────────────────────────────────────── */

.sales-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  color: #9ca3af;
  font-size: 13px;
  margin-top: 12px;
  border-top: 1px solid #f0f4f8;
}

/* ── Spacing utilities ─────────────────────────────────────────────── */

.ts-mb-8  { margin-bottom: 8px; }
.ts-mb-16 { margin-bottom: 16px; }
.ts-mt-8  { margin-top: 8px; }
.ts-mt-16 { margin-top: 16px; }
.ts-mt-24 { margin-top: 24px; }

/* ── Alerts (messages framework) inside sales shell ────────────────── */

.sales-main .alert {
  margin: 10px 18px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Wallet balance card (overrides in sales context) ───────────────── */

.wallet-balance-card {
  margin: 10px 18px;
  padding: 20px;
  background: linear-gradient(135deg, #fff7d6 0%, #ffe9a8 48%, #fff3c4 100%);
  border-radius: 18px;
  color: #0f172a;
  border: 1px solid rgba(245, 158, 11, 0.28);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.14);
  backdrop-filter: blur(10px);
}

.wallet-balance-card__label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 4px;
}

.wallet-balance-card__amount {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 16px;
}

.wallet-currency { font-size: 16px; font-weight: 700; color: #d97706; }
.wallet-amount { font-size: 36px; font-weight: 900; line-height: 1; color: #0f172a; }

.wallet-balance-card__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 720px) {
  .wallet-balance-card__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.wallet-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  padding: 10px;
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.wallet-stat__label { font-size: 11px; color: #64748b; font-weight: 700; }
.wallet-stat__value { font-size: 14px; font-weight: 800; color: #0f172a; }

/* ── Tab bar ──────────────────────────────────────────────────────── */

.tab-bar {
  display: flex;
  padding: 8px 18px;
  gap: 6px;
  overflow-x: auto;
}

.tab-item {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1.5px solid #e4e7eb;
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
  color: #60758a;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.13s;
}

.tab-item--active {
  background: #ff5a00;
  border-color: #ff5a00;
  color: #ffffff;
}

/* ── Text colour utilities ───────────────────────────────────────── */
.text-green  { color: #168a45 !important; }
.text-red    { color: #d93025 !important; }
.text-orange { color: #ff5a00 !important; }
.text-muted  { color: #7a828c !important; }

/* ── Status badges ───────────────────────────────────────────────── */

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.status-badge--approved  { background: #e8f6ee; color: #168a45; }
.status-badge--rejected  { background: #fdeceb; color: #d93025; }
.status-badge--review    { background: rgba(255,90,0,0.10); color: #e64d00; }
.status-badge--pending   { background: rgba(255,90,0,0.10); color: #ff5a00; }

/* ── Transaction rows ────────────────────────────────────────────── */

.tx-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid #f5f6f8;
  gap: 8px;
}

.tx-row__type  { font-size: 14px; font-weight: 700; }
.tx-row__meta  { font-size: 12px; color: #7a828c; }
.tx-row__date  { font-size: 11px; color: #9ca3af; }
.tx-row__amount { font-size: 15px; font-weight: 800; white-space: nowrap; }

/* ── Payout cards ────────────────────────────────────────────────── */

.glass-card { background: #fff; border-radius: 16px; margin: 10px 18px; padding: 16px; box-shadow: 0 2px 8px rgba(17,17,17,0.05); }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }

/* ── App row card (applications list) ───────────────────────────── */

.app-row-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #ffffff;
  border-bottom: 1px solid #f0f4f8;
  text-decoration: none;
  color: #111111;
  gap: 12px;
  min-height: 64px;
}

.app-row-card__left { flex: 1; min-width: 0; }
.app-row-card__name { font-size: 15px; font-weight: 700; }
.app-row-card__meta { font-size: 12px; color: #7a828c; }
.app-row-card__date { font-size: 11px; color: #9ca3af; }
.app-row-card__right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.chevron-right {
  width: 18px; height: 18px;
  fill: none; stroke: #c0cad4; stroke-width: 2;
}

/* ── Empty state ─────────────────────────────────────────────────── */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 18px;
  color: #9ca3af;
  text-align: center;
}

.empty-state__icon svg {
  width: 48px; height: 48px;
  fill: none; stroke: #c0cad4; stroke-width: 1.5;
}

.empty-sub { font-size: 13px; margin: 4px 0 0; }

/* ═══════════════════════════════════════════════════════════════════
   Phase 10 additions
   ═══════════════════════════════════════════════════════════════════ */

.sales-header-logo { width: 32px; height: 32px; object-fit: contain; display: block; }

.country-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: #f0f4f8; border-radius: 20px; padding: 3px 10px;
  font-size: 0.78rem; font-weight: 600; color: #333; border: 1px solid #e0e7ef;
}

.ts-field-row { position: relative; }

.ts-mark-btn {
  background: none; border: 1.5px solid #e0e7ef; border-radius: 50%;
  width: 22px; height: 22px; cursor: pointer; padding: 3px; color: #aaa;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
}
.ts-mark-btn:hover { border-color: #e67e22; color: #e67e22; }
.ts-mark-form { width: 100%; margin-top: 8px; }

.ts-btn-orange {
  background: #e67e22; color: #fff; border: none; border-radius: 8px;
  font-weight: 700; cursor: pointer; font-size: 0.85rem; padding: 8px 14px;
}
.ts-btn-orange:hover { background: #d35400; }

.ts-btn-secondary {
  background: #f5f6fa; color: #555; border: 1.5px solid #e0e7ef;
  border-radius: 8px; cursor: pointer; font-size: 0.85rem; padding: 8px 14px;
}

.text-green { color: #27ae60; }
.text-red { color: #e74c3c; }
.text-orange { color: #e67e22; }

[data-testid="arrears-deduction-row"] { border-left: 3px solid #e74c3c; }
[data-testid="commission-row"] { border-left: 3px solid #27ae60; }


/* -------------------------------------------------------------------
   Phase 10: Field marking, Malawi pill, commission rows
   ------------------------------------------------------------------- */

/* -- Sales header logo (small T icon) ---- */
.sales-header-logo,
.ts-header-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}

/* -- Malawi flag pill ---- */
.country-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0f4f8;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #333;
  border: 1px solid #e0e7ef;
}

/* -- Field row with mark button ---- */
.ts-field-row {
  position: relative;
}

.ts-mark-btn {
  background: none;
  border: 1.5px solid #e0e7ef;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  cursor: pointer;
  padding: 3px;
  color: #aaa;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s;
}

.ts-mark-btn:hover {
  border-color: #e67e22;
  color: #e67e22;
}

.ts-mark-form {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 10px;
  background: #fff9f0;
  border: 1px solid #f0d9c0;
  border-radius: 12px;
  padding: 12px;
  box-sizing: border-box;
}

.ts-mark-form form {
  display: grid;
  gap: 8px;
}

.ts-mark-form label {
  font-size: 0.76rem;
  font-weight: 800;
  color: #5f6670;
}

.ts-mark-form select,
.ts-mark-form input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #ddd4c7;
  border-radius: 10px;
  padding: 8px 10px;
  box-sizing: border-box;
  font-size: 0.86rem;
}

.ts-mark-form__actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.ts-review-flow,
.ts-sendback-panel {
  margin: 12px 18px;
}

.ts-review-flow {
  display: grid;
  gap: 14px;
}

.ts-review-flow__header {
  padding: 4px 2px;
}

.ts-review-flow__header span,
.ts-sendback-panel__eyebrow {
  color: #ff5a00;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ts-review-flow__header h2,
.ts-sendback-panel h2 {
  margin: 3px 0 0;
  color: #111;
  font-size: 1.2rem;
  line-height: 1.15;
}

.ts-review-section {
  display: grid;
  gap: 8px;
}

.ts-review-section h3 {
  margin: 6px 0 2px;
  color: #111;
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ts-question-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 12px;
  background: #fff;
  border: 1px solid #e7edf3;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(17,17,17,0.04);
  transition: border-color 0.15s;
}

/* Correction-flagged field card — amber left border, soft yellow tint */
.ts-question-card--correction {
  background: #fffbf0;
  border-color: rgba(245, 158, 11, 0.4);
  border-left: 3px solid #f59e0b;
}

.ts-question-card__meta {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.ts-question-card__number {
  min-width: 28px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff2e8;
  color: #e85d04;
  font-size: 0.68rem;
  font-weight: 950;
}

.ts-question-card__icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f0f4f8;
  color: #60758a;
  font-size: 0.58rem;
  font-weight: 950;
}

.ts-question-card__body {
  min-width: 0;
}

.ts-question-card__label {
  color: #667080;
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: none;
}

.ts-question-card__value {
  display: block;
  margin-top: 2px;
  color: #111;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ts-question-card__expected {
  margin-top: 5px;
  color: #7a828c;
  font-size: 0.74rem;
  line-height: 1.35;
}

/* Correction reason note inside a flagged field card */
.ts-question-card__corr-note {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 5px 8px;
  background: rgba(245, 158, 11, 0.12);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #92400e;
}
.ts-question-card__corr-note svg {
  flex-shrink: 0;
  color: #b45309;
}

.ts-sendback-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #fff8f0;
  border: 1.5px solid rgba(255, 106, 0, 0.32);
  border-radius: 16px;
}

.ts-sendback-panel__list {
  display: grid;
  gap: 8px;
}

.ts-sendback-chip {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 12px;
  background: #fff;
  color: #111;
}

.ts-sendback-chip span {
  color: #7a4d25;
  font-size: 0.8rem;
}

.ts-sendback-panel__action {
  text-align: center;
  text-decoration: none;
}

/* -- Orange action button ---- */
.ts-btn-orange {
  background: #e67e22;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 8px 14px;
}

.ts-btn-orange:hover { background: #d35400; }

/* -- Secondary button ---- */
.ts-btn-secondary {
  background: #f5f6fa;
  color: #555;
  border: 1.5px solid #e0e7ef;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 8px 14px;
}

/* -- Commission/arrears row badges ---- */
.text-green { color: #27ae60; }
.text-red { color: #e74c3c; }
.text-orange { color: #e67e22; }

/* -- Arrears deduction row ---- */
[data-testid="arrears-deduction-row"] {
  border-left: 3px solid #e74c3c;
}

/* -- Commission row ---- */
[data-testid="commission-row"] {
  border-left: 3px solid #27ae60;
}

/* -- Field review badges ---- */
.ts-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
}
.ts-badge-orange { background: rgba(255,106,0,0.12); color: #ff5a00; }
.ts-badge-blue   { background: rgba(29,78,216,0.10);  color: #1d4ed8; }
.ts-badge-green  { background: rgba(22,163,74,0.10);  color: #16a34a; }
.ts-badge-grey   { background: #f0f0f0; color: #666; }

/* -- Extra small button ---- */
.ts-btn-xs {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid;
  text-decoration: none;
  background: transparent;
}
.ts-btn-success  { border-color: #16a34a; color: #16a34a; }
.ts-btn-success:hover { background: #16a34a; color: #fff; }
.ts-btn-ghost    { border-color: #e0e7ef; color: #666; }
.ts-btn-ghost:hover  { background: #f5f5f5; }

/* -- Field actions row ---- */
.ts-field-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

/* -- Field meta ---- */
.ts-reason-tag {
  font-size: 11px;
  color: #888;
  margin-left: 4px;
}
.ts-current-value {
  font-size: 12px;
  color: #555;
  margin-top: 4px;
}
.ts-comment-text {
  font-size: 11px;
  color: #f59e0b;
  font-style: italic;
  margin-top: 2px;
}
.ts-meta-small {
  font-size: 10px;
  color: #aaa;
  margin-top: 2px;
}

/* -- Form elements ---- */
.ts-field-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #555;
  margin-bottom: 4px;
}
.ts-select {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #e4e7eb;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
}
.ts-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #e4e7eb;
  border-radius: 8px;
  font-size: 14px;
  resize: vertical;
}

/* -- Country pill ---- */
.ts-country-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0f4f8;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #333;
  border: 1px solid #e0e7ef;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MERCHANT DASHBOARD ENHANCEMENTS
   ═══════════════════════════════════════════════════════════════════════════ */

.merchant-greeting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.greeting-sub {
  font-size: 0.78rem;
  color: var(--muted, #94a3b8);
  font-weight: 600;
  letter-spacing: 0.03em;
  margin: -4px 0 12px;
}

.trust-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #fff7f0 0%, #fff3eb 100%);
  border: 1.5px solid rgba(255, 90, 0, 0.15);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: var(--ts-orange, #ff5a00);
  font-weight: 600;
  font-size: 0.9rem;
}
.trust-card svg {
  flex-shrink: 0;
  color: var(--ts-orange, #ff5a00);
}

/* Primary CTA — NEW CONTRACT */
.new-contract-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 18px 20px;
  background: var(--ts-orange, #ff5a00);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  border-radius: 16px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(255, 90, 0, 0.30);
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
  min-height: 58px;
}
.new-contract-cta:hover,
.new-contract-cta:focus {
  background: #e84f00;
  box-shadow: 0 6px 28px rgba(255, 90, 0, 0.40);
  transform: translateY(-1px);
  color: #fff;
  text-decoration: none;
}
.new-contract-cta:active { transform: translateY(0); }

/* Menu-row sub-label */
.menu-sub {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted, #94a3b8);
  margin-top: 1px;
}
.menu-row .left { display: flex; align-items: center; gap: 12px; }
.menu-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BRAND CARD VISUAL DIFFERENTIATION
   ═══════════════════════════════════════════════════════════════════════════ */

.brand-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px 14px;
  border-radius: 16px;
  border: 2px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  min-height: 96px;
}
.brand-card:hover { border-color: var(--ts-orange, #ff5a00); box-shadow: 0 2px 12px rgba(255,90,0,0.12); }
.brand-card.active {
  border-color: var(--ts-orange, #ff5a00);
  box-shadow: 0 0 0 3px rgba(255,90,0,0.15);
  background: #fff9f5;
}
.brand-card-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 38px;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 900;
}
.brand-card-name { font-size: 0.8rem; font-weight: 700; color: #111; text-align: center; }
.brand-card-meta { font-size: 0.68rem; color: #64748b; font-weight: 600; }
.brand-card-hint { font-size: 0.7rem; color: #94a3b8; }
.brand-card-logo-img {
  max-width: 56px;
  max-height: 32px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.brand-logo {
  display: block;
  width: auto;
  height: 20px;
  max-width: 96px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
}
.brand-logo--device { height: 18px; max-width: 104px; }
.offer-brand-row { display:flex;align-items:center;justify-content:space-between;gap:14px; }
.brand-card-logo-badge {
  font-size: 0.75rem;
  font-weight: 800;
  color: #374151;
  background: #f3f4f6;
  padding: 6px 10px;
  border-radius: 8px;
}
.brand-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 640px) {
  .brand-card-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .brand-card-grid { grid-template-columns: repeat(4, 1fr); }
}

.kyc-file-field {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.kyc-review-actions-missing {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}
.kyc-mode-pill {
  display: flex;
  max-width: 280px;
  margin: 0 auto 10px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
}
.kyc-mode-btn {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
}
.kyc-mode-btn--active {
  background: #fff;
  color: var(--ts-orange, #ff5a00);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Per-brand colour identities */
.brand-logo-tecno    { background: #e8f0fe; color: #1a56db; }
.brand-logo-itel     { background: #fee2e2; color: #dc2626; }
.brand-logo-samsung  { background: #eff6ff; color: #1e40af; }
.brand-logo-xiaomi,
.brand-logo-redmi    { background: #fff1f0; color: #e11d48; }
.brand-logo-generic  { background: #f3f4f6; color: #374151; }

/* ═══════════════════════════════════════════════════════════════════════════
   KYC FLOW IMPROVEMENTS
   ═══════════════════════════════════════════════════════════════════════════ */

.kyc-intro-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #fff9f5;
  border: 1.5px solid rgba(255,90,0,0.15);
  border-radius: 14px;
  margin-bottom: 16px;
}
.kyc-intro-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--ts-orange-soft, #fff3eb);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--ts-orange, #ff5a00);
}

/* KYC section header */
.kyc-section-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.kyc-section-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kyc-icon-face { background: #eff6ff; color: #2563eb; }
.kyc-icon-id   { background: #f0fdf4; color: #16a34a; }

/* KYC instruction tips */
.kyc-instruction-tips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 12px;
}
.kyc-tip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
}

/* ── Camera panel ─────────────────────────────────────────────── */
.camera-panel {
  margin: 0 0 12px;
}

/* Camera frame guides */
.camera-frame-wrapper {
  position: relative;
  display: block;
  width: 100%;
  max-width: 380px;
  margin: 0 auto 0;
  border-radius: 14px;
  overflow: hidden;          /* clip the guide shadow to the video bounds */
  background: #000;
  line-height: 0;
}
.camera-frame-wrapper video {
  width: 100%;
  display: block;
  object-fit: cover;
  border-radius: 0;          /* radius is on wrapper now */
  background: #000;
}
.camera-frame {
  position: absolute;
  border: 2.5px solid rgba(255,90,0,0.90);
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.42);
  z-index: 2;
}
.camera-frame--oval {
  border-radius: 50%;
  width: 66%;
  height: 76%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  inset: unset;
}
.camera-frame--rect {
  border-radius: 10px;
  width: 86%;
  height: 62%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  inset: unset;
}
/* Instruction text overlay inside video */
.camera-guide-text {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  z-index: 3;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
  pointer-events: none;
  padding: 0 8px;
}

/* Save row — button below the video */
.camera-save-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 0 2px;
}

/* ── Agent/Customer Mode pill ──────────────────────────────────── */
.kyc-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 99px;
  padding: 3px;
  margin: 8px 0 4px;
}
.kyc-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
  line-height: 1;
  white-space: nowrap;
}
.kyc-mode-btn svg { flex-shrink: 0; }
.kyc-mode-btn--active {
  background: #ff5a00;
  color: #fff;
  box-shadow: 0 1px 6px rgba(255,90,0,0.30);
}
.kyc-mode-desc {
  font-size: 11.5px;
  color: #64748b;
  margin: 2px 0 10px;
  font-style: italic;
}

/* ── KYC review image grid ─────────────────────────────────────── */
.ts-img-wrap {
  position: relative;
  overflow: hidden;
  background: #f0f4f8;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
}
.ts-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}
.ts-img-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #94a3b8;
  background: #f8fafc;
  border-radius: inherit;
}

/* KYC preview image — default (selfie/square) */
.kyc-preview-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
}

/* ID front & back — landscape card ratio (ISO 7810 ID-1 = 85.6 × 54 mm ≈ 1.586:1) */
.kyc-id-front-preview,
.kyc-id-back-preview {
  width: 100%;
  height: auto;
  aspect-ratio: 1.586 / 1;
  object-fit: contain;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  background: #f1f5f9;
}

/* Landscape guidance text shown below ID capture areas */
.kyc-landscape-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 10px;
  margin-top: 8px;
}
.kyc-landscape-hint svg {
  flex-shrink: 0;
  width: 14px; height: 14px;
  fill: none; stroke: #94a3b8; stroke-width: 2; stroke-linecap: round;
}

/* Confirmation modal overlay */
.kyc-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.70);
  z-index: 999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
.kyc-confirm-overlay[hidden] { display: none; }
.kyc-confirm-card {
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 24px 20px 36px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
}
.kyc-confirm-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111;
  margin: 0 0 4px;
}
.kyc-confirm-hint {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0 0 14px;
}
.kyc-confirm-preview {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  margin-bottom: 16px;
  background: #f8fafc;
}
.kyc-confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kyc-retake-btn {
  color: var(--ts-orange, #ff5a00);
  border-color: var(--ts-orange, #ff5a00);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ROLE FORBIDDEN PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.role-forbidden-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 20px 80px;
}
.role-forbidden-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #fff1f0;
  border: 2px solid #fecaca;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  margin-bottom: 20px;
}
.role-forbidden-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #111;
  margin: 0 0 8px;
}
.role-forbidden-desc {
  font-size: 0.9rem;
  color: #64748b;
  max-width: 320px;
  margin: 0 0 24px;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   APPLICATION CARD — device info line
   ═══════════════════════════════════════════════════════════════════════════ */

.app-card-v2__device {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PART 10: FOOTER OVERLAP FIX
   Ensure sticky footer never covers content on mobile.
   ═══════════════════════════════════════════════════════════════════════════ */

/* Global bottom safe-area padding for the main content */
.content {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 16px));
}

.ts-mobile-role-nav {
  display: none;
}

@media (max-width: 767.98px) {
  .app-shell:has(.ts-mobile-role-nav) .content {
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 16px)) !important;
  }

  .ts-mobile-role-nav {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 210;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: min(100%, 560px);
    transform: translateX(-50%);
    padding: 7px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 -10px 26px rgba(15, 23, 42, 0.10);
    backdrop-filter: blur(14px);
  }

  .ts-mobile-role-nav__item {
    min-width: 0;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #667085;
    text-decoration: none;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    transition: background .12s, color .12s;
    -webkit-tap-highlight-color: transparent;
  }

  .ts-mobile-role-nav__item i {
    font-size: 19px;
    line-height: 1;
  }

  .ts-mobile-role-nav__item span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ts-mobile-role-nav__item.is-active {
    background: rgba(255, 90, 0, 0.10);
    color: #ff5a00;
  }

  .ts-mobile-role-nav--hq .ts-mobile-role-nav__item.is-active {
    background: rgba(15, 23, 42, 0.08);
    color: #101828;
  }
}

@media (max-width: 370px) {
  .ts-mobile-role-nav {
    padding-left: 6px;
    padding-right: 6px;
  }

  .ts-mobile-role-nav__item {
    font-size: 9.5px;
  }
}

/* Non-fixed footer — prevents overlap by flowing naturally */
.footer {
  position: relative !important;
  bottom: auto !important;
}

/* On long form pages, give extra breathing room */
.kyc-form,
.deal-flow,
.application-form {
  padding-bottom: 80px;
}

/* The form submit / next button container — always above fold */
.kyc-next-button,
.new-contract-cta {
  position: relative;
  z-index: 1;
}

@media (max-width: 480px) {
  .new-contract-cta { font-size: 1rem; padding: 16px 16px; }
  .kyc-confirm-card { padding: 20px 16px 32px; }
  .role-forbidden-page { padding: 30px 16px 80px; }
}

@media (max-width: 767.98px) {
  .kyc-form,
  .application-flow-page,
  #review-form {
    padding-bottom: calc(140px + env(safe-area-inset-bottom, 16px)) !important;
  }
}

/* ── KYC review cards ──────────────────────────────────────────── */
.kyc-review-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 16px 0;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.kyc-portrait-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 16px auto;
  max-width: 420px;
  width: 100%;
}

.kyc-portrait-card {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}

.kyc-portrait-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.kyc-portrait-card__label {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #101828;
}

.kyc-portrait-card__frame {
  aspect-ratio: 3 / 4;
  max-width: 420px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
  border: 2px solid #e5e7eb;
}

.kyc-portrait-card__link {
  display: block;
  width: 100%;
  height: 100%;
}

.kyc-portrait-card__img {
  width: 100%;
  height: 100%;
  display: block;
}

.kyc-portrait-card__img--cover {
  object-fit: cover;
}

.kyc-portrait-card__img--contain {
  object-fit: contain;
  background: #0f172a08;
}

.kyc-portrait-card__placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  color: #64748b;
}

.kyc-portrait-card__placeholder p {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
  color: #475569;
}

.kyc-portrait-card__placeholder span {
  font-size: 13px;
  font-weight: 600;
}

.kyc-portrait-card__placeholder--broken {
  background: #fff7ed;
  border-color: #fed7aa;
}

.kyc-portrait-card__retake {
  margin-top: 10px;
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
}

.kyc-portrait-card__note {
  margin: 8px 0 0;
  font-size: 12px;
  color: #b45309;
}

.kyc-review-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kyc-review-card-image {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
  border: 2px solid #e5e7eb;
}

.kyc-review-card-image:has(#kyc-img-id_front),
.kyc-review-card-image:has(#kyc-img-id_back),
.kyc-review-card-image:has(img[data-kyc-img="id_front"]),
.kyc-review-card-image:has(img[data-kyc-img="id_back"]) {
  aspect-ratio: 1.586 / 1;
}

.kyc-review-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.kyc-review-card-image img#kyc-img-id_front,
.kyc-review-card-image img#kyc-img-id_back,
.kyc-review-card-image img[data-kyc-img="id_front"],
.kyc-review-card-image img[data-kyc-img="id_back"] {
  object-fit: contain;
  background: #f8fafc;
}

.kyc-review-card-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
  background: #f8fafc;
}

.kyc-review-card-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 6px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.kyc-review-retake {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 40px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.kyc-review-submit-row {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  position: relative;
  z-index: 5;
  padding-bottom: env(safe-area-inset-bottom, 0);
  pointer-events: auto;
}

@media (max-width: 767.98px) {
  .kyc-review-submit-row {
    margin-bottom: calc(72px + env(safe-area-inset-bottom, 16px));
  }
}

.kyc-review-submit-row .action-btn-large {
  pointer-events: auto;
}

.kyc-review-submit-row .action-btn-large.outline {
  flex: 0 0 auto;
  min-width: 96px;
  max-width: 120px;
}

.kyc-review-submit-row .action-btn-large.primary {
  flex: 1;
}

.kyc-review-submit-row .action-btn-large.primary[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Typography restoration (readable mobile scale) ─────────────── */
body {
  font-size: 16px;
}

.greeting,
h1.greeting {
  font-size: clamp(30px, 7vw, 42px);
  font-weight: 800;
  line-height: 1.15;
}

.kyc-section h2,
.kyc-guided-step h2 {
  font-size: clamp(22px, 5vw, 26px);
  font-weight: 800;
}

.kyc-section p,
.kyc-guided-step .text-muted {
  font-size: 15px;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  font-size: 18px;
}

label,
.ts-field-label,
.application-progress-meta {
  font-size: 14px;
}

.application-progress-meta-step,
.application-progress-meta-name {
  font-size: 14px;
  font-weight: 700;
}

.action-btn-large,
.new-application-button,
.new-contract-cta {
  font-size: 17px;
  font-weight: 700;
}

.action-btn-large .btn-label {
  font-size: 17px;
  font-weight: 700;
}

.term-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.term-chip {
  border: 1.5px solid var(--ts-border);
  background: #fff;
  color: var(--ts-text);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.term-chip--active {
  border-color: var(--ts-orange);
  background: #fff8f5;
  color: var(--ts-orange);
}

/* ── Spin & Win ───────────────────────────────────────────────── */
.spin-glass-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}
.spin-hero-card { text-align: center; padding: 24px 20px; }
.spin-hero-card__meta { margin-bottom: 18px; }
.spin-hero-card__label { display: block; font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 700; }
.spin-hero-card__count { font-size: 42px; font-weight: 900; color: #d97706; line-height: 1.1; }
.spin-wheel-wrap { position: relative; width: min(100%, 300px); height: min(100vw, 300px); max-width: 300px; max-height: 300px; margin: 0 auto 20px; }
.spin-wheel-glow {
  position: absolute; inset: -10px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.28), transparent 72%);
  animation: spin-glow-pulse 2.4s ease-in-out infinite;
}
@keyframes spin-glow-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.spin-wheel {
  width: 100%; height: 100%; border-radius: 50%;
  border: 7px solid rgba(255, 255, 255, 0.95); box-shadow: 0 14px 40px rgba(15, 23, 42, 0.18);
  position: relative; overflow: hidden;
  transition: transform 3.2s cubic-bezier(0.15, 0.85, 0.2, 1);
  background: conic-gradient(
    #fff7d6 0deg 45deg,
    #ffedd5 45deg 90deg,
    #fef3c7 90deg 135deg,
    #fde68a 135deg 180deg,
    #fcd34d 180deg 225deg,
    #f59e0b 225deg 270deg,
    #0f172a 270deg 315deg,
    #ff5a00 315deg 360deg
  );
}
.spin-wheel--premium .spin-wheel__segment {
  position: absolute;
  left: 50%; top: 50%;
  width: 38%; transform-origin: 0 0;
  transform: rotate(calc(var(--i) * 45deg - 90deg)) translate(18%, -50%);
  font-size: 11px;
  font-weight: 900;
  color: #0f172a;
  text-align: center;
  letter-spacing: 0.02em;
}
.spin-wheel__segment--jackpot { color: #ff5a00; font-size: 10px; }
.spin-wheel-wrap.is-spinning .spin-wheel { transition-duration: 3.6s; }
.spin-wheel__hub {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(145deg, #fff, #fff7d6);
  border: 3px solid #f59e0b;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}
.spin-wheel__hub-mark { font-weight: 900; font-size: 15px; color: #0f172a; }
.spin-wheel-pointer {
  position: absolute; top: -4px; left: 50%; transform: translateX(-50%);
  width: 0; height: 0; border-left: 12px solid transparent; border-right: 12px solid transparent;
  border-top: 22px solid #0f172a; z-index: 3;
  filter: drop-shadow(0 2px 4px rgba(15, 23, 42, 0.2));
}
.spin-wheel-pointer--premium { border-top-color: #d97706; }
.spin-button--primary {
  width: 100%; max-width: 280px; min-height: 52px; font-size: 16px; font-weight: 800;
  letter-spacing: 0.5px; border-radius: 14px;
  background: linear-gradient(135deg, #ff5a00, #f59e0b);
  border: none; color: #fff;
  box-shadow: 0 8px 20px rgba(255, 90, 0, 0.25);
}
.spin-button--primary:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }
.spin-hint, .spin-empty-hint { font-size: 13px; color: #64748b; margin: 12px 0 0; }
.spin-win-reveal { text-align: center; border: 2px solid rgba(245, 158, 11, 0.35); background: linear-gradient(180deg, #fffbeb, #fff); }
.spin-win-kicker { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: #d97706; font-weight: 800; margin: 0; }
.spin-win-title { margin: 6px 0; font-size: 22px; color: #0f172a; }
.spin-win-amount { font-size: 36px; font-weight: 900; color: #16a34a; margin: 0; }
.spin-win-tier { color: #64748b; font-weight: 700; }
.ts-spin-pop { animation: ts-spin-pop 0.5s ease-out; }
@keyframes ts-spin-pop { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.spin-reward-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid #f1f5f9;
}
.spin-reward-row strong { font-size: 0.88rem; color: #0f172a; font-weight: 700; }
.spin-reward-row__amount { font-size: 18px; font-weight: 800; color: #16a34a; white-space: nowrap; }
.spin-reward-row__amount--jackpot { color: #d97706; }
.spin-rewards-empty { text-align: center; padding: 24px 12px; color: #64748b; }
.spin-rewards-empty p { margin: 0 0 4px; font-weight: 800; color: #475569; }
.wallet-chart-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
}
.wallet-chart-card canvas { min-height: 260px !important; height: 260px !important; max-height: none !important; }

/* ── Activation stepper polish ─────────────────────────────────── */
.ts-activation-stepper .lock-step { padding: 14px 0; border-bottom: 1px solid #f1f5f9; }
.ts-activation-stepper .lock-step:last-child { border-bottom: none; }
.ts-status-circle.current {
  box-shadow: 0 0 0 4px rgba(255, 90, 0, 0.2);
  animation: ts-ring-pulse 1.6s ease-in-out infinite;
}
@keyframes ts-ring-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255, 90, 0, 0.15); }
  50% { box-shadow: 0 0 0 8px rgba(255, 90, 0, 0.35); }
}
.lock-step--failed .lock-step__sub { color: #b45309; font-weight: 600; }

.activation-stage-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  margin-bottom: 14px;
}

.activation-stage-card__icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #ff5a00;
  background: #fff;
  border: 2px solid rgba(255, 90, 0, 0.24);
}

.activation-stage-card__spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid rgba(255, 90, 0, 0.18);
  border-top-color: #ff5a00;
  animation: tsActivationSpin 0.85s linear infinite;
}

.activation-stage-card__copy h2 {
  margin: 0 0 4px;
  font-size: 18px;
  line-height: 1.25;
  color: #101828;
}

.activation-stage-card__copy p {
  margin: 0;
  color: #475467;
  font-size: 14px;
  line-height: 1.45;
}

.activation-stage-card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.activation-stage-card__facts span {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  color: #667085;
  font-size: 12px;
}

.activation-stage-card__facts strong {
  color: #101828;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.ts-activation-stepper .lock-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ts-activation-stepper .lock-step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 12px 8px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

.ts-activation-stepper .lock-step:last-child { border-bottom: 1px solid #e5e7eb; }

.ts-activation-stepper .lock-step--internal {
  grid-column: 1 / -1;
  flex-direction: row;
  justify-content: center;
  text-align: left;
  padding: 10px 12px;
  background: #f8fafc;
}

.ts-activation-stepper .ts-status-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 900;
  border: 2px solid #cbd5e1;
  background: #fff;
  color: #475467;
}

.ts-activation-stepper .ts-status-circle.done {
  border-color: #16a34a;
  background: #16a34a;
  color: #fff;
}

.ts-activation-stepper .ts-status-circle.current {
  border: 3px dashed #ff5a00;
  background: #fff7ed;
  color: #ff5a00;
  animation: pulseStep 1.4s ease-in-out infinite;
}

.ts-activation-stepper .lock-step__body { min-width: 0; }
.ts-activation-stepper .lock-step__title {
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}
.ts-activation-stepper .lock-step__title.done { color: #15803d; }
.ts-activation-stepper .lock-step__title.current { color: #ff5a00; }
.ts-activation-stepper .lock-step__title.pending { color: #475467; }
.ts-activation-stepper .lock-step__sub {
  margin-top: 4px;
  color: #667085;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.activation-pay-cta {
  min-height: 56px;
  background: #ff5a00 !important;
  box-shadow: 0 8px 22px rgba(255, 90, 0, 0.28);
}

.activation-pay-cta .btn-label { letter-spacing: 0; }

@keyframes pulseStep {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 90, 0, 0.35);
  }
  70% {
    transform: scale(1.03);
    box-shadow: 0 0 0 12px rgba(255, 90, 0, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 90, 0, 0);
  }
}

@keyframes tsActivationSpin { to { transform: rotate(360deg); } }

@media (max-width: 430px) {
  .activation-stage-card { flex-direction: column; }
  .ts-activation-stepper .lock-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ts-activation-stepper .lock-step { padding: 10px 6px; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MERCHANT PREMIUM DASHBOARD (mobile fintech shell)
   Scoped under .merchant-dashboard-shell — do not use global .action-row / .card
   ═══════════════════════════════════════════════════════════════════════════ */

.merchant-dashboard-shell {
  position: relative;
}

.merchant-dashboard-shell .merchant-shell {
  --merchant-bg: #eef2f6;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px 14px calc(96px + env(safe-area-inset-bottom, 0px));
  margin: -12px -14px 0;
  min-height: calc(100vh - 1px);
  background: var(--merchant-bg);
}

.merchant-dashboard-shell .merchant-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding-top: env(safe-area-inset-top, 0px);
}

.merchant-dashboard-shell .merchant-header .merchant-brand {
  justify-self: start;
}

.merchant-dashboard-shell .merchant-header .topbar-page-title {
  justify-self: center;
  font-size: 16px;
  font-weight: 800;
  color: #101828;
}

.merchant-dashboard-shell .merchant-header .merchant-header-actions {
  justify-self: end;
}

.merchant-dashboard-shell .merchant-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.merchant-dashboard-shell .merchant-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--ts-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.merchant-dashboard-shell .merchant-brand-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.merchant-dashboard-shell .merchant-brand-icon--fallback::after {
  content: "T";
  font-size: 18px;
  font-weight: 900;
  color: var(--ts-orange);
}

.merchant-dashboard-shell .merchant-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.merchant-dashboard-shell .merchant-brand-name {
  display: none;
}

.merchant-dashboard-shell .merchant-brand-tagline {
  font-size: 11px;
  font-weight: 600;
  color: var(--ts-muted);
  line-height: 1.2;
}

.merchant-dashboard-shell .merchant-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.merchant-dashboard-shell .merchant-logout-form {
  margin: 0;
}

.merchant-dashboard-shell .merchant-header-btn {
  position: relative;
  width: 48px;
  height: 48px;
  border: 1px solid var(--ts-border);
  border-radius: 12px;
  background: #fff;
  color: #344054;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.merchant-dashboard-shell .merchant-header-btn:hover,
.merchant-dashboard-shell .merchant-header-btn:focus-visible {
  background: #f8fafc;
  transform: translateY(-1px);
}

.merchant-dashboard-shell .merchant-header-btn .bi-whatsapp {
  color: #16a34a;
}

.merchant-dashboard-shell .merchant-header-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ts-orange);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.merchant-dashboard-shell .merchant-greeting {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.merchant-dashboard-shell .merchant-greeting-title {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  color: var(--ts-text);
  line-height: 1.2;
}

.merchant-dashboard-shell .merchant-greeting-sub {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--ts-muted);
}

.merchant-dashboard-shell .merchant-country-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--ts-border);
  color: var(--ts-muted);
  flex-shrink: 0;
}

.merchant-dashboard-shell .merchant-country-chip__code {
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.04em;
}

.merchant-dashboard-shell .primary-contract-btn {
  border-radius: 16px;
  background: var(--orange, #ff5a00);
  box-shadow: 0 8px 20px rgba(255, 90, 0, 0.28);
}

.merchant-dashboard-shell .primary-contract-btn:hover,
.merchant-dashboard-shell .primary-contract-btn:focus-visible {
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(255, 90, 0, 0.38);
  filter: brightness(1.03);
}

.merchant-dashboard-shell .primary-contract-btn:active {
  transform: translateY(0);
}

.merchant-dashboard-shell .primary-contract-btn__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: var(--ts-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.merchant-dashboard-shell .primary-contract-btn__label {
  flex: 1;
}

.merchant-dashboard-shell .primary-contract-btn__arrow {
  font-size: 22px;
  opacity: 0.95;
}

.merchant-dashboard-shell .overview-card {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.merchant-dashboard-shell .overview-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.merchant-dashboard-shell .overview-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 900;
  color: var(--ts-text);
}

.merchant-dashboard-shell .overview-card__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 800;
  color: var(--ts-orange);
  text-decoration: none;
  white-space: nowrap;
}

.merchant-dashboard-shell .overview-card__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.merchant-dashboard-shell .overview-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  min-width: 0;
}

.merchant-dashboard-shell .overview-stat__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.merchant-dashboard-shell .overview-stat__icon--phone { background: #eff6ff; color: #2563eb; }
.merchant-dashboard-shell .overview-stat__icon--active { background: #ecfdf3; color: #16a34a; }
.merchant-dashboard-shell .overview-stat__icon--locked { background: #fef3c7; color: #d97706; }
.merchant-dashboard-shell .overview-stat__icon--overdue { background: #fef2f2; color: #dc2626; }

.merchant-dashboard-shell .overview-stat__label {
  font-size: 10px;
  font-weight: 800;
  color: var(--ts-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.merchant-dashboard-shell .overview-stat__value {
  font-size: 18px;
  font-weight: 900;
  color: var(--ts-text);
  line-height: 1;
}

.merchant-dashboard-shell .section-title {
  margin: 4px 0 0;
  padding: 0 2px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.merchant-dashboard-shell .action-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.merchant-dashboard-shell .action-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 14px;
  border-top: 1px solid #eef2f7;
  color: var(--ts-text);
  text-decoration: none;
  transition: background 0.12s;
}

.merchant-dashboard-shell .action-card .action-row:first-child {
  border-top: none;
}

.merchant-dashboard-shell .action-row:hover,
.merchant-dashboard-shell .action-row:focus-visible {
  background: #f8fafc;
}

.merchant-dashboard-shell .action-row-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.merchant-dashboard-shell .action-row-icon--active { background: #fff7ed; color: #ea580c; }
.merchant-dashboard-shell .action-row-icon--pending { background: #eff6ff; color: #2563eb; }
.merchant-dashboard-shell .action-row-icon--completed { background: #ecfdf3; color: #16a34a; }
.merchant-dashboard-shell .action-row-icon--archived { background: #f1f5f9; color: #64748b; }
.merchant-dashboard-shell .action-row-icon--earnings { background: #fdf4ff; color: #9333ea; }
.merchant-dashboard-shell .action-row-icon--payments { background: #fffbeb; color: #d97706; }
.merchant-dashboard-shell .action-row-icon--cash { background: #ecfdf5; color: #059669; }
.merchant-dashboard-shell .action-row-icon--device { background: #eff6ff; color: #2563eb; }
.merchant-dashboard-shell .action-row-icon--spin { background: #fff7ed; color: #ff5a00; }
.merchant-dashboard-shell .action-row-icon--deals { background: #f8fafc; color: #475569; }
.merchant-dashboard-shell .action-row-icon--support { background: #eef2ff; color: #4f46e5; }

.merchant-dashboard-shell .action-row-label {
  font-size: 15px;
  font-weight: 800;
  color: var(--ts-text);
  min-width: 0;
  overflow-wrap: anywhere;
}

.merchant-dashboard-shell .action-row-value {
  font-size: 13px;
  font-weight: 800;
  color: var(--ts-muted);
  text-align: right;
  white-space: nowrap;
  max-width: none;
  justify-self: end;
}

.merchant-dashboard-shell .action-row-chevron {
  color: #cbd5e1;
  font-size: 18px;
  width: 18px;
  text-align: right;
  justify-self: end;
  flex-shrink: 0;
}

.merchant-dashboard-shell .bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 520px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 8px;
  padding: 8px 20px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--ts-border);
  backdrop-filter: blur(10px);
  z-index: 40;
}

.merchant-dashboard-shell .bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  min-height: 44px;
  font-size: 11px;
  font-weight: 800;
  color: var(--ts-muted);
  text-decoration: none;
}

.merchant-dashboard-shell .bottom-nav__item i {
  font-size: 20px;
}

.merchant-dashboard-shell .bottom-nav__item--active {
  color: var(--ts-orange);
}

.merchant-dashboard-shell .bottom-nav__fab {
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6a1a, #ff5a00);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(255, 90, 0, 0.35);
  transition: transform 0.12s, box-shadow 0.15s;
}

.merchant-dashboard-shell .bottom-nav__fab:hover,
.merchant-dashboard-shell .bottom-nav__fab:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(255, 90, 0, 0.4);
  color: #fff;
}

@media (max-width: 380px) {
  .merchant-dashboard-shell .overview-card__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .merchant-dashboard-shell .action-row-value {
    font-size: 12px;
  }
}

@media (min-width: 560px) {
  .merchant-dashboard-shell .merchant-shell {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 0;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Shared mobile-first UI (KulaSell-style tokens)
   ═══════════════════════════════════════════════════════════════════════════ */

.mobile-shell {
  min-height: 100vh;
  background: var(--app-bg, #eef2f6);
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
}

.topbar.mobile-topbar,
.mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--ts-border, #e4e7eb);
}

.topbar .topbar-page-title,
.mobile-header__title {
  font-size: 16px;
  font-weight: 800;
  color: var(--ts-text, #111);
}

.flag-pill,
.merchant-country-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--ts-border, #e4e7eb);
  flex-shrink: 0;
}

.flag-pill__code,
.merchant-country-chip__code {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--ts-muted, #64748b);
}

.primary-big-action,
.primary-contract-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--orange, #ff5a00);
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.03em;
  border: none;
  box-shadow: 0 8px 20px rgba(255, 90, 0, 0.28);
  transition: transform 0.12s, filter 0.15s;
  box-sizing: border-box;
}

.primary-big-action:hover,
.primary-contract-btn:hover,
.primary-big-action:focus-visible,
.primary-contract-btn:focus-visible {
  color: #fff;
  text-decoration: none;
  filter: brightness(1.04);
}

.simple-section {
  margin: 0;
  padding: 0 2px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #94a3b8;
}

.simple-row,
.action-row,
.ts-menu-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
}

.row-arrow,
.action-row-chevron,
.ts-row-arrow {
  font-size: 18px;
  font-weight: 700;
  color: #94a3b8;
  line-height: 1;
}

.form-card {
  background: #fff;
  border: 1px solid var(--ts-border, #e4e7eb);
  border-radius: 16px;
  padding: 18px 16px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.form-card .form-group {
  margin-bottom: 16px;
}

.form-card label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ts-text, #111);
  margin-bottom: 6px;
}

.form-card input[type="text"],
.form-card input[type="tel"],
.form-card input[type="email"],
.form-card input[type="number"],
.form-card input[type="date"],
.form-card input[type="password"],
.form-card select,
.form-card textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid var(--ts-border, #e4e7eb);
  border-radius: 12px;
  font-size: 1rem;
  background: #fff;
  color: var(--ts-text, #111);
  box-sizing: border-box;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.form-actions .ts-button-primary,
.form-actions .ts-button-outline,
.form-actions .btn:not(.btn-outline) {
  flex: 1;
  min-height: 48px;
}

.ts-button-primary,
.form-actions .btn:not(.btn-outline) {
  background: var(--orange, #ff5a00);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.ts-button-outline,
.form-actions .btn-outline {
  background: #fff;
  color: var(--ts-text, #111);
  border: 1.5px solid var(--ts-border, #d0d5dd);
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.application-flow-page {
  padding: 0 14px calc(24px + env(safe-area-inset-bottom, 0px));
  max-width: 520px;
  margin: 0 auto;
}

.application-flow-page .greeting {
  font-size: 1.35rem;
  font-weight: 900;
  margin: 8px 0 4px;
  color: var(--ts-text, #111);
}

.uw-primary-action {
  border-radius: 16px;
  box-shadow: none;
}

.uw-home-simple .ts-menu-row {
  grid-template-columns: 1fr auto auto;
}

.uw-home-simple .uw-primary-action::after {
  content: "→";
  font-size: 20px;
  font-weight: 700;
  opacity: 0.85;
  margin-left: auto;
}

/* ═══════════════════════════════════════════════════════
   GLOBAL POLISH — v2 premium fintech UI enhancements
   ═══════════════════════════════════════════════════════ */

/* ── Bigger primary action button ─────────────────────── */
.primary-contract-btn,
.primary-big-action {
  min-height: 68px;
  font-size: 17px;
  letter-spacing: 0.02em;
}

/* ── Underwriter primary action grid on mobile ─────────── */
@media (max-width: 430px) {
  .uw-primary-grid {
    grid-template-columns: 1fr;
  }
  .uw-primary-action {
    min-height: 68px;
  }
}

/* ── Merchant greeting subtitle ───────────────────────── */
.merchant-dashboard-shell .merchant-greeting-sub {
  font-size: 12px;
  color: var(--ts-muted);
  margin-top: 2px;
}

/* ── Queue status card improvements ───────────────────── */
.uw-queue-status-card p {
  font-size: 12px;
  color: var(--ts-muted);
  margin: 4px 0 0;
}

/* ── Action row icon improvements ─────────────────────── */
.ts-menu-row__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* ── ts-fade-in animation ─────────────────────────────── */
@keyframes ts-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ts-fade-in {
  animation: ts-fade-in-up 0.35s ease both;
}

/* ── Merchant greeting with subtitle ─────────────────── */
.merchant-greeting-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--ts-muted, #667085);
  margin: 2px 0 0;
}

/* ── Bigger section action rows on tablet ─────────────── */
@media (min-width: 480px) {
  .merchant-dashboard-shell .action-row {
    min-height: 62px;
  }
  .merchant-dashboard-shell .primary-contract-btn {
    min-height: 72px;
    font-size: 18px;
  }
}

/* ── Improved mobile topbar for underwriter ───────────── */
.sales-main.mobile-shell {
  padding: 12px 14px calc(48px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Smooth button press animation ───────────────────── */
.primary-contract-btn:active,
.uw-primary-action:active,
.ts-button-primary:active {
  transform: scale(0.98);
}

/* ── Better KPI cards fade in stagger ────────────────── */
.overview-card {
  animation: ts-fade-in-up 0.3s ease both;
  animation-delay: 0.1s;
}

.action-card {
  animation: ts-fade-in-up 0.35s ease both;
  animation-delay: 0.15s;
}

/* ── Money value class ────────────────────────────────── */
.money-value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  letter-spacing: -0.01em;
}

/* ── Flag pill polish ─────────────────────────────────── */
.flag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: #fff;
  border: 1px solid var(--ts-border, #e2e8f0);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  color: var(--ts-muted, #667085);
  box-shadow: 0 1px 4px rgba(15,23,42,0.05);
  white-space: nowrap;
}

/* == Risk Insight Card (Underwriter Review) ======================== */
.ts-risk-insight-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(15,23,42,0.06);
}

.ts-risk-insight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}

.ts-risk-insight-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ts-risk-insight-title svg {
  width: 15px; height: 15px;
  fill: none; stroke: #ff5a00; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

.ts-risk-insight-band {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.ts-risk-band--low    { background: rgba(22,163,74,0.10); color: #16a34a; }
.ts-risk-band--good   { background: rgba(74,222,128,0.15); color: #166534; }
.ts-risk-band--watch  { background: rgba(245,158,11,0.10); color: #d97706; }
.ts-risk-band--high   { background: rgba(249,115,22,0.10); color: #ea580c; }
.ts-risk-band--reject { background: rgba(220,38,38,0.10); color: #dc2626; }

.ts-risk-signals {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-bottom: 1px solid #f1f5f9;
}

@media (max-width: 640px) {
  .ts-risk-signals { grid-template-columns: repeat(2, 1fr); }
}

.ts-risk-signal {
  padding: 12px 14px;
  border-right: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ts-risk-signal:last-child { border-right: none; }

.ts-risk-signal-label {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ts-risk-signal-val {
  font-size: 15px;
  font-weight: 900;
  line-height: 1.1;
}

.ts-signal--green { color: #16a34a; }
.ts-signal--amber { color: #d97706; }
.ts-signal--red   { color: #dc2626; }

.ts-risk-signal-hint {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
}

.ts-risk-insight-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(220,38,38,0.06);
  font-size: 12.5px;
  font-weight: 700;
  color: #dc2626;
}

.ts-risk-insight-alert svg {
  width: 15px; height: 15px;
  fill: none; stroke: #dc2626; stroke-width: 2;
  stroke-linecap: round; flex-shrink: 0;
}

.ts-risk-insight-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(245,158,11,0.06);
  font-size: 12.5px;
  font-weight: 600;
  color: #92400e;
}

.ts-risk-insight-note svg {
  width: 15px; height: 15px;
  fill: none; stroke: #d97706; stroke-width: 2;
  stroke-linecap: round; flex-shrink: 0;
}

/* == Address Confidence Card ======================================= */
.ts-address-confidence-hints {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 12px;
}

.ts-confidence-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  gap: 8px;
}

.ts-confidence-item span { color: #64748b; font-weight: 500; }
.ts-confidence-item strong { font-weight: 700; font-size: 12px; text-align: right; }

.ts-confidence-item--ok {
  background: rgba(22,163,74,0.07);
  border: 1px solid rgba(22,163,74,0.20);
}
.ts-confidence-item--ok strong { color: #16a34a; }

.ts-confidence-item--missing {
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.20);
}
.ts-confidence-item--missing strong { color: #d97706; }

/* == Spin Quality Eligibility Card ================================= */
.spin-quality-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(15,23,42,0.06);
}

.spin-quality-header {
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(255,90,0,0.05), rgba(255,255,255,0));
  border-bottom: 1px solid #f1f5f9;
}

.spin-quality-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
}

.spin-quality-title svg {
  width: 14px; height: 14px;
  fill: none; stroke: #16a34a; stroke-width: 2.2;
  stroke-linecap: round; flex-shrink: 0;
}

.spin-quality-rules {
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spin-quality-rule {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: #374151;
  line-height: 1.45;
}

.spin-quality-rule svg {
  width: 13px; height: 13px;
  fill: none; stroke-width: 2.5;
  stroke-linecap: round; flex-shrink: 0;
  margin-top: 1px;
}

.spin-quality-rule--ok svg { stroke: #16a34a; }
.spin-quality-rule--warn svg { stroke: #d97706; }
.spin-quality-rule--ok  { color: #14532d; }
.spin-quality-rule--warn { color: #78350f; }

.spin-quality-tip {
  padding: 10px 16px;
  background: rgba(255,90,0,0.04);
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  color: #7c3a00;
  font-weight: 600;
  line-height: 1.5;
}

/* == Merchant Quality Score Card =================================== */
.merchant-quality-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  margin: 0 0 12px;
  box-shadow: 0 1px 4px rgba(15,23,42,0.06);
}

.merchant-quality-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
}

.merchant-quality-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.merchant-quality-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 800;
}

.merchant-quality-badge--great { background: rgba(22,163,74,0.10); color: #16a34a; }
.merchant-quality-badge--ok    { background: rgba(255,90,0,0.10);  color: #ff5a00; }
.merchant-quality-badge--warn  { background: rgba(245,158,11,0.10); color: #d97706; }

.merchant-quality-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.merchant-quality-stat {
  padding: 12px 14px;
  text-align: center;
  border-right: 1px solid #f1f5f9;
}
.merchant-quality-stat:last-child { border-right: none; }

.merchant-quality-stat-val {
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
}

.merchant-quality-stat-lbl {
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.merchant-quality-tip {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 10px 16px;
  background: rgba(255,90,0,0.04);
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
  color: #7c3a00;
  font-weight: 600;
  line-height: 1.5;
}

.merchant-quality-tip svg {
  width: 13px; height: 13px;
  fill: none; stroke: #ff5a00; stroke-width: 2;
  stroke-linecap: round; flex-shrink: 0;
  margin-top: 2px;
}

.mobile-bottom-action-bar {
  position: sticky;
  bottom: 0;
  z-index: 40;
  margin: 18px -4px 0;
  padding: 12px 8px calc(env(safe-area-inset-bottom, 0px) + 16px);
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 -12px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}
.mobile-bottom-action-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}
.mobile-bottom-action-bar__btn {
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 12px 16px;
  font-weight: 900;
  text-decoration: none;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.1;
  box-sizing: border-box;
}
.mobile-bottom-action-bar__btn--back,
.mobile-bottom-action-bar__btn--secondary {
  color: #0f172a;
  background: #fff;
  border-color: #e2e8f0;
  flex: 0 0 auto;
}
.mobile-bottom-action-bar__btn--primary {
  color: #fff;
  flex: 1 1 auto;
  border: 0;
  cursor: pointer;
}
.mobile-bottom-action-bar__btn--orange { background: #ff5a00; }
.mobile-bottom-action-bar__btn--green { background: #16a34a; }
.mobile-bottom-action-bar__btn--blue { background: #2563eb; }
.mobile-bottom-action-bar__btn--red { background: #dc2626; }
.mobile-bottom-action-bar__btn--yellow { background: #d97706; }
.mobile-bottom-action-bar__btn[disabled] {
  opacity: .55;
  cursor: not-allowed;
}

.ts-recording-card__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.ts-recording-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: .68rem;
  font-weight: 900;
}
.ts-recording-status--pending_qc { background: #fef3c7; color: #92400e; }
.ts-recording-status--passed_qc { background: #dcfce7; color: #166534; }
.ts-recording-status--failed_qc { background: #fee2e2; color: #991b1b; }
.ts-recording-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.ts-recording-item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
}
.ts-recording-item__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.ts-recording-item__name {
  font-weight: 900;
  color: #0f172a;
  word-break: break-word;
}
.ts-recording-item__meta {
  color: #64748b;
  font-size: .76rem;
  margin-top: 3px;
}
.ts-recording-empty {
  border: 1.5px dashed #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  color: #64748b;
  text-align: center;
  background: #fff;
  font-size: .86rem;
}
.ts-call-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.ts-call-section-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
.ts-call-section-card strong {
  display: block;
  margin-bottom: 5px;
  color: #0f172a;
}
.ts-call-section-card p {
  margin: 0;
  color: #64748b;
  font-size: .84rem;
  word-break: break-word;
}

/* == Underwriter queue fairness and action polish ================== */
.uw-home-simple .uw-queue-status-card {
  border-color: rgba(22, 163, 74, 0.32);
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(22, 163, 74, 0.10);
}

.uw-home-simple .uw-queue-status-card strong {
  color: #16a34a;
}

.uw-home-simple .uw-queue-status-card--empty {
  border-color: #bbf7d0;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.06);
}

.uw-home-simple .uw-primary-action {
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}

.uw-home-simple .uw-primary-action--queue {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(22, 163, 74, 0.26);
}

.uw-home-simple .uw-primary-action--queue-empty {
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #bbf7d0;
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.06);
}

.uw-home-simple .uw-primary-action--queue-empty span {
  color: #16a34a;
  opacity: 1;
}

.uw-home-simple .uw-primary-action--active-reviews,
.uw-home-simple .active-reviews-card {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.28);
}

.uw-home-simple .ts-app-row {
  border-radius: 14px;
  border: 1px solid #eef2f7;
  margin: 0 0 8px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.uw-home-simple .ts-menu-section,
.uw-home-simple .action-card {
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.uw-home-simple .ts-menu-row {
  grid-template-columns: auto 1fr auto auto;
  min-height: 62px;
  padding: 0 14px;
}

.uw-home-simple .action-row-icon--rules {
  background: #f1f5f9;
  color: #475569;
}

.uw-home-simple .action-row-value {
  justify-self: end;
  white-space: nowrap;
}

.uw-home-simple .action-row-chevron,
.uw-home-simple .row-arrow {
  justify-self: end;
  color: #94a3b8;
}

.queue-privacy-card {
  margin: 14px 0 0;
  padding: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  background: #ffffff;
  border: 1.5px solid #bbf7d0;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.08);
}

.queue-privacy-card__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(22, 163, 74, 0.10);
  color: #16a34a;
}

.queue-privacy-card__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.queue-privacy-card__body {
  min-width: 0;
}

.queue-privacy-card__kicker,
.queue-privacy-card__limit {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.queue-privacy-card h2 {
  margin: 3px 0 7px;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.15;
}

.queue-privacy-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.queue-privacy-card__form {
  grid-column: 1 / -1;
  margin: 0;
}

.queue-privacy-card__button {
  grid-column: 1 / -1;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: #16a34a;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.20);
}

.queue-privacy-card__button--disabled {
  background: #e2e8f0;
  color: #64748b;
  cursor: not-allowed;
  box-shadow: none;
}

@media (max-width: 430px) {
  .queue-privacy-card {
    margin-left: 0;
    margin-right: 0;
    grid-template-columns: 1fr;
  }
}

/* Final mobile regression repairs: keep role pages full-width, nav viewport-fixed, and review controls clean. */
@media (max-width: 767.98px) {
  body.role-merchant .app-shell,
  body.role-underwriter .app-shell {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    overflow: visible;
    box-shadow: none;
  }

  body.role-merchant .content,
  body.role-underwriter .content {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 16px)) !important;
    box-sizing: border-box;
  }

  body.role-merchant .merchant-dashboard-shell,
  body.role-merchant .merchant-dashboard-shell .merchant-shell,
  body.role-merchant .merchant-home-simple,
  body.role-underwriter .uw-home,
  body.role-underwriter .sales-main,
  body.role-underwriter .ts-review-page,
  body.role-underwriter .uw-canvas,
  body.role-underwriter .call-page {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
  }

  body.role-merchant .merchant-dashboard-shell .merchant-shell,
  body.role-underwriter .uw-home,
  body.role-underwriter .sales-main,
  body.role-underwriter .ts-review-page,
  body.role-underwriter .call-page {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  body.role-merchant .merchant-dashboard-shell .merchant-shell {
    margin-top: 0 !important;
    padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.role-merchant .merchant-dashboard-shell .overview-card,
  body.role-merchant .merchant-dashboard-shell .action-card,
  body.role-merchant .merchant-dashboard-shell .simple-menu-block,
  body.role-merchant .merchant-status-card,
  body.role-merchant .merchant-mini-finance,
  body.role-underwriter .ts-review-card,
  body.role-underwriter .uw-card,
  body.role-underwriter .uw-action-card,
  body.role-underwriter .uw-list-card,
  body.role-underwriter .app-card-v2,
  body.role-underwriter .review-card,
  body.role-underwriter .application-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .ts-mobile-role-nav,
  .merchant-dashboard-shell .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    transform: none;
    z-index: 1000;
    box-sizing: border-box;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .mobile-bottom-action-bar {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    margin-left: 0;
    margin-right: 0;
    z-index: 900;
  }

  .yes-no-buttons,
  .ts-yn-buttons,
  .review-choice-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
  }

  .btn-yn,
  .ts-yn-btn,
  .review-choice {
    width: 100%;
    min-width: 0;
    min-height: 56px;
    height: auto;
    border-radius: 14px;
    font-weight: 800;
    box-sizing: border-box;
  }

  .btn-yn--yes.btn-yn--active,
  .ts-yn-btn--yes.ts-yn-btn--active,
  .review-choice--yes.is-selected {
    background: #16a34a;
    border-color: #16a34a;
    color: #ffffff;
  }

  .btn-yn--no.btn-yn--active,
  .ts-yn-btn--no.ts-yn-btn--active,
  .review-choice--no.is-selected {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
  }

  .portal-search-shell {
    width: 100%;
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
  }

  .portal-search-shell .glass-card,
  .portal-search-shell .portal-support-card,
  .portal-search-shell .input,
  .portal-search-shell .select,
  .portal-search-shell .btn-full {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
  }

  .portal-heading {
    overflow-wrap: anywhere;
    line-height: 1.15;
  }
}

.kyc-portrait-stack {
  max-width: 100%;
}

.kyc-smart-card--selfie {
  width: 100%;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.kyc-smart-card--id_front,
.kyc-smart-card--id_back {
  width: 100%;
  max-width: 100%;
}

.kyc-smart-card__frame--id_front,
.kyc-smart-card__frame--id_back,
.kyc-review-card-image:has(#kyc-img-id_front),
.kyc-review-card-image:has(#kyc-img-id_back),
.kyc-review-card-image:has(img[data-kyc-img="id_front"]),
.kyc-review-card-image:has(img[data-kyc-img="id_back"]) {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #f1f5f9;
}

.kyc-smart-card__frame--id_front img,
.kyc-smart-card__frame--id_back img,
.kyc-review-card-image img#kyc-img-id_front,
.kyc-review-card-image img#kyc-img-id_back,
.kyc-review-card-image img[data-kyc-img="id_front"],
.kyc-review-card-image img[data-kyc-img="id_back"] {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

/* == Premium underwriter home polish ================================ */
.uw-home-premium {
  color: #0f172a;
}

.uw-home-premium .uw-primary-action::after {
  content: none;
}

.uw-hero-panel,
.uw-claim-panel,
.uw-empty-state,
.uw-queue-alert {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
}

.uw-hero-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: start;
  padding: 20px;
}

.uw-hero-panel__copy h1 {
  margin: 4px 0 6px;
  font-size: clamp(26px, 5vw, 38px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
  color: #0f172a;
}

.uw-hero-panel__copy p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.45;
}

.uw-live-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: #166534;
  font-size: 12px;
  font-weight: 850;
}

.uw-hero-panel__actions {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 10px;
}

.uw-sound-toggle {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.uw-sound-toggle[aria-pressed="true"] {
  background: #dcfce7;
  border-color: #bbf7d0;
  color: #166534;
}

.uw-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.uw-kpi-card {
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 15px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.uw-kpi-card__icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  font-size: 16px;
}

.uw-kpi-card__icon--neutral { background: #f3f4f6; color: #111827; }
.uw-kpi-card__icon--active { background: #dbeafe; color: #1d4ed8; }
.uw-kpi-card__icon--success { background: #dcfce7; color: #166534; }
.uw-kpi-card__icon--warning { background: #fef9c3; color: #854d0e; }
.uw-kpi-card__icon--danger { background: #fee2e2; color: #991b1b; }
.uw-kpi-card__icon--processing { background: #e0f2fe; color: #0369a1; }

.uw-kpi-card__label {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
}

.uw-kpi-card strong {
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
  font-weight: 950;
}

.uw-kpi-card small {
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.uw-claim-panel {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 0.72fr);
  gap: 16px;
  align-items: stretch;
  padding: 16px;
  border-color: rgba(22, 163, 74, 0.25);
}

.uw-claim-panel__status {
  display: grid;
  align-content: center;
  gap: 8px;
}

.uw-claim-panel__status strong {
  color: #0f172a;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 950;
}

.uw-claim-panel__status p {
  max-width: 46rem;
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.uw-claim-form {
  min-width: 0;
}

.uw-home-premium .uw-claim-button {
  min-height: 68px;
  position: relative;
  overflow: hidden;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 17px;
  text-align: left;
  isolation: isolate;
}

.uw-home-premium .uw-primary-action--queue.uw-claim-button {
  background: linear-gradient(135deg, #15803d, #16a34a 55%, #22c55e);
  box-shadow: 0 18px 38px rgba(22, 163, 74, 0.28);
}

.uw-claim-button__fill {
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  width: 0;
  background: rgba(255, 255, 255, 0.7);
  z-index: -1;
}

.uw-claim-button__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.uw-home-premium .uw-claim-button strong {
  font-size: 14px;
  opacity: 0.9;
}

.uw-claim-button__spinner {
  display: none;
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
}

.uw-claim-form.is-claiming .uw-claim-button {
  pointer-events: none;
}

.uw-claim-form.is-claiming .uw-claim-button__fill {
  animation: ts-progress-fill 900ms ease-out both;
}

.uw-claim-form.is-claiming .uw-claim-button__spinner {
  display: inline-block;
}

.uw-home-premium .uw-claim-button--disabled {
  min-height: 68px;
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid #bbf7d0;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.07);
}

.uw-queue-alert {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 14px;
  border-color: #fde68a;
  background: #fffbeb;
  box-shadow: 0 10px 24px rgba(133, 77, 14, 0.08);
}

.uw-queue-alert i {
  color: #854d0e;
  font-size: 18px;
}

.uw-queue-alert strong {
  color: #78350f;
  font-size: 14px;
}

.uw-queue-alert p {
  margin: 3px 0 0;
  color: #92400e;
  font-size: 12px;
  line-height: 1.4;
}

.uw-review-section {
  display: grid;
  gap: 12px;
}

.uw-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.uw-section-head h2 {
  margin: 2px 0 0;
  color: #0f172a;
  font-size: 21px;
  line-height: 1.1;
  font-weight: 950;
}

.uw-section-link {
  color: #166534;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.uw-application-grid {
  display: grid;
  gap: 12px;
}

.uw-application-card {
  display: grid;
  gap: 14px;
  padding: 15px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.uw-application-card__top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: start;
}

.uw-application-card__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #ecfdf5;
  color: #16a34a;
}

.uw-application-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.18;
  font-weight: 950;
}

.uw-application-card__top p {
  margin: 3px 0 0;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 750;
}

.uw-application-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin: 0;
}

.uw-application-facts div {
  min-width: 0;
}

.uw-application-facts dt {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.uw-application-facts dd {
  margin: 4px 0 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.uw-application-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}

.uw-risk-badge {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.uw-risk-badge--neutral { background: #f3f4f6; color: #334155; }
.uw-risk-badge--strong { background: #dcfce7; color: #166534; }
.uw-risk-badge--moderate { background: #fef9c3; color: #854d0e; }
.uw-risk-badge--watch { background: #fee2e2; color: #991b1b; }

.uw-review-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.uw-empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px 18px;
  text-align: center;
}

.uw-empty-state__icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: #ecfdf5;
  color: #16a34a;
  font-size: 25px;
}

.uw-empty-state h3 {
  margin: 0;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.15;
  font-weight: 950;
}

.uw-empty-state p {
  max-width: 30rem;
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.uw-empty-state__button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding: 10px 16px;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.uw-skeleton-strip[hidden] {
  display: none !important;
}

.uw-skeleton-strip {
  display: grid;
  gap: 10px;
}

@media (max-width: 760px) {
  .uw-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .uw-claim-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .uw-hero-panel {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .uw-hero-panel__actions {
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .uw-kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .uw-kpi-card {
    min-height: 124px;
    padding: 13px;
  }

  .uw-kpi-card strong {
    font-size: 24px;
  }

  .uw-application-card__top {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .uw-application-card__top .ts-status-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .uw-application-facts {
    grid-template-columns: 1fr;
  }
}

/* UI hierarchy rule: Use cards only for major sections. Use rows/dividers for facts, questions, and list items. Avoid nested cards unless the child card is a true independent module. */
.ts-section-card,
.uw-card,
.ts-review-card,
.action-card,
.uw-list-card,
.overview-card,
.merchant-quality-card,
.simple-menu-block {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.ts-section-card {
  padding: 20px;
  margin-bottom: 14px;
}

.ts-section-header,
.uw-section-title,
.ts-review-card__title,
.section-title,
.simple-section,
.uw-section-label {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.ts-info-row,
.review-field,
.ts-review-row,
.detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid #eef2f7;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-width: 0;
}

.ts-info-row:last-child,
.review-field:last-child,
.review-field:last-of-type,
.ts-review-row:last-child,
.detail-row:last-child {
  border-bottom: 0;
}

.ts-info-row > span,
.review-field__label,
.ts-review-row > span,
.detail-row > span {
  color: #64748b;
  flex: 0 0 42%;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  min-width: 0;
}

.ts-info-row > strong,
.review-field__value,
.ts-review-row > strong,
.detail-row > strong {
  color: #0f172a;
  flex: 1;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.review-field__copy {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.review-edit-btn {
  flex: 0 0 auto;
}

.ts-row-list,
.action-card,
.uw-list-card,
.simple-menu-block {
  overflow: hidden;
}

.ts-row-list > *,
.action-row,
.simple-row,
.uw-list-row,
.simple-menu-row {
  border-bottom: 1px solid #eef2f7;
  border-top: 0;
  background: transparent;
  box-shadow: none;
}

.ts-row-list > *:last-child,
.action-row:last-child,
.simple-row:last-child,
.uw-list-row:last-child,
.simple-menu-row:last-child {
  border-bottom: 0;
}

.ts-question-block,
.review-question,
.yes-no-field,
.ts-yn-group {
  padding: 14px 0;
  border-bottom: 1px solid #eef2f7;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.ts-question-block:last-child,
.review-question:last-child,
.review-question:last-of-type,
.yes-no-field:last-child,
.ts-yn-group:last-child {
  border-bottom: 0;
}

.review-choice-row,
.yes-no-buttons,
.ts-yn-buttons {
  margin-top: 10px;
}

.ts-action-bar,
.uw-actions,
.form-actions,
.call-actions {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.ts-question-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ts-question-card:last-child {
  border-bottom: 0;
}

.ts-question-card__meta,
.ts-question-card__body,
.ts-question-card__actions {
  min-width: 0;
}

.ts-question-card__number {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 900;
}

.ts-question-card__icon {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #64748b;
}

.ts-question-card__label {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.ts-question-card__value {
  overflow-wrap: anywhere;
}

.ts-mark-form {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.uw-comparison {
  display: block;
}

.uw-comparison-card,
.ts-call-section-card,
.ts-recording-item {
  padding: 13px 0;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.uw-comparison-card:last-child,
.ts-call-section-card:last-child,
.ts-recording-item:last-child {
  border-bottom: 0;
}

.ts-recording-list {
  gap: 0;
}

.ts-call-section-grid {
  display: block;
}

@media (max-width: 520px) {
  .ts-info-row,
  .review-field,
  .ts-review-row,
  .detail-row {
    flex-direction: column;
    gap: 4px;
  }

  .ts-info-row > span,
  .review-field__label,
  .ts-review-row > span,
  .detail-row > span,
  .ts-info-row > strong,
  .review-field__value,
  .ts-review-row > strong,
  .detail-row > strong {
    flex: none;
    text-align: left;
    width: 100%;
  }
}
