/* CheckPoynt Agents portal. CRM colors: navy #1e293b chrome, #007BFF primary. Phone first; >=768px widens. */
:root {
  --navy: #1e293b; --blue: #007BFF; --blue-d: #0062cc;
  --ink: #0f172a; --ink2: #334155; --mute: #64748b; --line: #e2e8f0; --line2: #f1f5f9; --bg: #f8fafc; --card: #ffffff;
  --ok-bg: #dcfce7; --ok: #166534; --warn-bg: #fee2e2; --warn: #991b1b; --off-bg: #e2e8f0; --off: #475569;
  --info-bg: #dbeafe; --info: #1e40af; --amber-bg: #fef3c7; --amber: #92400e;
  --r: 8px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
a { color: var(--blue); }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* Top bar + nav */
.ap-top { background: var(--navy); color: #fff; display: flex; align-items: center; gap: 12px; padding: 0 clamp(16px, 2.5vw, 40px); height: 52px; position: sticky; top: 0; z-index: 20; }
.ap-brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 16px; white-space: nowrap; }
.ap-user { margin-left: auto; position: relative; min-width: 0; }
.ap-user-btn { background: transparent; border: 0; color: #fff; opacity: .9; cursor: pointer; padding: 8px 4px; display: flex; gap: 4px; align-items: center; max-width: 60vw; }
.ap-user-btn:hover, .ap-user-btn:focus-visible { opacity: 1; }
.ap-user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-user-menu { position: absolute; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 8px 24px rgba(15,23,42,.15); min-width: 160px; padding: 4px; }
.ap-user-menu button { width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 6px; cursor: pointer; color: var(--ink); }
.ap-user-menu button:hover { background: var(--line2); }
.ap-nav { display: flex; gap: 22px; padding: 0 clamp(16px, 2.5vw, 40px); background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ap-nav::-webkit-scrollbar { display: none; }
.ap-nav a { color: #475569; text-decoration: none; padding: 12px 0 10px; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 14px; }
.ap-nav a.on { color: var(--blue); font-weight: 600; border-bottom-color: var(--blue); }
.ap-main { max-width: none; margin: 0; padding: 16px clamp(16px, 2.5vw, 40px); }
.ap-h1 { font-size: 20px; margin: 4px 0 14px; }
.ap-loading, .ap-empty { color: var(--mute); padding: 28px 12px; text-align: center; background: #fff; border: 1px dashed var(--line); border-radius: var(--r); }
.ap-error { color: var(--warn); background: var(--warn-bg); padding: 14px; border-radius: var(--r); }

/* Buttons, chips, pills */
.ap-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--blue); color: #fff; border: 1px solid var(--blue); border-radius: 6px; padding: 9px 14px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.ap-btn:hover { background: var(--blue-d); border-color: var(--blue-d); }
.ap-btn:disabled { opacity: .6; cursor: default; }
.ap-btn-light { background: #fff; color: var(--ink2); border-color: #cbd5e1; }
.ap-btn-light:hover { background: var(--line2); border-color: #cbd5e1; }
.ap-btn-block { width: 100%; margin-top: 14px; }
.ap-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.ap-chip { padding: 5px 12px; border-radius: 999px; border: 1px solid #cbd5e1; font-size: 13px; background: #fff; cursor: pointer; color: var(--ink2); }
.ap-chip:hover { border-color: #94a3b8; }
.ap-chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.ap-chip .n { opacity: .75; margin-left: 2px; }
.pill { display: inline-block; font-size: 11px; line-height: 16px; padding: 1px 8px; border-radius: 999px; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.off { background: var(--off-bg); color: var(--off); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill.amber { background: var(--amber-bg); color: var(--amber); }

/* Merchants list */
.ap-toolbar { margin-bottom: 10px; }
.ap-search { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; font-size: 15px; }
.ap-search:focus, textarea:focus, .ap-form input:focus { outline: 2px solid rgba(0,123,255,.25); border-color: var(--blue); }
.ap-row { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 8px; display: grid;
  grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n v" "a a" "s m"; gap: 2px 12px; align-items: baseline; color: inherit; text-decoration: none; }
.ap-row:hover { border-color: #94a3b8; }
.ap-row .n { grid-area: n; font-weight: 600; overflow-wrap: anywhere; }
.ap-row .v { grid-area: v; text-align: right; font-weight: 700; font-size: 16px; white-space: nowrap; }
.ap-row .v .vl { display: block; font-size: 11px; font-weight: 600; color: var(--mute); line-height: 1.2; }
.ap-row .v .vn { font-size: 13px; font-weight: 600; color: var(--mute); }
.ap-row .s { grid-area: s; font-size: 13px; color: var(--mute); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
/* Status stripe, same colors as the CRM: green open, amber not batching (CRM 'Needs attention'), red closed */
.ap-row.st-ok { border-left: 4px solid #16a34a; }
.ap-row.st-warn { border-left: 4px solid #f59e0b; background: #fffdf5; }
.ap-row.st-off { border-left: 4px solid #dc2626; background: #fbfcfd; }
.ap-row.st-off .n, .ap-row.st-off .v { color: var(--mute); }
.ap-row.st-warn .m { color: #b45309; font-weight: 600; }
/* Merchant / MID status pills (CRM msp-pills.css .ml-status) */
.pill.st-open { background: #16a34a; color: #fff; }
.pill.st-closed { background: #dc2626; color: #fff; }
.pill.st-nb { background: #f59e0b; color: #fff; }
/* Processor tags + filter chips (CRM msp-pills.css .ml-msp colors) */
.ap-proc { display: inline-block; font-size: 11px; line-height: 16px; padding: 1px 8px; border-radius: 999px; font-weight: 700; white-space: nowrap; vertical-align: middle; }
.ap-proc-dine, .ap-chip-dine { background: #e0f2fe; color: #075985; }
.ap-proc-nrs, .ap-chip-nrs { background: #ede9fe; color: #5b21b6; }
.ap-proc-epi, .ap-chip-epi { background: #ccfbf1; color: #115e59; }
.ap-proc-luqra, .ap-chip-luqra { background: #fef3c7; color: #92400e; }
.ap-proc-suede, .ap-chip-suede { background: #fce7f3; color: #9d174d; }
.ap-proc-other { background: #f1f5f9; color: #334155; }
.ap-chip-nb { background: #fffbeb; color: #b45309; border-color: #fcd34d; }
.ap-chip[class*="ap-chip-"]:not(.on) { border-color: transparent; }
.ap-chip-nb:not(.on) { border-color: #fcd34d !important; }
.ap-chip-dine.on { background: #075985; border-color: #075985; color: #fff; }
.ap-chip-nrs.on { background: #5b21b6; border-color: #5b21b6; color: #fff; }
.ap-chip-epi.on { background: #115e59; border-color: #115e59; color: #fff; }
.ap-chip-luqra.on { background: #92400e; border-color: #92400e; color: #fff; }
.ap-chip-suede.on { background: #9d174d; border-color: #9d174d; color: #fff; }
.ap-chip-nb.on { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.ap-row .m { grid-area: m; text-align: right; font-size: 12px; color: var(--mute); }
.ap-more { display: block; margin: 12px auto 0; }

/* Merchant page */
.ap-back { display: inline-block; text-decoration: none; font-size: 14px; margin-bottom: 8px; }
.ap-mhead { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.ap-mhead h1 { margin: 0 0 2px; font-size: 21px; overflow-wrap: anywhere; }
.ap-mhead .s { font-size: 13px; color: var(--mute); }
.ap-mhead .ap-btn { margin-left: auto; flex: none; }
.ap-tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 2px; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.ap-tabs button { flex: none; font-size: 13px; padding: 7px 12px; border-radius: 6px; background: var(--line); border: 0; white-space: nowrap; cursor: pointer; color: var(--ink2); }
.ap-tabs button.on { background: var(--navy); color: #fff; }
.ap-sub-tabs { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 6px; overflow: hidden; margin-bottom: 12px; }
.ap-sub-tabs button { background: #fff; border: 0; padding: 6px 14px; font-size: 13px; cursor: pointer; color: var(--ink2); }
.ap-sub-tabs button.on { background: var(--navy); color: #fff; }
.ap-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.ap-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.ap-card .l { font-size: 12px; color: var(--mute); }
.ap-card .v { font-size: 18px; font-weight: 700; margin-top: 2px; overflow-wrap: anywhere; }
.ap-sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 12px; }
.ap-sec h3 { margin: 0 0 8px; font-size: 14px; color: var(--ink2); }
.ap-kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line2); font-size: 14px; }
.ap-kv > div:last-child { border-bottom: 0; }
.ap-kv > div > span:first-child { color: var(--mute); flex: none; }
.ap-kv > div > span:last-child { text-align: right; overflow-wrap: anywhere; min-width: 0; }
.ap-contact { padding: 8px 0; border-bottom: 1px solid var(--line2); font-size: 14px; }
.ap-contact:last-child { border-bottom: 0; }
.ap-contact .who { font-weight: 600; }
.ap-contact .meta { color: var(--mute); font-size: 13px; overflow-wrap: anywhere; }
.ap-contact a { text-decoration: none; }

/* Tables: cards on phones */
.ap-table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ap-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ap-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--mute); background: var(--bg); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ap-table td { padding: 9px 12px; border-bottom: 1px solid var(--line2); vertical-align: top; overflow-wrap: anywhere; }
.ap-table tr:last-child td { border-bottom: 0; }
.ap-table .num { text-align: right; white-space: nowrap; }
.ap-table a { text-decoration: none; }

/* Payouts */
.ap-period { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; }
.ap-period > button { width: 100%; background: none; border: 0; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 14px; text-align: left; }
.ap-period .m { font-weight: 600; }
.ap-period .t { text-align: right; font-weight: 700; font-size: 16px; }
.ap-period .d { font-size: 13px; color: var(--mute); }
.ap-period .ap-chev { display: inline-block; transition: transform .15s; color: var(--mute); margin-right: 4px; }
.ap-period.open .ap-chev { transform: rotate(90deg); }
.ap-period .ap-lines { border-top: 1px solid var(--line); }
.ap-period .ap-table-wrap { border: 0; border-radius: 0 0 var(--r) var(--r); }
.ap-h2 { font-size: 16px; margin: 22px 0 10px; }

/* Case window */
.ap-modal { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ap-modal-box { background: #fff; border-radius: 10px; width: 100%; max-width: 540px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(15,23,42,.3); }
.ap-modal-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ap-modal-head h2 { margin: 0; font-size: 17px; min-width: 0; overflow-wrap: anywhere; }
.ap-x { margin-left: auto; background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--mute); padding: 0 4px; }
.ap-modal-body { padding: 14px 16px; overflow-y: auto; }
.ap-modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.ap-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink2); margin: 0 0 6px; }
.ap-modal textarea { width: 100%; border: 1px solid #cbd5e1; border-radius: 6px; padding: 10px; resize: vertical; min-height: 110px; margin-bottom: 10px; }
.ap-file { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; cursor: pointer; }
.ap-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ap-file input:focus-visible + .ap-btn { outline: 2px solid var(--blue); }
.ap-file-hint { font-size: 12px; color: var(--mute); }
.ap-file-list { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13px; color: var(--ink2); }
.ap-file-list li { padding: 2px 0; overflow-wrap: anywhere; }
.ap-file-list li.bad { color: var(--warn); }
.ap-note { font-size: 13px; color: var(--mute); margin: 10px 0 0; }
.ap-msg { background: var(--warn-bg); color: var(--warn); border-radius: 6px; padding: 10px 12px; font-size: 14px; margin: 10px 0 0; }
.ap-msg-ok { background: var(--ok-bg); color: var(--ok); }
.ap-sent { text-align: center; padding: 10px 0; }
.ap-sent .big { font-size: 18px; font-weight: 700; color: var(--ok); margin-bottom: 6px; }

/* Signed-out pages */
.ap-auth-body { background: var(--navy); }
.ap-auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.ap-auth-brand { color: #fff; font-weight: 700; font-size: 20px; margin-bottom: 16px; }
.ap-auth-card { background: #fff; border-radius: 12px; padding: 24px; width: 100%; max-width: 400px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.ap-auth-card h1 { font-size: 20px; margin: 0 0 6px; }
.ap-sub { color: var(--mute); font-size: 14px; margin: 0 0 8px; }
.ap-form label { display: block; font-size: 13px; font-weight: 600; color: var(--ink2); margin: 12px 0 4px; }
.ap-form input[type=email], .ap-form input[type=password] { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 15px; }
.ap-form input[readonly] { background: var(--bg); color: var(--mute); }
.ap-auth-link { text-align: center; margin: 14px 0 0; font-size: 14px; }
.ap-auth-foot { color: #cbd5e1; font-size: 13px; margin-top: 16px; }

/* Phones (<768px): tables become cards, modal full screen */
@media (max-width: 767.98px) {
  .ap-main { padding: 12px 16px; }
  .ap-mhead { flex-wrap: wrap; }
  .ap-row { grid-template-areas: "n v" "a a" "s s" "m m"; }
  .ap-row .m { text-align: left; }
  .ap-mhead .ap-btn { margin-left: 0; width: 100%; }
  .ap-table-wrap { background: none; border: 0; overflow: visible; }
  .ap-table thead { display: none; }
  .ap-table, .ap-table tbody, .ap-table tr, .ap-table td { display: block; width: 100%; }
  .ap-table tr { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; margin-bottom: 8px; }
  .ap-table td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 0; text-align: right; }
  .ap-table td::before { content: attr(data-label); color: var(--mute); font-size: 12px; text-align: left; flex: none; }
  .ap-table td.num { text-align: right; }
  .ap-table td:empty { display: none; }
  .ap-period .ap-table-wrap { padding: 8px; }
  .ap-modal { padding: 0; align-items: stretch; }
  .ap-modal-box { max-width: none; max-height: none; height: 100%; border-radius: 0; }
  .ap-modal-foot { position: sticky; bottom: 0; background: #fff; padding-top: 10px; }
  .ap-modal-foot .ap-btn { flex: 1; }
}
@media (min-width: 768px) {
  .ap-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ap-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .ap-two > .ap-sec { margin-bottom: 0; }
  .ap-two + .ap-sec { margin-top: 12px; }
}

/* Merchant page look (O'dany 2026-10-26: 'looks boring'): navy hero, processor-colored avatar, colored KPI cards, icon section heads */
.ap-ico { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.ap-mhead { background: linear-gradient(135deg, #1e293b 0%, #273449 100%); color: #fff; border-radius: 12px; padding: 18px; align-items: center; gap: 14px;
  border-top: 4px solid #64748b; box-shadow: 0 6px 18px rgba(15,23,42,.12); }
.ap-mhead h1 { color: #fff; }
.ap-mhead .s { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; color: #cbd5e1; }
.ap-mhead-main { min-width: 0; flex: 1; }
.ap-addr { margin-top: 8px; font-size: 13px; color: #cbd5e1; display: flex; gap: 6px; align-items: flex-start; }
.ap-avatar { width: 54px; height: 54px; border-radius: 14px; flex: none; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 20px; letter-spacing: .5px; background: #475569; color: #fff; }
.ap-btn-hero { background: #fff; color: #1e293b; border-color: #fff; }
.ap-btn-hero:hover { background: #e2e8f0; border-color: #e2e8f0; color: #1e293b; }
.ap-hero-dine { border-top-color: #0ea5e9; } .ap-hero-dine .ap-avatar { background: #0284c7; }
.ap-hero-nrs { border-top-color: #8b5cf6; } .ap-hero-nrs .ap-avatar { background: #7c3aed; }
.ap-hero-epi { border-top-color: #14b8a6; } .ap-hero-epi .ap-avatar { background: #0d9488; }
.ap-hero-luqra { border-top-color: #f59e0b; } .ap-hero-luqra .ap-avatar { background: #d97706; }
.ap-hero-suede { border-top-color: #ec4899; } .ap-hero-suede .ap-avatar { background: #db2777; }
.ap-tabs { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.ap-tabs button { background: transparent; }
.ap-tabs button:hover { background: var(--line2); }
.ap-tabs button.on { background: var(--navy); color: #fff; }
.ap-kpi { display: flex; gap: 10px; align-items: center; border-left: 4px solid var(--k, #94a3b8); }
.ap-kpi-ico { width: 38px; height: 38px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--kb, #f1f5f9); color: var(--k, #64748b); }
.ap-kpi-ico .ap-ico { width: 20px; height: 20px; }
.ap-kpi-txt { min-width: 0; }
.ap-kpi .v { color: var(--kv, var(--ink)); }
.k-blue { --k: #2563eb; --kb: #dbeafe; }
.k-green { --k: #16a34a; --kb: #dcfce7; }
.k-amber { --k: #d97706; --kb: #fef3c7; --kv: #b45309; }
.k-red { --k: #dc2626; --kb: #fee2e2; --kv: #b91c1c; }
.k-violet { --k: #7c3aed; --kb: #ede9fe; }
.k-orange { --k: #ea580c; --kb: #ffedd5; --kv: #c2410c; }
.k-grey { --k: #94a3b8; --kb: #f1f5f9; }
.ap-sec h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink); }
.ap-sec h3 .ap-ico { width: 26px; height: 26px; padding: 5px; border-radius: 8px; }
.ap-sec-contacts h3 .ap-ico { background: #dbeafe; color: #2563eb; }
.ap-sec-biz h3 .ap-ico { background: #dcfce7; color: #16a34a; }
.ap-sec-mids h3 .ap-ico { background: #ede9fe; color: #7c3aed; }
.ap-contact { display: flex; gap: 10px; align-items: flex-start; }
.ap-cav { width: 34px; height: 34px; border-radius: 50%; flex: none; background: #e0e7ff; color: #3730a3; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.ap-cbody { min-width: 0; flex: 1; }
.ap-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ap-act { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--line2); color: var(--ink2); border: 1px solid var(--line); text-decoration: none; overflow-wrap: anywhere; }
.ap-act:hover { background: #e0f2fe; border-color: #bae6fd; color: #075985; }
.ap-act .ap-ico { width: 13px; height: 13px; }
.ap-mid { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; color: var(--ink); }
@media (max-width: 767.98px) {
  .ap-mhead { padding: 14px; }
  .ap-avatar { width: 44px; height: 44px; font-size: 17px; border-radius: 12px; }
  .ap-mhead-main { flex-basis: calc(100% - 60px); }
  .ap-kpi { padding: 10px; gap: 8px; }
  .ap-kpi-ico { width: 32px; height: 32px; }
  .ap-kpi .v { font-size: 16px; }
}

/* Merchants list as a table on computers (O'dany 2026-10-26: 'looks like a mobile version'). Same markup as the phone cards. */
.ap-thead { display: none; }
@media (min-width: 900px) {
  .ap-list { background: none; border: 0; }
  .ap-thead, .ap-row { display: grid; grid-template-columns: minmax(180px, 1.6fr) minmax(200px, 1.8fr) 96px minmax(160px, 1.3fr) 120px 150px 140px;
    grid-template-areas: none; column-gap: 16px; align-items: center; }
  .ap-thead { padding: 4px 16px 6px 20px; background: none;
    font-size: 12px; font-weight: 600; color: var(--mute); }
  .ap-thead .r { text-align: right; }
  .ap-row { margin: 0 0 8px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
  .ap-row:hover { background: #f8fbff; border-color: #94a3b8; }
  .ap-row.st-warn:hover { background: #fff8e6; }
  .ap-row .n, .ap-row .v, .ap-row .m { grid-area: auto; }
  .ap-row .s { display: contents; }
  .ap-row .n { order: 1; }
  .ap-list .ap-row .ad { order: 2; grid-area: auto; font-size: 13px; }
  .ap-list .ap-row .ad:empty { display: block; }
  .ap-row .c-proc { order: 2; }
  .ap-row .c-mid { order: 3; font-size: 13px; color: var(--ink2); overflow-wrap: anywhere; }
  .ap-row .c-st { order: 4; }
  .ap-row .v { order: 5; }
  .ap-row .m { order: 6; text-align: right; font-size: 13px; }
  .ap-more { margin: 12px auto; }
  .ap-row .pfx { display: none; }
  .ap-row .m::first-letter { text-transform: uppercase; }
}

/* Merchant address under the name (list) */
.ap-row .ad { grid-area: a; font-weight: 400; font-size: 12.5px; color: var(--mute); overflow-wrap: anywhere; }
.ap-row .ad:empty { display: none; }

.ap-kpi .sub { font-size: 12px; color: var(--mute); margin-top: 2px; }

/* Payouts = agent version of the statement PDF (navy head, processor groups + subtotals, % pills, TOTALS bar) */
.ap-stmt-top { padding: 14px; display: grid; gap: 12px; }
.ap-rates { font-size: 13px; color: var(--mute); }
.ap-sumcard { border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: 10px; padding: 14px 16px; max-width: 420px; }
.ap-sumcard .k { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--mute); text-transform: uppercase; }
.ap-sumcard .v { font-size: 28px; font-weight: 800; color: var(--blue); margin: 2px 0; font-variant-numeric: tabular-nums; }
.ap-sumcard .s { font-size: 13px; color: var(--mute); }
.ap-sec-title { padding: 4px 14px 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--blue); text-transform: uppercase; }
.ap-stmt { font-variant-numeric: tabular-nums; }
.ap-stmt thead th { background: var(--navy); color: #cbd5e1; border-bottom: 0; }
.ap-stmt .ap-grow td { background: var(--line2); color: var(--mute); font-size: 12px; font-weight: 600; padding-top: 7px; padding-bottom: 7px; }
.ap-stmt .ap-mrow.multi { cursor: pointer; }
.ap-stmt .ap-mrow.multi:hover td { background: #f8fbff; }
.ap-stmt .ap-chev { display: inline-block; transition: transform .15s; color: var(--mute); margin-right: 6px; }
.ap-stmt .ap-mrow[aria-expanded="true"] .ap-chev { transform: rotate(90deg); }
.ap-stmt .ap-smid { display: block; font-size: 12px; color: var(--mute); font-weight: 400; margin-top: 1px; }
.ap-stmt .ap-tt { font-size: 12px; color: var(--mute); font-weight: 400; }
.ap-stmt th.ap-pctc, .ap-stmt td.ap-pctc { text-align: center; }   /* header and pill share the center */
.ap-stmt th.num, .ap-stmt td.num { padding-left: 14px; padding-right: 14px; }
.ap-pct { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #dbeafe; color: #1d4ed8; }
.ap-pct.tt { background: #dcfce7; color: #15803d; }
.ap-stmt .ap-lrow td { background: var(--line2); font-size: 13px; color: var(--ink2); }
.ap-stmt .ap-lrow td:first-child { padding-left: 34px; }
.ap-stmt .ap-subrow td { background: #f4f8fd; font-weight: 700; }
.ap-stmt .ap-subrow td:first-child { color: var(--mute); }
.ap-stmt .ap-net { font-weight: 700; }
.ap-stmt tfoot td { background: var(--navy); color: #fff; font-weight: 700; border: 0; }
.ap-stmt tfoot .ap-net { color: #60a5fa; }
.ap-stmt tr[hidden] { display: none !important; }
.ap-stmt-note { font-size: 13px; color: var(--mute); padding: 10px 14px; border-top: 1px solid var(--line2); }
@media (max-width: 767.98px) {
  .ap-stmt td:first-child { display: block; text-align: left; padding-bottom: 6px; }
  .ap-stmt td:first-child::before { content: none; }
  .ap-stmt .ap-grow, .ap-stmt .ap-grow td { display: block; background: none; border: 0; padding: 10px 2px 2px; }
  .ap-stmt .ap-lrow { border-left: 4px solid #cbd5e1; background: var(--line2); }
  .ap-stmt .ap-lrow td { background: transparent; }
  .ap-stmt .ap-lrow td:first-child { padding-left: 0; font-weight: 600; }
  .ap-stmt .ap-subrow { background: #f4f8fd; }
  .ap-stmt .ap-subrow td { background: transparent; }
  .ap-stmt tfoot, .ap-stmt tfoot tr, .ap-stmt tfoot td { display: block; width: 100%; }
  .ap-stmt tfoot tr { background: var(--navy); border-radius: var(--r); padding: 8px 12px; }
  .ap-stmt tfoot td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; text-align: right; background: transparent; }
  .ap-stmt tfoot td::before { content: attr(data-label); color: #cbd5e1; font-size: 12px; text-align: left; flex: none; }
  .ap-stmt tfoot td:first-child::before { content: none; }
}
.ap-stmt-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
@media (max-width: 767.98px) { .ap-stmt-actions .ap-btn { flex: 1 1 140px; } }

/* CheckPoynt logo (O'dany 2026-10-26): white wordmark on the navy bar and the sign-in page */
.ap-brand { display: inline-flex; align-items: center; gap: 10px; }
.ap-logo { height: 32px; width: auto; display: block; }
.ap-brand-sub { font-size: 13px; font-weight: 600; color: #cbd5e1; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.25); line-height: 20px; }
.ap-auth-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ap-auth-logo { height: 52px; width: auto; max-width: 80vw; display: block; }
.ap-auth-brand span { font-size: 14px; font-weight: 600; color: #cbd5e1; letter-spacing: .02em; }
@media (max-width: 767.98px) { .ap-logo { height: 26px; } .ap-brand-sub { font-size: 12px; } .ap-auth-logo { height: 42px; } }
/* Bigger header (O'dany 2026-10-26: 'make header bigger') */
.ap-top { height: 72px; }
.ap-logo { height: 44px; }
.ap-brand { gap: 14px; }
.ap-brand-sub { font-size: 16px; padding-left: 14px; line-height: 26px; }
.ap-user-btn { font-size: 16px; }
.ap-nav { gap: 28px; }
.ap-nav a { font-size: 16px; padding: 15px 0 13px; }
@media (max-width: 767.98px) {
  .ap-top { height: 60px; }
  .ap-logo { height: 32px; }
  .ap-brand-sub { font-size: 14px; }
  .ap-user-btn { font-size: 14px; }
  .ap-nav { gap: 22px; }
  .ap-nav a { font-size: 15px; }
}

/* Sign-in: tagline logo at the top of the card, everything centered (O'dany 2026-10-26) */
.ap-auth-card { max-width: 420px; padding: 28px 28px 24px; text-align: center; }
.ap-auth-head { margin: 0 0 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.ap-auth-card .ap-auth-logo { height: auto; width: 100%; max-width: 300px; margin: 0 auto; }
.ap-auth-tag { margin-top: 10px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.ap-auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.ap-auth-card .ap-form { text-align: left; }
.ap-auth-card .ap-btn-block { width: 100%; margin-top: 16px; padding: 11px 14px; font-size: 15px; }
.ap-auth-card .ap-msg { text-align: left; }
.ap-auth-foot a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ap-auth-foot a:hover { color: #93c5fd; }
.ap-auth-foot { text-align: center; line-height: 1.6; }
/* Header bigger again (O'dany 2026-10-26, second ask) */
.ap-top { height: 88px; }
.ap-logo { height: 56px; }
.ap-brand-sub { font-size: 18px; line-height: 30px; }
.ap-user-btn { font-size: 17px; }
.ap-nav a { font-size: 17px; padding: 17px 0 15px; }
.ap-auth-card { max-width: 460px; }
.ap-auth-card .ap-auth-logo { max-width: 360px; }
.ap-auth-tag { font-size: 14px; }
@media (max-width: 767.98px) {
  .ap-top { height: 68px; }
  .ap-logo { height: 38px; }
  .ap-brand-sub { font-size: 15px; }
  .ap-nav a { font-size: 15px; }
}
/* Tabs bar stays under the header while scrolling (O'dany 2026-10-26: 'lock bar where merchants cases and payouts live') */
.ap-nav { position: sticky; top: 88px; z-index: 19; box-shadow: 0 1px 0 var(--line), 0 4px 10px rgba(15,23,42,.05); }
@media (max-width: 767.98px) { .ap-nav { top: 68px; } }

/* Merchants: search + chips + column headers pinned under the tabs bar (O'dany 2026-10-26: 'this whole section should be pinned') */
.ap-mtop { position: sticky; top: var(--ap-stick, 148px); z-index: 18; background: var(--bg);
  margin: -16px calc(-1 * clamp(16px, 2.5vw, 40px)) 8px; padding: 16px clamp(16px, 2.5vw, 40px) 4px; box-shadow: 0 6px 8px -6px rgba(15,23,42,.12); }
.ap-mtop .ap-chips { margin-bottom: 8px; }
.ap-mtop .ap-thead { margin: 0; }
@media (max-width: 767.98px) { .ap-mtop { margin: -12px -16px 8px; padding: 12px 16px 2px; } }
/* MID + Status: values and headers centered in their columns (O'dany 2026-10-26: 'MID, Status are off') */
@media (min-width: 900px) {
  .ap-thead > span:nth-child(4), .ap-thead > span:nth-child(5) { text-align: center; }
  .ap-list .ap-row .c-mid, .ap-list .ap-row .c-st { justify-self: center; text-align: center; }
}

/* View as agent banner (O'dany 2026-10-28): CRM staff looking at an agent's portal, look only */
.ap-viewas { position: relative; z-index: 21; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  background: #fef3c7; color: #78350f; border-bottom: 1px solid #fcd34d; padding: 8px 16px; font-size: 14px; }
.ap-viewas form { margin: 0; }
.ap-viewas button { border: 1px solid #b45309; background: #b45309; color: #fff; border-radius: 999px; padding: 4px 14px; font-weight: 600; font-size: 13px; cursor: pointer; }
.ap-viewas button:hover, .ap-viewas button:focus-visible { background: #92400e; border-color: #92400e; }

/* Show / hide password (2026-10-28) */
.ap-pw { position: relative; }
.ap-form .ap-pw input { width: 100%; padding: 10px 44px 10px 12px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 15px; }
.ap-pw-eye { position: absolute; top: 0; right: 0; height: 100%; width: 42px; display: flex; align-items: center; justify-content: center;
             background: transparent; border: 0; color: var(--mute); cursor: pointer; border-radius: 0 6px 6px 0; }
.ap-pw-eye:hover { color: var(--ink2); }
.ap-pw-eye:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.ap-pw-eye .ap-eye-off { display: none; }
.ap-pw-eye[aria-pressed="true"] .ap-eye-on { display: none; }
.ap-pw-eye[aria-pressed="true"] .ap-eye-off { display: block; }
