:root {
  color-scheme: light;
  --ink: #071c34;
  --navy: #001629;
  --muted: #61738d;
  --line: #dce3ec;
  --canvas: #f3f5f8;
  --paper: #fff;
  --orange: #ff5a1f;
  --orange-light: #ff8851;
  --green: #39c99a;
  font-family: "Inter", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: clip; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input { font: inherit; }
a { color: inherit; }
.hidden, [hidden] { display: none !important; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: #111923; font-size: 27px; font-weight: 700; letter-spacing: -.8px; text-decoration: none; }
.brand-mark { position: relative; display: inline-block; width: 25px; height: 23px; }
.brand-mark::before { position: absolute; top: 2px; left: 1px; width: 12px; height: 19px; background: var(--orange); clip-path: polygon(0 0, 70% 0, 100% 100%, 42% 100%); content: ""; }
.brand-mark::after { position: absolute; top: 3px; left: 14px; width: 8px; height: 8px; border: 2px solid var(--orange); border-radius: 50%; content: ""; }
.brand-mark span { position: absolute; top: 5px; left: 16px; width: 4px; height: 4px; border-radius: 50%; background: var(--orange); }
.eyebrow { margin: 0 0 9px; color: var(--orange); font-size: 10px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
.login-page { display: grid; min-height: 100vh; padding: 28px 18px; place-items: center; background: radial-gradient(ellipse at 12% 16%, #fff4ee 0, transparent 28%), var(--canvas); }
.login-card { width: min(100%, 430px); padding: 34px; border: 1px solid var(--line); border-radius: 11px; background: var(--paper); box-shadow: 0 18px 48px #0c21320d; }
.login-brand { margin-bottom: 29px; font-size: 31px; }
.login-card h1 { margin: 0; font-size: 27px; letter-spacing: -.8px; }
.intro { margin: 8px 0 28px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.login-card label { display: block; margin: 17px 0 7px; font-size: 12px; font-weight: 650; }
.login-card input { width: 100%; height: 45px; padding: 0 12px; border: 1px solid #cfd8e4; border-radius: 6px; outline: none; background: #fff; color: var(--ink); }
.login-card input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px #ff5a1f1a; }
.button { min-height: 43px; padding: 0 17px; border: 1px solid transparent; border-radius: 7px; font-size: 12px; font-weight: 700; cursor: pointer; }
.button-primary { display: flex; width: 100%; margin-top: 21px; align-items: center; justify-content: center; gap: 9px; background: linear-gradient(100deg, var(--orange), var(--orange-light)); box-shadow: 0 5px 12px #ff5a1f25; color: white; }
.button-primary:hover { filter: brightness(.98); }
.button:disabled { cursor: wait; opacity: .72; }
.form-message { min-height: 17px; margin: 9px 0 0; color: #b42318; font-size: 12px; }
.form-message:not(.error) { color: #26785d; }
.security-note { margin: 17px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.5; }
.preview-link { display: inline-flex; margin-top: 19px; gap: 7px; color: #304c6b; font-size: 12px; font-weight: 700; text-decoration: none; }
.preview-link:hover, .back-link:hover { color: var(--orange); }
.preview-note { margin: 6px 0 0; color: #8492a5; font-size: 10px; }
.preview-status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.back-link { color: #355170; font-weight: 600; text-decoration: none; }
button.back-link { padding: 0; border: 0; background: transparent; cursor: pointer; font-size: inherit; }
.portal-layout { display: grid; min-height: 100vh; grid-template-columns: 232px minmax(0, 1fr); }
.portal-layout > .portal-content, .portal-content, .page-view, .panel { min-width: 0; }
.sidebar { display: flex; min-height: 100vh; padding: 19px 15px 16px; flex-direction: column; background: var(--navy); color: white; }
.sidebar-brand { margin: 0 10px 25px; color: white; font-size: 23px; }
.sidebar-caption { margin: 0 10px 14px; color: #a7bfd5; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.sidebar-nav { display: grid; gap: 4px; }
.sidebar-link { display: flex; width: 100%; min-height: 41px; padding: 0 12px; align-items: center; gap: 12px; border: 0; border-radius: 7px; background: transparent; color: #e7edf5; cursor: pointer; font-size: 13px; font-weight: 600; text-align: left; }
.sidebar-link span { width: 15px; color: #a6bfd3; text-align: center; }
.sidebar-link:hover { background: #ffffff12; }
.sidebar-link.active { background: linear-gradient(100deg, var(--orange), var(--orange-light)); box-shadow: 0 4px 12px #ff5a1f35; color: white; }
.sidebar-link.active span { color: white; }
.sidebar-user { display: flex; margin-top: auto; padding: 13px 3px 2px; align-items: center; gap: 10px; border-top: 1px solid #ffffff25; }
.avatar { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #ffd2c2; border-radius: 50%; background: #fff1eb; color: var(--orange); font-weight: 800; }
.sidebar-user-copy { min-width: 0; }
.sidebar-user-copy strong, .sidebar-user-copy small { display: block; overflow-wrap: anywhere; }
.sidebar-user strong { font-size: 11px; }
.sidebar-user small { margin-top: 3px; color: #b8c7d5; font-size: 10px; }
.sidebar-session-status { color: #d5e1eb !important; }
.sidebar-account-actions { display: grid; margin: 8px 0 0 45px; gap: 4px; }
.sidebar-account-action { width: fit-content; padding: 3px 0; border: 0; background: transparent; color: #d5e1eb; cursor: pointer; font: inherit; font-size: 10px; font-weight: 600; text-decoration: none; }
.sidebar-account-action:hover { color: #fff; text-decoration: underline; }
.sidebar-account-action:disabled { cursor: wait; opacity: .65; }
.portal-content { width: min(100%, 1420px); margin: 0 auto; padding: 18px 34px 44px; }
.preview-banner { display: flex; margin-bottom: 24px; padding: 11px 14px; align-items: center; gap: 10px; border: 1px solid #ffdacb; border-radius: 7px; background: #fff8f4; color: #78513f; font-size: 11px; }
.preview-banner strong { color: #b8431a; }
/* Keep each workspace view in one shrinkable column. Without minmax(0,1fr),
   the merchant table's 990px readable width can widen the whole page grid. */
.page-view { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.page-heading { display: flex; min-width: 0; margin: 1px 0 7px; align-items: center; justify-content: space-between; gap: 20px; }
.page-heading h1 { margin: 0; font-size: clamp(27px, 3vw, 34px); letter-spacing: -1.1px; }
.page-heading p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.role-badge { display: inline-flex; padding: 9px 12px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 99px; background: white; color: #5b6e87; font-size: 11px; white-space: nowrap; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.metric-card, .panel { border: 1px solid var(--line); border-radius: 9px; background: var(--paper); box-shadow: 0 5px 18px #12253a08; }
.metric-card { min-height: 112px; padding: 15px 17px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: #65758b; font-size: 11px; }
.metric-icon { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 7px; background: #fff1eb; color: var(--orange); font-size: 14px; }
.metric-card strong { display: block; margin-top: 7px; font-size: 25px; letter-spacing: -.7px; }
.metric-card small { display: block; margin-top: 3px; color: #718096; font-size: 10px; }
.attention-card .metric-icon { background: #fff4dd; color: #b87412; }
.panel { padding: 18px; }
.panel h2 { margin: 0; font-size: 17px; letter-spacing: -.3px; }
.panel p:not(.eyebrow) { color: var(--muted); font-size: 13px; line-height: 1.6; }
.sandbox-panel { padding: 21px; }
.sandbox-panel h2 { margin-top: 2px; }
.sandbox-panel p:not(.eyebrow) { margin: 8px 0 15px; }
.sandbox-panel .button { width: auto; margin-top: 0; }
.panel-heading { display: flex; margin-bottom: 15px; align-items: center; justify-content: space-between; gap: 12px; }
.panel-heading .eyebrow { margin-bottom: 6px; }
.text-link { padding: 4px 0; border: 0; background: transparent; color: #dc4d1a; cursor: pointer; font-size: 11px; font-weight: 700; }
/* Wide data tables scroll inside this wrapper instead of pushing the viewport. */
.table-scroll { min-width: 0; max-width: 100%; overflow-x: auto; }
.table-search-toolbar { display: flex; margin: 0 0 8px; align-items: center; justify-content: space-between; gap: 12px; }
.table-search-control { display: flex; min-width: min(100%, 320px); align-items: center; gap: 8px; color: #355170; font-size: 10px; font-weight: 700; }
.table-search-input { width: min(320px, 100%); min-width: 180px; height: 34px; padding: 0 10px; border: 1px solid #cfd8e4; border-radius: 6px; background: #fff; color: var(--ink); font: inherit; font-weight: 400; }
.table-search-input:focus { outline: 2px solid #ff6b382e; border-color: var(--orange); }
.table-search-count { color: var(--muted); font-size: 10px; white-space: nowrap; }
.table-search-hidden { display: none !important; }
.table-search-no-results[hidden] { display: none !important; }
.table-search-no-results td { padding: 18px 10px; color: #8391a3; text-align: center; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 9px 10px; border-bottom: 1px solid var(--line); color: #677991; font-size: 9px; letter-spacing: .4px; text-transform: uppercase; }
td { padding: 14px 10px; border-bottom: 1px solid #edf0f4; color: #344d69; font-size: 11px; }
.empty-state { padding: 20px 10px; color: #8391a3; text-align: center; }
.placeholder-panel { display: flex; min-height: 150px; flex-direction: column; justify-content: center; }
.placeholder-panel p { margin-bottom: 0; }
/*
 * ADD MERCHANT PAGE STYLES
 * Used by wwwroot/portal-preview.html. Behavior lives in
 * wwwroot/js/portal-preview.js; these rules only style its buttons, fields,
 * one-time credential panel and list. The [hidden] rule above is important:
 * auth-gated buttons/panels must stay invisible until JavaScript enables them.
 */
.merchant-page-actions { display: flex; align-items: center; gap: 9px; }
.merchant-add-button { display: inline-flex; width: auto; margin-top: 0; align-items: center; gap: 8px; white-space: nowrap; }
.merchant-add-button span:first-child { font-size: 16px; line-height: 1; }
/* Keep each field's own rows at the top so helper text doesn't stretch the
   neighboring input and make Code/Business name controls different heights. */
.merchant-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 15px 18px; }
.merchant-field { display: grid; min-width: 0; align-content: start; gap: 6px; }
.merchant-field-full { grid-column: 1 / -1; }
.merchant-field label, .credential-row label { color: #28435f; font-size: 11px; font-weight: 700; }
.merchant-field input, .merchant-field select, .merchant-field textarea { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid #cfd8e4; border-radius: 6px; outline: none; background: white; color: var(--ink); }
.merchant-field input, .merchant-field select { height: 42px; }
.merchant-field textarea { min-height: 88px; padding: 10px 11px; resize: vertical; font: 11px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.merchant-field input:focus, .merchant-field select:focus, .merchant-field textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px #ff5a1f1a; }
.merchant-field small { color: var(--muted); font-size: 10px; line-height: 1.45; }
/* Explains the DB records and one-time credential result before form submit. */
.panel p.merchant-form-description { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.merchant-form-actions { display: flex; margin-top: 17px; justify-content: flex-end; gap: 9px; }
.merchant-form-actions .button-primary { width: auto; margin-top: 0; }
.button-secondary { border-color: var(--line); background: white; color: #355170; }
.button-secondary:hover { border-color: #b8c6d6; background: #f8fafc; }
.merchant-message { min-height: 17px; margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.merchant-message.error { color: #b42318; }
.merchant-message.success { color: #26785d; }
.merchant-credentials { border-color: #b9e8d7; background: #fbfffd; }
.merchant-secret-note { margin: 0 0 14px; color: #526b65; font-size: 12px; line-height: 1.55; }
.credential-row { display: flex; margin: 9px 0; padding: 11px; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid #e1ebe6; border-radius: 6px; background: white; }
.credential-row > div { display: grid; min-width: 0; gap: 6px; }
.credential-row code { overflow-wrap: anywhere; color: #14324e; font-size: 12px; }
.credential-row .button { flex: 0 0 auto; }
.merchant-credentials > .button { margin-top: 8px; }
.merchant-table-status { color: #26785d; font-weight: 700; }
/* Wallet rules apply only to the admin funding card in portal-preview.html;
   behavior and success text are owned by wwwroot/js/portal-preview.js. */
.wallet-credit-preview-label { color: #28435f; font-size: 11px; }
.panel p.wallet-credit-preview { margin: 0; padding: 11px 12px; border: 1px solid #ffdacb; border-radius: 6px; background: #fff8f4; color: #78513f; font-size: 12px; overflow-wrap: anywhere; }
.wallet-credit-panel { width: 100%; min-width: 0; padding: 14px; }
.wallet-credit-panel .panel-heading { margin-bottom: 10px; }
.wallet-credit-panel .panel-heading .eyebrow { margin-bottom: 4px; }
.wallet-credit-panel .merchant-form-description { margin: 4px 0 0; font-size: 11px; line-height: 1.4; }
.wallet-credit-toggle { min-height: 38px; padding: 0 13px; white-space: nowrap; }
.wallet-credit-form .merchant-form-grid { gap: 10px 14px; }
.wallet-credit-form .merchant-field { gap: 4px; }
.wallet-credit-form .merchant-field label { font-size: 10px; }
.wallet-credit-form .merchant-field input,
.wallet-credit-form .merchant-field select { width: 100%; min-width: 0; height: 36px; min-height: 36px; padding: 0 10px; font-size: 12px; }
.wallet-credit-form .merchant-field-full { grid-column: 1 / -1; }
.wallet-credit-form .wallet-credit-preview-label { margin-bottom: -2px; font-size: 10px; }
.wallet-credit-form .wallet-credit-preview { padding: 8px 10px; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.wallet-credit-form .merchant-form-actions { margin-top: 10px; }
.wallet-credit-form .merchant-form-actions .button-primary,
.wallet-credit-form .merchant-form-actions .button-secondary { width: auto; min-height: 36px; margin-top: 0; padding: 0 13px; }
.wallet-credit-form .merchant-message { min-height: 0; margin-top: 6px; }
.wallet-credit-form .merchant-message.success,
.wallet-credit-form .merchant-message.error { display: block; width: 100%; min-height: 0; margin-top: 10px; padding: 10px 12px; border-radius: 6px; font-size: 11px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }
.wallet-credit-form .merchant-message.success { border: 1px solid #b9e8d7; background: #f1fbf6; color: #176b4b; }
.wallet-credit-form .merchant-message.error { border: 1px solid #f4c7c3; background: #fff6f5; color: #a3261d; }
.wallet-confirmation-dialog { width: min(calc(100vw - 32px), 520px); max-width: none; max-height: calc(100vh - 32px); margin: auto; padding: 0; overflow: auto; border: 1px solid #dce3ec; border-radius: 14px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 80px #061a2b40; }
.wallet-confirmation-dialog::backdrop { background: #071526a6; backdrop-filter: blur(3px); }
.wallet-confirmation-card { padding: 22px; }
.wallet-confirmation-header { display: flex; align-items: center; gap: 12px; }
.wallet-confirmation-icon { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: #fff1eb; color: var(--orange); font-size: 18px; font-weight: 800; }
.wallet-confirmation-heading { min-width: 0; }
.wallet-confirmation-heading .eyebrow { margin-bottom: 4px; }
.wallet-confirmation-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.4px; }
.wallet-confirmation-close-form { margin-left: auto; }
.wallet-confirmation-close { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: white; color: #52677e; cursor: pointer; font-size: 21px; line-height: 1; }
.wallet-confirmation-close:hover { background: #f6f8fa; }
.wallet-confirmation-description { margin: 13px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.wallet-confirmation-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 0; }
.wallet-confirmation-details > div { min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; }
.wallet-confirmation-details dt { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .6px; text-transform: uppercase; }
.wallet-confirmation-details dd { margin: 5px 0 0; color: #19334e; font-size: 12px; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.wallet-confirmation-details .wallet-confirmation-amount-row { grid-column: 1 / -1; border-color: #ffdacb; background: #fff8f4; }
.wallet-confirmation-details .wallet-confirmation-amount { color: #d84b16; font-size: 24px; letter-spacing: -.5px; }
.wallet-confirmation-warning { display: flex; margin-top: 12px; padding: 10px 12px; align-items: flex-start; gap: 9px; border: 1px solid #f0dfb2; border-radius: 8px; background: #fffbef; }
.wallet-confirmation-warning-icon { display: grid; width: 18px; height: 18px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #f7e7b6; color: #795400; font-size: 11px; font-weight: 800; }
.wallet-confirmation-warning p { margin: 0; color: #6b5831; font-size: 10px; line-height: 1.5; }
.wallet-confirmation-actions { display: flex; margin-top: 16px; justify-content: flex-end; gap: 9px; }
.wallet-confirmation-actions .button { width: auto; min-height: 40px; margin: 0; padding: 0 15px; }
.wallet-confirmation-actions .button-primary { box-shadow: 0 4px 11px #ff5a1f25; }
.wallet-row-action { min-height: 34px; padding: 0 10px; font-size: 10px; white-space: nowrap; }
#merchant-table { min-width: 990px; }
.merchant-content { width: min(100% - 36px, 1120px); margin: 0 auto; padding: 18px 0 32px; }
.merchant-footer { display: flex; margin-top: 22px; padding-top: 12px; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.merchant-footer-actions { display: flex; align-items: center; gap: 10px; }
.merchant-footer-actions .preview-status { max-width: 260px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.merchant-footer-actions .button { width: auto; min-height: 34px; margin: 0; padding: 0 12px; }
.merchant-footer-brand { font-size: 17px; }
.merchant-footer-brand .brand-mark { transform: scale(.75); transform-origin: left center; margin-right: -5px; }
.merchant-wallet-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wallet-credit-amount { color: #26785d; font-weight: 700; white-space: nowrap; }
.merchant-portal-page table { min-width: 900px; }
.field-help { color: var(--muted); font-size: 10px; line-height: 1.45; }
.provider-test-warning { margin: 10px 0 15px; padding: 11px 13px; border: 1px solid #f0dfb2; border-radius: 7px; background: #fffbef; color: #6b5831; font-size: 11px; line-height: 1.55; }
.provider-test-warning strong { color: #795400; }
.provider-test-confirm { display: flex; align-items: flex-start; gap: 8px; color: #6b5831; font-size: 11px; line-height: 1.5; }
.provider-test-confirm input { width: 15px; height: 15px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--orange); }
.provider-test-panel .catalog-form-grid .button { min-height: 40px; }
.merchant-route-test-panel { border-color: #f0c4a7; }
.merchant-route-test-result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.merchant-route-test-result-actions .button { width: auto; min-height: 36px; margin: 0; }
.merchant-route-test-response { max-height: 420px; margin: 0; overflow: auto; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #f7f9fb; color: #173451; font: 10px/1.55 "Cascadia Code", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.provider-test-result { min-width: 0; overflow: hidden; }
.provider-test-log-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.provider-test-log-grid section, .provider-test-provider-log { min-width: 0; }
.provider-test-log-grid h3, .provider-test-provider-log h3 { margin: 0 0 8px; color: #28435f; font-size: 12px; }
.provider-test-log-grid pre, .provider-call-entry pre { max-width: 100%; max-height: 380px; margin: 0; overflow: auto; padding: 11px; border: 1px solid var(--line); border-radius: 6px; background: #f7f9fb; color: #173451; font: 10px/1.55 "Cascadia Code", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.provider-test-provider-log { margin-top: 17px; }
.provider-call-entry { min-width: 0; padding: 12px 0; border-top: 1px solid var(--line); }
.provider-call-entry h4 { margin: 0 0 5px; color: #19334e; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.provider-call-entry > p { margin: 0 0 8px; color: var(--muted); font-size: 10px; }
.provider-call-payload-label { margin: 8px 0 5px !important; color: #355170 !important; font-size: 10px !important; font-weight: 700; }
.provider-call-transport { color: #a3261d !important; }
.provider-test-reference summary { color: #355170; cursor: pointer; font-size: 11px; font-weight: 700; }
.provider-test-reference p { margin-bottom: 0; }
.catalog-description { max-width: 760px; margin: 5px 0 0; color: var(--muted); font-size: 11px !important; line-height: 1.5 !important; }
.catalog-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 13px 18px; }
.catalog-form-grid .merchant-form-actions { grid-column: 1 / -1; }
.catalog-form-grid .button { width: auto; margin-top: 0; }
.provider-credentials-update { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); }
.provider-credentials-update summary { color: #355170; cursor: pointer; font-size: 11px; font-weight: 700; }
.provider-credentials-update form { margin-top: 14px; }
.route-list { display: grid; gap: 10px; }
.route-card { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) minmax(220px, 1.15fr) auto; align-items: center; gap: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.route-card h3 { margin: 0; color: var(--ink); font-size: 13px; }
.route-card p { margin: 4px 0 0; color: var(--muted); font-size: 10px !important; line-height: 1.4 !important; }
.route-card select { width: 100%; min-width: 0; height: 39px; padding: 0 10px; border: 1px solid #cfd8e4; border-radius: 6px; background: #fff; color: var(--ink); }
.route-card .button-primary { width: auto; min-width: 132px; margin: 0; }
.route-card .button-primary:disabled { background: #d7dde5; box-shadow: none; color: #617084; }
.merchant-route-card { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.merchant-route-card > :first-child, .merchant-route-card .route-weight-editor { grid-column: 1 / -1; }
.merchant-route-card .route-default-field { gap: 6px; }
.merchant-route-card .route-default-field select { margin-top: 2px; }
.route-weight-editor { display: grid; gap: 8px; padding-top: 11px; border-top: 1px solid var(--line); }
.route-weight-editor h4 { margin: 0; color: var(--ink); font-size: 11px; }
.route-even-split-button { justify-self: start; min-height: 34px; padding: 0 11px; }
.route-even-split-message { color: var(--muted); font-size: 10px; line-height: 1.4; }
.route-even-split-message.error { color: #b42318; }
.route-weight-row { display: grid; grid-template-columns: minmax(0, 1fr) 110px; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfe; }
.route-weight-choice { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink); font-size: 11px; font-weight: 600; }
.route-weight-choice input, .route-active-toggle input { accent-color: var(--orange); }
.route-weight-percent-label { display: grid; gap: 3px; color: var(--muted); font-size: 9px; }
.route-weight-percent-label input { width: 100%; height: 34px; padding: 0 8px; border: 1px solid #cfd8e4; border-radius: 5px; background: #fff; color: var(--ink); }
.route-weight-percent-label input:disabled { background: #edf0f4; color: #8793a2; }
.route-provider-health { grid-column: 1 / -1; color: #a14a00; font-size: 10px; line-height: 1.4; }
.route-active-toggle { display: flex; align-items: center; gap: 7px; color: #355170; font-size: 10px; font-weight: 700; }
.catalog-subsection { margin: 16px 0; padding: 16px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; }
.vtpass-plan-catalog-results { display: grid; gap: 8px; margin-top: 10px; }
.vtpass-plan-catalog-scroll { max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 7px; }
.vtpass-plan-catalog-scroll table { min-width: 650px; }
.vtpass-use-plan { min-height: 32px; padding: 0 10px; font-size: 10px; }
.catalog-subsection > h3, #airtime-route-panel > h3 { margin: 0 0 6px; color: var(--ink); font-size: 14px; }
.catalog-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 9px; margin-top: 14px; }
.airtime-service-card { display: block; padding: 11px 13px; }
.airtime-service-card h4 { margin: 0; color: var(--ink); font-size: 12px; }
.catalog-subsection .merchant-field-full { grid-column: 1 / -1; }
.route-state { color: #26785d !important; font-weight: 700; }
.provider-table-status { color: #26785d; font-weight: 700; }
#data-plan-table { min-width: 1050px; }
.route-overview-summary { margin: 0 0 13px; padding: 10px 12px; border: 1px solid #dce8f2; border-radius: 7px; background: #f7fafc; color: #355170; font-size: 11px; font-weight: 700; }
.route-overview-filters { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(220px, 1.3fr) repeat(2, minmax(135px, .7fr)); align-items: end; gap: 10px 14px; margin-bottom: 15px; }
.route-overview-filters .merchant-field { gap: 5px; }
.route-overview-filters .merchant-field input, .route-overview-filters .merchant-field select { height: 38px; min-height: 38px; font-size: 11px; }
.route-overview-table-scroll { border: 1px solid var(--line); border-radius: 7px; }
#route-overview-table { min-width: 1120px; }
#route-overview-table th { white-space: nowrap; }
#route-overview-table td { vertical-align: top; }
.route-overview-cell-main { display: block; color: #19334e; font-size: 11px; font-weight: 700; line-height: 1.4; }
.route-overview-cell-detail { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
.route-overview-primary-list { display: grid; gap: 8px; min-width: 190px; }
.route-overview-primary-line { display: grid; gap: 2px; }
.route-overview-primary-line strong { color: #19334e; font-size: 10px; line-height: 1.4; }
.route-overview-primary-line small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.route-overview-allocation-total { display: block; margin-top: 7px; color: #355170; font-size: 9px; font-weight: 750; }
.route-overview-default-only { color: #355170; font-size: 10px; font-weight: 650; }
.route-overview-status { display: inline-flex; max-width: 145px; padding: 5px 8px; align-items: center; border: 1px solid transparent; border-radius: 999px; font-size: 9px; font-weight: 750; line-height: 1.3; }
.route-overview-status-active { border-color: #b9e8d7; background: #effaf5; color: #176b4b; }
.route-overview-status-inactive { border-color: #f0dfb2; background: #fffbef; color: #795400; }
.route-overview-status-unconfigured { border-color: #dce3ec; background: #f4f6f8; color: #61738d; }
.route-overview-note { margin: 10px 0 0; color: var(--muted); font-size: 10px !important; line-height: 1.5 !important; }
.transaction-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 11px 13px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.transaction-filters .merchant-field { gap: 5px; }
.transaction-filters .merchant-field input, .transaction-filters .merchant-field select { height: 37px; min-height: 37px; font-size: 11px; }
.transaction-search-field { grid-column: span 2; }
.transaction-filter-actions { display: flex; min-height: 37px; align-items: end; gap: 8px; }
.transaction-filter-actions .button { width: auto; min-height: 37px; margin: 0; padding: 0 12px; white-space: nowrap; }
.transaction-pagination { display: flex; margin: 10px 0; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; }
.transaction-pagination > div { display: flex; gap: 7px; }
.transaction-pagination .button { min-height: 33px; padding: 0 11px; font-size: 10px; }
.transaction-table-scroll { border: 1px solid var(--line); border-radius: 7px; }
#admin-transaction-table { min-width: 1420px; }
#dashboard-transaction-table { min-width: 1120px; }
#admin-transaction-table td, #dashboard-transaction-table td { vertical-align: top; }
.transaction-id-code { display: block; max-width: 190px; color: #19334e; font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
.transaction-cell-main { display: block; color: #19334e; font-size: 10px; line-height: 1.45; }
.transaction-cell-detail { display: block; max-width: 260px; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
.transaction-status-badge { display: inline-flex; padding: 4px 7px; border: 1px solid transparent; border-radius: 999px; font-size: 9px; font-weight: 750; line-height: 1.2; white-space: nowrap; }
.transaction-status-succeeded { border-color: #b9e8d7; background: #effaf5; color: #176b4b; }
.transaction-status-processing, .transaction-status-pending, .transaction-status-unknown { border-color: #f0dfb2; background: #fffbef; color: #795400; }
.transaction-status-failed { border-color: #f4c7c3; background: #fff6f5; color: #a3261d; }
.transaction-status-permanentlyfailed { border-color: #e7b7b3; background: #fae9e8; color: #861b15; }
.transaction-status-other { border-color: var(--line); background: #f4f6f8; color: #61738d; }
.dashboard-transactions-panel .panel-heading { margin-bottom: 8px; }
.dashboard-transactions-panel .merchant-message { margin: 4px 0 8px; }
.dashboard-metrics-grid, .report-metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.report-metrics-grid { margin: 15px 0; }
.report-table-scroll { border: 1px solid var(--line); border-radius: 7px; }
#report-table { min-width: 960px; }
#report-table th { white-space: nowrap; }
.report-group-label { color: #19334e; font-weight: 700; }
.audit-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 10px 13px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.audit-filters .merchant-field { gap: 5px; }
.audit-filters .merchant-field input, .audit-filters .merchant-field select { height: 37px; min-height: 37px; font-size: 11px; }
.audit-search-field { grid-column: span 2; }
.audit-filter-actions { display: flex; min-height: 37px; align-items: end; gap: 8px; }
.audit-filter-actions .button { width: auto; min-height: 37px; margin: 0; padding: 0 12px; white-space: nowrap; }
.audit-table-summary { display: flex; margin: 8px 0 3px; align-items: center; justify-content: space-between; gap: 10px; }
.audit-table-summary .merchant-message { margin: 0; }
.audit-table-summary .transaction-pagination { margin: 0; }
.audit-table-scroll { border: 1px solid var(--line); border-radius: 7px; }
#admin-audit-table { min-width: 1180px; }
#admin-audit-table th { white-space: nowrap; }
#admin-audit-table td { vertical-align: top; }
.audit-action-label { color: #19334e; font-weight: 700; white-space: nowrap; }
.audit-entity-type { display: block; color: #19334e; font-size: 10px; }
.audit-entity-id, .audit-correlation-id { display: block; max-width: 190px; margin-top: 3px; color: #61738d; font-size: 9px; line-height: 1.4; overflow-wrap: anywhere; }
.audit-reason-cell { min-width: 190px; max-width: 330px; line-height: 1.45; overflow-wrap: anywhere; }
.audit-details-button { min-height: 30px; padding: 0 9px; font-size: 10px; white-space: nowrap; }
.audit-footnote { margin: 10px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.audit-details-dialog { width: min(920px, calc(100vw - 28px)); max-width: 920px; max-height: min(86vh, 820px); padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 24px 80px #061b2c40; }
.audit-details-dialog::backdrop { background: #061b2c80; backdrop-filter: blur(2px); }
.audit-details-heading { display: flex; margin-bottom: 13px; align-items: flex-start; justify-content: space-between; gap: 12px; }
.audit-details-heading h2 { margin: 2px 0 0; font-size: 19px; }
.audit-details-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 16px; margin: 0 0 16px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.audit-details-meta > div { min-width: 0; }
.audit-details-meta dt { margin-bottom: 3px; color: var(--muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.audit-details-meta dd { margin: 0; color: #19334e; font-size: 11px; overflow-wrap: anywhere; }
.audit-json-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.audit-json-grid section { min-width: 0; }
.audit-json-grid h3 { margin: 0 0 6px; font-size: 12px; }
.audit-json-grid pre { max-height: 310px; margin: 0; padding: 12px; overflow: auto; border: 1px solid var(--line); border-radius: 7px; background: #f7f9fc; color: #19334e; font-size: 10px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.airtime-reconciliation-guidance { display: block; max-width: 920px; margin: -3px 0 13px; line-height: 1.55; }
.airtime-reconciliation-filters { grid-template-columns: minmax(260px, 1fr) auto; align-items: end; gap: 10px; margin-bottom: 6px; }
#airtime-reconciliation-table { min-width: 1120px; }
#data-reconciliation-table { min-width: 1320px; }
#airtime-reconciliation-table td { vertical-align: top; }
#data-reconciliation-table td { vertical-align: top; }
.airtime-reconciliation-response { max-width: 310px; }
.airtime-reconciliation-actions { min-width: 130px; }
.airtime-reconciliation-action { width: auto; min-height: 29px; margin: 0 4px 4px 0; padding: 0 8px; font-size: 9px; white-space: nowrap; }
.airtime-reconciliation-dialog { width: min(980px, calc(100vw - 28px)); max-width: 980px; max-height: min(86vh, 820px); padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 24px 80px #061b2c40; }
.airtime-reconciliation-dialog::backdrop { background: #061b2c80; backdrop-filter: blur(2px); }
.airtime-reconciliation-dialog h2 { margin: 2px 0 0; font-size: 19px; }
.airtime-retry-confirmation-form { display: block; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; }
.dialog-actions .button { width: auto; min-height: 38px; margin: 0; padding: 0 14px; }
@media (max-width: 900px) {
  .portal-layout { grid-template-columns: 190px minmax(0, 1fr); }
  .portal-content { padding: 16px 20px 36px; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-metrics-grid, .report-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-overview-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .transaction-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .transaction-search-field { grid-column: 1 / -1; }
  .audit-search-field { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .table-search-toolbar { align-items: stretch; flex-direction: column; gap: 5px; }
  .table-search-control { min-width: 0; justify-content: space-between; }
  .table-search-input { min-width: 0; flex: 1; }
  .table-search-count { align-self: flex-end; }
}
@media (max-width: 620px) {
  .login-card { padding: 27px 23px; }
  .portal-layout { display: block; }
  .sidebar { min-height: auto; padding: 12px 12px 10px; }
  .sidebar-brand { margin: 0 8px 9px; font-size: 20px; }
  .sidebar-caption { display: none; }
  .sidebar-nav { display: flex; overflow-x: auto; gap: 5px; padding-bottom: 2px; }
  .sidebar-link { width: auto; min-width: max-content; min-height: 37px; padding: 0 10px; font-size: 11px; }
  .sidebar-link span { display: none; }
  .sidebar-user { margin-top: 9px; padding: 8px 2px 0; }
  .sidebar-account-actions { display: flex; margin: 5px 0 0 45px; gap: 14px; }
  .portal-content { padding: 13px 14px 30px; }
  .preview-banner { align-items: flex-start; flex-direction: column; gap: 4px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .metrics-grid { gap: 9px; }
  .metric-card { min-height: 100px; padding: 12px; }
  .metric-card strong { font-size: 22px; }
  .sandbox-panel, .panel { padding: 15px; }
  .merchant-form-grid { grid-template-columns: minmax(0, 1fr); }
  .catalog-form-grid { grid-template-columns: minmax(0, 1fr); }
  .catalog-form-grid .merchant-field-full { grid-column: auto; }
  .route-overview-filters { grid-template-columns: minmax(0, 1fr); }
  .transaction-filters { grid-template-columns: minmax(0, 1fr); }
  .audit-filters { grid-template-columns: minmax(0, 1fr); }
  .transaction-search-field { grid-column: auto; }
  .audit-search-field { grid-column: auto; }
  .audit-filter-actions { flex-wrap: wrap; }
  .audit-table-summary { align-items: flex-start; flex-direction: column; }
  .audit-details-meta, .audit-json-grid { grid-template-columns: minmax(0, 1fr); }
  .audit-details-dialog { padding: 15px; }
  .airtime-reconciliation-filters { grid-template-columns: minmax(0, 1fr); }
  .airtime-reconciliation-dialog { padding: 15px; }
  .dialog-actions { flex-wrap: wrap; }
  .transaction-filter-actions { flex-wrap: wrap; }
  .transaction-pagination { align-items: flex-start; flex-direction: column; }
  .route-card { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .route-card .button-primary { width: 100%; }
  .merchant-field-full { grid-column: auto; }
  .merchant-form-actions { flex-wrap: wrap; }
  .merchant-page-actions { flex-wrap: wrap; justify-content: flex-end; }
  .wallet-credit-form .merchant-form-grid { gap: 9px; }
  .wallet-credit-form .merchant-field-full { grid-column: auto; }
  .wallet-confirmation-card { padding: 16px; }
  .wallet-confirmation-details { grid-template-columns: minmax(0, 1fr); }
  .wallet-confirmation-details .wallet-confirmation-amount-row { grid-column: auto; }
  .wallet-confirmation-actions { flex-direction: column-reverse; }
  .wallet-confirmation-actions .button { width: 100%; }
  .credential-row { align-items: flex-start; }
  .merchant-content { width: min(100% - 28px, 1120px); padding-top: 13px; }
  .provider-test-log-grid { grid-template-columns: minmax(0, 1fr); }
  .merchant-footer { align-items: flex-start; flex-direction: column; }
  .merchant-footer-actions { flex-wrap: wrap; }
  .merchant-footer-actions .preview-status { max-width: 100%; }
}
