/* Bank Partners — Merchant Applications + Live Campaigns (design preview).
   Uses the portal's existing tokens (--surface, --border, --muted, --brand, --cta), fx tiles, badges and data-table. */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* sidebar: same sub-menu pattern as POS / Performance & Workflow Hub */
.bp-subnav:not(.open){display:none}
.bp-subnav{margin-top:-2px}
.bp-subnav button{grid-template-columns:18px 1fr}
.nav-item.bp-nav .nav-arrow{background:transparent;transition:transform .18s}
.nav-item.bp-nav[aria-expanded="true"] .nav-arrow{transform:rotate(180deg)}

/* preview strip */
.bp-preview-bar{display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;margin:-6px 0 18px;padding:10px 14px;border:1px dashed #c9d7f2;border-radius:14px;background:var(--surface-soft);font-size:13px;color:var(--muted)}
.bp-sample-tag{display:inline-flex;align-items:center;height:24px;padding:0 10px;border-radius:999px;background:#fff3d9;color:#9a5b00;font-weight:800;font-size:11px;letter-spacing:.04em;text-transform:uppercase}
.bp-preview-copy{flex:1 1 260px}
.bp-preview-bar label{display:inline-flex;align-items:center;gap:8px;font-weight:700;color:var(--text)}
.bp-preview-bar select{height:34px;border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--text);padding:0 10px;font:inherit}
.bp-switch input{width:16px;height:16px;accent-color:var(--brand)}

/* KPI tiles (fx-tile) */
.bp-kpis{margin-bottom:20px}
.bp-kpi{cursor:pointer;outline:none}
.bp-kpi:hover,.bp-kpi:focus-visible{border-color:#b9cbef;box-shadow:0 10px 28px rgba(27,47,91,.08)}
.bp-kpi.is-active{border:1.5px solid var(--cta);box-shadow:0 0 0 3px rgba(61,131,245,.12),0 10px 28px rgba(27,47,91,.08)}
.bp-kpi .fx-label-wrap{align-items:flex-start;gap:12px;display:flex}
.bp-kpi .fx-icon{width:44px;height:44px;flex-basis:44px;border-radius:12px}
.bp-kpi .fx-icon svg{width:22px;height:22px}
.bp-kpi-copy{display:grid;gap:3px}
.bp-kpi-label{font-size:14px;font-weight:800;color:var(--text);line-height:1.25}
.bp-kpi-copy small{font-size:12px;color:var(--muted);font-weight:500}
.bp-kpi .fx-main{padding-left:56px}
.bp-kpi .fx-foot{padding-left:56px}
.bp-kpi.fx-tile:not(.fx-hero) .fx-spark-wrap{top:auto;bottom:16px;height:56px;width:40%}

/* layout: list + details panel (side column on wide screens, overlay below 1280px) */
.bp-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;align-items:start}
.bp-main{min-width:0}
.bp-card{padding:20px 22px}
.bp-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:10px}
.bp-card-head h2{margin:0;font-size:22px;letter-spacing:-.02em}
.bp-card-head p{margin:6px 0 0;color:var(--muted);font-size:14px}
.bp-export{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.bp-ic{width:18px;height:18px;flex:0 0 18px}

.bp-tabs{display:flex;gap:4px;border-bottom:1px solid var(--border);margin:6px 0 16px;overflow-x:auto;scrollbar-width:none}
.bp-tabs::-webkit-scrollbar{display:none}
.bp-tabs button{position:relative;flex:0 0 auto;height:44px;padding:0 16px;border:0;background:transparent;color:var(--muted);font:inherit;font-weight:650;font-size:14px;cursor:pointer;white-space:nowrap}
.bp-tabs button:hover{color:var(--text)}
.bp-tabs button.active{color:var(--brand);font-weight:800}
.bp-tabs button.active::after{content:"";position:absolute;left:8px;right:8px;bottom:-1px;height:3px;border-radius:3px 3px 0 0;background:var(--cta)}

.bp-filters{display:grid;grid-template-columns:minmax(220px,1.4fr) repeat(3,minmax(140px,1fr));gap:12px;align-items:end;margin-bottom:14px}
.bp-filters label{display:grid;gap:6px;font-size:12px;font-weight:700;color:var(--muted)}
.bp-filters select,.bp-search input{height:44px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text);padding:0 12px;font:inherit;font-size:14px;width:100%;min-width:0}
.bp-filters select:focus,.bp-search input:focus{outline:0;border-color:#7db2ed;box-shadow:0 0 0 3px rgba(19,92,172,.10)}
.bp-search{position:relative;display:block!important}
.bp-search>span[aria-hidden]{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:var(--muted);font-size:17px}
.bp-search input{padding-left:38px}

/* table */
.bp-table-wrap{border-radius:12px}
.bp-table{min-width:760px}
.bp-table th{white-space:nowrap}
.bp-table td{padding:12px 14px}
.bp-check-cell{width:44px;text-align:center}
.bp-check-cell input{width:16px;height:16px;accent-color:var(--brand)}
.bp-sort{display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;padding:0;font:inherit;font-weight:inherit;color:inherit;cursor:pointer}
.bp-sort span{font-size:11px;opacity:.55}
.bp-sort.on{color:var(--brand)}.bp-sort.on span{opacity:1}
.bp-merchant{display:flex;align-items:center;gap:12px;border:0;background:transparent;padding:0;text-align:left;cursor:pointer;color:var(--text);font:inherit}
.bp-merchant strong{display:block;font-size:14px;white-space:nowrap}
.bp-merchant small{display:none;color:var(--muted);font-size:12px;margin-top:3px}
.bp-merchant:hover strong{color:var(--brand)}
.bp-table tr.is-selected td{background:#eef5ff}
.bp-date{white-space:nowrap;font-variant-numeric:tabular-nums}
.bp-icon-cell{text-align:center;width:84px}
.bp-icon-link{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:9px;color:var(--brand);transition:background .15s}
.bp-icon-link:hover{background:var(--brand-soft)}
.bp-insta{color:#d1307a}
.bp-icon-link svg{width:19px;height:19px}
.bp-action-cell{width:110px;text-align:center}
.bp-view-btn{display:inline-flex;align-items:center;gap:6px;min-height:36px!important;height:36px;padding:0 12px;font-size:13px}
.bp-view-btn svg{width:15px;height:15px}
.bp-empty{text-align:center;padding:36px 16px!important}
.bp-empty strong,.bp-empty span{display:block}.bp-empty span{color:var(--muted);font-size:13px;margin-top:4px}

/* logos: initials monogram (no merchant logos are invented) */
.bp-logo{display:inline-grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:50%;font-weight:800;font-size:13px;letter-spacing:.02em;color:#fff}
.bp-logo-lg{width:52px;height:52px;flex-basis:52px;font-size:17px}
.bp-logo-xl{width:96px;height:96px;flex-basis:96px;font-size:30px;border-radius:22px}
.bp-tone-0{background:linear-gradient(145deg,#c98a4b,#7a3f12)}
.bp-tone-1{background:linear-gradient(145deg,#3b95f3,#14306d)}
.bp-tone-2{background:linear-gradient(145deg,#2fbf8b,#0d5a46)}
.bp-tone-3{background:linear-gradient(145deg,#b07ae8,#5a1f6d)}
.bp-tone-4{background:linear-gradient(145deg,#e46a7a,#6d1f2c)}
.bp-tone-5{background:linear-gradient(145deg,#d6c255,#5e5a12)}
.bp-bank-chip{display:inline-grid;place-items:center;min-width:38px;height:26px;padding:0 8px;border-radius:8px;font-size:11px;font-weight:800;letter-spacing:.03em}
.bp-bank-dib{background:#e3f4ea;color:#0b6b3a}
.bp-bank-ei{background:#e7efff;color:#1d4fa8}
.badge.blue::before{content:"";width:6px;height:6px;margin-right:6px;border-radius:50%;background:currentColor;flex:0 0 6px}

/* pager */
.bp-pager{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-top:14px;font-size:13px;color:var(--muted)}
.bp-pager-right{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.bp-pager label{display:inline-flex;align-items:center;gap:8px}
.bp-pager select{height:34px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);padding:0 8px;font:inherit}
.bp-pages{display:flex;align-items:center;gap:6px}
.bp-pages button{min-width:34px;height:34px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);font-weight:700;cursor:pointer}
.bp-pages button.active{border-color:var(--cta);color:var(--brand);box-shadow:0 0 0 2px rgba(61,131,245,.15)}
.bp-pages button:disabled{opacity:.4;cursor:not-allowed}
.bp-gap{padding:0 2px}

/* details panel */
.bp-panel{padding:0;overflow:hidden;display:flex;flex-direction:column;outline:none}
.bp-panel-backdrop{display:none}
.bp-panel-head{display:grid;grid-template-columns:auto 1fr auto;align-items:start;gap:12px;padding:18px 18px 12px}
.bp-panel-badge{margin-top:8px}
.bp-panel-title{min-width:0}
.bp-panel-title h2{margin:0;font-size:18px;letter-spacing:-.015em;overflow-wrap:anywhere}
.bp-panel-title small{color:var(--muted);font-size:13px}
.bp-close{width:38px;height:38px;min-width:38px!important;font-size:22px;line-height:1;align-self:start}
.bp-ptabs{display:flex;gap:2px;padding:0 14px;border-bottom:1px solid var(--border);overflow-x:auto;scrollbar-width:none}
.bp-ptabs::-webkit-scrollbar{display:none}
.bp-ptabs button{position:relative;flex:0 0 auto;height:42px;padding:0 12px;border:0;background:transparent;color:var(--muted);font:inherit;font-size:14px;font-weight:650;cursor:pointer}
.bp-ptabs button.active{color:var(--brand);font-weight:800}
.bp-ptabs button.active::after{content:"";position:absolute;left:6px;right:6px;bottom:-1px;height:3px;border-radius:3px 3px 0 0;background:var(--cta)}
.bp-panel-body{padding:4px 18px 18px;overflow:auto}
.bp-block{padding:16px 0;border-bottom:1px solid var(--border)}
.bp-block:last-child{border-bottom:0}
.bp-block h3{margin:0 0 12px;font-size:16px;letter-spacing:-.01em}
.bp-block-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.bp-block-head h3{margin:0}
.bp-count{display:inline-grid;place-items:center;min-width:22px;height:22px;margin-left:6px;padding:0 6px;border-radius:999px;background:var(--surface-muted);font-size:12px;color:var(--muted)}
.bp-company{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:start}
.bp-company-2{grid-template-columns:1fr 1fr}
.bp-info{display:grid;gap:10px;min-width:0}
.bp-info-row{display:grid;grid-template-columns:20px 1fr;gap:10px;align-items:start;font-size:14px;min-width:0}
.bp-info-row>svg{color:var(--muted);margin-top:2px}
.bp-info-row small{display:block;font-size:12px;color:var(--muted);margin-bottom:1px}
.bp-info-row span{overflow-wrap:anywhere}
.bp-masked{color:var(--muted);font-style:italic;font-size:13px}
.bp-logo-box{display:grid;justify-items:center;gap:6px;padding:14px;border-radius:16px;background:var(--surface-soft);border:1px solid var(--border)}
.bp-logo-box small{font-size:11px;color:var(--muted)}
.bp-link{color:var(--brand);text-decoration:none;font-weight:600;overflow-wrap:anywhere}
.bp-link span{margin-left:4px;font-size:12px}
.bp-link:hover{text-decoration:underline}
.bp-bank-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:10px}
.bp-bank-card,.bp-reach{display:flex;gap:12px;align-items:center;padding:12px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft)}
.bp-bank-card .bp-bank-chip{width:46px;height:46px;border-radius:50%;font-size:13px}
.bp-bank-card strong,.bp-bank-card small,.bp-reach strong,.bp-reach small{display:block}
.bp-bank-card small,.bp-reach small{font-size:12px;color:var(--muted)}
.bp-reach svg{width:24px;height:24px;color:var(--brand);flex:0 0 24px}
.bp-reach strong{font-size:22px;letter-spacing:-.02em}
.bp-offer{margin-top:10px;padding:10px 12px;border-radius:12px;background:var(--brand-soft)}
.bp-offer small{display:block;font-size:12px;color:var(--muted)}
.bp-offer strong{font-size:14px}
.bp-timeline{list-style:none;margin:0;padding:0}
.bp-timeline li{position:relative;display:grid;grid-template-columns:18px 1fr auto;gap:12px;align-items:start;padding-bottom:16px}
.bp-timeline li:last-child{padding-bottom:0}
.bp-timeline li::before{content:"";position:absolute;left:8px;top:16px;bottom:-2px;width:2px;background:var(--border)}
.bp-timeline li:last-child::before{display:none}
.bp-timeline i{position:relative;z-index:1;width:14px;height:14px;margin:3px 0 0 2px;border-radius:50%;border:2px solid var(--border-strong);background:var(--surface)}
.bp-tl-done i,.bp-tl-done::before{background:var(--cta)!important;border-color:var(--cta)!important}
.bp-tl-current i{border-color:var(--cta);box-shadow:0 0 0 4px rgba(61,131,245,.15)}
.bp-tl-amber i{background:#d98a00;border-color:#d98a00}
.bp-tl-red i{background:var(--red);border-color:var(--red)}
.bp-timeline strong{display:block;font-size:14px}
.bp-timeline small{display:block;color:var(--muted);font-size:12px;margin-top:2px}
.bp-tl-todo strong{color:var(--muted)}
.bp-tl-badge{height:22px!important;font-size:11px!important}
.bp-dl{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px;margin:0}
.bp-dl div{min-width:0}
.bp-dl dt{font-size:12px;color:var(--muted);margin-bottom:3px}
.bp-dl dd{margin:0;font-weight:650;font-size:14px;overflow-wrap:anywhere}
.bp-about{margin:14px 0 0;color:var(--muted);font-size:14px;line-height:1.5}
.bp-muted{color:var(--muted);font-size:14px;margin:0}
.bp-notes{list-style:none;margin:0 0 12px;padding:0;display:grid;gap:10px}
.bp-notes li{padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft)}
.bp-notes li>div{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
.bp-notes strong{font-size:13px}.bp-notes small{color:var(--muted);font-size:12px}
.bp-notes p{margin:6px 0 0;font-size:14px;line-height:1.45}
.bp-note-form{display:grid;gap:8px}
.bp-note-form textarea{width:100%;border:1px solid var(--border);border-radius:10px;padding:10px 12px;font:inherit;background:var(--surface-soft);color:var(--text);resize:vertical}
.bp-note-form .primary{justify-self:end}
.bp-note-form .primary:disabled{opacity:.5;cursor:not-allowed}
.bp-note-form small{color:var(--muted);font-size:12px}

/* documents: Merchant Documents row pattern, compact inside the panel */
.bp-docs{padding:0}
.bp-doc-row{grid-template-columns:34px minmax(0,1fr) auto auto!important;gap:12px;padding:12px 0}
.bp-doc-ic svg{width:17px;height:17px}
.bp-doc-actions{display:flex;gap:6px}
.bp-mini{min-height:34px!important;height:34px;padding:0 12px;font-size:13px}
.bp-doc-image{background:#e6f0ff!important;color:#2a66d1!important}
.bp-doc-video{background:#f0eaff!important;color:#6c43c0!important}
.bp-doc-pdf{background:#ffe9eb!important;color:#c42d3c!important}
.bp-doc-doc{background:#e8f7f0!important;color:var(--green)!important}

/* campaign designs + attachments */
.bp-designs{display:grid;gap:10px}
.bp-designs-multi{grid-template-columns:1fr 1fr}
.bp-design{position:relative;display:block;padding:0;border:0;border-radius:14px;overflow:hidden;cursor:zoom-in;background:var(--surface-muted)}
.bp-design img{display:block;width:100%;aspect-ratio:2/1;object-fit:cover}
.bp-zoom{position:absolute;right:8px;bottom:8px;display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:rgba(15,23,42,.6);color:#fff;font-size:15px;opacity:0;transition:opacity .15s}
.bp-design:hover .bp-zoom,.bp-design:focus-visible .bp-zoom{opacity:1}
.bp-link-btn{border:0;background:transparent;color:var(--brand);font-weight:700;cursor:pointer;font-size:13px;padding:4px 8px;border-radius:8px}
.bp-link-btn:hover{background:var(--brand-soft)}
.bp-attach-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.bp-attach{display:grid;justify-items:center;gap:4px;padding:12px 6px;border:1px solid var(--border);border-radius:12px;background:var(--surface);cursor:pointer;text-align:center;color:var(--text);font:inherit;min-width:0}
.bp-attach:hover{border-color:#b9cbef;background:var(--surface-soft)}
.bp-attach-ic{display:grid;place-items:center;width:40px;height:40px;border-radius:10px}
.bp-attach-ic svg{width:20px;height:20px}
.bp-attach strong{font-size:11px;line-height:1.25;overflow-wrap:anywhere}
.bp-attach small{font-size:10px;color:var(--muted)}
.bp-carry{display:flex;align-items:flex-start;gap:8px;margin:14px 0 0;padding:10px 12px;border-radius:12px;background:#e8f7f0;color:#0f6b46;font-size:13px;line-height:1.4}
.bp-carry svg{flex:0 0 18px;margin-top:1px}

/* lightbox */
.bp-lightbox{position:fixed;inset:0;z-index:120;display:grid;place-items:center;padding:24px}
.bp-lb-backdrop{position:absolute;inset:0;background:rgba(7,14,32,.82)}
.bp-lightbox figure{position:relative;margin:0;max-width:min(1100px,100%);width:100%}
.bp-lightbox img{display:block;width:100%;border-radius:16px;box-shadow:0 30px 80px rgba(0,0,0,.4)}
.bp-lightbox figcaption{display:flex;justify-content:space-between;gap:12px;margin-top:10px;color:#fff;font-weight:700}
.bp-lightbox figcaption small{color:rgba(255,255,255,.7);font-weight:500}
.bp-lb-close{position:absolute;top:-14px;right:-14px;width:40px;height:40px;border:0;border-radius:50%;background:#fff;color:#111827;font-size:22px;cursor:pointer;box-shadow:0 6px 18px rgba(0,0,0,.3)}
.bp-lb-nav{position:absolute;top:calc(50% - 30px);width:44px;height:44px;border:0;border-radius:50%;background:rgba(255,255,255,.92);color:#111827;font-size:26px;cursor:pointer}
.bp-lb-nav.prev{left:10px}.bp-lb-nav.next{right:10px}

/* wide desktop: panel is a sticky right column like the reference */
@media(min-width:1600px){
  .bp-layout.has-panel{grid-template-columns:minmax(0,1fr) minmax(380px,430px)}
  .bp-panel{position:sticky;top:84px;max-height:calc(100vh - 104px)}
  .bp-layout.has-panel .bp-filters{grid-template-columns:minmax(180px,1.2fr) repeat(3,minmax(110px,1fr))}
}
/* panel open on mid-size desktops: category and city move under the merchant name so nothing is clipped */
@media(min-width:1600px) and (max-width:2047px){
  .bp-layout.has-panel .bp-col-cat,.bp-layout.has-panel .bp-col-city,.bp-layout.has-panel th.bp-th-cat,.bp-layout.has-panel th.bp-th-city{display:none}
  .bp-layout.has-panel .bp-merchant small{display:block}
  .bp-layout.has-panel .bp-table{min-width:0}
  .bp-layout.has-panel .bp-icon-cell{width:64px}
  .bp-layout.has-panel .bp-view-btn{font-size:0;gap:0;width:40px;padding:0;justify-content:center}
  .bp-layout.has-panel .bp-view-btn svg{width:17px;height:17px}
  .bp-layout.has-panel .bp-date{white-space:normal}
}
@media(min-width:1280px) and (max-width:1439px){.bp-layout:not(.has-panel) .bp-col-cat,.bp-layout:not(.has-panel) th.bp-th-cat{display:none}.bp-layout:not(.has-panel) .bp-merchant small{display:block}}
/* below 1280px: the same panel opens over the page from the right (drawer behaviour) */
@media(max-width:1599px){
  .bp-panel-backdrop{display:block;position:fixed;inset:0;z-index:60;background:rgba(15,23,42,.55);backdrop-filter:blur(2px)}
  .bp-panel{position:fixed;top:0;right:0;bottom:0;z-index:61;width:min(480px,100vw);border-radius:0;box-shadow:var(--shadow-modal)}
  body.bp-panel-open{overflow:hidden}
}
@media(max-width:1100px){.bp-filters{grid-template-columns:1fr 1fr}.bp-search{grid-column:1/-1}}
@media(max-width:900px){.bp-kpis.fx-grid-live{grid-template-columns:1fr 1fr}.bp-kpis .bp-kpi:last-child{grid-column:1/-1}}

/* phones: rows become compact merchant cards, no sideways scrolling */
@media(max-width:760px){
  .bp-preview-bar{margin-top:0}
  .bp-preview-bar label,.bp-preview-bar select{width:100%}
  .bp-preview-bar label:not(.bp-switch){display:grid;gap:6px}
  .bp-card{padding:16px 14px}
  .bp-card-head{align-items:center}
  .bp-card-head h2{font-size:19px}
  .bp-filters{grid-template-columns:1fr 1fr;gap:10px}
  .bp-table-wrap{border:0;overflow:visible}
  .bp-table{min-width:0!important;display:block}
  .bp-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .bp-table tbody{display:grid;gap:10px}
  .bp-table tr{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"chk merchant disc" "chk status action" "chk date action";gap:6px 10px;align-items:center;padding:12px;border:1px solid var(--border);border-radius:14px;background:var(--surface)}
  .bp-table td{display:block;padding:0!important;border:0!important;background:transparent!important}
  .bp-table td.bp-check-cell{grid-area:chk;width:auto;align-self:start;padding-top:11px!important}
  .bp-table td.bp-merchant-cell{grid-area:merchant;min-width:0}
  .bp-table td.bp-status-cell{grid-area:status;justify-self:start}
  .bp-table td.bp-date{grid-area:date;font-size:12px;color:var(--muted)}
  .bp-table td.bp-date::before{content:attr(data-label) " · "}
  .bp-table td.bp-action-cell{grid-area:action;width:auto;align-self:center}
  .bp-table td.bp-disc-cell{grid-area:disc;justify-self:end;align-self:start}
  .bp-table td.bp-col-cat,.bp-table td.bp-col-city,.bp-table td[data-label="Bank"]{display:none}
  .bp-table-live tr{grid-template-columns:auto 38px 38px minmax(0,1fr) auto;grid-template-areas:"chk merchant merchant merchant disc" "chk status status status action" "chk date date date date" "chk web insta . ."}
  .bp-table-live td.bp-action-cell{justify-self:end}
  .bp-table-live td.bp-icon-cell{grid-area:web;width:auto;text-align:left}
  .bp-table-live td.bp-icon-cell+td.bp-icon-cell{grid-area:insta}
  .bp-table tr.is-selected{border-color:var(--cta)}
  .bp-merchant small{display:block}
  .bp-merchant strong{overflow-wrap:anywhere;white-space:normal}
  .bp-empty{grid-column:1/-1}
  .bp-table td.bp-empty{display:block}
  .bp-pager{flex-direction:column;align-items:stretch}
  .bp-pager-right{justify-content:space-between}
  .bp-company,.bp-company-2,.bp-bank-grid{grid-template-columns:1fr}
  .bp-logo-box{justify-self:start;display:flex;align-items:center}
  .bp-logo-xl{width:64px;height:64px;flex-basis:64px;font-size:22px;border-radius:16px}
  .bp-attach-grid{grid-template-columns:1fr 1fr}
  .bp-lb-close{top:-48px;right:0}
}
@media(max-width:600px){.bp-kpis.fx-grid-live{grid-template-columns:1fr}.bp-kpis .bp-kpi:last-child{grid-column:auto}}
@media(max-width:480px){
  .bp-filters{grid-template-columns:1fr}
  .bp-panel-head{grid-template-columns:auto 1fr auto;padding:16px 14px 10px}
    .bp-panel-body{padding:4px 14px 18px}
  .bp-doc-row{grid-template-columns:34px minmax(0,1fr)!important}
  .bp-doc-row .document-status,.bp-doc-actions{grid-column:2}
  .bp-dl{grid-template-columns:1fr}
  .bp-designs-multi{grid-template-columns:1fr}
}

/* dark mode */
[data-theme="dark"] .bp-preview-bar{border-color:#3c4a67}
[data-theme="dark"] .bp-sample-tag{background:#3a2e17;color:#ffd88a}
[data-theme="dark"] .bp-table tr.is-selected td{background:#1f3253}
[data-theme="dark"] .bp-bank-dib{background:#173a28;color:#7ee0aa}
[data-theme="dark"] .bp-bank-ei{background:#1d2e52;color:#9cc2ff}
[data-theme="dark"] .bp-offer{background:#1d2e4a}
[data-theme="dark"] .bp-carry{background:#17382c;color:#9be1bd}
[data-theme="dark"] .bp-doc-image{background:rgba(106,166,255,.16)!important;color:#8fbcff!important}
[data-theme="dark"] .bp-doc-video{background:rgba(167,139,250,.16)!important;color:#c4b5fd!important}
[data-theme="dark"] .bp-doc-pdf{background:rgba(255,107,129,.14)!important;color:#ff9aa5!important}
[data-theme="dark"] .bp-doc-doc{background:rgba(61,220,151,.14)!important;color:#3ddc97!important}
@media(max-width:760px){[data-theme="dark"] .bp-table tr{background:var(--surface)}}
@media(prefers-reduced-motion:reduce){.nav-item.bp-nav .nav-arrow,.bp-zoom{transition:none}}

/* discount */
.bp-disc{display:inline-flex;align-items:center;justify-content:center;min-width:46px;height:26px;padding:0 9px;border-radius:8px;background:#fff1e3;color:#b4540a;font-weight:800;font-size:13px;font-variant-numeric:tabular-nums}
.bp-disc-lg{min-width:58px;height:34px;font-size:16px;border-radius:10px}
.bp-disc-cell,.bp-th-disc{text-align:center;width:96px}
.bp-offer{display:flex;align-items:center;justify-content:space-between;gap:12px}
[data-theme="dark"] .bp-disc{background:#3a2a17;color:#ffb36b}

/* next step + update status */
.bp-next{display:flex;align-items:center;flex-wrap:wrap;gap:10px 12px;margin:14px 0 2px;padding:12px 14px;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft)}
.bp-next>div{flex:1 1 180px;min-width:0}
.bp-next small{display:block;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
.bp-next strong{font-size:14px}
.bp-next.is-mine{border-color:#9cbcf6;background:#eef5ff}
.bp-next.is-mine small{color:var(--brand)}
.bp-next.is-done{background:#e8f7f0;border-color:#bfe6d3}
.bp-panel-badge{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.bp-head-update{height:30px!important;min-height:30px!important;padding:0 12px}
.bp-update-btn{min-height:36px!important;height:36px;padding:0 12px;font-size:13px;margin-left:6px}
.bp-layout .bp-action-cell{width:auto;white-space:nowrap}
.bp-status-card{width:min(560px,100%);max-height:calc(100vh - 32px);overflow:auto}
.bp-status-card header p{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.bp-moves{border:0;margin:16px 0 6px;padding:0;display:grid;gap:10px}
.bp-move{display:grid!important;grid-template-columns:auto 1fr auto;gap:12px!important;align-items:center;padding:14px;border:1.5px solid var(--border);border-radius:14px;cursor:pointer;margin:0!important;font-weight:500!important}
.bp-move input{width:18px;height:18px;accent-color:var(--brand);margin:0}
.bp-move strong{display:block;font-size:15px}
.bp-move small{display:block;color:var(--muted);font-size:13px;margin-top:3px;font-weight:500;line-height:1.4}
.bp-move:has(input:checked){border-color:var(--cta);background:#eef5ff}
.bp-move.is-danger:has(input:checked){border-color:var(--red);background:#fff1f2}
.bp-move-fields{display:grid;gap:4px;margin-top:8px}
.bp-move-fields label{display:grid;gap:6px;font-size:13px;font-weight:700;margin-bottom:10px}
.bp-move-fields label small{font-weight:500;color:var(--muted)}
.bp-move-fields input[type=url],.bp-move-fields textarea{width:100%;border:1px solid var(--border);border-radius:10px;padding:11px 12px;font:inherit;background:var(--surface-soft);color:var(--text)}
.bp-drop{position:relative;display:flex;align-items:center;justify-content:center;gap:8px;min-height:64px;border:1.5px dashed #9cbcf6;border-radius:12px;background:#f5f8ff;color:var(--brand);font-weight:700;cursor:pointer}
.bp-drop input{position:absolute;inset:0;opacity:0;cursor:pointer}
.bp-thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:8px;margin-bottom:6px}
.bp-thumbs:empty{display:none}
.bp-thumbs figure{margin:0}.bp-thumbs img{width:100%;aspect-ratio:2/1;object-fit:cover;border-radius:8px}
.bp-thumbs figcaption{font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bp-move-note{margin:6px 0 0;padding:10px 12px;border-radius:10px;background:var(--surface-soft);color:var(--muted);font-size:12px;line-height:1.45}
.bp-status-card footer{display:flex;justify-content:flex-end;gap:10px;margin-top:16px}
.bp-danger-btn{background:var(--red)!important;border-color:var(--red)!important}
[data-theme="dark"] .bp-next.is-mine,[data-theme="dark"] .bp-move:has(input:checked){background:#1d2e4a}
[data-theme="dark"] .bp-next.is-done{background:#17382c;border-color:#29694e}
[data-theme="dark"] .bp-drop{background:#182338}

/* bank employee view: own sidebar + top bar, ExtraMiles items hidden */
.bp-bank-side,.bp-bank-top{display:none}
body.bp-bank-mode #nav{display:none}
body.bp-bank-mode .bp-bank-side{display:grid;gap:5px}
.bp-side-sep{height:1px;margin:10px 4px;background:rgba(255,255,255,.18)}
.bp-side-exit{color:#ffd88a!important}
.bp-bank-side .nav-item b:empty{display:none}
.bp-bank-side .nav-item b{background:#f4474f;color:#fff}
body.bp-bank-mode #roleSwitcher,body.bp-bank-mode #addMerchantTop,body.bp-bank-mode .device-preview,body.bp-bank-mode .global-search{display:none!important}
body.bp-bank-mode .bp-bank-top{display:flex;align-items:center;gap:10px}
body.bp-bank-mode .topbar{justify-content:space-between}
.bp-bank-ctx,.bp-bank-user{display:flex;align-items:center;gap:10px;height:52px;padding:0 14px 0 8px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.bp-bank-ctx .bp-bank-chip{width:36px;height:36px;border-radius:50%}
.bp-bank-ctx strong,.bp-bank-user strong{display:block;font-size:14px;white-space:nowrap}
.bp-bank-ctx small,.bp-bank-user small{display:block;font-size:12px;color:var(--muted);white-space:nowrap}
.bp-bank-user .avatar{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:linear-gradient(145deg,#6d4bd1,#3d2a8f);color:#fff;font-weight:800;font-size:13px}
.bp-preview-bar.is-bank{border-color:#f0c97a;background:#fffaf0}
[data-theme="dark"] .bp-preview-bar.is-bank{background:#2a2416;border-color:#70582a}
@media(max-width:760px){
  body.bp-bank-mode .bp-bank-user{display:none}
  .bp-bank-ctx{height:44px;padding:0 10px 0 6px}
  .bp-bank-ctx small{display:none}
  .bp-bank-ctx strong{font-size:13px;max-width:150px;overflow:hidden;text-overflow:ellipsis}
  .bp-update-btn{margin:6px 0 0}
  .bp-update-btn{margin:0}
  .bp-status-card{max-height:100vh;border-radius:0}
  .bp-move{grid-template-columns:auto 1fr}
  .bp-move>.badge{grid-column:2;justify-self:start}
}
.bp-bank-side .nav-item{font-size:14px!important;gap:8px}
.bp-bank-side .nav-item b{min-width:22px;text-align:center;padding:3px 7px;border-radius:10px;font-size:11px}

/* Users & Roles: Bank Staff — only the bank settings apply (no merchant scope, sections or operations access) */
#userForm.bs-on .section-access,
#userForm.bs-on #opsAccessPanel,
#userForm.bs-on label:has(#userScope){display:none}
/* signed-in Bank Staff: their own bank and role only, no way back to the ExtraMiles view */
body.bp-bank-locked [data-bp-exit]{display:none!important}
/* status badge is the entry point to Update Status in the bank view */
.bp-status-btn{display:inline-flex;align-items:center;gap:4px;padding:2px 4px 2px 2px;border:1px solid transparent;border-radius:999px;background:transparent;cursor:pointer;font:inherit;color:var(--muted)}
.bp-status-btn>span{font-size:12px;line-height:1}
.bp-status-btn:hover,.bp-status-btn:focus-visible{border-color:var(--border-strong);background:var(--surface-soft);outline:none}
.bp-status-btn.is-mine{border-color:#9cbcf6;color:var(--brand)}
.bp-status-btn.is-mine:hover{background:#eef5ff}
/* Change Status: one clear button per row and under the panel header (bank view) */
.bp-update-btn{white-space:nowrap}
.bp-update-btn.is-locked,.bp-change-btn.is-locked{color:var(--muted)!important;border-color:var(--border)!important;background:var(--surface-soft)!important}
.bp-change-bar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:0 18px 14px}
.bp-change-btn{min-height:42px!important;padding:0 20px}
.bp-change-bar small{color:var(--muted);font-size:13px}
.bp-panel-head.bp-no-logo{grid-template-columns:1fr auto}
.bp-merchant{min-height:40px}
@media(min-width:1600px) and (max-width:2047px){
  .bp-layout.has-panel .bp-update-btn{display:inline-flex}
}
@media(max-width:760px){.bp-table tr{grid-template-columns:auto minmax(0,1fr) auto}.bp-change-bar{padding:0 14px 12px}.bp-change-btn{flex:1}}
@media(min-width:1600px) and (max-width:2047px){
  .bp-layout.has-panel td.bp-action-cell .bp-update-btn{margin:6px 0 0;padding:0 8px;font-size:12px}
  .bp-layout.has-panel .bp-view-btn{width:100%}
}
/* up to 1599px: category moves under the merchant name; in the bank view "View" is an icon so Change Status always fits */
@media(min-width:761px) and (max-width:1599px){
  .bp-col-cat,th.bp-th-cat{display:none}
  .bp-merchant small{display:block}
}
@media(min-width:761px) and (max-width:2047px){
  body.bp-bank-mode .bp-view-btn{font-size:0;gap:0;width:40px;padding:0;justify-content:center}
  body.bp-bank-mode .bp-view-btn svg{width:17px;height:17px}
}
@media(min-width:761px) and (max-width:1365px){
  .bp-col-city,th.bp-th-city{display:none}
  .bp-table{min-width:0}
  .bp-date{white-space:normal}
}
@media(min-width:761px) and (max-width:1100px){
  body.bp-bank-mode td.bp-action-cell .bp-update-btn{margin:6px 0 0;padding:0 10px;font-size:12px}
  body.bp-bank-mode .bp-view-btn{width:100%!important}
  .bp-table .bp-check-cell{display:none}
  .bp-table td{padding:12px 10px}
}
@media(min-width:761px) and (max-width:1100px){
  .bp-disc-cell,.bp-th-disc{width:64px}
  .bp-merchant strong{white-space:normal}
  .bp-date{width:84px}
  .bp-table th{padding:12px 10px}
}
/* row actions: the portal's ••• menu (same as POS) */
.bp-table td.bp-action-cell{width:76px;text-align:center}
.bp-menu-btn{min-width:44px;min-height:44px}
.bp-menu-btn:focus-visible{outline:2px solid var(--cta);outline-offset:2px}
@media(max-width:760px){.bp-table td.bp-action-cell{display:block!important;justify-self:end}}

/* ===== full-page merchant details (replaces the side panel) ===== */
.bp-detail{max-width:1280px;margin:0 auto}
.bp-back{display:inline-flex;align-items:center;gap:6px;margin:0 0 14px;padding:8px 12px 8px 4px;border:0;background:transparent;color:var(--brand);font:inherit;font-weight:800;font-size:15px;cursor:pointer;border-radius:10px}
.bp-back:hover,.bp-back:focus-visible{background:var(--brand-soft);outline:none}
.bp-detail .bp-preview-bar{margin:0 0 16px}
.bp-detail-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px 24px;align-items:start;padding:22px 24px;margin-bottom:6px}
.bp-detail-title h1{margin:0;font-size:28px;letter-spacing:-.025em;overflow-wrap:anywhere}
.bp-detail-title p{margin:6px 0 0;color:var(--muted);font-size:14px}
.bp-detail-meta{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:14px}
.bp-meta-chip{display:inline-flex;align-items:center;height:26px;padding:0 10px;border-radius:999px;background:var(--surface-soft);border:1px solid var(--border);color:var(--muted);font-size:12px;font-weight:700}
.bp-detail-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end}
.bp-detail-actions .bp-change-btn{min-height:46px!important;padding:0 24px;font-size:15px}
.bp-detail-next{grid-column:1/-1}
.bp-detail-next .bp-next{margin:0}
.bp-detail-tabs{padding:0;margin:14px 0 18px;background:transparent}
.bp-detail-tabs button{height:46px;padding:0 18px;font-size:15px}
.bp-detail-body .bp-block{padding:20px 22px;margin:0 0 18px;border:1px solid var(--border);border-radius:18px;background:var(--surface);box-shadow:0 1px 2px rgba(33,70,160,.04)}
.bp-detail-body .bp-block:last-child{border-bottom:1px solid var(--border)}
.bp-detail-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:18px;align-items:start}
.bp-detail-grid .bp-col{min-width:0}
.bp-detail-body .bp-designs .bp-design img{aspect-ratio:2/1}
.bp-detail-body .bp-attach-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.bp-detail-body .bp-docs{padding:0}
.bp-detail-body .bp-carry{margin-top:0}
.bp-move-group{margin:6px 2px -2px;font-size:11px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}
.bp-move.is-back:has(input:checked){border-color:#d98a00;background:#fff8ec}
.bp-action-menu button:disabled{color:var(--muted);cursor:not-allowed;background:transparent}
[data-theme="dark"] .bp-move.is-back:has(input:checked){background:#2a2416}
@media(max-width:1100px){.bp-detail-grid{grid-template-columns:1fr}}
@media(max-width:760px){
  .bp-detail-head{grid-template-columns:1fr;padding:18px 16px}
  .bp-detail-title h1{font-size:23px}
  .bp-detail-actions{justify-content:stretch}
  .bp-detail-actions>*{flex:1}
  .bp-detail-body .bp-block{padding:16px 14px}
  .bp-detail-body .bp-attach-grid{grid-template-columns:1fr 1fr}
  .bp-detail-tabs button{padding:0 12px;font-size:14px}
}

/* ===== horizontal status timeline in the merchant header ===== */
.bp-stepper{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);align-items:start;gap:0;padding:16px 18px;border:1px solid var(--border);border-radius:16px;background:var(--surface-soft)}
.bp-step{position:relative;display:grid;justify-items:center;text-align:center;gap:4px;padding:0 6px}
.bp-step::before{content:"";position:absolute;top:15px;left:calc(-50% + 18px);right:calc(50% + 18px);height:3px;border-radius:3px;background:var(--border)}
.bp-step:first-child::before{display:none}
.bp-step-done::before,.bp-step-red::before,.bp-step-amber::before{background:var(--cta)}
.bp-step-dot{position:relative;z-index:1;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;border:2px solid var(--border-strong);background:var(--surface);color:var(--muted);font-size:13px;font-weight:800}
.bp-step-done .bp-step-dot{background:var(--cta);border-color:var(--cta);color:#fff}
.bp-step-current .bp-step-dot{border-color:var(--cta);color:var(--brand);box-shadow:0 0 0 4px rgba(61,131,245,.15)}
.bp-step-amber .bp-step-dot{background:#d98a00;border-color:#d98a00;color:#fff}
.bp-step-red .bp-step-dot{background:var(--red);border-color:var(--red);color:#fff}
.bp-step strong{font-size:13px;line-height:1.25}
.bp-step small{font-size:12px;color:var(--muted)}
.bp-step-todo strong{color:var(--muted)}
.bp-step-current small{color:var(--brand);font-weight:700}
.bp-step-total{position:relative;display:grid;justify-items:center;align-content:center;text-align:center;gap:2px;min-height:64px;margin-left:10px;padding:8px 12px;border-radius:14px}
.bp-step-total::before{content:"";position:absolute;top:30px;left:-10px;width:10px;height:3px;background:var(--border)}
.bp-step-total strong{font-size:22px;letter-spacing:-.02em;line-height:1.1}
.bp-step-total small{font-size:12px;font-weight:700}
.bp-total-green{background:#e8f7f0;color:#0f6b46}
.bp-total-blue{background:#eef5ff;color:var(--brand)}
.bp-total-red{background:#ffe9eb;color:#c42d3c}
[data-theme="dark"] .bp-total-green{background:#17382c;color:#9be1bd}
[data-theme="dark"] .bp-total-blue{background:#1d2e4a;color:#9cc2ff}
[data-theme="dark"] .bp-total-red{background:#3a2227;color:#ffb3bb}
/* phones: the same timeline runs top to bottom */
@media(max-width:760px){
  .bp-stepper{grid-auto-flow:row;grid-auto-columns:auto;gap:10px;padding:14px}
  .bp-step{grid-template-columns:32px 1fr;justify-items:start;text-align:left;column-gap:12px;row-gap:0;padding:0}
  .bp-step .bp-step-dot{grid-row:1/3}
  .bp-step::before{top:-12px;left:15px;right:auto;width:3px;height:12px}
  .bp-step-total{margin:4px 0 0;justify-items:start;text-align:left;min-height:0;padding:10px 14px}
  .bp-step-total::before{display:none}
}

/* Live Campaigns: one Links column (published campaign links) */
.bp-links-cell{white-space:nowrap}
.bp-pub-links{display:inline-flex;gap:6px;flex-wrap:wrap}
.bp-pub-link{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 10px;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--brand);font-size:12px;font-weight:700;text-decoration:none}
.bp-pub-link svg{width:14px;height:14px}
.bp-pub-link:hover{border-color:#9cbcf6;background:var(--brand-soft)}
.bp-pub-insta{color:#c4246b}
.bp-pub-insta:hover{border-color:#f0a8c8;background:#fff0f6}
[data-theme="dark"] .bp-pub-insta{color:#ff8fc0}
@media(max-width:760px){
  .bp-table-live tr{grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"chk merchant disc" "chk status action" "chk date action" "chk links links"}
  .bp-table-live td.bp-links-cell{grid-area:links;display:block!important}
}

/* Bank Partners pages use the full screen width (no 1600px cap / side gaps on wide screens) */
.content:has(> .page-head + .bp-preview-bar),.content:has(> .bp-detail){max-width:none;margin:0}
.bp-detail{max-width:none}

/* merchant page: the two boxes are the same size and use the same text style */
.bp-detail-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch}
.bp-detail-grid>.bp-col{display:flex;flex-direction:column}
.bp-detail-grid>.bp-col>.bp-block{flex:1;margin-bottom:0}
.bp-detail-body .bp-block-head{min-height:28px}
/* total days box */
.bp-total-label{font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;opacity:.85}
.bp-step-total{min-width:190px}
.bp-step-total strong{font-size:26px}
.bp-step-total small{font-weight:600;opacity:.9}
@media(max-width:1100px){.bp-detail-grid{grid-template-columns:1fr}.bp-detail-grid>.bp-col>.bp-block{margin-bottom:18px}}

/* Move to Live: required design + proof of publication */
.bp-req-group{display:grid;gap:8px;margin:4px 0 12px;padding:14px;border:1.5px solid var(--border);border-radius:14px;background:var(--surface-soft)}
.bp-req-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.bp-req-head strong{font-size:14px}
.bp-req-tag{display:inline-flex;align-items:center;height:22px;padding:0 9px;border-radius:999px;background:#ffe9eb;color:#c42d3c;font-size:11px;font-weight:800;white-space:nowrap}
.bp-req-hint{margin:0;color:var(--muted);font-size:12px}
.bp-req-ok{display:flex;align-items:center;gap:6px;margin:0;color:#0f6b46;font-size:13px;font-weight:600}
.bp-req-ok svg{width:16px;height:16px}
.bp-req-group label{margin-bottom:4px!important}
.bp-drop-sm{min-height:48px}
.bp-proof-list{display:flex;flex-wrap:wrap;gap:6px}
.bp-proof-list:empty{display:none}
.bp-proof-chip{display:inline-flex;align-items:center;gap:5px;height:26px;padding:0 10px;border-radius:999px;background:var(--surface);border:1px solid var(--border);font-size:12px;font-weight:600}
.bp-proof-chip svg{width:13px;height:13px}
.bp-req-count{margin:0;font-size:12px;font-weight:700;color:#c42d3c}
.bp-req-count.is-ok{color:#0f6b46}
.bp-pub-proof{cursor:pointer;color:#5b4bc4;font:inherit;font-size:12px;font-weight:700}
.bp-pub-proof:hover{border-color:#c9bdf5;background:#f4f0ff}
[data-theme="dark"] .bp-req-tag{background:#3a2227;color:#ffb3bb}
[data-theme="dark"] .bp-req-ok,[data-theme="dark"] .bp-req-count.is-ok{color:#9be1bd}

/* Company Information without the logo box: one column */
.bp-company.bp-company-1{grid-template-columns:1fr}
