:root {
    color-scheme: light;
    --ink: #14243d;
    --muted: #52637a;
    --navy: #101d34;
    --navy-light: #243e5f;
    --canvas: #eff3f8;
    --paper: #fff;
    --line: #dbe3ee;
    --accent: #bb1e35;
    --accent-hover: #981329;
    --teal: #087780;
    --focus: #2164bd;
    --radius: 18px;
    --shadow: 0 10px 32px #1d355210, 0 1px 3px #1d355209;
    --space: clamp(16px, 3vw, 32px);
    --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: radial-gradient(ellipse at 86% 0, #e2eaf6 0, transparent 42rem), var(--canvas);
    font: 400 1rem/1.55 var(--font);
}

img, svg, video {
    max-width: 100%;
}

iframe {
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

h1, h2, h3, h4 {
    color: inherit;
    line-height: 1.18;
    margin: 0 0 .65em;
}

h1 {
    font-size: clamp(1.75rem, 3vw, 2.55rem);
    letter-spacing: -.035em;
}

h2 {
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    letter-spacing: -.015em;
}

h3 {
    font-size: 1.05rem;
}

p {
    margin: 0 0 .85em;
}

p:last-child {
    margin-bottom: 0;
}

small, .muted, .summary-note {
    color: var(--muted);
}

:where(a) {
    color: #195997;
    text-underline-offset: .18em;
}

:where(a:hover) {
    color: var(--accent-hover);
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 1.5rem 0;
}

code, pre {
    font-family: ui-monospace, monospace;
}

pre {
    overflow: auto;
    padding: 1rem;
    border-radius: 10px;
    background: #eaf0f8;
}

body > :where(h1,h2,h3,p,form,table,ul,ol) {
    width: min(1160px, calc(100% - 2 * var(--space)));
    margin-inline: auto;
}

body > h1 {
    margin-top: var(--space);
}

body > :where(form,table) {
    margin-block: 16px 24px;
}

body > form {
    padding: var(--space);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

body > :where(header,nav) {
    padding: 12px var(--space);
}

body > :where(header,nav) a {
    text-decoration: none;
    font-weight: 650;
}

body > nav {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

body > nav a {
    display: inline-block;
    margin: 3px 12px 3px 0;
}

main, .dashboard, .list-card, .admin-main {
    width: min(1420px, calc(100% - 2 * var(--space)));
    min-width: 0;
    margin: var(--space) auto clamp(28px, 5vw, 64px);
}

:where(main, .admin-main, .list-card, .dashboard) > * {
    min-width: 0;
}

.dashboard {
    display: grid;
    gap: clamp(14px, 2.4vw, 24px);
}

.list-card, .dashboard-heading, .summary-card, .ai-overview,
.dashboard > section:not(.summary-grid), .admin-card, .login-card,
.payment-card, .form-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow);
}

.list-card {
    overflow: clip;
}

.dashboard .list-card, .admin-main .list-card, main .list-card {
    width: 100%;
    margin: 0;
}

.dashboard-heading, .list-header, .admin-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: var(--space);
}

.list-header > *, .dashboard-heading > * {
    min-width: 0;
}

.list-header h1, .dashboard-heading h1, .admin-heading h1 {
    margin-bottom: .18em;
}

.list-header > :only-child {
    margin-bottom: 0;
}

.dashboard-heading, .admin-heading {
    background-color: var(--navy);
    background-image: radial-gradient(ellipse at 97% 0, #45668a66, transparent 62%),
        repeating-linear-gradient(118deg, transparent 0 28px, #ffffff08 29px 30px),
        linear-gradient(112deg, var(--navy), var(--navy-light));
    color: #fff;
    border: 1px solid #314763;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.dashboard-heading :is(p,small), .admin-heading :is(p,small) {
    color: #d6e3f3;
}

.dashboard-heading a:not(.new-payment):not(.details-link),
.admin-heading a:not(.new-payment):not(.details-link) {
    color: #fff;
}

.section-title {
    margin: 0;
}

:where(.topbar, .navbar, .site-header) {
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

:where(.topbar, .navbar, .site-header) :where(.logo img, img.logo, .brand img) {
    width: auto;
    max-height: 44px;
    object-fit: contain;
}

:where(.sidebar, .side-menu) {
    background: var(--paper);
    color: var(--ink);
    border-inline-end: 1px solid var(--line);
}

:where(.sidebar, .side-menu) a {
    color: #263e60;
    text-decoration: none;
}

:where(.sidebar, .side-menu) a:hover, :where(.sidebar, .side-menu) a[aria-current="page"] {
    color: #a61a30;
    background: #fff0f3;
}

.list-card > h2 {
    margin: 0;
    padding: 18px var(--space);
    border-top: 1px solid var(--line);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(12px, 2vw, 20px);
}

.summary-card {
    --metric: #255992;
    padding: clamp(16px, 2.4vw, 25px);
    border-top: 3px solid var(--metric);
}

.summary-card.success {
    --metric: #106847;
}

.summary-card.waiting {
    --metric: #885408;
}

.summary-card.danger {
    --metric: #a51d38;
}

.summary-card h2, .summary-label {
    color: var(--muted);
    font-size: .86rem;
    font-weight: 650;
}

.summary-number {
    color: var(--metric);
    font-size: clamp(1.8rem, 3.4vw, 2.75rem);
    font-weight: 760;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    margin-block: 10px;
}

.summary-note {
    font-size: .82rem;
}

button, input, select, textarea {
    font: inherit;
}

label {
    font-weight: 650;
}

.field {
    min-width: 0;
}

.field label, form label {
    display: block;
    margin-bottom: 6px;
}

input:not([type=checkbox],[type=radio],[type=hidden],[type=submit],[type=button],[type=reset],[type=image]),
select, textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #bfccdd;
    border-radius: 10px;
    color: var(--ink);
    background: var(--paper);
}

input::placeholder, textarea::placeholder {
    color: #64758a;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

input:is([type=checkbox],[type=radio]) {
    accent-color: var(--accent);
}

:where(input, select, textarea):disabled {
    background: #edf1f6;
}

:where(button, input[type=submit], input[type=button], input[type=reset], .new-payment, .details-link, .btn, .button, .logout-btn) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4em;
    min-height: 42px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 680;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s, box-shadow .15s;
}

:where(button, input[type=submit], input[type=button], .new-payment, .btn, .button, .logout-btn) {
    background: var(--navy);
    color: #fff;
}

:where(button, input[type=submit], input[type=button], .btn, .button, .logout-btn):hover {
    background: #284463;
    color: #fff;
}

.new-payment, .btn-primary {
    background: var(--accent);
    color: #fff;
}

.new-payment:hover, .btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
}

.details-link, input[type=reset], .btn-secondary {
    color: #263e60;
    background: #f5f8fc;
    border: 1px solid #cbd7e6;
}

.details-link:hover, input[type=reset]:hover, .btn-secondary:hover {
    color: #182c4b;
    background: #e8eff8;
}

:where(button,input):disabled {
    cursor: not-allowed;
    opacity: .58;
}

.payment-filters, .alerts-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
    padding: 18px var(--space);
    background: #f7f9fc;
    border-block: 1px solid var(--line);
}

:where(.payment-filters, .alerts-filters) .field {
    flex: 1 1 160px;
}

.payment-filters .field:first-child {
    flex-grow: 1.35;
}

.alerts-intro, .alerts-count {
    padding-inline: var(--space);
    color: var(--muted);
}

.alerts-intro {
    padding-bottom: 8px;
}

.fraud-alerts-page .table-wrapper table {
    min-width: 890px;
}

.alerts-count {
    margin-block: 15px;
    font-weight: 620;
}

.alerts-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 14px;
    padding: 20px;
}

.table-wrapper {
    max-width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--paper);
}

.table-wrapper table {
    min-width: 640px;
}

.payment-details .table-wrapper table {
    min-width: 780px;
}

th, td {
    padding: 13px clamp(10px, 1.6vw, 20px);
    text-align: start;
    vertical-align: middle;
    border-bottom: 1px solid #e7edf5;
}

th {
    background: #eaf0f7;
    color: #40536e;
    font-size: .79rem;
    font-weight: 750;
    letter-spacing: .015em;
}

td {
    font-size: .9rem;
}

tbody tr:last-child td {
    border-bottom-color: transparent;
}

tbody tr:hover > td {
    background-color: #f6f9fd;
}

td small {
    display: block;
    margin-top: 4px;
}

body > table, .admin-table {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
}

.amount, .summary-amount {
    font-weight: 730;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.currency {
    font-size: .77em;
    font-weight: 580;
    color: var(--muted);
    margin-inline-start: .25em;
}

.empty-message {
    padding: 28px 18px;
    color: var(--muted);
    text-align: center;
}

.alerts-reasons {
    min-width: 220px;
    max-width: 380px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.alerts-reasons ul, .attempt-analysis ul {
    padding-inline-start: 1.2em;
    margin: .45em 0;
}

.status, .badge, .ai-demo-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    background: #e9eff7;
    color: #304762;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: .78rem;
    line-height: 1.4;
    font-weight: 720;
}

.status::before {
    content: "";
    background: currentColor;
    flex: 0 0 6px;
    height: 6px;
    border-radius: 50%;
}

:is(.status,.badge):is(.paid,.success,.active,.approved) {
    color: #126044;
    background: #def3e8;
}

:is(.status,.badge):is(.failed,.danger,.rejected,.inactive) {
    color: #9d2037;
    background: #fae5eb;
}

:is(.status,.badge):is(.pending,.waiting,.warning,.unpaid) {
    color: #754608;
    background: #fff0d4;
}

.ai-overview {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space);
    align-items: center;
    padding: var(--space);
    border-inline-start: 4px solid var(--teal);
}

.ai-overview-content {
    min-width: 0;
    overflow-wrap: anywhere;
}

.ai-demo-label {
    margin-bottom: 10px;
    background: #e4f2f4;
    color: #125c64;
}

.ai-result-details, .details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(min(100%, 180px),1fr));
    gap: 12px;
}

.ai-result-details {
    margin-block: 12px;
}

.ai-result-details > *, .detail-item {
    padding: 12px 14px;
    border-radius: 11px;
    background: #f3f6fa;
    min-width: 0;
    overflow-wrap: anywhere;
}

.ai-score-note, .ai-gauge-label {
    color: var(--muted);
    font-size: .84rem;
}

.ai-gauge-wrapper {
    display: grid;
    justify-items: center;
    gap: 8px;
    text-align: center;
}

.ai-gauge {
    width: clamp(106px, 13vw, 146px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    border-radius: 50%;
    padding: 9px;
    background: conic-gradient(var(--teal) calc(clamp(0, var(--anomaly-score, 0), 100) * 1%), #e2e9f2 0);
}

.ai-gauge-center {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background: var(--paper);
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

.ai-gauge-center strong {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.payment-summary, .monitoring-settings {
    padding: var(--space);
    border-top: 1px solid var(--line);
}

.payment-details > .details-grid {
    padding: var(--space);
}

.summary-amount {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.attempt-analysis {
    max-width: min(700px, calc(100vw - 2 * var(--space) - 36px));
    margin: 5px 0;
    padding: clamp(12px, 2.5vw, 22px);
    background: #f4f7fb;
    border: 1px solid #d4dfed;
    border-inline-start: 4px solid #43688f;
    border-radius: 12px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.attempt-analysis:has(.status.pending) {
    border-inline-start-color: #a76509;
    background: #fffbf2;
}

.attempt-analysis form, .monitoring-settings form {
    display: grid;
    gap: 10px;
    max-width: 620px;
}

.attempt-analysis form {
    margin-top: 16px;
}

.attempt-analysis form button, .monitoring-settings form button {
    justify-self: start;
}

.review-history {
    margin-block: 16px;
}

.review-entry {
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--paper);
}

.login-card, .form-card, .payment-card {
    margin: var(--space) auto;
    width: min(calc(100% - 2 * var(--space)), 580px);
    padding: var(--space);
}

:where(.login-card, .payment-card, .form-card) .field {
    margin-bottom: 14px;
}

.admin-card {
    padding: var(--space);
    margin-block: 16px;
}

.admin-shell {
    display: grid;
    grid-template-columns: 230px minmax(0,1fr);
    min-height: 100vh;
}

.admin-shell .admin-main {
    width: calc(100% - 2 * var(--space));
}

.admin-sidebar {
    padding: 24px 14px;
    background: var(--navy);
    color: #f1f6fd;
}

.admin-sidebar a {
    display: block;
    padding: 10px 12px;
    border-radius: 9px;
    color: #eef4fc;
    text-decoration: none;
}

.admin-sidebar a:hover, .admin-sidebar a[aria-current="page"] {
    background: #2e4b71;
    color: #fff;
}

.admin-sidebar :where(ul,ol) {
    padding: 0;
    list-style: none;
}

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

    .admin-shell {
        grid-template-columns: minmax(0,1fr);
    }

    .admin-sidebar {
        padding: 12px;
    }

    .admin-sidebar a {
        display: inline-block;
    }
}

@media (max-width: 560px) {
    :root {
        --space: 14px;
        --radius: 13px;
    }

    .ai-overview {
        grid-template-columns: minmax(0,1fr);
    }

    .ai-gauge-wrapper {
        justify-items: start;
        text-align: start;
    }

    :where(.payment-filters,.alerts-filters) .field {
        flex-basis: 100%;
    }

    body > table, table.admin-table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
    }

    th, td {
        padding: 11px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0s !important;
    }
}

/* Gate-E workspace | 2026 visual refresh */
:root {
    --ink:#17273d;
    --muted:#53657c;
    --navy:#112139;
    --navy-light:#253e5c;
    --canvas:#f2f5f9;
    --line:#dde5ef;
    --accent:#af2039;
    --accent-hover:#8d1730;
    --teal:#08676d;
    --radius:14px;
    --space:clamp(15px,2.6vw,28px);
    --shadow:0 4px 14px #1121390a;
}

body {
    background:linear-gradient(165deg,#e7eef7 0,#f3f6fa 320px);
}

.gx-brand {
    display:inline-flex;
    flex:none;
    align-items:center;
    gap:9px;
    font-size:1.1rem;
    font-weight:800;
    letter-spacing:-.045em;
    white-space:nowrap;
}

.gx-mark {
    display:grid;
    place-items:center;
    width:29px;
    height:29px;
    border-radius:8px;
    background:var(--accent);
    color:#fff;
}

.gx-strip {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    gap:9px 18px;
    padding:10px var(--space);
    background:#fff;
    border-bottom:1px solid var(--line);
}

.dashboard > .gx-strip {
    border:1px solid var(--line);
    border-radius:var(--radius);
}

.gx-strip nav {
    display:flex;
    flex-wrap:wrap;
    gap:4px;
}

.gx-strip nav a {
    color:#415570;
    font-weight:680;
    font-size:.84rem;
    padding:7px 10px;
    border-radius:7px;
    text-decoration:none;
}

.gx-strip nav a:hover {
    background:#f0f4f9;
}

.gx-strip nav a[aria-current=page] {
    color:#8a2039;
    background:#fcecf0;
}

.gx-merchant .dashboard-heading {
    position:relative;
    overflow:hidden;
    isolation:isolate;
    padding:clamp(22px,3.4vw,42px) var(--space);
    background:
        radial-gradient(ellipse at 94% 35%,#395d86 0,transparent 64%),
        linear-gradient(110deg,#112139,#203856);
}

.gx-merchant .dashboard-heading::after {
    content:"";
    position:absolute;
    inset:0;
    z-index:-1;
    pointer-events:none;
    background:repeating-radial-gradient(ellipse at 97% 20%,transparent 0 26px,#cfdef023 27px 28px);
    mask-image:linear-gradient(90deg,transparent 32%,#000);
}

.dashboard-heading .new-payment {
    background:#fff;
    color:#172b48;
    border-color:#ffffffb0;
}

.dashboard-heading .new-payment:hover {
    background:#edf3fa;
    color:#14243d;
}

.gx-merchant .summary-card {
    border-top:1px solid var(--line);
    position:relative;
    overflow:hidden;
}

.gx-merchant .summary-card::before {
    content:"";
    width:32px;
    height:4px;
    border-radius:999px;
    display:block;
    background:var(--metric);
    margin-bottom:12px;
}

.gx-merchant .summary-card h2 {
    margin-bottom:6px;
}

.gx-merchant .summary-number {
    letter-spacing:-.045em;
}

.dashboard > .gx-review {
    border-inline-start:4px solid #a76509;
    background:#fffdf9;
}

.gx-review .list-header {
    padding-block:16px;
}

.gx-review .list-header p {
    color:#53657c;
    margin-top:4px;
    font-size:.88rem;
}

.gx-merchant .ai-overview {
    background:linear-gradient(112deg,#fff 56%,#ecf6f6);
}

.gx-merchant .ai-gauge {
    width:clamp(94px,11vw,126px);
}

.gx-merchant .ai-score-note {
    max-width:75ch;
}

.gx-merchant .list-card > .list-header {
    padding-block:22px;
}

.gx-merchant .list-header h1 {
    font-size:clamp(1.55rem,2.6vw,2.15rem);
}

.gx-merchant :is(.payment-filters,.alerts-filters) {
    background:#f6f8fc;
}

.gx-merchant .table-wrapper {
    scrollbar-color:#aabbd0 #edf2f8;
}

.gx-merchant .table-wrapper :is(th,td) {
    font-variant-numeric:tabular-nums;
}

.gx-merchant tbody tr:nth-child(even) > td {
    background:#f9fbfd;
}

.gx-merchant tbody tr:hover > td {
    background:#eef4fb;
}

.gx-merchant .payment-details .detail-item {
    border:1px solid #e3eaf3;
    background:#f8fafd;
}

.gx-merchant .attempt-analysis {
    background:#f3f7fc;
}

.gx-merchant .attempt-analysis:has(.status.pending) {
    background:#fffbf2;
}

.gx-merchant .monitoring-settings form {
    padding:16px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#f8fafd;
}

.payment-card .card-header {
    margin-bottom:20px;
}

.payment-card .card-header p {
    color:var(--muted);
}

.payment-card form .field {
    margin-bottom:15px;
}

.payment-card form button[type=submit] {
    background:var(--accent);
    color:#fff;
}

.payment-card form button[type=submit]:hover {
    background:var(--accent-hover);
}

.checkout-card {
    width:min(980px,calc(100% - 2 * var(--space)));
}

.checkout-card iframe {
    display:block;
    width:100%;
    border:0;
}

.gx-admin {
    display:grid;
    place-items:center;
    padding:var(--space);
    min-height:100svh;
    background:
      radial-gradient(ellipse at 85% 5%,#dbe6f6,transparent 55%),
      linear-gradient(130deg,#eef3f9,#f9fafc);
}

.gx-admin .gx-admin-card {
    margin:0;
    width:min(100%,530px);
    padding:0;
    overflow:hidden;
    border-top:4px solid var(--accent);
    border-radius:17px;
    box-shadow:0 16px 42px #192d4e16;
}

.gx-admin.gx-create .gx-admin-card {
    width:min(100%,660px);
}

.gx-admin-top {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    padding:14px var(--space);
    background:#f8fafd;
    border-bottom:1px solid var(--line);
}

.gx-context {
    color:#4a5e78;
    font-size:.77rem;
    font-weight:710;
}

.gx-admin-card .card-header {
    padding:23px var(--space) 0;
    margin:0 0 18px;
}

.gx-admin-card .card-header h1 {
    font-size:clamp(1.65rem,3vw,2.2rem);
    margin-bottom:6px;
}

.gx-admin-card form {
    padding:0 var(--space) 24px;
}

.gx-admin-card form input:not([type=hidden]) {
    background:#f9fbfd;
}

.gx-admin-card form input:focus {
    background:#fff;
    border-color:var(--focus);
}

.gx-admin-card button[type=submit] {
    min-height:46px;
}

.gx-login .gx-admin-card button[type=submit] {
    width:100%;
}

.gx-admin-card > [role=alert] {
    margin:0 var(--space) 15px;
    padding:10px 12px;
    border-inline-start:3px solid var(--accent);
    border-radius:8px;
    background:#fceef1;
    color:#8d1730;
    overflow-wrap:anywhere;
}

.gx-back {
    padding:13px var(--space);
    border-top:1px solid var(--line);
    background:#f8fafd;
}

.gx-back a {
    font-size:.85rem;
    font-weight:660;
}

@media (max-width:560px) {
    .gx-strip {
        align-items:flex-start;
    }

    .gx-strip nav {
        flex-basis:100%;
    }

    .gx-strip nav a {
        padding-inline:8px;
    }

    .gx-merchant .dashboard-heading {
        align-items:flex-start;
    }

    .gx-merchant .ai-gauge-wrapper {
        justify-items:start;
    }
}

/* Bound the original sidebar/header logo without changing navigation. */
body.has-sidebar > img:is([src*="logo" i], [alt*="gate" i]),
body.has-sidebar > :not(main) img:is([src*="logo" i], [alt*="gate" i], .logo),
body.has-sidebar > :not(main) a:is([href="index.php"], [href$="/index.php"]) img,
body.has-sidebar > a:is([href="index.php"], [href$="/index.php"]) > img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: min(142px, 42vw) !important;
    max-height: 42px !important;
    object-fit: contain;
}

/* Merchant login */
body.has-sidebar main.payment-card:has(form input[name="token"]):has(form input[name="password"]) {
    box-sizing: border-box;
    width: min(460px, calc(100% - 32px));
    margin: clamp(24px, 7vh, 64px) auto;
    padding: 0;
    overflow: hidden;
    background: #fff;
    color: #17273d;
    border: 1px solid #dce5ef;
    border-radius: 20px;
    box-shadow: 0 18px 48px #11213916;
}

main.payment-card:has(form input[name="token"]):has(form input[name="password"]) > .card-header {
    margin: 0;
    padding: 26px clamp(18px, 5vw, 30px);
    background: linear-gradient(125deg, #101f35, #254564);
    color: #fff;
    border-bottom: 3px solid #c42b47;
}

main.payment-card:has(form input[name="token"]):has(form input[name="password"]) .card-header h1 {
    margin: 0 0 6px;
    color: #fff;
    font-size: clamp(1.55rem, 4vw, 1.95rem);
    letter-spacing: -.035em;
}

main.payment-card:has(form input[name="token"]):has(form input[name="password"]) .card-header p {
    margin: 0;
    color: #dce8f5;
}

main.payment-card:has(form input[name="token"]):has(form input[name="password"]) > form {
    padding: 24px clamp(18px, 5vw, 30px) 28px;
}

main.payment-card:has(form input[name="token"]):has(form input[name="password"]) .field {
    margin-bottom: 16px;
}

main.payment-card:has(form input[name="token"]):has(form input[name="password"]) .field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 650;
}

main.payment-card:has(form input[name="token"]):has(form input[name="password"]) .field input {
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #cad6e5;
    border-radius: 10px;
    background: #f8fafd;
    color: #17273d;
    font: inherit;
}

main.payment-card:has(form input[name="token"]):has(form input[name="password"]) .field input:focus {
    outline: 2px solid #4874ad;
    outline-offset: 2px;
    background: #fff;
}

main.payment-card:has(form input[name="token"]):has(form input[name="password"]) button[type="submit"] {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 10px;
    background: #a91e3a;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

main.payment-card:has(form input[name="token"]):has(form input[name="password"]) button[type="submit"]:hover {
    background: #86172e;
}

main.payment-card:has(form input[name="token"]):has(form input[name="password"]) > [role="alert"] {
    margin: 16px 18px 0;
    padding: 10px 12px;
    border-inline-start: 3px solid #a91e3a;
    border-radius: 8px;
    background: #fcebf0;
    color: #85162f;
}

/* Admin merchant directory */
main.list-card:has(> .list-header a[href="addMerchant.php"]) {
    box-sizing: border-box;
    width: min(1120px, calc(100% - 32px));
    max-width: none;
    margin: clamp(22px, 5vw, 52px) auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid #dce5ef;
    border-radius: 18px;
    background: #fff;
    color: #17273d;
    box-shadow: 0 14px 40px #11213914;
}

main.list-card:has(> .list-header a[href="addMerchant.php"]) > .list-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: clamp(18px, 3vw, 30px);
    background: linear-gradient(125deg, #101f35, #254564);
    border-bottom: 3px solid #c42b47;
}

main.list-card:has(> .list-header a[href="addMerchant.php"]) .list-header h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.5rem, 4vw, 2rem);
    letter-spacing: -.035em;
}

main.list-card:has(> .list-header a[href="addMerchant.php"]) a.new-payment {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: #fff;
    color: #17273d;
    font-weight: 700;
    text-decoration: none;
}

main.list-card:has(> .list-header a[href="addMerchant.php"]) a.new-payment:hover {
    background: #eaf1fa;
}

main.list-card:has(> .list-header a[href="addMerchant.php"]) .table-wrapper {
    overflow-x: auto;
}

main.list-card:has(> .list-header a[href="addMerchant.php"]) table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
}

main.list-card:has(> .list-header a[href="addMerchant.php"]) :is(th, td) {
    padding: 14px 18px;
    border-bottom: 1px solid #e4ebf3;
    text-align: start;
}

main.list-card:has(> .list-header a[href="addMerchant.php"]) th {
    background: #eef3f9;
    color: #405570;
    font-size: .8rem;
    font-weight: 750;
}

main.list-card:has(> .list-header a[href="addMerchant.php"]) tbody tr:nth-child(even) > td {
    background: #f8fafd;
}

main.list-card:has(> .list-header a[href="addMerchant.php"]) tbody tr:hover > td {
    background: #edf4fc;
}

main.list-card:has(> .list-header a[href="addMerchant.php"]) td:nth-child(2) {
    font-weight: 700;
}

main.list-card:has(> .list-header a[href="addMerchant.php"]) .status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
}

main.list-card:has(> .list-header a[href="addMerchant.php"]) .status.paid {
    background: #dff3e9;
    color: #126044;
}

main.list-card:has(> .list-header a[href="addMerchant.php"]) .status.unpaid {
    background: #edf1f7;
    color: #40536b;
}

/* Admin navigation */
.gate-admin-sidebar {
    box-sizing: border-box;
    padding: 22px;
    background: #101f35;
    color: #fff;
}

.gate-admin-brand {
    display: grid;
    gap: 2px;
    margin-bottom: 20px;
}

.gate-admin-brand strong {
    font-size: 1.45rem;
    letter-spacing: -.035em;
}

.gate-admin-brand small {
    color: #c1d1e5;
}

.gate-admin-sidebar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gate-admin-sidebar nav a {
    display: block;
    padding: 10px 12px;
    border-radius: 9px;
    color: #eaf1fb;
    text-decoration: none;
}

.gate-admin-sidebar nav a:hover,
.gate-admin-sidebar nav a[aria-current="page"] {
    background: #2a4565;
    color: #fff;
}

.gate-admin-sidebar nav a[aria-current="page"] {
    box-shadow: inset 3px 0 #f4788e;
}

.gate-admin-sidebar form {
    margin-top: 18px;
}

.gate-admin-sidebar button[type="submit"] {
    padding: 9px 12px;
    border: 1px solid #7890ad;
    border-radius: 9px;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

/* Platform overview */
.gate-admin-overview {
    width: min(1140px, calc(100% - 32px));
    margin: 26px auto;
    color: #17273d;
}

.gate-admin-hero {
    padding: clamp(20px, 4vw, 44px);
    border-radius: 18px;
    background: radial-gradient(ellipse at top right, #365e83, #101f35 68%);
    color: #fff;
}

.gate-admin-hero h1 {
    margin: 6px 0 8px;
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.gate-admin-hero p {
    margin: 0;
    color: #dce8f5;
}

.gate-admin-hero p:first-child {
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .14em;
}

.gate-admin-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr));
    gap: 14px;
    margin: 18px 0;
}

.gate-admin-metric,
.gate-admin-note {
    padding: 18px;
    border: 1px solid #dde6f1;
    border-radius: 14px;
    background: #fff;
}

.gate-admin-metric h2 {
    margin: 0 0 8px;
    color: #4b617d;
    font-size: .9rem;
}

.gate-admin-metric strong {
    font-size: 2rem;
    font-variant-numeric: tabular-nums;
}

.gate-admin-metric:last-child {
    border-inline-start: 4px solid #a91e3a;
}

@media (min-width: 820px) {
    body:has(> .gate-admin-sidebar) {
        display: block;
        padding-inline-start: 220px;
    }

    .gate-admin-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 220px;
        overflow-y: auto;
    }

    .gate-admin-sidebar nav {
        display: grid;
    }
}

@media (max-width: 819px) {
    body:has(> .gate-admin-sidebar) {
        display: block;
        padding: 0;
    }
}

/* Make overview cards look and behave like links. */
a.gate-admin-metric {
    display: grid;
    gap: 6px;
    color: #17273d;
    text-decoration: none;
}

a.gate-admin-metric:hover,
a.gate-admin-metric[aria-current="true"] {
    background: #eef4fb;
    border-color: #6d8cac;
}

a.gate-admin-metric:focus-visible {
    outline: 3px solid #2164bd;
    outline-offset: 3px;
}

.gate-admin-metric-action {
    color: #315980;
    font-size: .85rem;
    font-weight: 700;
}

/* Center the Add Merchant form beside the sidebar. */
body.gx-create:has(> .gate-admin-sidebar) > main.gx-admin-card {
    box-sizing: border-box;
    width: min(660px, calc(100% - 32px));
    margin: clamp(24px, 5vw, 56px) auto;
}

.merchant-login-brand {
    display: flex;
    justify-content: center;
    padding: 18px 24px;
    background: #fff;
}

.merchant-login-brand img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(160px, 100%);
    max-height: 52px;
    object-fit: contain;
}

/* Keep the menu and logo on the same row. */
body.has-sidebar > .app-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px clamp(16px, 3vw, 28px);
    background: #fff;
    border-bottom: 1px solid #dce5ef;
}

body.has-sidebar > .app-topbar > .sidebar-toggle {
    flex: 0 0 auto;
    margin: 0;
}

body.has-sidebar > .app-topbar > .app-brand {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

/* Shared navigation drawer */
#appSidebar[open] {
    position: fixed;
    inset: 0 auto 0 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: min(320px, 88vw);
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: 22px;
    overflow-y: auto;
    border: 0;
    border-right: 1px solid #334c66;
    border-radius: 0;
    background: linear-gradient(155deg, #1d3855, #101f35 55%);
    color: #fff;
    box-shadow: 16px 0 48px #08152545;
}

#appSidebar::backdrop {
    background: #08152580;
}

#appSidebar .sidebar-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px solid #ffffff26;
}

#appSidebar .sidebar-heading h2 {
    margin: 0;
    color: #fff;
    font-size: 1.25rem;
}

#appSidebar .sidebar-close {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 1px solid #ffffff40;
    border-radius: 10px;
    background: #ffffff12;
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

#appSidebar .sidebar-links {
    display: grid;
    gap: 6px;
}

#appSidebar .sidebar-links a {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    color: #e8f0fa;
    font-weight: 600;
    text-decoration: none;
}

#appSidebar .sidebar-close:hover,
#appSidebar .sidebar-links a:hover {
    background: #ffffff1a;
}

#appSidebar .sidebar-links a[aria-current="page"] {
    background: #2b4968;
    color: #fff;
    box-shadow: inset 3px 0 #ff829b;
}

#appSidebar :is(a, button):focus-visible {
    outline: 2px solid #b5d6ff;
    outline-offset: 3px;
}

#appSidebar .sidebar-logout {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    padding: 16px 0 0;
    border: 0;
    border-top: 1px solid #ffffff26;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

#appSidebar .sidebar-logout button {
    width: 100%;
    margin: 0;
    background: #a91e3a;
    color: #fff;
}

/* Customer registration */
body.customer-register-page main {
    box-sizing: border-box;
    width: min(540px, calc(100% - 32px));
    margin: clamp(24px, 5vw, 56px) auto;
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dce5ef;
    border-radius: 20px;
    box-shadow: 0 16px 40px #10233c14;
}

body.customer-register-page main .card-header {
    margin: 0;
    padding: 24px clamp(18px, 5vw, 30px);
    background: linear-gradient(125deg, #101f35, #254564);
    color: #fff;
    border-bottom: 3px solid #c42b47;
}

body.customer-register-page main .card-header h1 {
    margin: 0 0 6px;
    color: #fff;
    font-size: clamp(1.45rem, 4vw, 1.9rem);
}

body.customer-register-page main .card-header p {
    margin: 0;
    color: #dce8f5;
}

body.customer-register-page main form {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 24px clamp(18px, 5vw, 30px);
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

body.customer-register-page main .field {
    margin-bottom: 14px;
}

body.customer-register-page main :is(input:not([type="hidden"]), select) {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
}

body.customer-register-page main button[type="submit"] {
    width: 100%;
    min-height: 46px;
}

body.customer-register-page .register-sign-in {
    margin: 0;
    padding: 16px;
    border-top: 1px solid #dce5ef;
    text-align: center;
}

.customer-login-signup {
    margin: 0;
    padding: 16px 20px;
    border-top: 1px solid #dce5ef;
    text-align: center;
}

.customer-login-signup a {
    color: #a91e3a;
    font-weight: 700;
}

/* Shared card for customer sign-in and registration. */
body.has-sidebar main.customer-auth-card {
    box-sizing: border-box;
    width: min(520px, calc(100% - 32px));
    max-width: none;
    margin: clamp(24px, 5vw, 52px) auto;
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dce5ef;
    border-radius: 20px;
    box-shadow: 0 16px 40px #10233c14;
}

body.has-sidebar main.customer-auth-card .card-header {
    margin: 0;
    padding: 24px clamp(18px, 5vw, 30px);
    background: linear-gradient(125deg, #101f35, #254564);
    border-bottom: 3px solid #c42b47;
    color: #fff;
}

body.has-sidebar main.customer-auth-card .card-header h1 {
    margin: 0 0 6px;
    color: #fff;
    font-size: clamp(1.45rem, 4vw, 1.9rem);
}

body.has-sidebar main.customer-auth-card .card-header p {
    margin: 0;
    color: #dce8f5;
}

body.has-sidebar main.customer-auth-card form {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 24px clamp(18px, 5vw, 30px);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

body.has-sidebar main.customer-auth-card .field {
    margin-bottom: 14px;
}

body.has-sidebar main.customer-auth-card .field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 650;
}

body.has-sidebar main.customer-auth-card .field :is(input:not([type="hidden"]), select) {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    border: 1px solid #cad6e5;
    border-radius: 10px;
    background: #f8fafd;
}

body.has-sidebar main.customer-auth-card form button[type="submit"] {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 10px;
    background: #a91e3a;
    color: #fff;
    font-weight: 700;
}

body.has-sidebar main.customer-auth-card form button[type="submit"]:hover {
    background: #86172e;
}

body.has-sidebar main.customer-auth-card .customer-auth-footer {
    margin: 0;
    padding: 16px 20px;
    border-top: 1px solid #dce5ef;
    text-align: center;
}

body.has-sidebar main.customer-auth-card .customer-auth-footer a {
    color: #a91e3a;
    font-weight: 700;
}

body p.customer-auth-footer.register-login-footer {
    display: block;
    margin: 0;
    padding: 16px 20px;
    border-top: 1px solid #dce5ef;
    text-align: center;
}

body p.customer-auth-footer.register-login-footer a {
    color: #a91e3a;
    font-weight: 700;
    text-decoration: underline;
}

/* Payment details timeline */
.payment-timeline {
    margin: 24px clamp(12px, 3vw, 28px);
    padding: clamp(16px, 3vw, 26px);
    border: 1px solid #dce5ef;
    border-radius: 16px;
    background: #fff;
}

.payment-timeline header h2 {
    margin: 0 0 6px;
    color: #17273d;
}

.payment-timeline header p,
.payment-timeline .timeline-date {
    color: #50637a;
    font-size: .9rem;
}

.payment-timeline ol {
    list-style: none;
    margin: 20px 0 0 6px;
    padding: 0;
    border-inline-start: 2px solid #dce5ef;
}

.payment-timeline .timeline-event {
    position: relative;
    padding: 0 0 20px 20px;
    overflow-wrap: anywhere;
}

.payment-timeline .timeline-event:last-child {
    padding-bottom: 0;
}

.payment-timeline .timeline-event::before {
    content: "";
    position: absolute;
    inset-inline-start: -7px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #42678f;
    box-shadow: 0 0 0 3px #fff;
}

.payment-timeline [data-tone="success"]::before {
    background: #087d69;
}

.payment-timeline [data-tone="failed"]::before {
    background: #a91e3a;
}

.payment-timeline .timeline-date {
    display: block;
    margin-top: 3px;
}

.payment-timeline .timeline-event p {
    margin: 5px 0;
}

.payment-timeline .timeline-monitoring {
    display: inline-block;
    margin: 6px 0;
    padding: 4px 8px;
    border-radius: 8px;
    background: #fff1db;
    color: #704309;
    font-size: .85rem;
}

.payment-timeline .timeline-event a {
    display: block;
    margin-top: 4px;
    color: #315980;
    font-size: .85rem;
    font-weight: 700;
}

tr[id^="payment-attempt-"] {
    scroll-margin-top: 90px;
}

tr[id^="payment-attempt-"]:target > td {
    background: #e8f2fd;
}

.merchant-attention .attention-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.merchant-attention .attention-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 18px;
    padding: 14px clamp(16px, 3vw, 26px);
    border-top: 1px solid #e4ebf3;
    background: #fff;
}

.merchant-attention .attention-list li div {
    display: grid;
    gap: 3px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.merchant-attention .attention-list span {
    color: #50637a;
    font-size: .85rem;
}

.merchant-attention .attention-empty {
    margin: 0;
    padding: 14px clamp(16px, 3vw, 26px);
    border-top: 1px solid #e4ebf3;
    color: #365c4e;
}

/* Profile summary */
.account-profile > .details-grid {
    margin: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.account-profile .detail-item dt {
    color: #50637a;
    font-size: .85rem;
}

.account-profile .detail-item dd {
    margin: 4px 0 0;
    color: #17273d;
    font-weight: 700;
    overflow-wrap: anywhere;
}

/* Monitoring settings */
.account-profile .monitoring-settings form {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    gap: 16px;
    padding: 20px;
}

.account-profile .monitoring-settings .field {
    min-width: 0;
}

.account-profile .monitoring-settings .field p {
    margin: 6px 0 0;
    color: #50637a;
    font-size: .9rem;
}

.account-profile .monitoring-settings form > p {
    margin: 0;
    padding: 12px 14px;
    border-inline-start: 3px solid #b9cde2;
    background: #eef4fa;
    color: #354e68;
    font-size: .9rem;
}

.account-profile .monitoring-settings button[type="submit"] {
    justify-self: start;
    min-height: 44px;
    padding: 10px 20px;
    background: #a91e3a;
    color: #fff;
}

.account-profile .monitoring-settings button[type="submit"]:hover {
    background: #86172e;
}

@media (min-width: 1000px) {
    .account-profile > .details-grid {
        grid-template-columns: 1fr 1fr 1fr 1.6fr;
    }

    .account-profile .monitoring-settings form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .account-profile .monitoring-settings .field:has(#highAmountThreshold),
    .account-profile .monitoring-settings form > p {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .account-profile > .details-grid {
        grid-template-columns: 1fr;
    }

    .account-profile .monitoring-settings button[type="submit"] {
        width: 100%;
    }
}
.gate-admin-overview .gate-merchant-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    max-width: none;
    margin: 16px 0;
    padding: 16px;
    border: 1px solid #dce6f1;
    border-radius: 14px;
    background: #fff;
}

.gate-merchant-filter .field {
    flex: 1 1 220px;
    min-width: 0;
    max-width: 420px;
    margin: 0;
}

.gate-merchant-filter select {
    width: 100%;
}

.gate-merchant-filter button {
    margin: 0;
}
/* New payment form */
body.gate-payment-page .payment-card:not(.checkout-card) {
    box-sizing: border-box;
    width: calc(100% - 32px);
    max-width: 620px;
    margin: 36px auto;
    padding: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #dbe4ef;
    border-radius: 20px;
    box-shadow: 0 18px 48px rgba(16, 29, 52, 0.09);
}

.gate-payment-page .payment-card:not(.checkout-card) > .card-header {
    margin: 0;
    padding: 26px 30px;
    background: linear-gradient(115deg, #101d34, #243e5f);
    border-bottom: 3px solid #b51e3b;
    color: #fff;
}

.gate-payment-page .payment-card:not(.checkout-card) .card-header h1 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 1.85rem;
}

.gate-payment-page .payment-card:not(.checkout-card) .card-header p {
    margin: 0;
    color: #e0e8f4;
}

.gate-payment-page .payment-card:not(.checkout-card) > form {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 16px;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 24px 30px 28px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.gate-payment-page .payment-card:not(.checkout-card) > form > .field,
.gate-payment-page .payment-card:not(.checkout-card) > form > button {
    grid-column: 1 / -1;
    min-width: 0;
    margin: 0;
}

.gate-payment-page .payment-card:not(.checkout-card) > form > .payment-pair {
    grid-column: auto;
}

.gate-payment-page .payment-card .amount-field {
    position: relative;
}

.gate-payment-page .payment-card .amount-field input {
    box-sizing: border-box;
    width: 100%;
    padding-right: 68px;
    appearance: textfield;
}

.gate-payment-page .payment-card .amount-field input::-webkit-inner-spin-button,
.gate-payment-page .payment-card .amount-field input::-webkit-outer-spin-button {
    appearance: none;
    margin: 0;
}

.gate-payment-page .payment-card .amount-field > span {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    padding: 3px 7px;
    border-radius: 6px;
    background: #eaf0f7;
    color: #344b67;
    font-size: 0.75rem;
    font-weight: 700;
    pointer-events: none;
}

.gate-payment-page .payment-card .phone-field {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr);
    gap: 10px;
}

.gate-payment-page .payment-card .phone-field select,
.gate-payment-page .payment-card .phone-field input {
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    margin: 0;
}

.gate-payment-page .payment-card:not(.checkout-card) > form > button {
    width: 100%;
    min-height: 46px;
    background: #aa1936;
    color: #fff;
    font-weight: 700;
}

.gate-payment-page .payment-card:not(.checkout-card) > form > button:hover {
    background: #88142c;
}

@media (max-width: 560px) {
    .gate-payment-page .payment-card:not(.checkout-card) > form {
        grid-template-columns: minmax(0, 1fr);
        padding: 22px;
    }

    .gate-payment-page .payment-card:not(.checkout-card) > .card-header {
        padding: 22px;
    }
}
/* Gate-E hosted checkout frame */
body.gate-payment-page .payment-card.checkout-card {
    box-sizing: border-box;
    width: calc(100% - 32px);
    max-width: 1200px;
    margin: 32px auto;
    padding: 24px;
}

body.gate-payment-page .checkout-card #paymentFrame {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 570px;
    min-height: 0;
    border: 0;
    border-radius: 12px;
}

@media (max-width: 600px) {
    body.gate-payment-page .payment-card.checkout-card {
        width: calc(100% - 20px);
        margin: 16px auto;
        padding: 12px;
    }

    body.gate-payment-page .checkout-card #paymentFrame {
        height: 540px;
    }
}
.checkout-card #paymentResult {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-wrap: anywhere;
}

.checkout-card #paymentResult[data-state] {
    margin: 0 0 16px;
    padding: 14px 18px;
    border: 1px solid #cbd9eb;
    border-radius: 12px;
    background: #eff5ff;
    color: #244670;
    font-weight: 600;
}

.checkout-card #paymentResult[data-state="success"] {
    max-width: 540px;
    margin: 0 auto;
    padding: 24px 18px;
    border-color: #b8dec9;
    background: #eaf7ef;
    color: #175638;
    text-align: center;
    font-size: 1.25rem;
}

.checkout-card #paymentResult[data-state="retry"] {
    border-color: #efd19a;
    background: #fff6e4;
    color: #714606;
}

.checkout-card #paymentResult[data-state="error"] {
    border-color: #edbec6;
    background: #fceef0;
    color: #842138;
}

.checkout-card .checkout-frame-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #244670;
    font-size: 0.875rem;
    cursor: pointer;
}

.checkout-card .checkout-frame-toggle input {
    width: auto;
    margin: 0;
}

body.gate-payment-page .checkout-card
.checkout-frame-toggle:has(input:checked) + #paymentFrame {
    height: 650px;
}

.checkout-card #paymentResult[data-state="success"] + .checkout-frame-toggle,
.checkout-card #paymentResult[data-state="error"] + .checkout-frame-toggle {
    display: none;
}

@media (max-width: 600px) {
    body.gate-payment-page .checkout-card #paymentFrame {
        height: 360px;
    }
}
body.gate-payment-page .payment-card.checkout-card.checkout-card--confirmed {
    position: relative;
    box-sizing: border-box;
    width: calc(100% - 32px);
    max-width: 480px;
    margin: 48px auto;
    padding: clamp(24px, 6vw, 40px);
    border: 1px solid #dbe4ef;
    border-top: 4px solid #177653;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(16, 29, 52, 0.09);
    text-align: center;
}

/* Keep the status announcement for screen readers without showing it twice. */
.checkout-card--confirmed #paymentResult[data-state="success"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.checkout-confirmation[hidden] {
    display: none;
}

.checkout-confirmation-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #e7f5ee;
    color: #177653;
    font-size: 1.75rem;
    font-weight: 700;
}

.checkout-confirmation h1 {
    margin: 0 0 8px;
    color: #101d34;
    font-size: 1.75rem;
}

.checkout-confirmation p {
    margin: 0;
    color: #52637a;
}

.checkout-confirmation-reference {
    margin: 24px 0;
    padding: 14px;
    border: 1px solid #e0e8f1;
    border-radius: 12px;
    background: #f5f8fc;
}

.checkout-confirmation-reference dt {
    color: #52637a;
    font-size: 0.875rem;
}

.checkout-confirmation-reference dd {
    margin: 4px 0 0;
    color: #101d34;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.checkout-confirmation-link {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 10px;
    background: #101d34;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.checkout-confirmation-link:hover {
    background: #243e5f;
    color: #fff;
}
.gate-urgent-alerts {
    border-inline-start: 4px solid #b45309;
}

.gate-urgent-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid #efd19a;
    border-radius: 12px;
    background: #fff8eb;
}

.gate-urgent-item p {
    margin: 4px 0 0;
    color: #714606;
}
/* Connection activity card */
.connection-card {
    --connection-color: #0f766e;
    --connection-background: #f0fdfa;

    margin: 20px 0;
    padding: 22px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
}

.connection-card--repeated {
    --connection-color: #a16207;
    --connection-background: #fffbeb;
}

.connection-card--unavailable {
    --connection-color: #64748b;
    --connection-background: #f1f5f9;
}

.connection-card .connection-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.connection-card .connection-card__header h2 {
    margin: 0;
    color: #334155;
    font-size: 16px;
    line-height: 1.4;
}

.connection-card .connection-card__badge {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--connection-background);
    color: var(--connection-color);
    font-size: 12px;
    font-weight: 700;
}

.connection-card .connection-card__body {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.connection-card .connection-card__icon {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 68px;
    height: 68px;
    border-radius: 18px;
    background: var(--connection-background);
    color: var(--connection-color);
}

.connection-card .connection-card__icon svg {
    display: block;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.connection-card .connection-card__count {
    color: #0f172a;
    font-size: 42px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.connection-card .connection-card__description {
    margin: 7px 0 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
}

.connection-card .connection-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.connection-card .connection-card__tags span {
    padding: 5px 10px;
    border-radius: 7px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
}

.connection-card .connection-card__note {
    margin: 14px 0 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .connection-card {
        padding: 16px;
    }

    .connection-card .connection-card__body {
        gap: 14px;
    }

    .connection-card .connection-card__count {
        font-size: 36px;
    }
}