/* BeatQ Tech Partners portal. Plain CSS, no build step. Compact sizing. */

:root {
    --brand: #5a55df;          /* BeatQ indigo */
    --brand-dark: #4742c1;
    --brand-deep: #2f2b8c;     /* top bar */
    --brand-soft: #eeedfc;
    --green: #0c7a52;          /* BeatQ green */
    --green-soft: #e3f4ec;
    --amber: #9a6400;
    --amber-soft: #fff3d6;
    --red: #c2364a;
    --red-soft: #fdeaed;
    --blue: #1d5fa8;
    --blue-soft: #e4effb;
    --violet: #6b3fb8;
    --violet-soft: #f0e9fb;
    --ink: #182033;
    --text: #2b3445;
    --muted: #697386;
    --line: #e5e8f0;
    --bg: #f3f4f8;
    --white: #fff;
    --radius: 12px;
    --sidebar: 232px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: "Outfit", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.45;
}

a { color: var(--brand-dark); }
h1 { font-size: 20px; font-weight: 700; color: var(--ink); margin: 0 0 14px; }
h2 { font-size: 15.5px; font-weight: 600; color: var(--ink); margin: 0 0 10px; }
/* An icon in front of a page or section title. */
h1 > .icon, h2 > .icon { display: inline-block; vertical-align: -3px; margin-right: 4px; color: var(--brand); }
code { background: var(--bg); padding: 1px 5px; border-radius: 5px; font-size: 12.5px; }
.icon { flex: none; display: block; }

/* ---------- App shell: sidebar + main ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar);
    flex: none;
    background: var(--white);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    transition: width .2s;
}
.side-brand { display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.side-brand img { height: 34px; width: auto; }
.side-brand span { font-weight: 700; font-size: 14px; line-height: 1.2; }
.side-brand small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); }

.side-search { margin: 12px 12px 4px; position: relative; }
.side-search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.side-search input[type=text] { padding-left: 34px; border-radius: 9px; height: 36px; font-size: 13.5px; }

.side-nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 8px; margin: 2px 0;
    border-radius: 9px;
    text-decoration: none; color: var(--ink);
    font-size: 14px; font-weight: 500;
    position: relative;
}
.nav-item:hover { background: var(--bg); }
.nav-item .nav-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-dark); }
.nav-item .nav-icon .icon { width: 16px; height: 16px; }
.nav-item.active { background: var(--brand-soft); font-weight: 600; }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-item.active .nav-icon { background: var(--brand); color: var(--white); }
.nav-item.hidden { display: none; }
.side-foot { padding: 8px 12px; border-top: 1px solid var(--line); }
button.nav-item { width: 100%; border: 0; background: none; cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; text-align: left; }
button.nav-item:hover { background: var(--bg); }

/* Collapsed sidebar: icons only */
.collapsed .sidebar { width: 64px; }
.collapsed .side-brand span, .collapsed .nav-label, .collapsed .side-search { display: none; }
.collapsed .side-brand { padding: 0; justify-content: center; }
.collapsed .nav-item { justify-content: center; padding: 6px; }
.collapsed .collapse-btn .icon { transform: rotate(180deg); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------- Top bar ---------- */
.topbar {
    height: 60px; background: var(--brand-deep);
    display: flex; align-items: center; gap: 12px;
    padding: 0 18px 0 0;
    position: sticky; top: 0; z-index: 20;
}
.collapse-btn {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--white); border: 1px solid var(--line);
    display: grid; place-items: center; cursor: pointer; color: var(--ink);
    margin-left: -14px; flex: none;
}
.collapse-btn .icon { width: 14px; height: 14px; }
.top-btn.menu-btn { display: none; }
.top-search { position: relative; flex: 0 1 440px; }
.top-search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.top-search input[type=text] { height: 38px; border-radius: 9px; border: 0; padding: 0 40px 0 36px; font-size: 14px; }
.top-search kbd {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; font-size: 11.5px; color: var(--muted); font-family: inherit;
}
.top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.top-pill {
    display: flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 9px; margin-right: 4px;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); color: var(--white);
}
.top-pill .icon { width: 18px; height: 18px; }
.top-pill strong { display: block; font-size: 14.5px; line-height: 1.15; }
.top-pill small { display: block; font-size: 11px; opacity: .85; }
.top-btn {
    width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center;
    color: var(--white); background: none; border: 0; cursor: pointer; text-decoration: none; position: relative;
}
.top-btn .icon { width: 19px; height: 19px; }
.top-btn:hover { background: rgba(255,255,255,.12); }
/* Full-screen button: "enter" icon normally, "exit" icon while in full screen. */
#fullscreen-btn .fs-exit, #fullscreen-btn.is-fullscreen .fs-enter { display: none; }
#fullscreen-btn.is-fullscreen .fs-exit { display: block; }

.user-menu { position: relative; margin-left: 4px; }
.user-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-chip {
    display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 11px;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); color: var(--white);
}
.user-chip .icon { width: 15px; height: 15px; }
.avatar {
    width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; position: relative;
    background: #ffcf3f; color: var(--brand-deep); font-weight: 700; font-size: 12.5px;
}
.avatar::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: #2fd47c; border: 2px solid var(--brand-deep); }
.user-chip .user-text { white-space: nowrap; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.user-chip strong { display: block; font-size: 13.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; }
.user-chip small { font-size: 11px; opacity: .85; }
.user-pop {
    position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px;
    background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 6px;
    box-shadow: 0 10px 28px rgba(24,32,51,.14);
}
.user-pop .who { padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 12.5px; color: var(--muted); }
.user-pop .who strong { display: block; color: var(--ink); font-size: 13.5px; }
.pop-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border-radius: 7px; border: 0; background: none; font: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer; text-decoration: none; }
.pop-item:hover { background: var(--bg); }

/* Notifications (the bell) */
.notif-menu { position: relative; }
.notif-menu summary { list-style: none; }
.notif-menu summary::-webkit-details-marker { display: none; }
.notif-badge {
    position: absolute; top: -7px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
    background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
    border: 2px solid var(--brand-deep); box-sizing: content-box;
}
.notif-pop {
    position: absolute; right: -60px; top: calc(100% + 8px); width: min(380px, calc(100vw - 24px)); z-index: 50;
    background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(24,32,51,.16);
    color: var(--ink); overflow: hidden;
}
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.notif-head .muted { font-size: 12px; }
.notif-new { background: var(--red); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11.5px; font-weight: 600; }
.notif-group { padding: 7px 14px 5px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--bg); border-bottom: 1px solid var(--line); }
.notif-item:not(.is-unread) .notif-body strong { font-weight: 600; }
.notif-item:not(.is-unread) .tile { color: var(--muted); }
.notif-item.is-unread .notif-body strong::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--red); vertical-align: middle; }
.notif-list { max-height: 420px; overflow-y: auto; }
.notif-item { display: flex; gap: 10px; padding: 10px 14px; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); }
.notif-item:hover { background: var(--bg); }
.notif-item.is-unread { background: var(--brand-soft); }
.notif-item.is-unread:hover { background: #e4e3fa; }
.notif-item .tile { width: 30px; height: 30px; flex: none; border-radius: 8px; background: var(--white); border: 1px solid var(--line); color: var(--brand-dark); display: grid; place-items: center; }
.notif-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 12.5px; line-height: 1.4; }
.notif-body strong { font-size: 13px; color: var(--ink); }
.notif-body small { font-size: 11px; }
.notif-empty { padding: 18px 14px; margin: 0; font-size: 13px; }
.notif-foot { display: block; padding: 10px 14px; text-align: center; font-size: 13px; font-weight: 600; color: var(--brand-dark); text-decoration: none; }
.notif-foot:hover { background: var(--bg); }

.page { padding: 18px 22px 32px; width: 100%; }

/* ---------- Cards ---------- */
.card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px 18px; margin-bottom: 16px;
}

/* Welcome strip */
.welcome {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 12px 16px; margin-bottom: 16px;
}
.welcome h1 { margin: 0; font-size: 18px; }
.live { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #f5b70a; }
.welcome .chips { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip {
    display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 10px;
    background: var(--bg); border: 1px solid var(--line); text-decoration: none; color: var(--muted); font-size: 13px;
}
.chip strong { color: var(--ink); font-size: 14.5px; }
.chip .tile { width: 28px; height: 28px; border-radius: 7px; }
.chip .tile .icon { width: 15px; height: 15px; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card {
    position: relative; display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
    transition: border-color .15s;
}
a.stat-card:hover { border-color: var(--brand); }
.stat-card .tile { width: 42px; height: 42px; border-radius: 10px; }
.stat-card .tile .icon { width: 20px; height: 20px; }
.stat-card .stat-body { min-width: 0; }
.stat-card .number { font-size: 22px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.stat-card .label { font-size: 13.5px; font-weight: 600; margin-top: 2px; line-height: 1.25; }
.stat-card .sub { color: var(--muted); font-size: 12px; margin-top: 1px; line-height: 1.3; }
.stat-card .dot { position: absolute; top: 12px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

/* Tinted icon tiles */
.tile { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.tile-brand { background: var(--brand-soft); color: var(--brand-dark); }
.tile-green { background: var(--green-soft); color: var(--green); }
.tile-amber { background: var(--amber-soft); color: var(--amber); }
.tile-red { background: var(--red-soft); color: var(--red); }
.tile-blue { background: var(--blue-soft); color: var(--blue); }
.tile-violet { background: var(--violet-soft); color: var(--violet); }
.text-brand { color: var(--brand-dark); }
.text-green { color: var(--green); }
.text-amber { color: var(--amber); }
.text-red { color: var(--red); }
.text-blue { color: var(--blue); }
.text-violet { color: var(--violet); }

/* Panel heading with icon tile (settings pages) */
.panel-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.panel-head .tile { width: 38px; height: 38px; border-radius: 9px; }
.panel-head .tile .icon { width: 19px; height: 19px; }
.panel-head h2 { margin: 0 0 1px; font-size: 16px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 13.5px; color: var(--ink); }
.field { margin-bottom: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }
input[type=text], input[type=email], input[type=password], input[type=tel], select, textarea {
    width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px;
    font-size: 14px; font-family: inherit; color: var(--ink); background: var(--white);
}
input[type=text], input[type=email], input[type=password], input[type=tel], select { height: 38px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 40px; }
.input-wrap .eye { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 5px; cursor: pointer; color: var(--muted); border-radius: 6px; }
.input-wrap .eye .icon { width: 17px; height: 17px; }
.input-wrap .eye:hover { color: var(--ink); }
.code-input { font-size: 22px !important; letter-spacing: 8px; text-align: center; height: 46px !important; }
.hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.error-text { color: var(--red); font-size: 12.5px; margin-top: 4px; }
/* Email local part + fixed domain + button (Partner accounts) */
.add-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.addon-group { display: flex; }
.addon-group input[type=text] { border-radius: 9px 0 0 9px; min-width: 0; }
.addon-group input.invalid { border-color: var(--red); }
.addon { display: flex; align-items: center; padding: 0 10px; height: 38px; background: var(--bg); border: 1px solid var(--line); border-left: 0; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.addon-group .btn { border-radius: 0 9px 9px 0; height: 38px; }
.addon-group .addon:last-child { border-radius: 0 9px 9px 0; }
@media (max-width: 860px) { .add-row { grid-template-columns: 1fr; gap: 12px; } }
.check { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: 12.5px; color: var(--muted); margin-top: 6px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 8px 16px; border: 1px solid var(--brand); border-radius: 9px;
    background: var(--brand); color: var(--white);
    font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; font-family: inherit; line-height: 1.3;
}
.btn .icon { width: 16px; height: 16px; }
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-block { width: 100%; }
.btn-light { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-light:hover { background: var(--bg); border-color: var(--line); }
.btn-small { padding: 4px 10px; font-size: 12.5px; border-radius: 7px; gap: 5px; }
.btn-small .icon { width: 14px; height: 14px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.link-button { background: none; border: 0; padding: 0; color: var(--brand-dark); cursor: pointer; font: inherit; text-decoration: underline; }
.inline { display: inline; }

/* ---------- Messages ---------- */
.alert { padding: 9px 14px; border-radius: 9px; margin-bottom: 14px; font-size: 13.5px; word-break: break-word; }
.alert-success { background: var(--green-soft); color: var(--green); }
.alert-error { background: var(--red-soft); color: var(--red); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12.5px; }
tbody tr:hover td { background: #fafbfd; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.badge-active { background: var(--green-soft); color: var(--green); }
.badge-invited { background: var(--amber-soft); color: var(--amber); }
.badge-disabled { background: var(--red-soft); color: var(--red); }
.badge-org { background: var(--bg); color: var(--ink); }

.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar form { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar input, .toolbar select { width: auto; }

/* Older stat tiles still used on some pages */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat .number { font-size: 22px; font-weight: 700; color: var(--ink); }
.stat .label { color: var(--muted); font-size: 12.5px; }
.stat-link { display: block; text-decoration: none; color: inherit; }
.stat-link:hover { border-color: var(--brand); }

/* Onboarding statuses */
.status { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.status-pending_review { background: var(--bg); color: var(--ink); border: 1px solid var(--line); }
.status-under_review { background: var(--blue-soft); color: var(--blue); }
.status-documents_required { background: var(--amber-soft); color: var(--amber); }
.status-review_completed { background: var(--violet-soft); color: var(--violet); }
.status-active { background: var(--green-soft); color: var(--green); }

/* Sub-merchant detail page */
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.detail-head h1 { margin: 0 0 2px; }
.columns { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 5px 16px; font-size: 13.5px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; word-break: break-word; }
.section-title { font-size: 13.5px; font-weight: 600; margin: 14px 0 6px; color: var(--brand-dark); }
details summary { cursor: pointer; font-weight: 600; margin-bottom: 8px; }
.file-list { list-style: none; padding: 0; margin: 0; }
.file-list li { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.file-list li:last-child { border-bottom: 0; }

/* Pagination under every list: "Showing 1–25 of 80" and page numbers. */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; }
.pagination { display: flex; gap: 5px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-block; min-width: 30px; text-align: center; padding: 4px 9px; border: 1px solid var(--line); border-radius: 7px; text-decoration: none; font-size: 12.5px; }
.pagination a:hover { background: var(--brand-soft); border-color: var(--brand-soft); }
.pagination .page-current { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* Merchant list: queue tabs, "Waiting on" labels, next step, main button */
.tabs-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 13px; background: var(--white); }
.tab:hover { border-color: var(--brand); color: var(--brand-dark); }
.tab-count { background: var(--bg); border-radius: 999px; padding: 0 7px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.tab-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.tab-active:hover { color: #fff; }
.tab-active .tab-count { background: rgba(255,255,255,.22); color: #fff; }
.tab-action:not(.tab-active) { border-color: var(--amber-soft); background: var(--amber-soft); color: var(--amber); font-weight: 600; }
.tab-action:not(.tab-active) .tab-count { background: var(--white); color: var(--amber); }
.merchant-table td { vertical-align: top; }
.merchant-table .next-step { max-width: 320px; }
.who { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--bg); color: var(--muted); }
.who-you { background: var(--brand-soft); color: var(--brand-dark); }
.who-merchant { background: var(--amber-soft); color: var(--amber); }
.who-zest, .who-stanbic, .who-partners { background: var(--blue-soft); color: var(--blue); }
.who-beatq { background: var(--violet-soft); color: var(--violet); }
.who-none { background: var(--green-soft); color: var(--green); }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions > form.inline, .row-actions > .btn, .row-actions > details { vertical-align: middle; }
.row-actions details.row-menu { display: inline-block; }

/* ---------- Signed-out pages ---------- */
.guest-wrap { max-width: 400px; margin: 56px auto; padding: 0 16px; }
.guest-logo { text-align: center; margin-bottom: 16px; }
.guest-logo img { height: 48px; }
.guest-logo div { font-weight: 600; margin-top: 8px; color: var(--ink); font-size: 14.5px; }
.guest-wrap .card { padding: 22px; }

/* ---------- Small screens ---------- */
.backdrop { display: none; }
@media (max-width: 1100px) {
    .columns { grid-template-columns: 1fr; }
    .top-pill, .top-btn.hide-sm { display: none; }
}
@media (max-width: 860px) {
    .sidebar { position: fixed; left: 0; top: 0; z-index: 40; transform: translateX(-100%); transition: transform .2s; width: 240px; }
    .menu-open .sidebar { transform: none; }
    .menu-open .backdrop { display: block; position: fixed; inset: 0; background: rgba(24,32,51,.4); z-index: 30; }
    .collapse-btn { display: none; }
    .top-btn.menu-btn { display: grid; }
    .topbar { height: 56px; padding: 0 12px; gap: 8px; }
    .top-search { flex: 1; }
    .top-search kbd, .user-chip .user-text, .user-chip > .icon { display: none; }
    .user-chip { padding: 3px; }
    .page { padding: 14px 12px 28px; }
    .welcome .chips { margin-left: 0; }
    .form-grid { grid-template-columns: 1fr; }
}

/* Button that is saving or sending (set by public/js/portal.js) */
button:disabled { cursor: not-allowed; }
.is-loading { opacity: .75; cursor: progress !important; }
.is-loading::before {
    content: ""; flex: none; display: inline-block; width: 14px; height: 14px; margin-right: 2px; vertical-align: -2px;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: portal-spin .7s linear infinite;
}
.link-button.is-loading::before { margin-right: 6px; }
@keyframes portal-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .is-loading::before { animation-duration: 2s; } }

/* Sign-in pages: gradient in the BeatQ logo colours (lavender, navy, red, purple) */
.guest-page {
    min-height: 100vh;
    position: relative;
    /* Logo colours: red (top right) through magenta to purple-violet (bottom left). */
    background-color: #b83ad6;
    background-image: linear-gradient(210deg, #f0283c 0%, #e8306a 22%, #d63ab8 48%, #a948e8 72%, #7b5cec 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}
/* The large, slightly darker see-through shape on the right, with a rounded corner pointing left. */
.guest-page::before {
    content: "";
    position: fixed;
    width: 150vmax;
    height: 150vmax;
    left: 68vw;
    top: 24vh;
    border-radius: 36px;
    transform: rotate(-30deg);
    transform-origin: top left;
    background: linear-gradient(200deg, rgba(120, 0, 30, .22), rgba(70, 0, 90, .16));
    pointer-events: none;
    z-index: 0;
}
.guest-page .guest-wrap { position: relative; z-index: 1; }
.guest-page .guest-wrap { margin: 0 auto; padding: 40px 16px; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.guest-logo-badge {
    display: inline-grid; place-items: center; width: 80px; height: 80px; border-radius: 20px;
    background: #eeedfc; box-shadow: 0 6px 18px rgba(6, 36, 102, .12);
}
.guest-page .guest-logo img { height: 58px; }
.guest-page .guest-logo div { color: #062466; }
.guest-box {
    background: var(--white); border-radius: 20px; padding: 28px 28px 20px;
    box-shadow: 0 24px 60px rgba(6, 36, 102, .22), 0 4px 14px rgba(6, 36, 102, .08);
}
.guest-form { border-top: 1px solid var(--line); padding-top: 18px; }
.guest-page .guest-logo { margin-bottom: 18px; }
.guest-page .btn { background: #062466; border-color: #062466; }
.guest-page .btn:hover { background: #0b2f80; border-color: #0b2f80; }
.guest-page a { color: #d32518; }
.guest-note { text-align: center; font-size: 12px; color: var(--muted); margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }

/* Sign-in box: centred heading and hint */
.guest-form h1 { text-align: center; }
.guest-form .hint { text-align: center; }
/* Hidden on screen, still read out by screen readers */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Copyright footer */
.main .page { flex: 1; }
.app-footer { padding: 14px 22px; border-top: 1px solid var(--line); background: var(--white); color: var(--muted); font-size: 12.5px; text-align: center; }
.guest-footer { margin-top: 18px; text-align: center; font-size: 12.5px; color: rgba(255, 255, 255, .9); text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }

/* Correction list on the merchant page */
.correction-row { background: var(--bg); border-radius: 9px; padding: 10px 12px; }
.correction-row-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13.5px; }
.correction-row-head .link-button { font-size: 12.5px; }

/* Merchant list: quick actions and their pop-up */
.row-actions .btn-small { padding: 4px 9px; }
.quick-dialog {
    width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 0;
    border: 0; border-radius: 14px; box-shadow: 0 24px 60px rgba(24, 32, 51, .3); color: var(--text);
}
.quick-dialog::backdrop { background: rgba(24, 32, 51, .45); }
.quick-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--white); z-index: 1; }
.quick-head h2 { margin: 0; font-size: 15.5px; }
.quick-close { color: var(--muted); }
.quick-close:hover { background: var(--bg); color: var(--ink); }
.quick-body { padding: 16px 18px 18px; }
.quick-loading { display: flex; align-items: center; gap: 8px; color: var(--muted); margin: 0; }

/* Merchant list: "⋯" actions menu */
.row-menu { position: relative; display: inline-block; }
.row-menu summary { list-style: none; }
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu-btn { width: 34px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.row-menu-btn:hover, .row-menu[open] .row-menu-btn { background: var(--brand-soft); border-color: var(--brand-soft); color: var(--brand-dark); }
.row-menu-pop {
    position: fixed; z-index: 50; min-width: 250px; padding: 6px;
    background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(24, 32, 51, .18);
}
.row-menu-head { padding: 6px 10px 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.row-menu-sep { height: 1px; background: var(--line); margin: 4px 0; }
.row-menu form { margin: 0; }
.menu-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: 13.5px; color: var(--ink); text-decoration: none; cursor: pointer; text-align: left; white-space: nowrap; }
.menu-item:hover { background: var(--bg); }
.menu-item .icon { color: var(--muted); }
.menu-item-strong { color: var(--brand-dark); font-weight: 600; }
.menu-item-strong .icon { color: var(--brand-dark); }

/* Stanbic IBTC forms on the merchant page, and their PDF preview pop-up */
.form-list { list-style: none; margin: 0; padding: 0; }
.form-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 9px 0; border-top: 1px solid var(--line); }
.form-list li:first-child { border-top: 0; }
.form-name { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; }
.form-actions { display: inline-flex; gap: 6px; }
.pdf-dialog { width: min(980px, calc(100vw - 24px)); height: min(88vh, 920px); max-height: none; padding: 0; }
.pdf-dialog[open] { display: flex; flex-direction: column; }
.pdf-dialog .quick-head > span { display: inline-flex; align-items: center; gap: 6px; }
.pdf-body { position: relative; flex: 1; min-height: 0; background: var(--bg); }
.pdf-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pdf-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0; color: var(--muted); font-size: 13.5px; }
.pdf-wait[hidden] { display: none; }
