/*
 * GetPayin identity layer — carries the landing page's language into the app.
 *
 * The landing page and the auth pages are a self-contained system in
 * themes/bikin/css/landing.css: teal-tinted ground, ink-green type, one teal accent,
 * Bricolage Grotesque over Figtree, generous radii and hairlines instead of
 * shadows. Everything else in the product still runs on the 19k-line Bootstrap 4
 * + Material Design Kit build in assets/css/app.css, which reads as a different
 * product: cool grey ground, Source Sans Pro, boxed cards.
 *
 * Rather than rewrite that theme, this sheet loads after it and re-points the
 * few things that carry the identity — the typeface, the ground, the hairline,
 * the accent. It is deliberately small: the admin panels get the shell and the
 * type, not a component rewrite, so no existing screen changes shape.
 *
 * Selectors are written `[dir] ...` on purpose. The built theme styles bare
 * elements (`body`, `h1`, `.card`) behind a `[dir=ltr]` attribute selector, and
 * a plain class or element cannot outrank that; `[dir]` matches the same
 * specificity and wins on order. This is the same convention the guest checkout
 * already documents.
 */

:root {
    /* The ground, line and row are tinted from the logo teal, so the page reads as the
       brand's; the warm beige they replaced sat against it. Sand is a cool grey on
       purpose, not a teal tint: it fills the neutral chips (Refunded, a gateway or
       method label), which must never read as a success chip on --gp-success-soft. */
    --gp-ground: #f2f9f8;
    --gp-panel: #ffffff;
    --gp-sand: #eceeef;
    --gp-ink: #12332f;
    --gp-body: #4c635f;
    --gp-faint: #7c8f8b;
    --gp-line: #d9eae8;
    --gp-teal: #009c95;
    --gp-teal-soft: #e4f2f1;
    --gp-teal-bright: #5fe0d4;
    /* Placeholder text is text: 4.98:1 on white, where #a7ada4 was 2.3:1. */
    --gp-placeholder: #637370;
    /* The panel's placeholder: lighter than typed text, so an empty field never reads as
       filled. 2.99:1 on white, under the 4.5:1 above, by Ahmed's choice (28 Oct 2026). */
    --gp-placeholder-soft: #8a9896;
    --gp-radius: 24px;
    --gp-radius-sm: 14px;
    /* The rest of the corner scale (PAYL-1958). Pages name these instead of writing a size, so
       the Classic look can change every corner in one place. */
    --gp-radius-xs: 6px;      /* chips, code, small marks */
    --gp-radius-row: 8px;     /* menu rows, small boxes */
    --gp-radius-field: 12px;  /* inputs, selects, thumbnails, sidebar rows */
    --gp-radius-pill: 999px;  /* buttons, badges, chips, pagination, avatars */
    --gp-radius-switch: 999px; /* a switch's track: round in both looks, as the old theme drew it */
    --gp-radius-round: 50%;   /* icon-only buttons, close, dots */
    /* Elevation: the identity separates by surface and hairline, so there are only these. */
    --gp-shadow-lift: 0 1px 2px rgba(18, 51, 47, 0.25);  /* a switch's knob, a pressed segment */
    --gp-shadow-card: 0 8px 24px -18px rgba(18, 51, 47, 0.18);
    --gp-shadow-menu: 0 10px 24px -10px rgba(18, 51, 47, 0.28), 0 2px 6px -2px rgba(18, 51, 47, 0.12);
    --gp-shadow-dialog: 0 24px 60px -20px rgba(18, 51, 47, 0.35);
    --gp-shadow-up: 0 -10px 24px -10px rgba(18, 51, 47, 0.28);     /* a bar fixed to the bottom */
    --gp-shadow-side: -24px 0 60px -20px rgba(18, 51, 47, 0.35);   /* a drawer from the right */
    --gp-ring: 0 0 0 3px rgba(0, 155, 149, 0.16);
    --gp-gap: 16px;
    --gp-pad: clamp(18px, 3vw, 56px);

    --gp-display: "Bricolage Grotesque", "Bricolage Fallback", Figtree, "Helvetica Neue", Arial, sans-serif;
    --gp-text: Figtree, "Figtree Fallback", "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
    /* Codes, keys and IDs: the system's own fixed-width face, as no web font is loaded for it. */
    --gp-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    /* The command palette's hand-written hint beside its drawn arrow. Nothing else. */
    --gp-hand: "Segoe Script", "Bradley Hand", "Comic Sans MS", cursive;

    /*
     * Identity-layer additions. The landing page has no need of these — it never
     * reports a status or stripes a table — but the panels cannot be made
     * consistent without them, and every component that used to invent its own
     * green or grey now names one of these instead.
     *
     * The semantic four are desaturated to sit on the ground: the stock
     * Bootstrap #28a745 and #dc3545 read as a different product's alert next to
     * this palette. Each has a soft tint for pills and banner fills.
     */
    --gp-row: #f6fbfa;
    --gp-hover: rgba(0, 155, 149, 0.05);
    /* Text and icons on a teal, red or dark fill (PAYL-1964). The same white as --gp-panel,
       named apart so a surface and the text on a fill never have to change together. */
    --gp-on-fill: #ffffff;
    /* The screen behind a window or a side drawer: the ink at a little over half strength. */
    --gp-scrim: rgba(18, 51, 47, 0.55);
    /* The panel page's ground: a gradient from --gp-wash at the top of the window to
       --gp-wash-end 320px down. The top is as dark as it can be while faint text on it
       stays 4.5:1 (--gp-faint-ink there is 4.53:1). */
    --gp-wash: #eaf7f5;
    --gp-wash-end: #f7fafa;
    /* Faint text: column heads, breadcrumbs, hints. --gp-faint is 3.20:1 on the ground and
       3.41:1 on white, under the 4.5:1 small text needs (WCAG AA); this darker shade of the
       same grey-green is 4.67:1 and 4.98:1. --gp-faint stays for icons, hover hairlines and
       disabled controls, which need 3:1 or nothing. */
    --gp-faint-ink: #637370;
    /* A text field's or a dropdown's edge. The 3:1 edge (#7c8f8b) read heavy, and so did the
       middle grey after it (#a3b3b0), so by Ahmed's choice (28 Oct 2026) it is this light grey:
       1.56:1 on white, under the 3:1 of WCAG 1.4.11, and still darker than --gp-line (1.24:1),
       which cards and dividers keep, so a field stands out from its card. */
    --gp-field-line: #c6d1cf;
    /* A tick box's, a round option's and a switch's edge. They are small, so the edge is most
       of what shows them, and it keeps 3:1: 3.41:1 on white and 3.20:1 on the ground. */
    --gp-control-line: #7c8f8b;
    /* Teal text: links, active tabs and menu rows, accent labels. --gp-teal is 3.39:1 on
       white and 2.95:1 on --gp-teal-soft, under the 4.5:1 small text needs; this darker
       shade of the same teal is 5.71:1 and 4.97:1. --gp-teal stays for icons, borders,
       focus rings and text of 24px (or 18.66px bold), which need 3:1. */
    --gp-teal-ink: #00736e;
    /* A teal fill under white text: buttons, active pills and tabs, counts, table heads.
       White on --gp-teal is 3.39:1, under the 4.5:1 a 13px label needs; on this shade,
       the one --gp-success already is, it is 4.51:1. */
    --gp-teal-fill: #00857f;
    /* A link in a list row, and a button drawn as a link. Its own name so the Classic look
       can give links back their old blue without turning every teal label blue. */
    --gp-link: var(--gp-teal-ink);
    --gp-link-hover: var(--gp-ink);

    /*
     * There is one primary colour and it is the teal in the logo, so success is a
     * shade of it rather than a green. A leaf green beside this teal read as a
     * second brand, which is the thing to avoid: paid and failed are still
     * separable, by teal against red, without a third hue competing for primary.
     */
    --gp-success: #00857f;
    --gp-success-soft: #e0f0ef;
    /* Success text on its own soft tint. --gp-success there is 3.84:1, under the 4.5:1
       small text needs (WCAG AA); this shade of the same teal is 4.87:1. */
    --gp-success-ink: #00736e;
    --gp-warning: #9a6b00;
    --gp-warning-soft: #f6eedd;
    /* Warning text on its own soft tint. --gp-warning there is 4.06:1, under 4.5:1; this
       shade of the same amber is 5.16:1. */
    --gp-warning-ink: #855c00;
    --gp-danger: #b3402f;
    --gp-danger-soft: #f7e8e5;
    --gp-info: #44605e;
    --gp-info-soft: #e9eeed;
}

@media (max-width: 620px) {
    :root {
        --gp-radius: 20px;
    }
}

/* --- The Classic look (PAYL-1957) -----------------------------------------
 *
 * Both panels open on the Classic look until a user turns on "New look" at the
 * end of the side menu; the layout then drops this class from <html>. Classic
 * is the old theme's fonts, colours and small corners, set back through the
 * tokens, so every page that names a token follows. Icons go back to the font
 * in x-icon. It also takes the old website's sizes for the shared parts (28
 * Oct 2026, "closer to dev"): the side menu rows, the stat card numbers, the
 * table heads, the shadows and the field edge, and then (Done-when 10 to 14) the
 * text sizes, labels, badges, tabs, buttons, dropdown menus, fields, filters,
 * table rows, page numbers, message boxes, breadcrumb and the Settings list.
 * Layouts stay as they are. Where an old text colour is too faint to read, the
 * nearest shade that reaches 4.5:1 is used, except the placeholders, the small
 * grey capital labels and the Settings list, which keep the old light shades,
 * and the green badges and buttons, which take a green close to the old one that
 * keeps white text at 3:1 (Ahmed's choices). These are the old theme's own
 * values (assets/css/app.css, and dev's pages), so they are written out here and
 * nowhere else.
 * ------------------------------------------------------------------------- */

:root.look-classic {
    /* The old theme set every heading in Open Sans; its stylesheet still loads it. */
    --gp-display: "Open Sans", "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
    --gp-text: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
    --gp-ink: #112b4a;
    --gp-body: #112b4a;
    --gp-ground: #f7f8f9;
    --gp-wash: #f7f8f9;
    --gp-wash-end: #f7f8f9;
    --gp-line: #efefef;
    --gp-link: #4a90e2;
    --gp-link-hover: #1f69c1;
    --gp-radius-xs: 2px;
    --gp-radius-row: 4px;
    --gp-radius-field: 4px;
    --gp-radius-sm: 4px;
    --gp-radius: 4px;
    --gp-radius-pill: 4px;
    --gp-shadow-card: 0 2px 4px rgba(0, 0, 0, 0.075);
    /* The old dropdown menu and window shadows. */
    --gp-shadow-menu: 0 5px 11px rgba(0, 0, 0, 0.07);
    --gp-shadow-dialog: 0 8px 16px rgba(0, 0, 0, 0.5);
    /* The field edge as dev draws it. Tick boxes and switches keep --gp-control-line. */
    --gp-field-line: #dbdfe4;
}

/* The merchant's cards lift on the old theme's larger, softer shadow; the super admin's
   keep the small one above. */
:root.look-classic .layout-default:not(:has(.sm-super-admin)) {
    --gp-shadow-card: 0 10px 25px rgba(50, 50, 93, 0.07), 0 5px 15px rgba(0, 0, 0, 0.07);
}

/* The old side menu: grey rows, a faint icon, and the current page marked in
   teal with no fill (app.css, .sidebar-light). Its text takes the teal ink shade,
   as all teal text does: the logo teal is too faint to read at this size. */
:root.look-classic .layout-default .sidebar-menu-button {
    color: #939fad;
}

:root.look-classic .layout-default .sidebar-menu-icon {
    color: rgba(164, 175, 186, 0.5);
}

:root.look-classic .layout-default .sidebar-menu-button:hover {
    background-color: transparent;
    color: #212121;
}

:root.look-classic .layout-default .sidebar-menu-button:hover .sidebar-menu-icon {
    color: #939fad;
}

:root.look-classic .layout-default .sidebar-menu-item.active > .sidebar-menu-button {
    background-color: transparent;
    color: var(--gp-teal-ink);
}

:root.look-classic .layout-default .sidebar-menu-item.active > .sidebar-menu-button .sidebar-menu-icon {
    color: var(--gp-teal);
}

/* The old rows, in the side menu only: the Settings pages' own list (.page__container
   .sidebar-menu) keeps its size in both looks. The merchant menu: 42px rows with 16px
   text, flush with the menu's edges. The super admin menu, as dev draws it: dark grey
   bold rows, smaller rows inside a group, grey icons, and the current page and its group
   filled grey with dark text and icon. The look switch row follows the rows of its own menu. */
:root.look-classic .layout-default #default-drawer .sidebar-menu:not(.sm-super-admin) {
    padding-inline: 0;
}

:root.look-classic .layout-default #default-drawer .sidebar-menu:not(.sm-super-admin) > .sidebar-menu-item > .sidebar-menu-button,
:root.look-classic .layout-default #default-drawer .sidebar-menu:not(.sm-super-admin) .gp-look-switch__button {
    min-height: 42px;
    font-size: 16px;
    padding-inline: 20px;
}

:root.look-classic .layout-default #default-drawer .sm-super-admin .sidebar-menu-button {
    color: #4b5563;
    font-weight: 700;
}

:root.look-classic .layout-default #default-drawer .sm-super-admin > .sidebar-menu-item > .sidebar-menu-button,
:root.look-classic .layout-default #default-drawer .sm-super-admin .gp-look-switch__button {
    min-height: 32px;
    font-size: 14.4px;
}

:root.look-classic .layout-default #default-drawer .sm-super-admin .sidebar-submenu .sidebar-menu-button {
    font-size: 13.6px;
    color: #6b7280;
}

:root.look-classic .layout-default #default-drawer .sm-super-admin .sidebar-menu-icon {
    color: #8b95a5;
}

:root.look-classic .layout-default #default-drawer .sm-super-admin .sidebar-menu-item.active > .sidebar-menu-button {
    background-color: #eef0f3;
    border-radius: var(--gp-radius-row);
    color: #111827;
}

:root.look-classic .layout-default #default-drawer .sm-super-admin .sidebar-menu-item.active > .sidebar-menu-button .sidebar-menu-icon {
    color: #111827;
}

/* A phone keeps the look switch row a 44px finger target, as the New look does. */
@media (max-width: 767.98px) {
    :root.look-classic .layout-default #default-drawer .sidebar-menu:not(.sm-super-admin) .gp-look-switch__button,
    :root.look-classic .layout-default #default-drawer .sm-super-admin .gp-look-switch__button {
        min-height: 44px;
    }
}

/* The company name above the menu is body text on the old website, not a title: in the
   title font it was wider and broke "Test Company" over two lines. */
:root.look-classic .layout-default .sidebar-account .sidebar-account-name,
:root.look-classic .layout-default .sidebar-account strong {
    font-family: var(--gp-text);
    letter-spacing: normal;
}

/* The old stat numbers: 24px, one colour per meaning. A figure of more than ten
   characters, such as a money total, takes 18px: at 24px it ran into the card's
   icon, as it does on the old website. .layout-default outranks the card body's 17px
   heading rule. */
:root.look-classic .layout-default .gp-stat__value {
    font-size: 24px;
}

:root.look-classic .layout-default .gp-stat__value--long {
    font-size: 18px;
}

:root.look-classic .gp-stat--primary { --stat-ink: #009c95; --stat-tint: rgba(0, 156, 149, 0.1); }
:root.look-classic .gp-stat--success { --stat-ink: #48ba16; --stat-tint: rgba(40, 167, 69, 0.1); }
:root.look-classic .gp-stat--warning { --stat-ink: #f59e0b; --stat-tint: rgba(245, 158, 11, 0.1); }
:root.look-classic .gp-stat--danger { --stat-ink: #dc3545; --stat-tint: rgba(220, 53, 69, 0.1); }
:root.look-classic .gp-stat--info { --stat-ink: #51a7c5; --stat-tint: rgba(23, 162, 184, 0.1); }

/* The old table heads. The merchant's: 13.2px, as written, no letter spacing. The
   super admin's: capitals on a light grey band, over lower rows. */
:root.look-classic .layout-default .table thead th {
    font-size: 13.2px;
    letter-spacing: normal;
    text-transform: none;
    color: rgba(55, 77, 103, 0.54);
    padding-top: 5.6px;
    padding-bottom: 5.6px;
}

:root.look-classic .layout-default:has(.sm-super-admin) .table thead th {
    font-weight: 600;
    letter-spacing: 0.528px;
    text-transform: uppercase;
    background-color: #f8fafa;
}

:root.look-classic .layout-default:has(.sm-super-admin) .table tbody td {
    padding-top: 6px;
    padding-bottom: 6px;
}

/* Open Sans titles at their own spacing, as the old website sets them. */
:root.look-classic .layout-default .page__heading h1,
:root.look-classic .layout-default .page__heading .h1 {
    letter-spacing: normal;
}

/* The Classic look's text, forms, badges, tabs, buttons, menus, fields, lists and boxes
   (Done-when 10 to 13) are at the end of this file: they meet the component rules at the
   same strength, and the later rule wins a tie. */

/*
 * Metric-matched fallbacks.
 *
 * The two faces arrive from Google over the network, and until they do the page
 * sets in Arial — which is narrower and sits on a different baseline, so every
 * line of text moves when the swap happens. The header is worst affected: its
 * height is measured in JS, which is why app.blade.php re-measures on
 * document.fonts.ready rather than trusting its first reading.
 *
 * These re-cut Arial to the real face's metrics, so the swap changes the shapes
 * without moving anything. The overrides are close approximations rather than
 * exact: tune them against the real metrics if a shift is still visible.
 */
@font-face {
    font-family: "Figtree Fallback";
    src: local("Arial");
    size-adjust: 105.4%;
    ascent-override: 92%;
    descent-override: 24.2%;
    line-gap-override: 0%;
}

@font-face {
    font-family: "Bricolage Fallback";
    src: local("Arial");
    size-adjust: 104%;
    ascent-override: 95%;
    descent-override: 24%;
    line-gap-override: 0%;
}


/*
 * --primary is deliberately left alone. The theme declares it under
 * `[dir=ltr] :root`, a descendant selector that can never match the root
 * element, so the token has never resolved anywhere in the product and every
 * use of it carries a literal fallback. Defining it here would finally switch
 * those on — including the ~7 places in the billing pay section that fall back
 * to a different green (#16726a) — which is a change to component colour, not
 * to the shell. The theme's own #009C95 and the identity's #009c95 are the same
 * teal to the eye anyway.
 */

/*
 * Type. The theme sets Source Sans Pro on `[dir=ltr] body` and lets everything
 * inherit, so re-pointing the body face carries the whole product; headings are
 * named separately because the identity pairs a display face with the text one.
 */
[dir] body {
    font-family: var(--gp-text);
    -webkit-font-smoothing: antialiased;
}

/* The page heading is not in this list: its title is an h1, and the buttons beside it are set
   in the text face like every other button (PAYL-1973). */
[dir] h1,
[dir] h2,
[dir] h3,
[dir] h4,
[dir] .h1,
[dir] .h2,
[dir] .h3,
[dir] .h4,
[dir] .card-title,
[dir] .navbar-brand {
    font-family: var(--gp-display);
    font-weight: 700;
    letter-spacing: -0.025em;
}

/* The panels' small headings in the New look, which kept the old theme's Open Sans (Mobile App
   Usage, a company's Volume cards, the admin dashboard). Classic keeps dev's. :where() keeps
   it light, so a cell or a tab drawn as h6 still takes its own rule below (PAYL-1973). */
:root:not(.look-classic) .layout-default :where(h5, h6, .h5, .h6) {
    font-family: var(--gp-display);
    font-weight: 700;
    letter-spacing: -0.025em;
}

/*
 * Shell. The tinted ground is what makes a page read as GetPayin at a glance, and
 * it is the one change that reaches every screen at once. Panels stay white, so
 * the contrast the theme relies on for cards and tables is unchanged. The panel
 * page washes from a deeper tint under the header to a lighter one, held to the
 * window so it does not scroll away.
 */
[dir] body.layout-default {
    background-color: var(--gp-wash-end);
    background-image: linear-gradient(180deg, var(--gp-wash) 0, var(--gp-wash-end) 320px);
    background-attachment: fixed;
    color: var(--gp-ink);
}

/* Bootstrap's light grey (the notifications list, a few table cells, the checkout's
   expired and failed pages) takes the ground, so no cool-grey patch sits on a page
   in the teal identity. Bootstrap sets it with !important. */
[dir] .layout-default .bg-light,
[dir] .gp-checkout .bg-light {
    background-color: var(--gp-ground) !important;
}

/* The checkout's alerts, the card error box among them, take the card corners (dev QA #51). */
[dir] .gp-checkout .alert {
    border-radius: var(--gp-radius-sm, 14px);
}

[dir] .layout-default .card,
[dir] .layout-default .list-group-item {
    border-color: var(--gp-line);
}

[dir] .layout-default .card {
    border-radius: var(--gp-radius-sm);
}

/* A card's own head and foot inherit the corner, or the fill squares it off. */
[dir] .layout-default .card > :first-child {
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

[dir] .layout-default .card > :last-child {
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}

/* The sidebar and the fixed header are the two edges that meet the ground. */
[dir] .layout-default .sidebar-light.sidebar-left {
    border-inline-end-color: var(--gp-line);
}

[dir] .layout-default .navbar-main {
    border-bottom: 1px solid var(--gp-line);
}

/* The phone's menu button sits on the screen's right edge. Bootstrap 5 drew a 4px grey ring
   round it on every focus, a tap included, and the edge cut the ring off. A tap now shows
   nothing; the keyboard gets the teal ring, drawn inside the button. */
[dir] .layout-default .navbar-toggler:focus {
    box-shadow: none;
}

[dir] .layout-default .navbar-toggler:focus-visible {
    outline: 2px solid var(--gp-teal);
    outline-offset: -4px;
}

/* The merchant announcement above the top bar. It was a Bootstrap row, so it reached 15px
   past both sides of the screen, and its fixed 50px height cut a button that wrapped onto two
   lines on a phone. The text wraps now, the button keeps one line, and the bar grows. */
[dir] .layout-default .gp-announcement {
    gap: 8px;
    padding: 6px 12px;
    text-align: center;
}

[dir] .layout-default .gp-announcement .btn {
    flex: none;
    white-space: nowrap;
}

[dir] .layout-default .page__heading {
    color: var(--gp-ink);
}

/* Plans page (order/plans): the plan's name and price in the heading face and ink, and
   drawn ticks and crosses in place of the theme's teal dots and its wide letter spacing. */
[dir] .layout-default .pricing__title,
[dir] .layout-default .pricing__amount {
    font-family: var(--gp-display);
    font-weight: 700;
    color: var(--gp-ink);
}

[dir] .layout-default .pricing__lead {
    font-family: var(--gp-text);
    font-weight: 400;
    color: var(--gp-body);
}

[dir] .layout-default .pricing__duration {
    white-space: nowrap;
}

[dir] .layout-default .pricing__features {
    display: grid;
    gap: 10px;
    letter-spacing: normal;
    line-height: 1.5;
    color: var(--gp-body);
}

[dir] .layout-default .pricing__features li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding-left: 0;
    padding-right: 0;
}

[dir] .layout-default .pricing__features li::after {
    content: none;
}

[dir] .layout-default .pricing__features .gp-icon {
    flex-shrink: 0;
    margin-top: 1px;
    color: var(--gp-teal);
}

[dir] .layout-default .pricing__features .na {
    color: var(--gp-faint-ink);
}

[dir] .layout-default .pricing__features .na .gp-icon {
    color: var(--gp-faint);
}

/*
 * Guest checkout shell.
 *
 * The public checkout is the only page in the product a payer sees, so it takes
 * the identity in full rather than the shell-and-type pass above. The header
 * carries two marks with different jobs: the merchant's, centred and prominent,
 * because that is who is being paid; and ours beside it, plainly legible,
 * because that is who is handling the card.
 */
[dir] body.gp-checkout {
    background-color: var(--gp-ground);
    color: var(--gp-ink);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* The same teal rule the signed-in header wears, which is the one piece of
       chrome a merchant already recognises as ours. */
    border-top: 3px solid var(--gp-teal);
}

/* The content wrapper takes the slack so the footer sits at the bottom of a
   short page instead of half way up it. */
[dir] body.gp-checkout > .mdk-header-layout {
    flex: 1 0 auto;
}

[dir] .gp-checkout__shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 var(--gp-pad);
}

[dir] .gp-checkout__header {
    padding: 20px 0 24px;
}

/* Three tracks, the outer two equal, so the logo is centred on the page rather
   than merely between its neighbours. */
[dir] .gp-checkout__header .gp-checkout__shell {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 56px;
}

[dir] .gp-checkout__powered,
[dir] .gp-checkout__header-pad {
    flex: 1 1 0;
    min-width: 0;
    /* Both tracks measure the same, so the logo between them is centred on the
       page. Ours holds a wordmark and a logo and the pad holds nothing, so
       without equal basis the row leaned left by the width of our lockup. */
    max-width: 50%;
}

[dir] .gp-checkout__powered {
    justify-content: flex-start;
}

[dir] .gp-checkout__brand {
    flex: 0 1 auto;
    /*
     * No frame. A merchant's mark is whatever they uploaded, and a border around
     * it flatters almost none of them — a logo already drawn on its own plate
     * ends up double-framed, and a wordmark ends up looking like a sticker. What
     * an arbitrary upload actually needs is a predictable box: a fixed height so
     * a tall icon and a long lockup carry the same optical weight, `contain` so
     * nothing is cropped or stretched, and a max-width so a wide lockup cannot
     * push the row out of balance. That is all this is.
     */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: min(260px, 54vw);
    min-height: 48px;
    padding: 2px 0;
}

[dir] .gp-checkout__mark {
    display: block;
    max-height: 40px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    /* A logo exported on a white background melts into the ground instead of
       showing its plate. A transparent one is unaffected. */
    mix-blend-mode: multiply;
}

/* No logo on file: the name sets in the display face rather than leaving an
   empty frame or a broken image. */
[dir] .gp-checkout__brand-name {
    font-family: var(--gp-display);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: var(--gp-ink);
    text-align: center;
    overflow-wrap: anywhere;
}

/* Ours: legible at a glance, and still the smaller of the two marks. */
[dir] .gp-checkout__powered {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--gp-faint-ink);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
}

[dir] .gp-checkout__powered:hover,
[dir] .gp-checkout__powered:focus {
    color: var(--gp-ink);
}

[dir] .gp-checkout__powered img {
    display: block;
    height: 18px;
    width: auto;
    mix-blend-mode: multiply;
}

[dir] .gp-checkout__footer {
    flex: none;
    margin-top: auto;
    border-top: 1px solid var(--gp-line);
    padding: 24px 0;
    font-size: 14px;
    color: var(--gp-faint-ink);
}

[dir] .gp-checkout__footer .gp-checkout__shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

[dir] .gp-checkout__meta {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

[dir] .gp-checkout__secure {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

[dir] .gp-checkout__secure .material-icons,
[dir] .gp-checkout__secure .gp-icon {
    font-size: 16px;
    width: 1em;
    height: 1em;
}

/* Below the width where three tracks fit, the row stacks: the merchant's logo
   leads on its own line and ours sits under it, both centred. */
@media (max-width: 720px) {
    [dir] .gp-checkout__header .gp-checkout__shell {
        flex-direction: column;
        gap: 12px;
    }

    [dir] .gp-checkout__header-pad {
        display: none;
    }

    [dir] .gp-checkout__brand {
        order: -1;
        min-height: 56px;
        max-width: 100%;
    }

    [dir] .gp-checkout__powered {
        flex: none;
    }
}

/*
 * Phone gutters.
 *
 * The layout wraps the page in Bootstrap's .px-4 (24px a side) and each checkout
 * then adds its own wrapper padding on top, so on a 360px screen the content was
 * losing ~72px — a fifth of the display — to margin before a card even started.
 * The page's own wrapper is the one that should set the gutter, so the layout's
 * is dropped from the phone breakpoint down and the cards run nearly edge to
 * edge, which is where the room for prices and item names comes from.
 */
@media (max-width: 720px) {
    [dir] body.gp-checkout .px-4 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    [dir] body.gp-checkout .gp-checkout__shell {
        padding-left: 14px;
        padding-right: 14px;
    }
}

@media (max-width: 620px) {
    [dir] .gp-checkout__mark {
        max-height: 34px;
    }

    [dir] .gp-checkout__footer .gp-checkout__shell {
        justify-content: center;
        text-align: center;
    }

    [dir] .gp-checkout__meta {
        justify-content: center;
        gap: 12px;
    }
}

/*
 * The payer's status card: a payment that failed, is still pending or is paid, or a link that
 * has expired. A band in the status's pale tint, a white disc with the status mark, the heading
 * in the status's text shade, then the card's own body. The card sets its own gutter,
 * because the layout's .px-4 is dropped at phone width (above).
 */
[dir] .gp-checkout .gp-status {
    overflow: hidden;
    background: var(--gp-panel);
    border: 1px solid var(--gp-line);
    border-radius: var(--gp-radius-sm);
    box-shadow: var(--gp-shadow-card, 0 8px 24px -18px rgba(18, 51, 47, 0.18));
}

[dir] .gp-checkout .gp-status--danger {
    --status-tint: var(--gp-danger-soft);
    --status-mark: var(--gp-danger);
    --status-ink: var(--gp-danger);
}

[dir] .gp-checkout .gp-status--warning {
    --status-tint: var(--gp-warning-soft);
    --status-mark: var(--gp-warning);
    --status-ink: var(--gp-warning-ink);
}

/* A paid pay request's receipt. */
[dir] .gp-checkout .gp-status--success {
    --status-tint: var(--gp-success-soft);
    --status-mark: var(--gp-success);
    --status-ink: var(--gp-success-ink);
}

/* A link that ran out of time: nothing failed and nothing is waiting. */
[dir] .gp-checkout .gp-status--info {
    --status-tint: var(--gp-info-soft);
    --status-mark: var(--gp-info);
    --status-ink: var(--gp-info);
}

[dir] .gp-checkout .gp-status__band {
    padding: 24px 16px;
    text-align: center;
    background: var(--status-tint);
}

[dir] .gp-checkout .gp-status__disc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    border-radius: var(--gp-radius-round, 50%);
    background: var(--gp-panel);
    color: var(--status-mark);
}

[dir] .gp-checkout .gp-status__title {
    margin: 0;
    color: var(--status-ink);
}

[dir] .gp-checkout .gp-status__body {
    padding: 24px;
}

/* Quiet text on the white body, the ground-tinted details box and the waiting window. */
[dir] .gp-checkout .gp-status .text-muted,
[dir] .gp-checkout .gp-status-wait .text-muted {
    color: var(--gp-faint-ink) !important;
}

/*
 * The code, the pay request number, the reference and the time, one row each. A line sits
 * between any two rows, so it holds whichever rows a payment has.
 */
[dir] .gp-checkout .gp-status__details {
    padding: 4px 16px;
    border-radius: var(--gp-radius-sm);
    background: var(--gp-ground);
}

[dir] .gp-checkout .gp-status__details > * + * {
    border-top: 1px solid var(--gp-line);
}

/* The failure reason, or the bank's word on a pending payment, in the status's tint. */
[dir] .gp-checkout .gp-status__note {
    margin-bottom: 24px;
    padding: 12px 16px;
    border-radius: var(--gp-radius-sm);
    text-align: center;
    background: var(--status-tint);
    color: var(--status-ink);
}

/* Faint ink is 4.19:1 on the red tint; the body shade reads. */
[dir] .gp-checkout .gp-status__note-label {
    display: block;
    margin-bottom: 4px;
    font-size: 11.5px;
    color: var(--gp-body);
}

/* The window shown while the bank is asked again. */
[dir] .gp-checkout .gp-status-wait {
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    background: var(--gp-scrim, rgba(18, 51, 47, 0.55));
}

[dir] .gp-checkout .gp-status-wait__panel {
    padding: 32px 40px;
    text-align: center;
    background: var(--gp-panel);
    border-radius: var(--gp-radius);
    box-shadow: var(--gp-shadow-dialog, 0 24px 60px -20px rgba(18, 51, 47, 0.35));
    color: var(--gp-ink);
}

[dir] .gp-checkout .gp-status-wait__spinner {
    width: 48px;
    height: 48px;
    color: var(--gp-teal);
}

@media (max-width: 720px) {
    [dir] .gp-checkout .gp-status__body {
        padding: 20px 16px;
    }
}

/* ============================================================================
 * Component layer — merchant admin and super admin.
 *
 * Everything below is scoped to `.layout-default`, the body class both panels
 * share and the guest checkout does not, so the payer-facing pages keep their
 * own designed sheet. The table cell helpers (.dt-cell, .dt-ico and the rest)
 * take the scope through :where(), which adds no weight, so they weigh what they
 * did in x-table.
 *
 * This layer exists because of arithmetic: 72 view files hand-roll a
 * `<table class="table">` and only 8 use the `x-table` component. Restyling the
 * component alone would leave the product more inconsistent than it started, so
 * the Bootstrap classes those files already use are re-pointed here and the
 * components are re-pointed at the same tokens. One definition, both routes.
 * ========================================================================== */

/* --- Cards ---------------------------------------------------------------- */

/* The theme gives every card a grey drop shadow and no border. The identity
   separates by surface and hairline, with a lift that is warm and wide rather
   than dark and tight. */
[dir] .layout-default .card {
    border: 1px solid var(--gp-line);
    box-shadow: var(--gp-shadow-card, 0 8px 24px -18px rgba(18, 51, 47, 0.18));
}

/* Bootstrap's small shadow (23 panel views, the shared x-data-table among them) and its grey
   .border on a card put the theme's drop back. Both carry !important in Bootstrap. Classic
   keeps Bootstrap's small shadow, as dev draws it: its merchant card shadow is the large one. */
:root:not(.look-classic) .layout-default .shadow-sm {
    box-shadow: var(--gp-shadow-card, 0 8px 24px -18px rgba(18, 51, 47, 0.18)) !important;
}

[dir] .layout-default .card.border {
    border-color: var(--gp-line) !important;
}

[dir] .layout-default .card-header {
    background-color: transparent;
    border-bottom-color: var(--gp-line);
    font-family: var(--gp-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--gp-ink);
}

[dir] .layout-default .card-footer {
    background-color: transparent;
    border-top-color: var(--gp-line);
}

/* A card head may lead with its subject's icon on a pale tint, as both dashboards do. The
   -ink shades keep the icon at 3:1 or more on its tint; the logo teal is 2.95:1 there. */
[dir] .layout-default .card-header__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    margin-inline-end: 12px;
    border-radius: var(--gp-radius-field, 12px);
    background: var(--gp-teal-soft);
    color: var(--gp-teal-ink);
}

[dir] .layout-default .card-header__icon--info {
    background: var(--gp-info-soft);
    color: var(--gp-info);
}

/* A heading that is the card head's title reads as the head: its font, weight, size and ink.
   The theme's own .card-header__title is Source Sans in black. */
[dir] .layout-default .card-header__heading {
    margin: 0;
    font: inherit;
    letter-spacing: inherit;
    color: inherit;
}

/* The theme's own card title is Source Sans in black. In the panel it only ever labels a tab
   (a list's or a details page's), so it takes the identity's tab face, the text face at 600,
   as .nav-tabs and .gp-tabs do; the display face is for headings, and it ran wide enough to
   push "Overdue Pay Requests" onto a second line. The open tab keeps its teal from the
   .active rule further down. */
[dir] .layout-default .card-header__title {
    font-family: var(--gp-text);
    color: var(--gp-ink);
}

/* --- Tables --------------------------------------------------------------- */

[dir] .layout-default .table {
    color: var(--gp-body);
    /* Bootstrap 5 is loaded over the Bootstrap 4 theme and stripes rows with an
       inset box-shadow driven by these, so both engines have to be told. */
    --bs-table-striped-bg: var(--gp-row);
    --bs-table-hover-bg: var(--gp-hover);
    --bs-table-border-color: var(--gp-line);
    --bs-table-color: var(--gp-body);
}

/* The column head is the landing page's eyebrow: small, spaced, upper, faint.
   It is the single strongest signal that a table belongs to this product. */
[dir] .layout-default .table thead th {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gp-faint-ink);
    background-color: transparent;
    border-top: 0;
    border-bottom: 1px solid var(--gp-line);
    /* These tables are read, not browsed: an operator scanning a hundred payment
       rows wants more of them on screen than the theme's 0.75rem allowed. */
    padding: 10px 12px;
    white-space: nowrap;
}

[dir] .layout-default .table td {
    border-top: 0;
    border-bottom: 1px solid var(--gp-line);
    padding: 9px 12px;
    font-size: 13.5px;
    vertical-align: middle;
    color: var(--gp-ink);
}

/* A table inside a card already has the card's edge; a second rule under the
   last row draws a line across nothing. */
[dir] .layout-default .table tbody tr:last-child td {
    border-bottom: 0;
}

[dir] .layout-default .table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--gp-row);
}

[dir] .layout-default .table-hover tbody tr:hover,
[dir] .layout-default .table tbody tr.clickable-row:hover {
    background-color: var(--gp-hover);
    color: var(--gp-ink);
}

/* A link in a list row takes the identity's link shade, not the theme's blue (3.29:1 on
   white). It weighs exactly what the theme's [dir=ltr] a does and wins on load order, so a
   page's own link rule and the text utilities (.text-reset on a sort head) still win.
   Buttons, row-menu items and badges drawn as links keep their own look. The menu items are
   named, not matched on "item", which would also catch align-items-center. */
:where(.layout-default) .table :where(tbody) a:where(:not([class*="btn"], [class*="badge"], .dropdown-item, [class*="menu-item"], [class*="menu__item"])) {
    color: var(--gp-link, #00736e);
}

:where(.layout-default) .table :where(tbody) a:where(:not([class*="btn"], [class*="badge"], .dropdown-item, [class*="menu-item"], [class*="menu__item"])):hover {
    color: var(--gp-link-hover, #12332f);
}

/* A plain link anywhere else on a page (Clear Filters, Cancel, the API docs, "Open the
   feedback queue") was the theme's blue too. Same weight as the theme's rule, so a page's own
   link colour as strong still wins; the Settings list and the tabs keep theirs (PAYL-1973). */
.layout-default :where(.page) a:where(:not([class*="btn"], [class*="badge"], .dropdown-item, [class*="menu-item"], [class*="menu__item"], [class*="sidebar-menu"], .page-link, .nav-link)) {
    color: var(--gp-link, #00736e);
}

.layout-default :where(.page) a:where(:not([class*="btn"], [class*="badge"], .dropdown-item, [class*="menu-item"], [class*="menu__item"], [class*="sidebar-menu"], .page-link, .nav-link)):hover {
    color: var(--gp-link-hover, #12332f);
}

/* Cell helpers. They lived in x-table's pushed styles, so a cell drawn outside one
   (x-company-link on Commission requests) got none of them: a 20px dark icon and a
   name that never ellipsed. Scoped through :where(), not [dir], so they weigh
   what they did and a screen's own rule still wins. */
:where(.layout-default) .dt-cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    line-height: 1;
}

:where(.layout-default) .dt-cell .gp-icon {
    position: relative;
    top: 1px;
}

/* A name cut by CSS rather than by a character count: it fills the width
   the column has and the whole of it stays on the tooltip. */
:where(.layout-default) .dt-name {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

:where(.layout-default) .dt-muted {
    font-size: 11.5px;
    color: var(--gp-faint-ink, #637370);
}

:where(.layout-default) .dt-pos {
    color: var(--gp-teal-ink, #00736e);
    font-weight: 600;
}

/* A drawn icon ignores font-size, so width and height size it: 14px, a size up
   from the 12px glyph it replaced, as the rest of the drawn set sits. */
:where(.layout-default) .dt-ico {
    width: 14px;
    height: 14px;
    font-size: 14px !important;
    line-height: 1;
    color: var(--gp-faint, #7c8f8b);
    flex-shrink: 0;
    vertical-align: middle;
}

:where(.layout-default) .dt-ico--online {
    color: var(--gp-teal, #009c95);
    animation: dt-pulse 1.8s ease-in-out infinite;
}

@keyframes dt-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .6; transform: scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
    :where(.layout-default) .dt-ico--online { animation: none; }
}

:where(.layout-default) .dt-date {
    font-size: 12.5px;
    color: var(--gp-body, #4c635f);
    white-space: nowrap;
}

:where(.layout-default) .dt-date .gp-icon {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
    color: var(--gp-faint, #7c8f8b);
    margin-inline-end: 4px;
}

/* --- Buttons -------------------------------------------------------------- */

/* The pill is the identity's most recognisable shape. Groups are handled below
   so a segmented control keeps square inner edges rather than pinching. */
/* A button is set in the text face wherever it sits: a page heading and a card head are in
   the heading face, and a button there took it (PAYL-1973). */
[dir] .layout-default .btn,
[dir] .layout-default .gp-btn {
    font-family: var(--gp-text);
}

[dir] .layout-default .btn {
    border-radius: var(--gp-radius-pill, 999px);
    font-weight: 600;
    box-shadow: none;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* A small button is one size in both panels, the 32px of a .gp-btn--sm: the theme's was 22px
   tall with 10px text (dev QA #49). */
[dir] .layout-default .btn-sm,
[dir] .layout-default .btn-group-sm > .btn {
    padding: 6px 14px;
    font-size: 13px;
    line-height: 18px;
}

[dir] .layout-default .btn-primary {
    background-color: var(--gp-teal-fill);
    border-color: var(--gp-teal-fill);
    color: var(--gp-on-fill, #ffffff);
    box-shadow: none;
}

/* The theme's pressed and open rules (`:not(:disabled):not(.disabled):active`,
   `.show > .dropdown-toggle`) outrank a plain :active, so they are named here
   too: without them a pressed button flashed the theme's blue #0d70e3. */
[dir] .layout-default .btn-primary:hover,
[dir] .layout-default .btn-primary:focus,
[dir] .layout-default .btn-primary:active,
[dir] .layout-default .btn-primary:not(:disabled):not(.disabled):active,
[dir] .layout-default .btn-primary:not(:disabled):not(.disabled).active,
[dir] .layout-default .show > .btn-primary.dropdown-toggle {
    background-color: var(--gp-ink);
    border-color: var(--gp-ink);
    color: var(--gp-on-fill, #ffffff);
}

/* The theme rings a pressed, selected or open button in blue. */
[dir] .layout-default .btn-primary:not(:disabled):not(.disabled):active:focus,
[dir] .layout-default .btn-primary:not(:disabled):not(.disabled).active:focus,
[dir] .layout-default .show > .btn-primary.dropdown-toggle:focus,
[dir] .layout-default .btn-success:not(:disabled):not(.disabled):active:focus,
[dir] .layout-default .btn-success:not(:disabled):not(.disabled).active:focus,
[dir] .layout-default .show > .btn-success.dropdown-toggle:focus,
[dir] .layout-default .btn-outline-primary:not(:disabled):not(.disabled):active:focus,
[dir] .layout-default .btn-outline-primary:not(:disabled):not(.disabled).active:focus,
[dir] .layout-default .show > .btn-outline-primary.dropdown-toggle:focus,
[dir] .layout-default .btn-secondary:not(:disabled):not(.disabled):active:focus,
[dir] .layout-default .btn-secondary:not(:disabled):not(.disabled).active:focus,
[dir] .layout-default .show > .btn-secondary.dropdown-toggle:focus,
[dir] .layout-default .btn-outline-secondary:not(:disabled):not(.disabled):active:focus,
[dir] .layout-default .btn-outline-secondary:not(:disabled):not(.disabled).active:focus,
[dir] .layout-default .show > .btn-outline-secondary.dropdown-toggle:focus {
    box-shadow: none;
}

[dir] .layout-default .btn-secondary,
[dir] .layout-default .btn-light,
[dir] .layout-default .btn-outline-secondary {
    background-color: transparent;
    border-color: var(--gp-line);
    color: var(--gp-ink);
    box-shadow: none;
}

[dir] .layout-default .btn-secondary:hover,
[dir] .layout-default .btn-light:hover,
[dir] .layout-default .btn-outline-secondary:hover {
    background-color: transparent;
    border-color: var(--gp-ink);
    color: var(--gp-ink);
}

/* Pressed or open, as .btn-primary above: the theme's own rules outrank the hover, and filled a
   pressed white button dark grey (#545b62, #6c757d) under white text. .btn-light's pressed grey
   keeps dark text and is left to the theme. */
[dir] .layout-default .btn-secondary:not(:disabled):not(.disabled):active,
[dir] .layout-default .btn-secondary:not(:disabled):not(.disabled).active,
[dir] .layout-default .show > .btn-secondary.dropdown-toggle,
[dir] .layout-default .btn-outline-secondary:not(:disabled):not(.disabled):active,
[dir] .layout-default .btn-outline-secondary:not(:disabled):not(.disabled).active,
[dir] .layout-default .show > .btn-outline-secondary.dropdown-toggle {
    background-color: var(--gp-hover, rgba(0, 155, 149, 0.05));
    border-color: var(--gp-ink);
    color: var(--gp-ink);
}

/* An outline button is clear until it is pointed at or pressed. Bootstrap 5 also fills it on
   keyboard focus, in its own blue, green or red, under the text colour set here: red on red was
   1.26:1. A focused one keeps the teal outline below instead. */
[dir] .layout-default .btn-outline-primary {
    background-color: transparent;
    border-color: var(--gp-teal);
    color: var(--gp-teal-ink);
}

[dir] .layout-default .btn-outline-primary:hover,
[dir] .layout-default .btn-outline-primary:not(:disabled):not(.disabled):active,
[dir] .layout-default .btn-outline-primary:not(:disabled):not(.disabled).active,
[dir] .layout-default .show > .btn-outline-primary.dropdown-toggle {
    background-color: var(--gp-teal-fill);
    border-color: var(--gp-teal-fill);
    color: var(--gp-on-fill, #ffffff);
}

/* .btn-link is a button drawn as a link, mostly the view icon at the end of a list row. It
   took the theme's link blue (3.29:1 on white); it takes the link shade, and ink on hover,
   as a link in a list row does. A disabled one keeps the theme's grey. */
[dir] .layout-default .btn-link:not(:disabled):not(.disabled) {
    color: var(--gp-link);
}

[dir] .layout-default .btn-link:not(:disabled):not(.disabled):hover,
[dir] .layout-default .btn-link:not(:disabled):not(.disabled):focus-visible {
    color: var(--gp-link-hover);
}

[dir] .layout-default .btn-success {
    background-color: var(--gp-teal-fill);
    border-color: var(--gp-teal-fill);
    color: var(--gp-on-fill, #ffffff);
}

[dir] .layout-default .btn-success:hover,
[dir] .layout-default .btn-success:focus,
[dir] .layout-default .btn-success:active,
[dir] .layout-default .btn-success:not(:disabled):not(.disabled):active,
[dir] .layout-default .btn-success:not(:disabled):not(.disabled).active,
[dir] .layout-default .show > .btn-success.dropdown-toggle {
    background-color: var(--gp-ink);
    border-color: var(--gp-ink);
    color: var(--gp-on-fill, #ffffff);
}

[dir] .layout-default .btn-danger {
    background-color: var(--gp-danger);
    border-color: var(--gp-danger);
}

[dir] .layout-default .btn-warning {
    background-color: var(--gp-warning);
    border-color: var(--gp-warning);
    color: var(--gp-on-fill, #ffffff);
}

[dir] .layout-default .btn-info {
    background-color: var(--gp-info);
    border-color: var(--gp-info);
    color: var(--gp-on-fill, #ffffff);
}

[dir] .layout-default .btn:focus-visible {
    outline: 2px solid var(--gp-teal);
    outline-offset: 3px;
    box-shadow: none;
}

/* Segmented controls: only the ends are round. Without this a button group
   reads as a row of separate pills overlapping each other. */
[dir] .layout-default .btn-group > .btn:not(:first-child),
[dir] .layout-default .input-group > .btn:not(:first-child),
[dir] .layout-default .input-group-append .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

[dir] .layout-default .btn-group > .btn:not(:last-child),
[dir] .layout-default .input-group > .btn:not(:last-child),
[dir] .layout-default .input-group-prepend .btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* --- Badges --------------------------------------------------------------- */

/* Pills with a soft tint and dark text, not saturated blocks of colour. At
   0.675rem bold on a solid fill the old badges were the loudest thing in a
   table of numbers. Info is the one outline; see .badge-info below. */
[dir] .layout-default .badge {
    border-radius: var(--gp-radius-pill, 999px);
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* The theme's .badge-soft-* are a second set of tints in its own blue, green and grey (the
   "Monthly" cycle on Commission Requests); each is drawn as its shared twin (dev QA #12). */
[dir] .layout-default .badge-primary,
[dir] .layout-default .badge-soft-primary {
    background-color: var(--gp-teal-soft);
    color: var(--gp-teal-ink);
}

[dir] .layout-default .badge-success,
[dir] .layout-default .badge-soft-success {
    background-color: var(--gp-success-soft);
    color: var(--gp-success-ink);
}

[dir] .layout-default .badge-danger,
[dir] .layout-default .badge-soft-danger {
    background-color: var(--gp-danger-soft);
    color: var(--gp-danger);
}

[dir] .layout-default .badge-warning,
[dir] .layout-default .badge-soft-warning {
    background-color: var(--gp-warning-soft);
    color: var(--gp-warning-ink);
}

/* Info is an outline, as on the CyberSource screen: its tint sits 1.007:1 from the sand
   neutral, so a Pending chip read as an ended one. An inset line keeps every chip one height. */
[dir] .layout-default .badge-info,
[dir] .layout-default .badge-soft-info {
    background-color: transparent;
    box-shadow: inset 0 0 0 1px var(--gp-info);
    color: var(--gp-info);
}

[dir] .layout-default .badge-secondary,
[dir] .layout-default .badge-light,
[dir] .layout-default .badge-dark,
[dir] .layout-default .badge-soft-secondary,
[dir] .layout-default .badge-soft-light,
[dir] .layout-default .badge-soft-dark {
    background-color: var(--gp-sand);
    color: var(--gp-body);
}

/* Code text (a cron command, an email address, a webhook event): the theme's pink read 3.82:1
   on white. Dark ink on a light grey chip, 11.71:1 (dev QA #18). A code that breaks onto a
   second line (the webhook events list on a phone) draws a whole chip on each line. */
[dir] .layout-default code {
    padding: 1px 6px;
    border-radius: var(--gp-radius-xs, 6px);
    background-color: var(--gp-sand, #eceeef);
    color: var(--gp-ink, #12332f);
    font-family: var(--gp-mono);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

[dir] .layout-default pre code,
[dir] .layout-default a > code {
    color: inherit;
}

[dir] .layout-default pre code {
    padding: 0;
    background-color: transparent;
}

/* A template tag ({company.name}) in the Template Tags windows was Bootstrap's black key box
   with 3px corners; it is the code chip above (dev QA #1016). The command palette keeps its keys. */
[dir] .layout-default kbd:not(.pal-kbd) {
    padding: 1px 6px;
    border-radius: var(--gp-radius-xs, 6px);
    background-color: var(--gp-sand, #eceeef);
    box-shadow: none;
    color: var(--gp-ink, #12332f);
    font-family: var(--gp-mono);
}

/* The template picker on Pay Request and Estimate Settings: the chosen template took the
   picker's Bootstrap blue edge and 5px corners (dev QA #53). */
[dir] .layout-default .custom-control.image-checkbox label img {
    border-radius: var(--gp-radius-field, 12px);
}

[dir] .layout-default .custom-control.image-checkbox .custom-control-input:checked ~ label img {
    border-color: var(--gp-teal, #009c95);
    border-radius: var(--gp-radius-field, 12px);
}

/* --- Forms ---------------------------------------------------------------- */

/* A rule between a form's sections is a hairline like every other, not Bootstrap's 10% black. */
[dir] .layout-default hr {
    border-top-color: var(--gp-line, #d9eae8);
}

[dir] .layout-default .form-control,
[dir] .layout-default .custom-select,
[dir] .layout-default .select2-container .select2-selection--single {
    border: 1px solid var(--gp-field-line);
    border-radius: var(--gp-radius-field, 12px);
    box-shadow: none;
    color: var(--gp-ink);
}

[dir] .layout-default .form-control:focus,
[dir] .layout-default .custom-select:focus {
    border-color: var(--gp-teal);
    box-shadow: var(--gp-ring, 0 0 0 3px rgba(0, 155, 149, 0.16));
}

/* A plain select drew Bootstrap 4's up-and-down arrows beside the shared filter's chevron, as
   on Billing and the hand-written filters (Batch 9 browser check). It takes that chevron, in
   the resting icon grey. A list box (multiple, or a size) has no arrow. Classic keeps dev's. */
:root:not(.look-classic) .layout-default .custom-select:not([multiple]):not([size]) {
    padding-inline-end: 34px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237c8f8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-position: right 10px center;
    background-size: 16px 16px;
}

[dir=rtl]:not(.look-classic) .layout-default .custom-select:not([multiple]):not([size]) {
    background-position: left 10px center;
}

/* A searchable picker in a form or a filter is the size of the fields beside it: the picker
   theme drew it 40.5px tall in 16px text (PAYL-1973; in a filter, dev QA #23, #40). The theme's
   padding and line height centre 13.5px text in 38px, so only the height and size are set. */
[dir] .layout-default .select2-container .select2-selection--single {
    height: 38px;
    font-size: 13.5px;
}

/* A long name stays on one line and is cut with "…": the picker theme sets these three to
   inherit, so a long customer name wrapped and ran out of the field. */
[dir] .layout-default .select2-container .select2-selection--single .select2-selection__rendered {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* A select that takes several values (Extra Charges, Currency Settings, the product form's)
   draws its own box in place of the picker theme's, in the field edge like every other field,
   and the teal when focused. Both picker themes the panels use. */
[dir] .layout-default .select2-container .select2-selection--multiple {
    border: 1px solid var(--gp-field-line);
    border-radius: var(--gp-radius-field, 12px);
    min-height: 38px;
}

/* ...and the size of the fields beside it: the picker theme set it in 16px Bootstrap grey, 8px
   in, so a row of chips stood 43px against the 38px single picker next to it. */
[dir] .layout-default .select2-container .select2-selection--multiple {
    padding: 6px 8px;
    font-size: 13.5px;
    color: var(--gp-ink, #12332f);
}

[dir] .layout-default .select2-container .select2-selection--multiple .select2-search__field {
    font-size: inherit;
    color: inherit;
}

[dir] .layout-default .select2-container.select2-container--focus .select2-selection--multiple {
    border-color: var(--gp-teal);
}

[dir] .layout-default .select2-container .select2-selection--multiple .select2-selection__choice {
    border: 0;
    border-radius: var(--gp-radius-pill, 999px);
    background-color: var(--gp-teal-soft);
    color: var(--gp-ink);
}

[dir] .layout-default .select2-container .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--gp-body);
}

/* A picker's hint ("Search for a company...") was the library's #999, or the typed-text ink
   where the picker theme sets none; it is the hint every other panel field has (dev QA #1015). */
:root:not(.look-classic) .layout-default .select2-selection__placeholder {
    color: var(--gp-placeholder);
    font-weight: 300;
}

/* The open list is a menu like the others, a small gap from its field: the picker theme drew
   it with 5px corners, its rows in Bootstrap's grey at 54% (2.4:1), and its search box with a
   blue glow (dev QA #1014). Classic keeps dev's list. */
:root:not(.look-classic) .layout-default .select2-dropdown {
    border: 1px solid var(--gp-line);
    border-radius: var(--gp-radius-field, 12px);
    box-shadow: var(--gp-shadow-menu, 0 10px 24px -10px rgba(18, 51, 47, 0.28), 0 2px 6px -2px rgba(18, 51, 47, 0.12));
    padding: 4px;
}

:root:not(.look-classic) .layout-default .select2-container--open .select2-dropdown--below {
    margin-top: 4px;
}

:root:not(.look-classic) .layout-default .select2-container--open .select2-dropdown--above {
    margin-top: -4px;
}

/* The "bootstrap" picker theme (the pickers on a commission request, on "create for all" and
   on a service subscription) squared the open field's corners and hid its edge on the list's
   side, to join the two. The list now stands apart, so the field keeps both (Batch 10 browser
   check). One class heavier than the theme, which loads after this file. */
:root:not(.look-classic) .layout-default .select2-container--open .select2-selection {
    border-color: var(--gp-teal, #009c95);
    border-radius: var(--gp-radius-field, 12px);
}

:root:not(.look-classic) .layout-default .select2-results__option {
    padding: 6px 9px;
    border-radius: var(--gp-radius-row, 8px);
    color: var(--gp-body);
    font-size: 13.5px;
}

/* The row under the pointer or the arrow keys; the theme also set it bold, so the row moved. */
:root:not(.look-classic) .layout-default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--gp-teal-soft);
    color: var(--gp-ink);
    font-weight: 400;
}

:root:not(.look-classic) .layout-default .select2-results__option[aria-selected=true] {
    color: var(--gp-teal-ink);
    font-weight: 600;
}

:root:not(.look-classic) .layout-default .select2-results__option[aria-disabled=true] {
    color: var(--gp-faint);
}

/* "Searching…" is drawn as a locked row too, but it is a line to read. */
:root:not(.look-classic) .layout-default .select2-results__option.loading-results {
    color: var(--gp-faint-ink);
}

:root:not(.look-classic) .layout-default .select2-search--dropdown .select2-search__field {
    border-color: var(--gp-field-line);
    border-radius: var(--gp-radius-row, 8px);
    color: var(--gp-ink);
}

:root:not(.look-classic) .layout-default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--gp-teal);
    box-shadow: var(--gp-ring, 0 0 0 3px rgba(0, 155, 149, 0.16));
}

/* The list's search box was 13px, so an iPhone zoomed in when it was tapped. Both looks, as
   the filter fields (dev QA #186). The theme's fixed 28.75px height and 1.75 line height left
   22.75px inside for a 28px line, so the box takes the height its text needs. */
@media (max-width: 576px) {
    [dir] .layout-default .select2-search--dropdown .select2-search__field {
        height: auto;
        font-size: 16px;
        line-height: 1.5;
    }
}

/* The phone number's country picker (intl-tel-input 18) keeps its own black-tinted greys. */
[dir] .layout-default .iti--separate-dial-code .iti__selected-flag,
[dir] .layout-default .iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag {
    background-color: var(--gp-sand);
    border-start-start-radius: var(--gp-radius-field, 12px);
    border-end-start-radius: var(--gp-radius-field, 12px);
}

[dir] .layout-default .iti__selected-dial-code {
    color: var(--gp-ink);
}

[dir] .layout-default .iti__country-list {
    border: 1px solid var(--gp-line);
    border-radius: var(--gp-radius-row, 8px);
    box-shadow: var(--gp-shadow-menu);
}

[dir] .layout-default .iti__country.iti__highlight {
    background-color: var(--gp-hover);
}

[dir] .layout-default .iti__dial-code {
    color: var(--gp-faint-ink);
}

[dir] .layout-default .iti__divider {
    border-bottom-color: var(--gp-line);
}

[dir] .layout-default .form-control::placeholder {
    color: var(--gp-placeholder);
}

/* In the panel a placeholder is lighter and thinner than typed text (Ahmed's choice, 28 Oct
   2026). Every panel field names --gp-placeholder, so it is re-pointed here once. The
   customer portal carries .layout-default too, so it follows; payer and sign-in pages keep
   the 4.5:1 grey. The 300 weight is loaded with the font (layouts/_css). The Classic look
   keeps the old 400 and the old light grey. */
[dir] .layout-default {
    --gp-placeholder: var(--gp-placeholder-soft);
}

[dir] .layout-default ::placeholder {
    font-weight: 300;
}

[dir] .layout-default label,
[dir] .layout-default .col-form-label {
    color: var(--gp-body);
    font-weight: 600;
    /* The theme leaves these at the body's 1rem, which is the size of the heading
       above the form they label. */
    font-size: 12.5px;
    margin-bottom: 6px;
}

/* A checkbox's or radio's label sits beside its box, not above a field: the gap under a field's
   label pushed it off the box's line and spread a list of ticks unevenly. */
[dir] .layout-default :is(.custom-control-label, .form-check-label, .custom-control label, .form-check label) {
    margin-bottom: 0;
}

/* Every field gets the same air under it, not only the ones inside a card form. */
[dir] .layout-default .form-group {
    margin-bottom: 16px;
}

/* The last field gets no space under it, unless it ends a column with another row under it:
   then the next label sat 3px below it (dev QA #328). :where() keeps the rule's weight. */
[dir] .layout-default .form-group:last-child:not(:where(.row:not(:last-child) > :is(.col, [class*="col-"]) > .form-group)) {
    margin-bottom: 0;
}

/* The rule above also takes the space under a field when its column has another column
   under it: on a phone, where the columns stack, the next label sat 3px below it
   (PAYL-1991 QA, Pay Request Settings → Table Header). On a phone, a field that ends a
   column, with a column after it, keeps its 16px. Left out: a .col or .col-N column, which
   stays side by side; a card body, which has its own padding; and .ce-section-body, which
   sets 14px on every field. */
@media (max-width: 767.98px) {
    [dir] .layout-default .row:not(:where(.ce-section-body .row)) > [class*="col-"]:not(:last-child, .col, .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-auto, .card-body, .card-form__body) > .form-group:last-child {
        margin-bottom: 16px;
    }
}

/* On a computer, a last row of fields can still wrap: full-width .col-12 columns, or a filter
   row with more fields than fit on one line. The row puts 16px between its lines, and none
   under the last one. Only a row of plain field columns: every column ends in a field, or is
   the last one and is a field itself. A card body, a column with its own margin, or a column
   that ends in something else keeps the space it has today. Classic's card forms and
   .ce-section-body keep the space on each field, so they are left out. */
@media (min-width: 768px) {
    [dir] .layout-default .row:last-child:has(> :is(.col, [class*="col-"]) > .form-group:last-child):not(:has(> :not(.col, [class*="col-"]), > .form-group:not(:last-child), > :is(.card-body, .card-form__body, [class*="mb-"], [class*="my-"]), > :not(.form-group) > :last-child:not(.form-group))):not(:where(:root.look-classic .card-form .row, .ce-section-body .row)) {
        row-gap: 16px;
    }
}

/* An input group's ends meet the control, so only its outer corners round. */
[dir] .layout-default .input-group > .form-control:not(:last-child),
[dir] .layout-default .input-group > .custom-select:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

[dir] .layout-default .input-group > .form-control:not(:first-child),
[dir] .layout-default .input-group > .custom-select:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

[dir] .layout-default .input-group-text {
    background-color: var(--gp-sand);
    border-color: var(--gp-field-line);
    color: var(--gp-body);
}

/* --- Pagination ----------------------------------------------------------- */

[dir] .layout-default .page-link {
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: var(--gp-radius-pill, 999px);
    color: var(--gp-body);
    font-weight: 600;
}

[dir] .layout-default .page-link:hover {
    background-color: var(--gp-sand);
    color: var(--gp-ink);
}

[dir] .layout-default .page-item.active .page-link {
    background-color: var(--gp-teal-fill);
    border-color: var(--gp-teal-fill);
    color: var(--gp-on-fill, #ffffff);
}

/* The theme gives the greyed "‹" and "…" a grey edge, and squares the outer corners of the
   first and last items; both outrank the rule above. Classic keeps dev's corners, which a
   rounded list draws round and a plain one square. */
[dir] .layout-default .page-item.disabled .page-link {
    background-color: transparent;
    border-color: transparent;
    color: var(--gp-faint);
}

:root:not(.look-classic) .layout-default .page-item:first-child .page-link,
:root:not(.look-classic) .layout-default .page-item:last-child .page-link {
    border-radius: var(--gp-radius-pill, 999px);
}

/* --- Alerts, modals, dropdowns, tabs -------------------------------------- */

[dir] .layout-default .alert {
    border-radius: var(--gp-radius-sm);
    border-width: 1px;
}

[dir] .layout-default .alert-success {
    background-color: var(--gp-success-soft);
    border-color: var(--gp-success-soft);
    color: var(--gp-success-ink);
}

[dir] .layout-default .alert-danger {
    background-color: var(--gp-danger-soft);
    border-color: var(--gp-danger-soft);
    color: var(--gp-danger);
}

[dir] .layout-default .alert-warning {
    background-color: var(--gp-warning-soft);
    border-color: var(--gp-warning-soft);
    color: var(--gp-warning-ink);
}

[dir] .layout-default .alert-info,
[dir] .layout-default .alert-primary {
    background-color: var(--gp-info-soft);
    border-color: var(--gp-info-soft);
    color: var(--gp-info);
}

/* The theme's "soft" boxes (33 uses: the SMS and WhatsApp "not enabled" warning, the phone
   banner, the "Status: Draft" bar) draw coloured text on a 5% tint: its yellow is 1.59:1 and
   its green 2.6:1. They take the boxes above; the dark one is ink on sand (PAYL-1973). */
[dir] .layout-default .alert-soft-success {
    background-color: var(--gp-success-soft);
    border-color: var(--gp-success-soft);
    color: var(--gp-success-ink);
}

[dir] .layout-default .alert-soft-danger {
    background-color: var(--gp-danger-soft);
    border-color: var(--gp-danger-soft);
    color: var(--gp-danger);
}

[dir] .layout-default .alert-soft-warning {
    background-color: var(--gp-warning-soft);
    border-color: var(--gp-warning-soft);
    color: var(--gp-warning-ink);
}

[dir] .layout-default .alert-soft-info,
[dir] .layout-default .alert-soft-primary {
    background-color: var(--gp-info-soft);
    border-color: var(--gp-info-soft);
    color: var(--gp-info);
}

[dir] .layout-default .alert-soft-dark {
    background-color: var(--gp-sand);
    border-color: var(--gp-sand);
    color: var(--gp-ink);
}

[dir] .layout-default .modal-content {
    border: 1px solid var(--gp-line);
    border-radius: var(--gp-radius);
    /* The theme's shadow is rgba(0,0,0,.5) — a black halo. The scrim behind the
       dialog already separates it; this only needs to lift it off the scrim. */
    box-shadow: var(--gp-shadow-dialog, 0 24px 60px -20px rgba(18, 51, 47, 0.35));
}

/* The theme drops every .modal-content 150px down the page, which is why a dialog asking to be
   centred still sat below the middle of the window — and why a tall one ran off the bottom. A
   centred dialog is positioned by its own flex box, so it needs no offset of its own. */
[dir] .layout-default .modal-dialog-centered .modal-content {
    top: 0;
}

[dir] .layout-default .modal-header,
[dir] .layout-default .modal-footer {
    border-color: var(--gp-line);
}

[dir] .layout-default .modal-title {
    font-family: var(--gp-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--gp-ink);
}

/* The pop-ups after a save, an error or a delete (SweetAlert, appended to the body): a dialog,
   pill buttons, and the product's status colours in place of SweetAlert's green, pink and
   orange. layouts/_flash squares the box and its button for every page that loads it; these
   outrank that inside the panels only, so sign-in and payer pages keep their own (PAYL-1973).
   The button colours are set where each pop-up is opened. */
[dir] .layout-default .swal2-popup {
    border-radius: var(--gp-radius, 24px);
}

[dir] .layout-default .swal2-popup .swal2-title {
    font-family: var(--gp-display);
    letter-spacing: -0.02em;
    color: var(--gp-ink);
}

[dir] .layout-default .swal2-popup .swal2-html-container {
    color: var(--gp-body);
}

[dir] .layout-default .swal2-popup .swal2-styled {
    border-radius: var(--gp-radius-pill, 999px);
    padding: 0.55rem 1.6rem;
    font-weight: 600;
}

/* No glow: the pale one hid which button Enter presses. The keyboard gets the panel's ring,
   !important because the theme's `.swal2-actions button:focus { outline: none !important }`
   took every mark off these buttons. */
[dir] .layout-default .swal2-popup .swal2-styled:focus {
    box-shadow: none;
}

[dir] .layout-default .swal2-popup .swal2-styled:focus-visible {
    outline: 2px solid var(--gp-teal, #009c95) !important;
    outline-offset: 3px;
}

[dir] .layout-default .swal2-icon.swal2-success,
[dir] .layout-default .swal2-icon.swal2-success .swal2-success-ring {
    border-color: color-mix(in srgb, var(--gp-success, #00857f) 30%, transparent);
}

[dir] .layout-default .swal2-icon.swal2-success [class^='swal2-success-line'] {
    background-color: var(--gp-success, #00857f);
}

[dir] .layout-default .swal2-icon.swal2-error {
    border-color: var(--gp-danger, #b3402f);
    color: var(--gp-danger, #b3402f);
}

[dir] .layout-default .swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
    background-color: var(--gp-danger, #b3402f);
}

[dir] .layout-default .swal2-icon.swal2-warning {
    border-color: var(--gp-warning, #9a6b00);
    color: var(--gp-warning, #9a6b00);
}

[dir] .layout-default .swal2-icon.swal2-info,
[dir] .layout-default .swal2-icon.swal2-question {
    border-color: var(--gp-info, #44605e);
    color: var(--gp-info, #44605e);
}

/* A group of fields inside a window, set off from the fields above by a hairline and
   named in small capitals (PAYL-1971: the Integration Settings switches read as one
   block with the number above them). */
[dir] .layout-default .gp-modal-section {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--gp-line);
}

[dir] .layout-default .gp-modal-section__title {
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gp-faint-ink);
}

/* A field for a short number, such as a count, does not run the window's full width. */
[dir] .layout-default .gp-field--short {
    max-width: 9rem;
}

[dir] .layout-default .dropdown-menu {
    border: 1px solid var(--gp-line);
    border-radius: var(--gp-radius-field, 12px);
    box-shadow: var(--gp-shadow-menu, 0 10px 24px -10px rgba(18, 51, 47, 0.28), 0 2px 6px -2px rgba(18, 51, 47, 0.12));
    padding: 4px;
}

[dir] .layout-default .dropdown-item {
    padding: 6px 9px;
    border-radius: var(--gp-radius-row, 8px);
    color: var(--gp-body);
    font-size: 13px;
}

[dir] .layout-default .dropdown-item:hover,
[dir] .layout-default .dropdown-item:focus {
    background-color: var(--gp-hover);
    color: var(--gp-ink);
}

[dir] .layout-default .dropdown-divider {
    border-top-color: var(--gp-line);
}

[dir] .layout-default .nav-tabs {
    border-bottom-color: var(--gp-line);
}

[dir] .layout-default .nav-tabs .nav-link {
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--gp-body);
    font-weight: 600;
}

[dir] .layout-default .nav-tabs .nav-link.active {
    background-color: transparent;
    border-bottom-color: var(--gp-teal);
    color: var(--gp-ink);
}

/* --- Sidebar -------------------------------------------------------------- */

/* A collapsible group's arrow: the super admin nav's drawn chevron, quarter-turned while the
   group is open, in place of the theme's plus and minus set in the icon font. */
[dir] .layout-default .sidebar-group-arrow {
    margin-inline-start: auto;
    flex: none;
    color: var(--gp-faint, #7c8f8b);
    transition: transform 0.18s ease;
}

[dir=rtl] .layout-default .sidebar-group-arrow {
    transform: scaleX(-1);
}

[dir] .layout-default .sidebar-menu-button:not(.collapsed) > .sidebar-group-arrow {
    transform: rotate(90deg);
}

[dir] .layout-default .sidebar-menu-button:hover > .sidebar-group-arrow {
    color: var(--gp-body, #4c635f);
}

[dir] .layout-default .sidebar-menu-button {
    border-radius: var(--gp-radius-field, 12px);
    color: var(--gp-body);
}

[dir] .layout-default .sidebar-menu-button:hover {
    background-color: var(--gp-hover);
    color: var(--gp-ink);
}

/* The current page is the one thing a sidebar has to say clearly. */
[dir] .layout-default .sidebar-menu-item.active > .sidebar-menu-button {
    background-color: var(--gp-teal-soft);
    color: var(--gp-teal-ink);
    font-weight: 600;
}

/* The ink shade too: the logo teal on the soft tint is 2.95:1, under the 3:1 an icon needs. */
[dir] .layout-default .sidebar-menu-item.active > .sidebar-menu-button .sidebar-menu-icon {
    color: var(--gp-teal-ink);
}

[dir] .layout-default .sidebar-heading {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gp-faint-ink);
}

/* --- The look switch (PAYL-1957) -------------------------------------------
 *
 * The last row of both side menus, under a hairline: an ordinary menu row that
 * names the look the user is on, with what a click does at its end in the link
 * colour, "Try Modern" or "Back to Classic" (PAYL-1971). It is meant to be found
 * by whoever reaches the end of the menu, not to call out to everyone, so the
 * rest of it takes the rows' own colours.
 * ------------------------------------------------------------------------- */

[dir] .layout-default .gp-look-switch {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--gp-line);
}

[dir] .layout-default .gp-look-switch__form {
    display: flex;
    margin: 0;
}

/* A button wearing the menu row's class: only what a button adds is taken off. The row
   rule's inner spacing needs the button straight inside the <li>; this one sits in a form. */
[dir] .layout-default .gp-look-switch__button {
    flex: 1 1 auto;
    min-width: 0;
    padding-inline: 10px;
    border: 0;
    background-color: transparent;
    font-family: inherit;
    text-align: start;
    cursor: pointer;
}

/* Inside the row, as the side menu's rows draw it: the menu cuts what spills past them. */
[dir] .layout-default .gp-look-switch__button:focus-visible {
    outline: 2px solid var(--gp-teal, #009c95);
    outline-offset: -2px;
    box-shadow: none;
}

/* margin-inline-start, so it sits at the row's far end in Arabic too. */
[dir] .layout-default .gp-look-switch__action {
    flex: none;
    margin-inline-start: auto;
    padding-inline-start: 8px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--gp-link);
}

[dir] .layout-default .gp-look-switch__button:hover .gp-look-switch__action {
    color: var(--gp-link-hover);
    text-decoration: underline;
}

/* While an admin views as a merchant, the line under the look's name says which look the
   merchant uses: the visit starts on the admin's own look. */
[dir] .layout-default .gp-look-switch__hint {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
    white-space: normal;
    color: var(--gp-faint-ink, #637370);
}

/* A finger-sized row on a phone, where the menu is a drawer. */
@media (max-width: 767.98px) {
    [dir] .layout-default .gp-look-switch__button {
        min-height: 44px;
    }
}

/* --- Table density and small screens -------------------------------------- */

/*
 * These tables are read, not browsed: an operator scanning a hundred payment rows
 * wants more of them on screen than the theme's 0.75rem cell padding allows. The
 * row rhythm below fits roughly a third more rows in the same height while
 * keeping the 44px touch target on the action control at the end of each row.
 */
[dir] .layout-default .table-sm thead th,
[dir] .layout-default .table-sm td {
    padding: 6px 10px;
}

/* A number column is read by comparing digits down a column, which only works
   when the digits line up. */
[dir] .layout-default .table td.text-right,
[dir] .layout-default .table td.text-end,
[dir] .layout-default .table .dt-amount {
    font-variant-numeric: tabular-nums;
}

/*
 * Small screens.
 *
 * A table of nine columns cannot be made to fit a phone, so the honest answer is
 * to let it scroll and make the scroll obvious. .table-responsive already exists
 * on most of these; the rules below tighten the rhythm further, keep the scroll
 * smooth on iOS, and stop the container clipping the row-action menu — which is
 * why both menu implementations portal themselves to <body> on open.
 */
[dir] .layout-default .table-responsive {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

@media (max-width: 768px) {
    [dir] .layout-default .table thead th {
        padding: 8px 10px;
        font-size: 10px;
        letter-spacing: 0.08em;
    }

    [dir] .layout-default .table td {
        padding: 8px 10px;
        font-size: 13px;
    }

    /* The card's own gutter is dead space beside a table that already scrolls. */
    [dir] .layout-default .card > .table-responsive > .table td:first-child,
    [dir] .layout-default .card > .table-responsive > .table th:first-child {
        padding-inline-start: 14px;
    }

    [dir] .layout-default .card > .table-responsive > .table td:last-child,
    [dir] .layout-default .card > .table-responsive > .table th:last-child {
        padding-inline-end: 14px;
    }

    /* Pagination wraps rather than overflowing its card on a narrow screen. */
    [dir] .layout-default .pagination {
        flex-wrap: wrap;
        gap: 4px;
    }
}

/* --- Row actions ----------------------------------------------------------
 *
 * Two menus grew in these tables: .action-menu (x-action-dropdown, 61 call
 * sites, a more_horiz trigger) and .pfl-menu (x-actions-menu, 3 call sites, a
 * labelled "Actions" trigger with its own stylesheet). Both portal themselves to
 * <body> on open, because .table-responsive clips an absolutely positioned child.
 *
 * They are styled together here so a row action looks the same wherever it is
 * opened from. The two implementations still differ underneath — that is a
 * migration, not a paint job — but nothing about them reads as two systems now.
 * ------------------------------------------------------------------------- */

[dir] .layout-default .action-menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 28px;
    padding: 0 8px;
    background-color: transparent;
    border: 1px solid var(--gp-line);
    border-radius: var(--gp-radius-pill, 999px);
    color: var(--gp-body);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1;
}

[dir] .layout-default .action-menu-trigger:hover,
[dir] .layout-default .action-menu-trigger[aria-expanded="true"] {
    background-color: var(--gp-hover);
    border-color: var(--gp-teal);
    color: var(--gp-teal-ink);
}

/* Keyboard focus: the teal ring the buttons show. This selector used to head the icon
   rule below with no rule of its own, so a focused trigger took the icon's 1em width
   (30px down to 18px) and showed the browser's blue ring. */
[dir] .layout-default .action-menu-trigger:focus-visible {
    outline: 2px solid var(--gp-teal, #009c95);
    outline-offset: 3px;
}

[dir] .layout-default .action-menu-trigger .material-icons,
[dir] .layout-default .action-menu-trigger .gp-icon {
    font-size: 16px !important;
    width: 1em;
    height: 1em;
    line-height: 1;
}

/* The menus are portalled out of .layout-default when opened, so their own
   selectors carry the styling rather than a scoped one. */
[dir] .action-menu,
[dir] .pfl-menu {
    min-width: 168px;
    padding: 4px;
    background-color: var(--gp-panel, #fff);
    border: 1px solid var(--gp-line, #d9eae8);
    border-radius: var(--gp-radius-field, 12px);
    /* Tighter and darker than the panel shadow: a menu sits above the page for a
       moment and has to read as lifted off it, not as another surface on it. */
    box-shadow: var(--gp-shadow-menu, 0 10px 24px -10px rgba(18, 51, 47, 0.28), 0 2px 6px -2px rgba(18, 51, 47, 0.12));
}

/*
 * Items are scoped under their menu rather than styled on their own class: the
 * theme carries [dir=ltr] a:not(.btn) { text-decoration: underline }, whose
 * :not() argument contributes a class to its specificity — (0,2,1). A bare
 * [dir] .pfl-menu__item is (0,2,0) and loses, so every menu link came out
 * underlined. The extra parent makes these (0,3,0).
 */
[dir] .action-menu .action-menu-item,
[dir] .pfl-menu .pfl-menu__item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 9px;
    background: none;
    border: 0;
    border-radius: var(--gp-radius-row, 8px);
    color: var(--gp-body, #4c635f);
    font-size: 13px;
    font-weight: 500;
    text-align: start;
    text-decoration: none;
}

[dir] .action-menu .action-menu-item:hover,
[dir] .action-menu .action-menu-item:focus,
[dir] .pfl-menu .pfl-menu__item:hover,
[dir] .pfl-menu .pfl-menu__item:focus {
    background-color: var(--gp-hover, rgba(0, 155, 149, 0.05));
    color: var(--gp-ink, #12332f);
    text-decoration: none;
}

/* The arrow keys move through the items. The faint hover fill alone does not show which one has
   the keyboard, so it takes the teal ring the menu button shows, drawn inside the item. */
[dir] .action-menu .action-menu-item:focus-visible {
    outline: 2px solid var(--gp-teal, #009c95);
    outline-offset: -2px;
}

[dir] .action-menu .action-menu-item .material-icons,
[dir] .action-menu .action-menu-item .gp-icon,
[dir] .pfl-menu .pfl-menu__item .material-icons,
[dir] .pfl-menu .pfl-menu__item .gp-icon {
    font-size: 15px !important;
    width: 1em;
    height: 1em;
    line-height: 1;
    color: var(--gp-faint, #7c8f8b);
}

[dir] .action-menu .action-menu-item--danger,
[dir] .pfl-menu .pfl-menu__item--danger {
    color: var(--gp-danger, #b3402f);
}

[dir] .action-menu .action-menu-item--danger:hover,
[dir] .action-menu .action-menu-item--danger:focus,
[dir] .pfl-menu .pfl-menu__item--danger:hover,
[dir] .pfl-menu .pfl-menu__item--danger:focus {
    background-color: var(--gp-danger-soft, #f7e8e5);
    color: var(--gp-danger, #b3402f);
}

[dir] .action-menu .action-menu-item--danger .material-icons,
[dir] .action-menu .action-menu-item--danger .gp-icon,
[dir] .pfl-menu .pfl-menu__item--danger .material-icons,
[dir] .pfl-menu .pfl-menu__item--danger .gp-icon {
    color: currentColor;
}

[dir] .action-menu .dropdown-divider,
[dir] .action-menu .action-menu-sep,
[dir] .pfl-menu .pfl-menu__sep {
    height: 0;
    margin: 4px 6px;
    border-top: 1px solid var(--gp-line, #d9eae8);
}

/* --- Checkboxes and radios ------------------------------------------------
 *
 * Three idioms are in the views and they never matched each other: Bootstrap's
 * custom-control (209 uses, box drawn on the label's ::before with the input
 * hidden behind it), form-check (41 uses, a native input), and a bare
 * type="checkbox" with no wrapper at all (81 files). Bespoke ones grew on top —
 * .pfb-check, .bc-check, .pi-cbox — because none of the three looked right.
 *
 * All of them are drawn identically here: the same 18px box, the same warm
 * hairline, the same teal fill and the same white mark. The native input keeps
 * its own behaviour and its own focus ring throughout; nothing is replaced by a
 * div pretending to be a control.
 * ------------------------------------------------------------------------- */

/* The custom-control idiom: the input is hidden and the label draws the box. */
[dir] .layout-default .custom-control:not(.custom-switch):not(.custom-checkbox-toggle) .custom-control-label::before {
    top: 0.15rem;
    width: 18px;
    height: 18px;
    background-color: var(--gp-panel);
    border: 1px solid var(--gp-control-line);
    border-radius: var(--gp-radius-xs, 6px);
    box-shadow: none;
    transition: background-color 0.12s ease, border-color 0.12s ease;
}

/* The round option's box, and the ticked, focused and locked states below, each also name
   the box as precisely as the rule above does. The browser follows the more precise rule,
   so with the short names alone a ticked box stayed white under its white tick, the focus
   ring and the locked fill never showed, and a round option was square. The short
   names stay for the switches and the toggles, which the box rule above leaves out. */
[dir] .layout-default .custom-radio .custom-control-label::before,
[dir] .layout-default .custom-control.custom-radio:not(.custom-switch):not(.custom-checkbox-toggle) .custom-control-label::before {
    border-radius: var(--gp-radius-round, 50%);
}

[dir] .layout-default .custom-control:not(.custom-switch):not(.custom-checkbox-toggle) .custom-control-label::after {
    top: 0.15rem;
    width: 18px;
    height: 18px;
    background-size: 62% 62%;
}

[dir] .layout-default .custom-control-input:checked ~ .custom-control-label::before,
[dir] .layout-default .custom-control:not(.custom-switch):not(.custom-checkbox-toggle) .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--gp-teal);
    border-color: var(--gp-teal);
}

/* A box's ring shows when it is reached by keyboard (:focus-visible), not after a click, as
   the panel's other tick boxes do. */
[dir] .layout-default .custom-control-input:focus ~ .custom-control-label::before {
    border-color: var(--gp-teal);
    box-shadow: var(--gp-ring, 0 0 0 3px rgba(0, 155, 149, 0.16));
}

/* By keyboard the box takes the panel's ring, 2px of teal 2px away, drawn as a shadow because
   the box is the label's ::before: the soft glow alone was 1.2:1 (dev QA #159). */
[dir] .layout-default .custom-control:not(.custom-switch):not(.custom-checkbox-toggle) .custom-control-input:focus-visible ~ .custom-control-label::before {
    border-color: var(--gp-teal);
    box-shadow: 0 0 0 2px var(--gp-panel, #ffffff), 0 0 0 4px var(--gp-teal, #009c95);
}

[dir] .layout-default .custom-control-input:disabled ~ .custom-control-label {
    color: var(--gp-faint);
}

[dir] .layout-default .custom-control-input:disabled ~ .custom-control-label::before,
[dir] .layout-default .custom-control:not(.custom-switch):not(.custom-checkbox-toggle) .custom-control-input:disabled ~ .custom-control-label::before {
    background-color: var(--gp-sand);
    border-color: var(--gp-line);
}

/* A locked box that is ticked keeps a fill, grey rather than teal, so its white tick still
   shows (3.41:1) and the box still reads as locked. */
[dir] .layout-default .custom-control:not(.custom-switch):not(.custom-checkbox-toggle) .custom-control-input:disabled:checked ~ .custom-control-label::before {
    background-color: var(--gp-faint);
    border-color: var(--gp-faint);
}

[dir] .layout-default .custom-control-label {
    color: var(--gp-body);
    font-weight: 500;
    cursor: pointer;
}

/*
 * Everything else: a real input, drawn directly. `appearance: none` reaches the
 * form-check idiom and the bare inputs alike, which is what makes the wrapper
 * class stop mattering. Anything that hides its input — the custom-control above,
 * or a component drawing its own box — is left alone by the :not() guard.
 */
[dir] .layout-default input[type="checkbox"]:not(.custom-control-input):not([role="switch"]),
[dir] .layout-default input[type="radio"]:not(.custom-control-input) {
    appearance: none;
    -webkit-appearance: none;
    flex: none;
    width: 18px;
    height: 18px;
    margin-top: 0.15rem;
    background-color: var(--gp-panel);
    border: 1px solid var(--gp-control-line);
    border-radius: var(--gp-radius-xs, 6px);
    cursor: pointer;
    transition: background-color 0.12s ease, border-color 0.12s ease;
}

[dir] .layout-default input[type="radio"]:not(.custom-control-input) {
    border-radius: var(--gp-radius-round, 50%);
}

[dir] .layout-default input[type="checkbox"]:not(.custom-control-input):not([role="switch"]):checked,
[dir] .layout-default input[type="radio"]:not(.custom-control-input):checked {
    background-color: var(--gp-teal);
    border-color: var(--gp-teal);
    /* The mark is drawn rather than set in a font, so it cannot depend on an
       icon font having loaded. */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 68% 68%;
}

[dir] .layout-default input[type="radio"]:not(.custom-control-input):checked {
    background-image: none;
    box-shadow: inset 0 0 0 3px var(--gp-panel);
}

[dir] .layout-default input[type="checkbox"]:not(.custom-control-input):not([role="switch"]):focus-visible,
[dir] .layout-default input[type="radio"]:not(.custom-control-input):focus-visible {
    outline: none;
    border-color: var(--gp-teal);
    box-shadow: 0 0 0 2px var(--gp-panel, #ffffff), 0 0 0 4px var(--gp-teal, #009c95);
}

[dir] .layout-default input[type="checkbox"]:not(.custom-control-input):not([role="switch"]):disabled,
[dir] .layout-default input[type="radio"]:not(.custom-control-input):disabled {
    background-color: var(--gp-sand);
    cursor: not-allowed;
}

[dir] .layout-default .form-check-label {
    color: var(--gp-body);
    font-weight: 500;
    cursor: pointer;
}

/*
 * The switch.
 *
 * Bootstrap draws it from the same two pseudo-elements as the checkbox — a track
 * on ::before and a knob on ::after — which is why the checkbox rules above have
 * to exclude it: painted as an 18px box, the track lost its width and the knob
 * sat off to one side of it.
 */
[dir] .layout-default .custom-switch .custom-control-label::before {
    top: 0.1rem;
    inset-inline-start: -2.25rem;
    width: 34px;
    height: 20px;
    background-color: var(--gp-line);
    border: 1px solid var(--gp-control-line);
    border-radius: var(--gp-radius-switch, 999px);
    box-shadow: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

[dir] .layout-default .custom-switch .custom-control-label::after {
    top: calc(0.1rem + 3px);
    inset-inline-start: calc(-2.25rem + 3px);
    width: 14px;
    height: 14px;
    background-color: var(--gp-panel);
    background-image: none;
    border-radius: var(--gp-radius-round, 50%);
    box-shadow: var(--gp-shadow-lift, 0 1px 2px rgba(18, 51, 47, 0.25));
    transition: transform 0.15s ease;
}

[dir] .layout-default .custom-switch .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--gp-teal);
    border-color: var(--gp-teal);
}

[dir] .layout-default .custom-switch .custom-control-input:checked ~ .custom-control-label::after {
    background-color: var(--gp-panel);
    transform: translateX(14px);
}

[dir=rtl] .layout-default .custom-switch .custom-control-input:checked ~ .custom-control-label::after {
    transform: translateX(-14px);
}

[dir] .layout-default .custom-switch .custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: var(--gp-ring, 0 0 0 3px rgba(0, 155, 149, 0.16));
}

[dir] .layout-default .custom-switch .custom-control-input:focus-visible ~ .custom-control-label::before {
    box-shadow: 0 0 0 2px var(--gp-panel, #ffffff), 0 0 0 4px var(--gp-teal, #009c95);
}

[dir] .layout-default .custom-switch .custom-control-input:disabled ~ .custom-control-label::before {
    background-color: var(--gp-sand);
}

/*
 * The other switch.
 *
 * Two idioms are in the views: Bootstrap 4's .custom-switch, drawn on the label's
 * pseudo-elements above, and Bootstrap 5's .form-switch, which is a real input
 * with the knob painted on as a background image. The companies table uses the
 * second, so the checkbox rules had been squaring it off into an 18px box. Both
 * are the same control on screen now.
 */
[dir] .layout-default .form-switch .form-check-input,
[dir] .layout-default input[type="checkbox"][role="switch"] {
    appearance: none;
    -webkit-appearance: none;
    flex: none;
    width: 34px;
    height: 20px;
    margin-top: 0.1rem;
    border: 1px solid var(--gp-control-line);
    border-radius: var(--gp-radius-pill, 999px);
    background-color: var(--gp-line);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='%23fff'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 2px center;
    background-size: 14px 14px;
    cursor: pointer;
    transition: background-color 0.15s ease, background-position 0.15s ease, border-color 0.15s ease;
}

[dir] .layout-default .form-switch .form-check-input:checked,
[dir] .layout-default input[type="checkbox"][role="switch"]:checked {
    background-color: var(--gp-teal);
    border-color: var(--gp-teal);
    background-position: right 2px center;
}

[dir] .layout-default .form-switch .form-check-input:focus-visible,
[dir] .layout-default input[type="checkbox"][role="switch"]:focus-visible {
    outline: none;
    border-color: var(--gp-teal);
    box-shadow: 0 0 0 2px var(--gp-panel, #ffffff), 0 0 0 4px var(--gp-teal, #009c95);
}

[dir] .layout-default .form-switch .form-check-input:disabled,
[dir] .layout-default input[type="checkbox"][role="switch"]:disabled {
    background-color: var(--gp-sand);
    cursor: not-allowed;
}

[dir=rtl] .layout-default .form-switch .form-check-input:checked,
[dir=rtl] .layout-default input[type="checkbox"][role="switch"]:checked {
    background-position: left 2px center;
}

/* --- The button ------------------------------------------------------------
 *
 * .gp-btn is the one button. It exists beside the .btn-* rules above because
 * bespoke buttons kept being written — .pfl-confirm__btn, .vcc-cta, a dozen
 * inline-styled ones — whenever Bootstrap's felt wrong, and each arrived with
 * its own radius, weight and green. New markup uses <x-button>, which renders
 * these classes; existing .btn markup keeps working and looks the same.
 * ------------------------------------------------------------------------- */

[dir] .gp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 9px 20px;
    border: 1px solid transparent;
    border-radius: var(--gp-radius-pill, 999px);
    background-color: transparent;
    color: var(--gp-ink, #12332f);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

[dir] .gp-btn:hover,
[dir] .gp-btn:focus {
    text-decoration: none;
}

[dir] .gp-btn:focus-visible {
    outline: 2px solid var(--gp-teal, #009c95);
    outline-offset: 3px;
}

[dir] .gp-btn:disabled,
[dir] .gp-btn[disabled],
[dir] .gp-btn.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Sizes. */
[dir] .gp-btn--sm {
    min-height: 32px;
    padding: 7px 14px;
    font-size: 13px;
    gap: 6px;
}

[dir] .gp-btn--lg {
    min-height: 46px;
    padding: 13px 26px;
    font-size: 16px;
}

[dir] .gp-btn--block {
    width: 100%;
}

/* Variants. Each swaps colour on hover rather than lifting or glowing. */
[dir] .gp-btn--primary {
    background-color: var(--gp-teal-fill, #00857f);
    color: var(--gp-on-fill, #ffffff);
}

[dir] .gp-btn--primary:hover,
[dir] .gp-btn--primary:focus {
    background-color: var(--gp-ink, #12332f);
    color: var(--gp-on-fill, #ffffff);
}

[dir] .gp-btn--dark {
    background-color: var(--gp-ink, #12332f);
    color: var(--gp-on-fill, #ffffff);
}

[dir] .gp-btn--dark:hover,
[dir] .gp-btn--dark:focus {
    background-color: var(--gp-teal-fill, #00857f);
    color: var(--gp-on-fill, #ffffff);
}

[dir] .gp-btn--secondary {
    border-color: var(--gp-line, #d9eae8);
    color: var(--gp-ink, #12332f);
}

[dir] .gp-btn--secondary:hover,
[dir] .gp-btn--secondary:focus {
    border-color: var(--gp-ink, #12332f);
    color: var(--gp-ink, #12332f);
}

[dir] .gp-btn--ghost {
    color: var(--gp-body, #4c635f);
}

[dir] .gp-btn--ghost:hover,
[dir] .gp-btn--ghost:focus {
    background-color: var(--gp-hover, rgba(0, 155, 149, 0.05));
    color: var(--gp-ink, #12332f);
}

[dir] .gp-btn--danger {
    background-color: var(--gp-danger, #b3402f);
    color: var(--gp-on-fill, #ffffff);
}

[dir] .gp-btn--danger:hover,
[dir] .gp-btn--danger:focus {
    background-color: var(--gp-ink, #12332f);
    color: var(--gp-on-fill, #ffffff);
}

[dir] .gp-btn--danger-quiet {
    border-color: var(--gp-line, #d9eae8);
    color: var(--gp-danger, #b3402f);
}

[dir] .gp-btn--danger-quiet:hover,
[dir] .gp-btn--danger-quiet:focus {
    background-color: var(--gp-danger-soft, #f7e8e5);
    border-color: var(--gp-danger-soft, #f7e8e5);
    color: var(--gp-danger, #b3402f);
}

[dir] .gp-btn--success {
    background-color: var(--gp-success, #00857f);
    color: var(--gp-on-fill, #ffffff);
}

[dir] .gp-btn--success:hover,
[dir] .gp-btn--success:focus {
    background-color: var(--gp-ink, #12332f);
    color: var(--gp-on-fill, #ffffff);
}

/* An icon-only button is a circle, and keeps the same 38px target. */
[dir] .gp-btn--icon {
    width: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: var(--gp-radius-round, 50%);
}

[dir] .gp-btn--icon.gp-btn--sm {
    width: 32px;
    min-height: 32px;
}

/* --- Icons ----------------------------------------------------------------
 *
 * x-icon draws its set inline, stroked in currentColor, so an icon sits at the
 * weight of the text beside it rather than as a filled glyph from a font. The
 * legacy class is what the component falls back to for a name it has not been
 * given a path for yet; it is styled to sit at the same size so a half-migrated
 * screen does not jump.
 * ------------------------------------------------------------------------- */

[dir] .gp-icon {
    display: inline-block;
    flex: none;
    vertical-align: -0.18em;
}

/* A drawn icon carries less visual weight than a filled glyph at the same size,
   so the set sits a size up from where the ligature sat and strokes a shade
   heavier. Anything that wants otherwise passes its own :size. */
[dir] .gp-icon--solid {
    fill: currentColor;
}

[dir] .gp-icon--legacy {
    vertical-align: -0.22em;
    line-height: 1;
}

/* The Classic look's filled icons (PAYL-1957): the font's glyph inside a box that is a
   .gp-icon, so a rule that sizes a drawn icon by its width and height sizes this one too.
   The glyph fills whatever box it is given. */
[dir] .gp-icon--classic {
    width: var(--icon-size, 20px);
    height: var(--icon-size, 20px);
    container-type: size;
}

[dir] .gp-icon--classic > i {
    display: block;
    height: 100%;
    font-size: min(100cqw, 100cqh);
    line-height: 1;
    text-align: center;
}

/* --- Navbar menus ----------------------------------------------------------
 *
 * Four menus hang off the top bar — the company switcher, the language picker,
 * notifications and the account menu — each built its own way: two nav-links, a
 * bare div and a .btn-light. The panel itself is drawn by the dropdown rules
 * above; only what the theme leaves wrong is corrected here, because the header
 * is a 35KB partial with its own responsive rules and a heavier hand fights them.
 * ------------------------------------------------------------------------- */

/* The hover tint is on the control, so the chevron and the avatar inside it need
   room before it reaches the edge. */
[dir] .layout-default .navbar-main .nav-item > .dropdown-toggle,
[dir] .layout-default .navbar-main .dropdown > .dropdown-toggle {
    padding-inline: 10px;
    border-radius: var(--gp-radius-pill, 999px);
    color: var(--gp-body);
    transition: background-color 0.15s ease, color 0.15s ease;
}

[dir] .layout-default .navbar-main .dropdown-toggle:hover,
[dir] .layout-default .navbar-main .dropdown-toggle[aria-expanded="true"] {
    background-color: var(--gp-hover);
    color: var(--gp-ink);
}

/* The language picker is a .btn-light in one place: up here it is a menu
   trigger, not a form button, and it brought a button's focus ring with it. */
[dir] .layout-default .navbar-main .btn-light.dropdown-toggle {
    background-color: transparent;
    border-color: transparent;
    box-shadow: none;
}

[dir] .layout-default .navbar-main .btn-light.dropdown-toggle:focus,
[dir] .layout-default .navbar-main .btn-light.dropdown-toggle.focus,
[dir] .layout-default .navbar-main .btn-light.dropdown-toggle:active,
[dir] .layout-default .navbar-main .btn-light.dropdown-toggle:not(:disabled):not(.disabled):active:focus {
    background-color: var(--gp-hover);
    border-color: transparent;
    box-shadow: none;
}

/* The company switcher's trigger carries no label of its own, so it was holding
   a full nav-link's width for nothing. */
[dir] .layout-default .navbar-main .nav-item.dropdown > a[href="#companies"] {
    padding-inline: 8px;
}

/* Rows. dropdown-item-text is what the switcher and the account menu use for
   their name headers, and it was inheriting nothing. */
[dir] .layout-default .navbar-main .dropdown-menu .dropdown-item-text {
    padding: 6px 9px;
    color: var(--gp-faint-ink);
    font-size: 12px;
}

[dir] .layout-default .navbar-main .dropdown-menu .dropdown-item-text strong {
    display: block;
    color: var(--gp-ink);
    font-size: 13.5px;
    font-weight: 600;
}

/*
 * The notifications panel lays its own rows out with the theme's spacing
 * utilities and a full-width header, so the menu's 4px padding doubled up on
 * every edge — most visibly as a gap down the left of its footer.
 */
[dir] .layout-default .navbar-main .dropdown-menu.dropdown-menu-xl {
    padding: 0;
    overflow: hidden;
}

/*
 * Its header is marked .bg-primary.text-white, which resolved to neither: the
 * theme declares --primary under a selector that never matches, and the
 * Bootstrap 5 CDN layered on top paints its own dark fill there — leaving dark
 * text on a dark bar. It is a section head like every other panel head now.
 */
[dir] .layout-default .navbar-main .dropdown-menu .bg-primary {
    background-color: var(--gp-sand) !important;
    border-bottom: 1px solid var(--gp-line);
}

[dir] .layout-default .navbar-main .dropdown-menu .bg-primary,
[dir] .layout-default .navbar-main .dropdown-menu .bg-primary h6,
[dir] .layout-default .navbar-main .dropdown-menu .bg-primary .text-white,
[dir] .layout-default .navbar-main .dropdown-menu .bg-primary a {
    color: var(--gp-ink) !important;
}

[dir] .layout-default .navbar-main .dropdown-menu .bg-primary h6 {
    font-family: var(--gp-display);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

[dir] .layout-default .navbar-main .dropdown-menu.dropdown-menu-xl .dropdown-item,
[dir] .layout-default .navbar-main .dropdown-menu.dropdown-menu-xl > a {
    border-radius: 0;
}

/* A menu long enough to scroll gets the same rhythm as one that does not. */
[dir] .layout-default .navbar-main .dropdown-menu.overflow-auto {
    max-height: min(70vh, 420px);
}

/* --- Sidebar, continued ---------------------------------------------------
 *
 * The merchant sidebar's account block and submenus were left on the theme's
 * greys while the menu rows above moved. The super admin sidebar carries its own
 * <style> block in the partial (it has to: the layout renders @stack('css')
 * before including it), and that block now names the same tokens, so the two
 * navs are the same object with different contents.
 * ------------------------------------------------------------------------- */

/* The theme fills the account block a light grey; it is the menu's own white, so the
   block reads as the top of the menu rather than a grey patch on it. */
[dir] .layout-default .sidebar-account {
    background-color: transparent;
    border-bottom-color: var(--gp-line) !important;
}

[dir] .layout-default .sidebar-account .sidebar-account-name,
[dir] .layout-default .sidebar-account strong {
    font-family: var(--gp-display);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--gp-ink);
}

/* The store buttons at the top of the side menu (layouts/_side_menu_apps), only from 576 to
   1399px, where the top bar has no room for them (layouts/_header). At full size: Apple asks for
   a badge at least 40px tall on a screen, Google for the badge as supplied. 8px insets keep the
   two side by side in the super admin menu too, which is 8px narrower. */
[dir] .layout-default .gp-side-apps {
    display: none;
}

@media (min-width: 576px) and (max-width: 1399.98px) {
    [dir] .layout-default .gp-side-apps {
        display: block;
        padding: 14px 4px 14px;
        border-bottom: 1px solid var(--gp-line);
    }
}

[dir] .layout-default .gp-side-apps .gp-side-apps__title {
    padding-inline: 8px;
}

[dir] .layout-default .gp-side-apps__row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-inline: 8px;
}

[dir] .layout-default .gp-side-apps img {
    display: block;
    width: auto;
    height: 40px;
}

[dir] .layout-default .sidebar-menu-icon {
    color: var(--gp-faint);
}

[dir] .layout-default .sidebar-menu-button:hover .sidebar-menu-icon {
    color: var(--gp-body);
}

/* A submenu is a continuation of its parent row, so it is set quieter and
   indented rather than boxed. */
[dir] .layout-default .sidebar-submenu .sidebar-menu-button {
    font-size: 13px;
    font-weight: 500;
    color: var(--gp-body);
}

[dir] .layout-default .sidebar-submenu .sidebar-menu-item.active > .sidebar-menu-button {
    background-color: transparent;
    color: var(--gp-teal-ink);
}

/* Under the pointer a sub-item took the theme's near-black #212121, which outweighs the row's
   hover rule; it takes the ink a top row takes (dev QA #1019). The current page keeps its teal,
   and Classic keeps dev's. */
:root:not(.look-classic) .layout-default .sidebar-submenu .sidebar-menu-item:not(.active) > .sidebar-menu-button:hover {
    color: var(--gp-ink);
}

:root:not(.look-classic) .layout-default .sidebar-submenu .sidebar-menu-item:not(.active) > .sidebar-menu-button:hover .sidebar-menu-icon {
    color: var(--gp-body);
}

/* --- Navbar, continued ----------------------------------------------------
 *
 * The top bar sits on the ground rather than on its own white plate, so the
 * hairline under it is the only thing separating the two.
 * ------------------------------------------------------------------------- */

[dir] .layout-default .navbar-main {
    background-color: var(--gp-panel) !important;
}

[dir] .layout-default .navbar-main .nav-link {
    color: var(--gp-body);
}

[dir] .layout-default .navbar-main .nav-link:hover {
    color: var(--gp-ink);
}

/* The badge on the notifications bell is a count, not a status: it stays a solid
   dot so it reads at a glance against the icon behind it. */
[dir] .layout-default .navbar-main .badge-notifications,
[dir] .layout-default .navbar-main .nav-link .badge {
    background-color: var(--gp-danger);
    color: var(--gp-on-fill, #ffffff);
}

/* --- Form sections --------------------------------------------------------
 *
 * .ce-section is the panel a long form is broken into — customer, items, notes.
 * It was defined identically in seven view files, copied each time a new form
 * needed one, and every copy was square, borderless-cornered and topped with a
 * grey band. It is declared once here, and the copies are gone.
 * ------------------------------------------------------------------------- */

[dir] .layout-default .ce-section {
    background: var(--gp-panel);
    border: 1px solid var(--gp-line);
    border-radius: var(--gp-radius-sm);
    /* The corner has to clip the head's fill, or the band squares it off again. */
    overflow: hidden;
    box-shadow: var(--gp-shadow-card, 0 8px 24px -18px rgba(18, 51, 47, 0.18));
    margin-bottom: 16px;
}

/*
 * The head was a teal uppercase label on a grey band — the only place in the
 * product where a section title shouted. It reads as a card header now: the
 * display face, ink, on the panel itself, with the hairline doing the dividing.
 */
[dir] .layout-default .ce-section-head {
    padding: 14px 20px;
    background: transparent;
    border-bottom: 1px solid var(--gp-line);
    font-family: var(--gp-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--gp-ink);
}

[dir] .layout-default .ce-section-body {
    padding: 18px 20px 10px;
}

[dir] .layout-default .ce-section-body .form-group {
    margin-bottom: 14px;
}

/* --- The account and company menus ----------------------------------------
 *
 * Both are a name header, a rule, then a list of links. The header was inheriting
 * a bare .dropdown-item-text and the rules were carrying the theme's full-width
 * margins, so the menu read as three loose fragments rather than one card.
 * ------------------------------------------------------------------------- */

[dir] .layout-default .navbar-main .dropdown-menu:not(.dropdown-menu-xl) {
    min-width: 220px;
}

[dir] .layout-default .navbar-main .dropdown-menu .dropdown-item-text--lh {
    padding: 10px 12px 8px;
    line-height: 1.35;
}

[dir] .layout-default .navbar-main .dropdown-menu .dropdown-divider {
    margin: 4px 8px;
    border-top-color: var(--gp-line);
}

[dir] .layout-default .navbar-main .dropdown-menu .dropdown-item {
    padding: 7px 12px;
    font-size: 13.5px;
}

/* The last row of the account menu is the way out, so it is set apart. */
[dir] .layout-default .navbar-main #account_menu .dropdown-item:last-child {
    color: var(--gp-danger);
}

[dir] .layout-default .navbar-main #account_menu .dropdown-item:last-child:hover {
    background-color: var(--gp-danger-soft);
    color: var(--gp-danger);
}

/* --- Dialog close ---------------------------------------------------------
 *
 * The filter-fields and column pickers each drew their own: a filled sand disc
 * with a text glyph in it, one at 999px and one at 50%. A close is a quiet
 * affordance — it is the way out, not an action — so it is a ghost circle with
 * the drawn icon, and it is declared once because both dialogs need it and
 * neither should own it.
 * ------------------------------------------------------------------------- */

[dir] .ftm-close,
[dir] .ctm-close,
[dir] .lvm-close,
[dir] .d-close,
[dir] .layout-default .modal-header .close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border: 1px solid transparent;
    border-radius: var(--gp-radius-round, 50%);
    background: transparent;
    color: var(--gp-faint, #7c8f8b);
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}

[dir] .ftm-close:hover,
[dir] .ctm-close:hover,
[dir] .lvm-close:hover,
[dir] .d-close:hover,
[dir] .layout-default .modal-header .close:hover {
    background: var(--gp-hover, rgba(0, 156, 149, 0.05));
    color: var(--gp-ink, #12332f);
}

[dir] .ftm-close:focus-visible,
[dir] .ctm-close:focus-visible,
[dir] .lvm-close:focus-visible,
[dir] .d-close:focus-visible,
[dir] .layout-default .modal-header .close:focus-visible {
    outline: 2px solid var(--gp-teal, #009c95);
    outline-offset: 2px;
}

/* A window's close. Bootstrap fades it to 50% (75% on hover and focus) and pulls it
   16px up and out of the header: the faint grey read 1.7:1 on white, and the × sat
   14px above the title's middle. At full strength it is 3.4:1, centred on the title
   line. The text × of a window not yet on x-modal takes the same strength and place. */
[dir] .layout-default .modal-header .close {
    align-self: center;
    margin: 0;
    margin-inline-start: auto;
    margin-inline-end: -6px;
    padding: 0;
    opacity: 1;
    text-shadow: none;
}

[dir] .layout-default .modal-header .close:not(:disabled):not(.disabled):hover,
[dir] .layout-default .modal-header .close:not(:disabled):not(.disabled):focus {
    opacity: 1;
}

/* --- One primary ----------------------------------------------------------
 *
 * The theme ships Bootstrap's whole success scale in green — .text-success on 46
 * call sites, .bg-success on 8, plus the borders and table variants — and the
 * component overrides above only reached the badge, the alert and the button.
 * Everything else kept rendering green beside the teal, which is the second
 * primary this palette does not have.
 * ------------------------------------------------------------------------- */

/* Bootstrap's body and dark text (.text-body on 38 views, .text-dark on 20) kept the theme's
   navy and black, and its edges (.border and its four sides, on about 230) the theme's grey,
   as on a pay request's and a batch's details (dev QA #1009). They take the ink and the
   hairline. Classic's ink and hairline are the old navy and grey, so Classic's body text and
   edges do not change, and its dark text keeps the theme's black. The success edge below comes
   later and wins where an element has both; Bootstrap's other coloured edges would lose to
   these, and no view puts one beside .border. */
[dir] .layout-default .text-body,
:root:not(.look-classic) .layout-default .text-dark {
    color: var(--gp-ink) !important;
}

[dir] .layout-default .border,
[dir] .layout-default .border-top,
[dir] .layout-default .border-right,
[dir] .layout-default .border-bottom,
[dir] .layout-default .border-left {
    border-color: var(--gp-line) !important;
}

[dir] .layout-default .text-success {
    color: var(--gp-success) !important;
}

[dir] .layout-default .bg-success {
    background-color: var(--gp-success) !important;
}

[dir] .layout-default .border-success {
    border-color: var(--gp-success) !important;
}

[dir] .layout-default .table-success,
[dir] .layout-default .table-success > td,
[dir] .layout-default .table-success > th {
    background-color: var(--gp-success-soft);
}

[dir] .layout-default .btn-outline-success {
    background-color: transparent;
    border-color: var(--gp-success);
    color: var(--gp-success);
}

[dir] .layout-default .btn-outline-success:hover {
    background-color: var(--gp-success);
    border-color: var(--gp-success);
    color: var(--gp-on-fill, #ffffff);
}

/* The red, amber and slate outline buttons (Delete, Pause, Clear trusted devices, a
   subscription's history) kept Bootstrap's #dc3545, #ffc107 and #17a2b8 (dev QA #1005). The
   amber's text is its darker shade, as a warning's is on a tint; its fill keeps white at 4.69:1.
   Clear at rest and on keyboard focus, as the teal outline button above. */
[dir] .layout-default .btn-outline-danger {
    background-color: transparent;
    border-color: var(--gp-danger);
    color: var(--gp-danger);
}

[dir] .layout-default .btn-outline-warning {
    background-color: transparent;
    border-color: var(--gp-warning);
    color: var(--gp-warning-ink);
}

[dir] .layout-default .btn-outline-info {
    background-color: transparent;
    border-color: var(--gp-info);
    color: var(--gp-info);
}

[dir] .layout-default .btn-outline-danger:hover,
[dir] .layout-default .btn-outline-danger:not(:disabled):not(.disabled):active,
[dir] .layout-default .btn-outline-danger:not(:disabled):not(.disabled).active {
    background-color: var(--gp-danger);
    border-color: var(--gp-danger);
    color: var(--gp-on-fill, #ffffff);
}

[dir] .layout-default .btn-outline-warning:hover,
[dir] .layout-default .btn-outline-warning:not(:disabled):not(.disabled):active,
[dir] .layout-default .btn-outline-warning:not(:disabled):not(.disabled).active {
    background-color: var(--gp-warning);
    border-color: var(--gp-warning);
    color: var(--gp-on-fill, #ffffff);
}

[dir] .layout-default .btn-outline-info:hover,
[dir] .layout-default .btn-outline-info:not(:disabled):not(.disabled):active,
[dir] .layout-default .btn-outline-info:not(:disabled):not(.disabled).active {
    background-color: var(--gp-info);
    border-color: var(--gp-info);
    color: var(--gp-on-fill, #ffffff);
}

[dir] .layout-default .text-info {
    color: var(--gp-info) !important;
}

[dir] .layout-default .bg-info {
    background-color: var(--gp-info) !important;
}

/* The theme's .text-primary is the logo teal, 3.39:1 on white: every stat number and
   link that carries it was too light to read at its size. */
[dir] .layout-default .text-primary {
    color: var(--gp-teal-ink) !important;
}

/* The theme marks the open tab's title in the logo teal too, as on a batch's details. */
[dir] .layout-default .active .card-header__title,
[dir] .layout-default .dashboard-area-tabs__tab.active .text-label-large {
    color: var(--gp-teal-ink);
}

/* The theme's .text-warning is Bootstrap's yellow #ffc107, 1.63:1 on white: the pending
   and unpaid counts on the list summaries could hardly be read. */
[dir] .layout-default .text-warning {
    color: var(--gp-warning) !important;
}

/* The progress bar and the spinner default to the theme's blue and green. */
[dir] .layout-default .progress-bar,
[dir] .layout-default .spinner-border,
[dir] .layout-default .spinner-grow {
    color: var(--gp-teal);
    background-color: currentColor;
}

[dir] .layout-default .progress {
    background-color: var(--gp-line);
    border-radius: var(--gp-radius-pill, 999px);
}

/* --- Page heading -------------------------------------------------------
 *
 * A page heading is a title, its breadcrumb and the actions for that page. Three
 * things were fighting: the theme sets line-height:1 on the h1, which clips the
 * descenders of a display face and collides the lines the moment it wraps; the
 * actions carry ml-3 each, so on a narrow screen they take a line apiece with the
 * margin hanging; and letting the title block shrink meant the title wrapped to
 * make room for buttons that then sat beside it, into it.
 * ------------------------------------------------------------------------- */

[dir] .layout-default .page__heading,
[dir] .layout-default .gp-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* The title keeps its line. Below the breakpoint the actions take their own row
   rather than squeezing it. !important because the theme's own utility,
   [dir=ltr] .flex { flex: 1 1 0% !important }, otherwise wins: it gave the title
   box no width of its own, so the buttons kept the row and "Commission Requests"
   broke into five pieces 163px wide at 1366px. */
[dir] .layout-default .page__heading > .flex,
[dir] .layout-default .gp-page-actions > .flex {
    flex: 1 1 100% !important;
    min-width: 0;
}

@media (min-width: 992px) {
    [dir] .layout-default .page__heading > .flex,
    [dir] .layout-default .gp-page-actions > .flex {
        flex: 1 1 auto !important;
        width: auto;
    }
}

/* Most Settings pages put the breadcrumb straight in the row, with no .flex box around
   it and the title. The breadcrumb takes a row of its own, so the title sits under it,
   as on every other page, not beside it. */
[dir] .layout-default .page__heading > nav {
    flex: 1 1 100%;
}

/* line-height:1 has no room for a descender, and none at all for a second line.
   A title longer than the row breaks between words, and inside one only when a
   word is longer than the row. */
[dir] .layout-default .page__heading h1,
[dir] .layout-default .page__heading .h1 {
    line-height: 1.15;
    margin: 0;
    overflow-wrap: break-word;
    color: var(--gp-ink);
}

/* The gap does the spacing, so the per-button margin is dead weight — and it is
   what pushed the last button onto a line of its own. */
[dir] .layout-default .page__heading > .btn,
[dir] .layout-default .page__heading > .gp-btn,
[dir] .layout-default .page__heading > a.btn,
[dir] .layout-default .gp-page-actions > .gp-btn,
[dir] .layout-default .gp-page-actions > .btn {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* A button's label is a label: it does not wrap. */
[dir] .gp-btn {
    white-space: nowrap;
}

/*
 * The breadcrumb sits above the title inside the heading, so its own bottom
 * margin doubles the heading's padding, and its "/" separators are ::before on
 * each item — when the trail wraps, a separator lands at the start of the new
 * line with nothing before it.
 */
[dir] .layout-default .page__heading .breadcrumb {
    margin-bottom: 4px;
    row-gap: 2px;
    font-size: 12.5px;
    line-height: 1.4;
}

[dir] .layout-default .page__heading .breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

[dir] .layout-default .page__heading .breadcrumb-item + .breadcrumb-item::before {
    color: var(--gp-faint);
}

[dir] .layout-default .page__heading .breadcrumb-item,
[dir] .layout-default .page__heading .breadcrumb-item a {
    color: var(--gp-faint-ink);
}

[dir] .layout-default .page__heading .breadcrumb-item.active {
    color: var(--gp-body);
}

/* --- The card form -------------------------------------------------------
 *
 * .card-form is the settings forms' surface (the old x-filter-card, gone since
 * PAYL-1973, used it too). It gets the panel's card, and nothing more: an earlier
 * pass also laid out its inner .row as a wrapping flex, which reached the 41
 * settings forms built from this markup and scrambled their Bootstrap columns.
 * ------------------------------------------------------------------------- */

[dir] .layout-default .card.card-form {
    background: var(--gp-panel);
    border: 1px solid var(--gp-line);
    border-radius: var(--gp-radius-sm);
    box-shadow: var(--gp-shadow-card, 0 8px 24px -18px rgba(18, 51, 47, 0.18));
}

/* Normal case, as on the pay request forms: the old theme's .card-form__body label rule set
   these in spaced capitals (dev QA #55). Classic keeps them, in its own block below. */
[dir] .layout-default .card-form label {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    color: var(--gp-ink);
    margin-bottom: 6px;
}

/* --- Filters ---------------------------------------------------------------
 *
 * Every filter box draws the same label and the same fields (dev QA #23, #36, #37). The
 * label is the filter panel's small capitals, which a filter written by hand takes with
 * .fp-label. A field is 13.5px on a computer, as a form's is, and 16px on a phone, where
 * smaller text makes the iPhone zoom in; one white fill. The filter panel's own 12px label
 * and 13px field never showed: the global label rule above and the theme's
 * `input { font-size: inherit }` outweigh a lone class. A list's heading that names no
 * single field (a picker's "Selected", a dialog's "Columns") is a span with the same look.
 * ------------------------------------------------------------------------- */

[dir] .layout-default :is(label, span).fp-label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gp-faint-ink);
}

[dir] .layout-default .fp-input {
    background-color: var(--gp-panel);
    font-size: 13.5px;
}

@media (max-width: 576px) {
    [dir] .layout-default .fp-card :is(.fp-input, .form-control, .custom-select),
    [dir] .layout-default .fp-card .select2-container .select2-selection--single,
    [dir] .layout-default :has(> .fp-label) :is(.form-control, .custom-select),
    [dir] .layout-default :has(> .fp-label) .select2-container .select2-selection--single {
        font-size: 16px;
    }
}

/* --- The settings nav -----------------------------------------------------
 *
 * The settings pages put their nav in a page column using the drawer's own
 * .sidebar-menu classes, so it inherited a drawer's styling with no drawer around
 * it — a bare list against the ground. It reads as a panel of rows here, and its
 * current item is marked with the same teal the drawer uses. The markup marks
 * that item with .text-primary rather than .active, which is why the drawer's
 * active rule never reached it.
 * ------------------------------------------------------------------------- */

[dir] .layout-default .page__container .sidebar-menu {
    padding: 8px;
    background: var(--gp-panel);
    border: 1px solid var(--gp-line);
    border-radius: var(--gp-radius-sm);
    box-shadow: var(--gp-shadow-card, 0 8px 24px -18px rgba(18, 51, 47, 0.18));
    list-style: none;
    margin-bottom: 16px;
}

[dir] .layout-default .page__container .sidebar-menu .sidebar-menu-button {
    border-radius: var(--gp-radius-field, 12px);
    padding-inline: 10px;
    color: var(--gp-body);
}

[dir] .layout-default .page__container .sidebar-menu .sidebar-menu-button:hover {
    background-color: var(--gp-hover);
    color: var(--gp-ink);
}

/* The current page. .text-primary is how these mark it; .active is how the
   drawer does, so both are answered here. */
[dir] .layout-default .page__container .sidebar-menu .sidebar-menu-button.text-primary,
[dir] .layout-default .page__container .sidebar-menu .sidebar-menu-item.active > .sidebar-menu-button {
    background-color: var(--gp-teal-soft);
    color: var(--gp-teal-ink) !important;
}

[dir] .layout-default .page__container .sidebar-menu .sidebar-menu-button.text-primary .gp-icon,
[dir] .layout-default .page__container .sidebar-menu .sidebar-menu-item.active > .sidebar-menu-button .gp-icon {
    color: var(--gp-teal-ink);
}

[dir] .layout-default .page__container .sidebar-menu .sidebar-menu-button.text-secondary {
    color: var(--gp-body) !important;
}

/* --- Row actions in the merchant tables ------------------------------------
 *
 * Super admin opens a row's actions from a quiet trigger; the merchant tables use
 * `btn btn-primary dropdown-toggle`, which puts a filled primary button in every
 * row of the table — a page whose primary action is repeated fifty times has none.
 * A dropdown trigger inside a table cell is the same quiet control here as there.
 * ------------------------------------------------------------------------- */

[dir] .layout-default .table td > .btn.dropdown-toggle,
[dir] .layout-default .table td > .dropdown > .btn.dropdown-toggle {
    min-height: 28px;
    padding: 0 10px;
    background-color: transparent;
    border: 1px solid var(--gp-line);
    border-radius: var(--gp-radius-pill, 999px);
    color: var(--gp-body);
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: none;
}

/* Pressed is named too: the pressed .btn-primary rule above outranks the quiet trigger. */
[dir] .layout-default .table td > .btn.dropdown-toggle:hover,
[dir] .layout-default .table td > .btn.dropdown-toggle:not(:disabled):not(.disabled):active,
[dir] .layout-default .table td > .btn.dropdown-toggle[aria-expanded="true"],
[dir] .layout-default .table td > .dropdown > .btn.dropdown-toggle:hover {
    background-color: var(--gp-hover);
    border-color: var(--gp-teal);
    color: var(--gp-teal-ink);
}

/* --- Sidebar rows ---------------------------------------------------------
 *
 * The row's tint ran to both edges of the drawer, so an active or hovered item
 * read as a full-width band rather than as a selected row. It is inset instead,
 * and a little shorter, so the tint has the same air on every side.
 * ------------------------------------------------------------------------- */

[dir] .layout-default .sidebar-menu {
    padding-inline: 8px;
}

[dir] .layout-default .sidebar-menu-button {
    /* The theme sets line-height: 42px here, which is where the row's height was
       coming from — the padding on top of it made a 54px row for one line of
       text. The height is the padding's job. */
    min-height: 36px;
    line-height: 1.4;
    padding-top: 7px;
    padding-bottom: 7px;
    font-size: 13.5px;
    /* The super admin nav set its rows at 700; a nav row is not a heading. */
    font-weight: 600;
}

[dir] .layout-default .sidebar-submenu .sidebar-menu-button {
    line-height: 1.4;
}

[dir] .layout-default .sidebar-menu > .sidebar-menu-item > .sidebar-menu-button {
    padding-inline: 10px;
}

[dir] .layout-default .sidebar-submenu {
    padding-inline: 0;
}

[dir] .layout-default .sidebar-submenu .sidebar-menu-button {
    min-height: 32px;
    padding-inline: 10px 10px;
}

[dir] .layout-default .sidebar-heading {
    padding-inline: 10px;
}

/* --- The company mark -----------------------------------------------------
 *
 * A company's logo is whatever they uploaded — a square icon, a landscape
 * wordmark, a tall stack — and forcing it into a 40px circle squashed every one
 * that was not square. Like the checkout's logo, it gets a fixed box with the
 * image contained (framed here; the checkout's has no frame), so a wide mark
 * stays wide and a missing one falls back to a generic building rather than a
 * broken image.
 * ------------------------------------------------------------------------- */

[dir] .gp-company-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 38px;
    height: 34px;
    padding: 3px 4px;
    background: var(--gp-panel, #fff);
    border: 1px solid var(--gp-line, #d9eae8);
    border-radius: var(--gp-radius-row, 8px);
    color: var(--gp-faint, #7c8f8b);
    overflow: hidden;
}

[dir] .gp-company-mark img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

[dir] .gp-company-mark--sm {
    width: 34px;
    height: 30px;
    border-radius: var(--gp-radius-row, 8px);
}

/* The top bar is white, and .text-light is Bootstrap's near-white — so the
   onboarding label, the company name and the analytics label were set in a
   colour that barely registers against the bar behind them. */
[dir] .layout-default .navbar-main .text-light {
    color: var(--gp-body) !important;
}

[dir] .layout-default .navbar-main .dropdown-toggle:hover .text-light,
[dir] .layout-default .navbar-main .dropdown-toggle[aria-expanded="true"] .text-light {
    color: var(--gp-ink) !important;
}

/* A dropdown row that carries an icon is a flex row: the theme's .dropdown-item
   is display:block, so an icon beside a label sat on the text baseline rather
   than centred against it. */
[dir] .layout-default .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

[dir] .layout-default .dropdown-item .gp-icon {
    flex: none;
    color: var(--gp-faint);
}

[dir] .layout-default .dropdown-item:hover .gp-icon,
[dir] .layout-default .dropdown-item:focus .gp-icon {
    color: var(--gp-ink);
}

/* --- Settings forms -------------------------------------------------------
 *
 * The settings pages are a nav column beside a card holding a long form. The card
 * body carries .bg-white on top of the card's own surface, the required marker is
 * drawn by the theme, and the buttons at the foot sit in whatever row the page
 * gave them. What follows is the rhythm they were missing rather than a
 * restructure: a form is a list of fields, and it should read as one.
 * ------------------------------------------------------------------------- */

[dir] .layout-default .card-form__body {
    padding: 20px 22px;
}

[dir] .layout-default .card-form__body .form-group {
    margin-bottom: 16px;
}

[dir] .layout-default .card-form__body .form-group:last-child:not(:where(.row:not(:last-child) > :is(.col, [class*="col-"]) > .form-group)) {
    margin-bottom: 0;
}

/* A required field says so once, next to its label. */
[dir] .layout-default .form-group.required > label::after {
    content: "*";
    margin-inline-start: 3px;
    color: var(--gp-danger);
}

/* The theme sets .form-text in a grey that is lighter than the hairline. */
[dir] .layout-default .form-text,
[dir] .layout-default small.text-muted {
    color: var(--gp-faint-ink) !important;
    font-size: 11.5px;
    line-height: 1.4;
}

/* Every other muted text in the New look: the line under a page title, "—" in an empty cell,
   "Showing 1–25 of …", a customer's email under the name. The theme's blue-grey at 54% is
   2.6:1 and .text-dark-gray 2.7:1. Classic keeps dev's grey (PAYL-1973, the approved mockup). */
:root:not(.look-classic) .layout-default .text-muted:not(.gp-icon),
:root:not(.look-classic) .layout-default .text-dark-gray {
    color: var(--gp-faint-ink) !important;
}

/* Bootstrap's .text-secondary (#6c757d), the small captions on the company hub and the merchant
   wizard, is the same kind of text (dev QA #1009). Classic keeps dev's grey here too. */
:root:not(.look-classic) .layout-default .text-secondary:not(.gp-icon) {
    color: var(--gp-faint-ink) !important;
}

/* A muted icon (the recurring series mark, an unsorted column's arrow) takes the resting icon
   grey, 3:1 on white, not the theme's blue-grey at 54%. */
[dir] .layout-default .gp-icon.text-muted {
    color: var(--gp-faint) !important;
}

/* A settings page's actions sit at the foot of the card, not in the page heading,
   so they need the same wrapping row the heading has. */
[dir] .layout-default .card-form__footer,
[dir] .layout-default .card-form__body > form > .row:last-child {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* .btn-light is the theme's quiet button and it arrives white-on-white against a
   card. It is the secondary. */
[dir] .layout-default .btn-light {
    background-color: transparent;
    border-color: var(--gp-line);
    color: var(--gp-ink);
}

[dir] .layout-default .btn-light:hover {
    background-color: var(--gp-hover);
    border-color: var(--gp-ink);
    color: var(--gp-ink);
}

/* Bootstrap's .text-danger is !important #dc3545, and a darker #a71d2a on a link under the
   pointer. In the New look a red text button such as "Delete" on the Settings lists, the * on a
   required field and the Two-factor warning take the product's red, as the outline buttons do
   (dev QA #48, #1017). Classic keeps Bootstrap's red: its red buttons are that red, and red
   text beside them in another red read as two colours (#315). */
:root:not(.look-classic) .layout-default .text-danger,
:root:not(.look-classic) .layout-default a.text-danger:hover,
:root:not(.look-classic) .layout-default a.text-danger:focus {
    color: var(--gp-danger) !important;
}

[dir] .layout-default .btn-light.text-danger:hover {
    background-color: var(--gp-danger-soft);
    border-color: var(--gp-danger-soft);
}

/* A card body marked .bg-white sits on the card's own white; the class is
   harmless but the double edge it implies is not. */
[dir] .layout-default .card .card-body.bg-white {
    background-color: transparent !important;
}

/* --- Icon size utilities --------------------------------------------------
 *
 * 400 call sites size their icon with .icon-16pt, .icon-20pt or .fs-64px, which
 * are font-size utilities — they sized a ligature glyph. A drawn icon carries its
 * own width and height, so after the migration every one of those rendered at the
 * component's default: an empty state's 64px mark came out at 20px, which is why
 * those states looked broken. The utilities size the SVG here instead.
 * ------------------------------------------------------------------------- */

[dir] .gp-icon.icon-16pt {
    width: 16px;
    height: 16px;
}

[dir] .gp-icon.icon-18pt {
    width: 18px;
    height: 18px;
}

[dir] .gp-icon.icon-20pt {
    width: 20px;
    height: 20px;
}

[dir] .gp-icon.icon-40pt {
    width: 34px;
    height: 34px;
}

[dir] .gp-icon.fs-64px {
    width: 48px;
    height: 48px;
    color: var(--gp-faint);
}

/* The hand-rolled empty state: two stacked .card-body rows, an icon in one and a
   heading in the other, which left a gap between them and none around them. */
[dir] .layout-default .card-body.text-center > .col-12 > .gp-icon.fs-64px {
    margin-bottom: 4px;
}

[dir] .layout-default .row.justify-content-center.text-center.card-body.pb-0 {
    padding-bottom: 0 !important;
    padding-top: 40px !important;
}

[dir] .layout-default .row.justify-content-center.text-center.card-body.pb-5 {
    padding-top: 8px !important;
    padding-bottom: 40px !important;
}

[dir] .layout-default .row.justify-content-center.text-center.card-body .h4 {
    font-family: var(--gp-display);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--gp-ink);
}

/* --- The toggle checkbox --------------------------------------------------
 *
 * A third control drawn from the same two pseudo-elements: .custom-checkbox-toggle
 * is the theme's 3rem x 1.5rem switch, used 32 times across settings. The checkbox
 * rules were squaring its track exactly as they did .custom-switch.
 * ------------------------------------------------------------------------- */

[dir] .layout-default .custom-checkbox-toggle .custom-control-label::before {
    border: 1px solid var(--gp-control-line);
    border-radius: var(--gp-radius-switch, 999px);
    background-color: var(--gp-line);
    box-shadow: none;
}

[dir] .layout-default .custom-checkbox-toggle .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--gp-teal);
    border-color: var(--gp-teal);
}

[dir] .layout-default .custom-checkbox-toggle .custom-control-label::after {
    background-color: var(--gp-panel);
    border-radius: var(--gp-radius-round, 50%);
    box-shadow: var(--gp-shadow-lift, 0 1px 2px rgba(18, 51, 47, 0.25));
}

[dir] .layout-default .custom-checkbox-toggle .custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: var(--gp-ring, 0 0 0 3px rgba(0, 155, 149, 0.16));
}

[dir] .layout-default .custom-checkbox-toggle .custom-control-input:focus-visible ~ .custom-control-label::before {
    box-shadow: 0 0 0 2px var(--gp-panel, #ffffff), 0 0 0 4px var(--gp-teal, #009c95);
}

/* --- Settings tabs --------------------------------------------------------
 *
 * The team and role forms tab with `col-6 nav-link bg-secondary text-white` — two
 * grey filled blocks spanning the card, which is a segmented control drawn as two
 * buttons that do not look like buttons. It is a tab strip: a rule under the pair,
 * the current one marked in teal.
 * ------------------------------------------------------------------------- */

[dir] .layout-default .nav-link.bg-secondary {
    background-color: transparent !important;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--gp-body) !important;
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
    padding: 10px 12px;
}

[dir] .layout-default .nav-link.bg-secondary:hover {
    color: var(--gp-ink) !important;
}

[dir] .layout-default .nav-link.bg-secondary.active {
    background-color: transparent !important;
    border-bottom-color: var(--gp-teal);
    color: var(--gp-ink) !important;
}

/* The pair sits in a .row, so the rule has to run under both of them. */
[dir] .layout-default .row > .nav-link.bg-secondary:first-child {
    box-shadow: inset 0 -1px 0 var(--gp-line);
}

[dir] .layout-default .row > .nav-link.bg-secondary:last-child {
    box-shadow: inset 0 -1px 0 var(--gp-line);
}

/* --- Type scale in the panels ---------------------------------------------
 *
 * The theme sets 1rem on body and leaves labels, help text and table cells to
 * inherit it, so a settings form ran at the same size as its own heading. These
 * are the sizes the rest of the identity already uses.
 * ------------------------------------------------------------------------- */

[dir] .layout-default .card-form__body,
[dir] .layout-default .card-body {
    font-size: 13.5px;
}

[dir] .layout-default .card-body h1,
[dir] .layout-default .card-body h2,
[dir] .layout-default .card-body h3,
[dir] .layout-default .card-body h4,
[dir] .layout-default .card-body .h4 {
    font-size: 17px;
}

[dir] .layout-default .card-body h5,
[dir] .layout-default .card-body .h5,
[dir] .layout-default .card-body h6,
[dir] .layout-default .card-body .h6 {
    font-family: var(--gp-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--gp-ink);
}

/* Several lists draw a cell as h6, or put an h6 in it (the merchant's Pay Requests, Items, the
   Settings lists). It is cell text, not a heading: the text face at the cell's own size. A cell
   keeps the size the table gives its cells, at the row's weight; a heading inside one (a row's
   name) takes the cell's size, semi-bold. These outrank the card body's rule above, (0,4,1)
   and (0,3,2) against (0,3,1). */
[dir] .layout-default .table td.h5,
[dir] .layout-default .table td.h6 {
    font-family: var(--gp-text);
    font-weight: inherit;
    letter-spacing: inherit;
}

[dir] .layout-default .table td h5,
[dir] .layout-default .table td h6,
[dir] .layout-default .table td .h5,
[dir] .layout-default .table td .h6 {
    font-family: var(--gp-text);
    font-size: inherit;
    font-weight: 600;
    letter-spacing: inherit;
}

/* A tab drawn as h6 (a customer's and a vendor's page) is a tab, not a heading: the New look
   sets tabs in the text face. Classic's heading face is dev's Open Sans, which they had. */
:root:not(.look-classic) .layout-default .nav-link.h5,
:root:not(.look-classic) .layout-default .nav-link.h6 {
    font-family: var(--gp-text);
    letter-spacing: normal;
}

/* The pay request, estimate, Dynamic QR and SoftPOS lists set their status badges in the
   theme's 0.9rem utility (14.4px, with !important); a badge is 11px everywhere else. */
[dir] .layout-default .badge.fs-0-9rem {
    font-size: 11px !important;
}

[dir] .layout-default .custom-control-label,
[dir] .layout-default .form-check-label {
    font-size: 13.5px;
}

/* Controls sit on one rhythm: the same height, the same gap under each field. */
[dir] .layout-default .form-control,
[dir] .layout-default .custom-select {
    height: 38px;
    font-size: 13.5px;
}

[dir] .layout-default textarea.form-control {
    height: auto;
    min-height: 84px;
    padding-top: 9px;
    padding-bottom: 9px;
}

/* On a phone every field is 16px, as the filters' fields are ("The filter panel"): smaller
   text makes an iPhone zoom in when the field is tapped (dev QA #325). After the 13.5px above,
   at the same weight, so it wins. */
@media (max-width: 576px) {
    [dir] .layout-default :is(.form-control, .custom-select, .fp-input),
    [dir] .layout-default .select2-container .select2-selection--single {
        font-size: 16px;
    }
}

[dir] .layout-default .custom-control:not(.custom-checkbox-toggle):not(.custom-switch) {
    min-height: 22px;
    padding-inline-start: 26px;
}

[dir] .layout-default .custom-control:not(.custom-control-inline) + .custom-control:not(.custom-control-inline) {
    margin-top: 6px;
}

/* The toggle's label fills its track, so it carries no text of its own. */
[dir] .layout-default .custom-checkbox-toggle .custom-control-label {
    font-size: 0;
}

/* --- A labelled row menu in a toolbar -------------------------------------
 *
 * The row-action trigger is 28px, which is what a 9px table row can carry. In a
 * toolbar beside 38px buttons it sat short and its wrapper broke the flex row, so
 * a labelled trigger takes the button's own height and its wrapper stops being a
 * block in the middle of a flex row. The icon-only trigger is 30px wide, so a
 * labelled one takes the width of its word and arrow instead of spilling out.
 * ------------------------------------------------------------------------- */

[dir] .action-menu-wrap {
    display: inline-flex;
    align-items: center;
    position: relative;
}

[dir] .layout-default .action-menu-trigger--labelled {
    width: auto;
    min-height: 38px;
    gap: 8px;
    padding: 0 16px;
    font-size: 14px;
}

/* --- Tab strips -----------------------------------------------------------
 *
 * .gp-tabs is the strip the details page and the settings forms use: a rule under
 * the row, the current tab marked by a teal underline rather than a filled block.
 * ------------------------------------------------------------------------- */

[dir] .layout-default .gp-tabs.nav-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--gp-line);
    margin-bottom: 16px;
}

[dir] .layout-default .gp-tabs .nav-link {
    flex: 0 0 auto;
    padding: 10px 14px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--gp-body);
    font-size: 13.5px;
    font-weight: 600;
}

[dir] .layout-default .gp-tabs .nav-link:hover {
    color: var(--gp-ink);
}

[dir] .layout-default .gp-tabs .nav-link.active,
[dir] .layout-default .gp-tabs .nav-link.active.show {
    background: transparent;
    border-bottom-color: var(--gp-teal);
    color: var(--gp-ink);
}

/* --- Section navigation -----------------------------------------------------
 *
 * .gp-section-nav moves between the pages of one super admin section, the pages that share a
 * sidebar item (<x-section-tabs>). It is navigation between pages, not a tab inside one, so it
 * must not read as .gp-tabs: it is a panel of its own under the page header, named for the
 * section on the left, with the current page filled rather than underlined.
 * ------------------------------------------------------------------------- */

[dir] .layout-default .gp-section-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 20px;
    padding: 6px;
    background: var(--gp-panel, #ffffff);
    border: 1px solid var(--gp-line, #d9eae8);
    border-radius: var(--gp-radius-sm, 14px);
    box-shadow: var(--gp-shadow-card, 0 8px 24px -18px rgba(18, 51, 47, 0.18));
}

[dir] .layout-default .gp-section-nav__name {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 10px;
    margin-inline-end: 4px;
    border-inline-end: 1px solid var(--gp-line, #d9eae8);
    color: var(--gp-faint-ink, #637370);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

[dir] .layout-default .gp-section-nav__name .gp-icon {
    width: 18px;
    height: 18px;
    font-size: 18px;
    color: var(--gp-teal, #009c95);
}

[dir] .layout-default .gp-section-nav__tabs {
    display: flex;
    flex: 1 1 auto;
    gap: 4px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

[dir] .layout-default .gp-section-nav__tabs::-webkit-scrollbar {
    display: none;
}

[dir] .layout-default .gp-section-nav__tab {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: var(--gp-radius-pill, 999px);
    color: var(--gp-body, #4c635f);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

[dir] .layout-default .gp-section-nav__tab .gp-icon {
    width: 18px;
    height: 18px;
    font-size: 18px;
    color: var(--gp-faint, #7c8f8b);
}

[dir] .layout-default .gp-section-nav__tab:hover,
[dir] .layout-default .gp-section-nav__tab:focus-visible {
    background: var(--gp-hover, rgba(0, 155, 149, 0.05));
    color: var(--gp-ink, #12332f);
    text-decoration: none;
}

[dir] .layout-default .gp-section-nav__tab:focus-visible {
    outline: none;
    box-shadow: var(--gp-ring, 0 0 0 3px rgba(0, 155, 149, 0.16));
}

[dir] .layout-default .gp-section-nav__tab.is-current {
    background: var(--gp-teal-soft, #e4f2f1);
    color: var(--gp-teal-ink, #00736e);
    font-weight: 700;
}

[dir] .layout-default .gp-section-nav__tab.is-current .gp-icon {
    color: var(--gp-teal-ink, #00736e);
}

[dir] .layout-default .gp-section-nav__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: var(--gp-radius-pill, 999px);
    background: var(--gp-sand, #eceeef);
    color: var(--gp-ink, #12332f);
    font-size: 11.5px;
    font-weight: 700;
}

[dir] .layout-default .gp-section-nav__tab.is-current .gp-section-nav__count {
    background: var(--gp-teal-fill, #00857f);
    color: var(--gp-on-fill, #ffffff);
}

/* On a phone the section's name gives its room to the pages, which scroll sideways. */
@media (max-width: 767.98px) {
    [dir] .layout-default .gp-section-nav__name {
        display: none;
    }

    [dir] .layout-default .gp-section-nav__tab {
        padding: 8px 12px;
    }
}

/* --- The history list -----------------------------------------------------
 *
 * Each entry was a card inside a Bootstrap row inside another card, so a list of
 * twenty events was twenty nested panels. It reads as a list: a hairline between
 * entries, the date in the faint tone, and the event itself carrying the weight.
 * ------------------------------------------------------------------------- */

[dir] .layout-default #history .projects-item {
    margin: 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--gp-line);
}

[dir] .layout-default #history .projects-item:last-child {
    border-bottom: 0;
}

[dir] .layout-default #history .projects-item .card {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

[dir] .layout-default #history .projects-item .card > .px-4 {
    padding-inline: 0 !important;
    padding-block: 0 !important;
}

[dir] .layout-default #history .projects-item .text-dark-gray {
    color: var(--gp-faint-ink);
    font-size: 12px;
    white-space: nowrap;
}

[dir] .layout-default #history .text-15pt {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--gp-ink);
}

[dir] .layout-default #history .projects-item:first-child {
    padding-top: 0;
}

[dir] .layout-default #history .projects-item:last-child {
    padding-bottom: 0;
}

/* --- Invoice edit form ----------------------------------------------------
 *
 * The item rows are a grid of controls with no shared rhythm: some in .form-group,
 * some bare, some in an .input-group. They sit on the same height and the same gap
 * as every other control now.
 * ------------------------------------------------------------------------- */

[dir] .layout-default .invoice-form .form-control,
[dir] .layout-default .invoice-form .custom-select {
    height: 38px;
}

[dir] .layout-default .invoice-form .table td,
[dir] .layout-default .invoice-form .table th {
    vertical-align: middle;
}

[dir] .layout-default .invoice-form .table td .form-group,
[dir] .layout-default .invoice-form .table td .form-control {
    margin-bottom: 0;
}

[dir] .layout-default .input-group > .form-control {
    height: 38px;
}

[dir] .layout-default .input-group-text {
    font-size: 13px;
}

/* --- Merged input groups --------------------------------------------------
 *
 * A prefix inside the field — the invoice number's series, a currency symbol —
 * is drawn by the theme as .input-group-merge: the control loses its left border
 * and, with it, its left padding, so the value sat flush against the prefix. The
 * pair reads as one control here, with the prefix quiet, the value spaced off it,
 * and the outer corners on the shared radius rather than the theme's 4px.
 * ------------------------------------------------------------------------- */

[dir] .layout-default .input-group.input-group-merge {
    border: 1px solid var(--gp-field-line);
    border-radius: var(--gp-radius-field, 12px);
    background: var(--gp-panel);
    overflow: hidden;
}

/* The same focused edge as a field's: see "Keyboard focus". */
[dir] .layout-default .input-group.input-group-merge:focus-within {
    border-color: var(--gp-teal);
    box-shadow: inset 0 0 0 1px var(--gp-teal, #009c95), var(--gp-ring, 0 0 0 3px rgba(0, 155, 149, 0.16));
}

[dir] .layout-default .input-group.input-group-merge .form-control {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

/* The group draws the focused edge, so the field inside draws none: !important, to outweigh a
   field's own focused edge in "Keyboard focus" below. */
[dir] .layout-default .input-group.input-group-merge .form-control:focus {
    box-shadow: none !important;
}

/* The value needs room off the prefix; the theme takes all of it away. */
[dir] .layout-default .input-group.input-group-merge .form-control-prepended {
    padding-inline-start: 8px !important;
}

[dir] .layout-default .input-group.input-group-merge .form-control-appended {
    padding-inline-end: 8px !important;
}

[dir] .layout-default .input-group.input-group-merge .input-group-text {
    height: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--gp-faint-ink);
    font-size: 13px;
    padding-inline: 12px 4px;
}

[dir] .layout-default .input-group.input-group-merge .input-group-append .input-group-text {
    padding-inline: 4px 12px;
}

/* --- A checkbox with its own label ----------------------------------------
 *
 * Some forms write the input and its label as siblings with no .form-check
 * around them, so nothing set the gap between the box and the words, and the
 * label sat on the box's baseline.
 * ------------------------------------------------------------------------- */

[dir] .layout-default .form-check-input + .form-check-label {
    margin-inline-start: 8px;
    vertical-align: middle;
    cursor: pointer;
}

[dir] .layout-default input[type="checkbox"].form-check-input:not(.custom-control-input),
[dir] .layout-default input[type="radio"].form-check-input:not(.custom-control-input) {
    vertical-align: middle;
    margin-top: 0;
}

/* --- Form sections on the create form -------------------------------------
 *
 * The rows inside a section were laid out with Bootstrap columns and no gap, so
 * fields met at their edges. The section keeps its own padding and the columns
 * get the same rhythm the rest of the forms have.
 * ------------------------------------------------------------------------- */

[dir] .layout-default .ce-section-body > .row {
    row-gap: 4px;
}

[dir] .layout-default .ce-section-body .col-md-6.form-group,
[dir] .layout-default .ce-section-body .col-lg-6.form-group {
    margin-bottom: 16px;
}

/* A switch on its own in a field needs the label's baseline, not the field's. */
[dir] .layout-default .ce-section-body .custom-switch {
    margin-top: 4px;
}

/* A form's action row: at its end, on the side the eye leaves from, wrapping on a
   narrow screen rather than each button taking a line. */
[dir] .layout-default .gp-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gp-line);
}

/* --- Keyboard focus -------------------------------------------------------
 *
 * One ring for everything the Tab key reaches in the panels: 2px of teal, 3px
 * away, only for the keyboard (:focus-visible), so a click draws none. It takes
 * the place of Chrome's own blue ring, which about half the stops showed, and of
 * Bootstrap 5's light-blue glow on links and tabs. It weighs as much as three
 * classes: more than Bootstrap's and the theme's focus rules, and as much as this
 * file's own `[dir] .x:focus-visible` rules above, which it replaces by coming
 * later. A page's own copy loads after this file and would win, so no page keeps
 * one; a part that draws its own ring (row menus, buttons) names one more class.
 * The dev QA's keyboard pass, #135 to #148.
 * ------------------------------------------------------------------------- */

[dir] .layout-default :where(a[href], button, summary, [role="button"], [role="tab"], [tabindex]:not([tabindex="-1"])):focus-visible {
    outline: 2px solid var(--gp-teal, #009c95);
    outline-offset: 3px;
    box-shadow: none;
}

/* The side menu cuts what spills past a row, so its rows draw the ring inside. */
[dir] .layout-default .sidebar-menu-button:focus-visible {
    outline-offset: -2px;
}

/* The theme's page numbers glowed blue on focus, by keyboard or by click. */
[dir] .layout-default .page-link:focus {
    box-shadow: none;
}

/* A company name's cell cuts what spills past it, which took the ring off its link, so the
   cell draws the ring instead. */
[dir] .layout-default .dt-name:has(> a:focus-visible) {
    outline: 2px solid var(--gp-teal, #009c95);
    outline-offset: 2px;
    border-radius: var(--gp-radius-xs, 6px);
}

[dir] .layout-default .dt-name > a:focus-visible {
    outline: 0;
}

/* A focused field: the teal edge, a 1px teal line inside it, and the soft glow outside. The
   line makes the edge twice as thick, so the change shows to someone who cannot tell the grey
   from the teal. The theme's `.form-control:focus { box-shadow: none !important }` took the
   glow off every field, so this one is !important too, and the heavier of the two. The
   searchable pickers and the text editor had no focused look at all. */
[dir] .layout-default .form-control:focus,
[dir] .layout-default .custom-select:focus,
[dir] .layout-default .select2-container--focus .select2-selection,
[dir] .layout-default .select2-container--open .select2-selection,
[dir] .layout-default .ql-container:focus-within {
    border-color: var(--gp-teal, #009c95);
    box-shadow: inset 0 0 0 1px var(--gp-teal, #009c95), var(--gp-ring, 0 0 0 3px rgba(0, 155, 149, 0.16)) !important;
}

/* "Skip to content": the first stop on every panel page, shown only while it has focus, so
   the keyboard need not pass the 10 to 13 stops of the top bar first. */
[dir] .layout-default .gp-skip-link {
    position: fixed;
    inset-inline-start: 16px;
    top: 12px;
    z-index: 2000;
    padding: 8px 16px;
    border-radius: var(--gp-radius-pill, 999px);
    background-color: var(--gp-ink, #12332f);
    color: var(--gp-on-fill, #ffffff);
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-200%);
}

[dir] .layout-default .gp-skip-link:focus {
    transform: none;
}

/* --- Parts a library draws ------------------------------------------------
 *
 * The text editor (Quill), the date picker (flatpickr's airbnb theme) and the hover hints
 * (Bootstrap's tooltip) brought their own blue, red and black (dev QA #1004, #1007, #1008).
 * The editor's sheet loads after this one, on the pages that use it, so each rule here is
 * heavier than the library's own.
 * ------------------------------------------------------------------------- */

/* The editor's toolbar is teal when a button is pointed at, pressed or picked, not Quill's
   #06c. Its icons take the logo teal, as an icon needs only 3:1; a picker's words the darker
   teal text needs. Quill's picker rules (the heading picker on the campaign editor) weigh
   (0,5,0) for the colour, (0,7,0) for a fill and (0,6,0) for a stroke; .ql-snow puts these one
   class above. */
[dir] .layout-default .ql-toolbar.ql-snow :is(button:hover, button:focus, button.ql-active, .ql-picker-label:hover, .ql-picker-label.ql-active, .ql-picker-item:hover, .ql-picker-item.ql-selected) {
    color: var(--gp-teal-ink);
}

[dir] .layout-default .ql-toolbar.ql-snow :is(button:hover, button:focus, button.ql-active, .ql-picker-label:hover, .ql-picker-label.ql-active, .ql-picker-item:hover, .ql-picker-item.ql-selected) :is(.ql-fill, .ql-stroke.ql-fill) {
    fill: var(--gp-teal);
}

[dir] .layout-default .ql-toolbar.ql-snow :is(button:hover, button:focus, button.ql-active, .ql-picker-label:hover, .ql-picker-label.ql-active, .ql-picker-item:hover, .ql-picker-item.ql-selected) :is(.ql-stroke, .ql-stroke-miter) {
    stroke: var(--gp-teal);
}

/* In the open date picker today is underlined in teal, not red, and a range's two ends take a
   picked day's teal, not a blue edge. A picked day's white number needs the darker teal fill:
   4.51:1, where the logo teal is 3.39:1. */
[dir] .layout-default .flatpickr-calendar span.flatpickr-day.today:not(.selected) {
    border-bottom-color: var(--gp-teal);
}

[dir] .layout-default .flatpickr-calendar span.flatpickr-day.today:not(.selected):hover {
    border-color: var(--gp-teal);
}

[dir] .layout-default .flatpickr-calendar .flatpickr-day:is(.selected, .startRange, .endRange) {
    background: var(--gp-teal-fill);
    border-color: var(--gp-teal-fill);
    color: var(--gp-on-fill, #ffffff);
}

/* A range of two days side by side is joined by a 10px strip, which kept the logo teal. */
[dir] .layout-default .flatpickr-calendar .flatpickr-day.startRange + .endRange:not(:nth-child(7n+1)) {
    box-shadow: -10px 0 0 var(--gp-teal-fill);
}

/* A hover hint is the ink at full strength, in the design's face with a row's corner, not
   Bootstrap's black at 90% with 4px corners. Both copies of Bootstrap load, so this sets the
   newer one's variables and the older one's rules, its arrow included. */
[dir] .layout-default .tooltip {
    --bs-tooltip-bg: var(--gp-ink);
    --bs-tooltip-color: var(--gp-on-fill, #ffffff);
    --bs-tooltip-border-radius: var(--gp-radius-row, 8px);
    --bs-tooltip-opacity: 1;
    font-family: var(--gp-text);
}

[dir] .layout-default .tooltip.show {
    opacity: 1;
}

[dir] .layout-default .tooltip-inner {
    padding: 6px 10px;
    background-color: var(--gp-ink);
    color: var(--gp-on-fill, #ffffff);
    border-radius: var(--gp-radius-row, 8px);
}

[dir] .layout-default :is(.bs-tooltip-top, .bs-tooltip-auto[x-placement^="top"]) .arrow::before {
    border-top-color: var(--gp-ink);
}

[dir] .layout-default :is(.bs-tooltip-right, .bs-tooltip-auto[x-placement^="right"]) .arrow::before {
    border-right-color: var(--gp-ink);
}

[dir] .layout-default :is(.bs-tooltip-bottom, .bs-tooltip-auto[x-placement^="bottom"]) .arrow::before {
    border-bottom-color: var(--gp-ink);
}

[dir] .layout-default :is(.bs-tooltip-left, .bs-tooltip-auto[x-placement^="left"]) .arrow::before {
    border-left-color: var(--gp-ink);
}

/* --- Right to left (PAYL-1938) ---------------------------------------------
 *
 * Arabic pages load the theme's mirrored twin (app.rtl.css), which flips the drawer,
 * the tables and Bootstrap's own utilities. What is left is the lettering: the caps
 * labels and buttons carry letter-spacing, and any spacing between Arabic letters
 * pulls the joined script apart into single letters, so a right-to-left page has none.
 */
[dir=rtl] body,
[dir=rtl] body * {
    letter-spacing: normal !important;
}

/* Arabic names the two looks in more letters than the super admin menu's one-line rows hold,
   so the look-switch row may take a second line rather than cut its name to "…". */
[dir=rtl] .layout-default .sm-super-admin .gp-look-switch .sidebar-menu-text {
    white-space: normal;
}

[dir=rtl] .layout-default .sm-super-admin .gp-look-switch__action {
    flex: 0 1 auto;
    white-space: normal;
    text-align: end;
}

/* --- The Classic look, closer to dev: Done-when 10 to 13 (PAYL-1957) ---------
 *
 * The old website's text, forms, badges, tabs, buttons, dropdown menus, fields,
 * lists and boxes, as measured on dev. They sit last in the file: a component rule
 * above is as strong as these, and the later rule wins a tie. Where the old text
 * colour is too faint to read, the nearest shade that reaches 4.5:1 is used
 * (#00857f teal, #66717f grey); the placeholders, the small grey capital labels
 * and the Settings list keep the old light shades (Ahmed's choice). The green
 * badges and buttons take #3fa313, close to the old #48ba16: the lightest green
 * that keeps white text at 3:1 (3.25:1), also Ahmed's choice.
 * The tokens they change are in the Classic block at the top of the file.
 * ------------------------------------------------------------------------- */

/* Done-when 10: the old text size inside fields, table cells and tick-box labels. A small
   or large field and a compact table keep their own size, as they did on the old website. */
:root.look-classic .layout-default input.form-control:not([type="checkbox"]):not([type="radio"]):not(.form-control-sm):not(.form-control-lg),
:root.look-classic .layout-default select.form-control:not([multiple]):not(.select2-hidden-accessible):not(.form-control-sm):not(.form-control-lg),
:root.look-classic .layout-default .custom-select:not(.custom-select-sm):not(.custom-select-lg),
:root.look-classic .layout-default .fp-input {
    height: 36.2px;
    font-size: 14.8px;
}

:root.look-classic .layout-default textarea.form-control {
    font-size: 14.8px;
}

/* A searchable picker in a form or a filter, the size of the fields above (PAYL-1973; in a
   filter it was 16px beside 14.8px, dev QA #40); the padding centres the larger text in the
   lower box. */
:root.look-classic .layout-default .select2-container .select2-selection--single {
    height: 36.2px;
    padding-top: 6px;
    padding-bottom: 6px;
    font-size: 14.8px;
}

:root.look-classic .layout-default .select2-container .select2-selection--multiple {
    min-height: 36.2px;
    padding-top: 5px;
    padding-bottom: 5px;
    font-size: 14.8px;
}

/* A filter's button in the row of its fields is their height. The shared button is 38px, the
   New look's field height, so in Classic it stood 1.8px above the hand-written filters' fields
   (Batch 10 browser check). Report Subscriptions wraps its button in a box. */
:root.look-classic .layout-default :has(> .fp-label) ~ .gp-btn:not(.gp-btn--sm):not(.gp-btn--lg),
:root.look-classic .layout-default :has(> .fp-label) ~ div > .gp-btn:not(.gp-btn--sm):not(.gp-btn--lg) {
    min-height: 36.2px;
}

/* On a phone a filter's field is 16px in Classic too, as in the New look ("The filter panel"
   above): smaller text makes the iPhone zoom in when the field is tapped (dev QA #186). The
   sizes above outweigh that rule, so these repeat them inside a filter, one class heavier. */
@media (max-width: 576px) {
    :root.look-classic .layout-default .fp-card input.form-control:not([type="checkbox"]):not([type="radio"]):not(.form-control-sm):not(.form-control-lg),
    :root.look-classic .layout-default .fp-card select.form-control:not([multiple]):not(.select2-hidden-accessible):not(.form-control-sm):not(.form-control-lg),
    :root.look-classic .layout-default .fp-card .custom-select:not(.custom-select-sm):not(.custom-select-lg),
    :root.look-classic .layout-default .fp-card .fp-input,
    :root.look-classic .layout-default .fp-card .select2-container .select2-selection--single,
    :root.look-classic .layout-default :has(> .fp-label) input.form-control:not([type="checkbox"]):not([type="radio"]):not(.form-control-sm):not(.form-control-lg),
    :root.look-classic .layout-default :has(> .fp-label) select.form-control:not([multiple]):not(.select2-hidden-accessible):not(.form-control-sm):not(.form-control-lg),
    :root.look-classic .layout-default :has(> .fp-label) .custom-select:not(.custom-select-sm):not(.custom-select-lg),
    :root.look-classic .layout-default :has(> .fp-label) .select2-container .select2-selection--single {
        font-size: 16px;
    }
}

/* A small field, as dev draws it (the super admin dashboard's currency choice). */
:root.look-classic .layout-default .form-control-sm {
    height: 25.6px;
    padding-block: 2.4px;
    padding-inline-start: 8px;
    font-size: 10.4px;
    line-height: 15.6px;
}

/* On a phone every Classic field is 16px too (dev QA #325), not only a filter's. The same
   selectors as the sizes above, after them, so they win; a small field grows to fit its text. */
@media (max-width: 576px) {
    :root.look-classic .layout-default input.form-control:not([type="checkbox"]):not([type="radio"]):not(.form-control-sm):not(.form-control-lg),
    :root.look-classic .layout-default select.form-control:not([multiple]):not(.select2-hidden-accessible):not(.form-control-sm):not(.form-control-lg),
    :root.look-classic .layout-default .custom-select:not(.custom-select-sm):not(.custom-select-lg),
    :root.look-classic .layout-default .fp-input,
    :root.look-classic .layout-default textarea.form-control,
    :root.look-classic .layout-default .select2-container .select2-selection--single,
    :root.look-classic .layout-default .form-control-sm {
        font-size: 16px;
    }

    :root.look-classic .layout-default .form-control-sm {
        height: auto;
        line-height: 1.5;
    }
}

:root.look-classic .layout-default:not(:has(.sm-super-admin)) .table:not(.table-sm) tbody td {
    padding: 5.6px 16px;
    font-size: 16px;
}

:root.look-classic .layout-default .custom-control-label,
:root.look-classic .layout-default .form-check-label {
    font-size: 16px;
    font-weight: 400;
}

/* Labels: plain on a form; small grey capitals on the Settings forms and in the
   filters. Only a label with no class, as the old theme chose them
   (.card-form__body label:not([class]), app.css): a label with a class of its own is a
   switch's "Yes", a heading, a toggle or a page's own part, and keeps its look. The
   capital rule carries one class more, so it wins where both match. */
:root.look-classic .layout-default label:not([class]) {
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    color: #112b4a;
}

:root.look-classic .layout-default .card-form__body label:not([class]),
:root.look-classic .layout-default .page__container :is(label, span).fp-label {
    margin-bottom: 8px;
    font-size: 12.8px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(147, 159, 173, 0.84);
}

/* A label whose class only spaces or lays it out (a switch's "Yes", "Private Notes") is
   plain body text on the old website; one marked as a heading takes the heading's size. A
   label with a class of its own (a toggle, a page's own part) is not touched. */
:root.look-classic .layout-default label:is(.mb-0, .mb-2, .d-flex):not(.h5):not(.h6):not(.small):not(.custom-control-label):not(.form-check-label) {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
    color: #212529;
}

:root.look-classic .layout-default label.h5 {
    font-size: 20px;
    font-weight: 500;
    color: #000;
}

:root.look-classic .layout-default label.h6 {
    font-size: 16px;
    font-weight: 500;
    color: #000;
}

:root.look-classic .layout-default .form-control::placeholder,
:root.look-classic .layout-default .fp-input::placeholder {
    color: #a6b0bc;
    opacity: 1;
}

/* Every other panel field names --gp-placeholder (the Quick Pay, Billing search, VCC, form
   builder and command palette fields), so the old light grey reaches them through it. */
:root.look-classic .layout-default {
    --gp-placeholder: #a6b0bc;
}

/* The old placeholders are as heavy as typed text; the new look's are thinner. */
:root.look-classic .layout-default ::placeholder {
    font-weight: 400;
}

/* The old 16px under every field, the last one in its column too. */
:root.look-classic .layout-default .card-form .form-group,
:root.look-classic .layout-default .card-form .form-group:last-child {
    margin-bottom: 16px;
}

:root.look-classic .layout-default .btn.btn-light.choose-button {
    color: rgba(147, 159, 173, 0.84);
}

/* A form's section title: small teal capitals on a grey band. */
:root.look-classic .layout-default .ce-section-head {
    padding: 12px 20px;
    background: #f8fafa;
    border-bottom: 1px solid #e5e7eb;
    font-family: var(--gp-text);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #0a6361;
}

/* Done-when 11: solid badges. The teal and green take the nearest shade white text
   can be read on. A dot and a round badge keep their round shape. */
:root.look-classic .layout-default .badge:not(.badge-dot):not(.badge-pill) {
    padding: 4px;
    border-radius: var(--gp-radius-xs);
    font-weight: 600;
}

/* The unread mark is round, as the old theme's .badge-dot was (app.css). */
:root.look-classic .layout-default .badge.badge-dot {
    border-radius: var(--gp-radius-round);
}

:root.look-classic .layout-default .badge-primary { background-color: #00857f; color: #fff; }
:root.look-classic .layout-default .badge-secondary { background-color: #6c757d; color: #fff; }
:root.look-classic .layout-default .badge-success { background-color: #3fa313; color: #fff; }
:root.look-classic .layout-default .badge-danger { background-color: #dc3545; color: #fff; }
:root.look-classic .layout-default .badge-warning { background-color: #ffc107; color: #212529; }
/* box-shadow: the New look draws Info as an outline; Classic's filled chip had no ring. */
:root.look-classic .layout-default .badge-info { background-color: #117a8b; color: #fff; box-shadow: none; }
:root.look-classic .layout-default .badge-dark { background-color: #000; color: #fff; }
:root.look-classic .layout-default .badge-light { background-color: #f8f9fa; color: #212529; }

/* Filled tabs side by side, grey with the current one teal, as the old pill tabs. The
   tabs marked .bg-secondary carry Bootstrap's !important fill and text colour, which the
   New look's rule overrides with !important, so these do too. */
:root.look-classic .layout-default .gp-tabs,
:root.look-classic .layout-default .nav-pills {
    gap: 4px;
    border-bottom: 0;
}

/* A label that wraps to two lines on a phone keeps the one-line labels beside it centred. */
:root.look-classic .layout-default .gp-tabs .nav-link,
:root.look-classic .layout-default .nav-link.bg-secondary {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 8px 16px;
    background-color: #6c757d !important;
    border: 0;
    border-radius: var(--gp-radius-row);
    box-shadow: none;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    color: #fff !important;
}

:root.look-classic .layout-default .gp-tabs .nav-link.active,
:root.look-classic .layout-default .gp-tabs .nav-link.active.show,
:root.look-classic .layout-default .nav-link.bg-secondary.active {
    background-color: #00857f !important;
    color: #fff !important;
}

/* Second buttons, the top bar's language button among them: white with a light edge. */
:root.look-classic .layout-default .btn-light,
:root.look-classic .layout-default .gp-btn--secondary,
:root.look-classic .layout-default .navbar-main .btn-light.dropdown-toggle {
    background-color: #fff;
    border: 1px solid #efefef;
    color: #212529;
}

:root.look-classic .layout-default .btn-light:hover,
:root.look-classic .layout-default .gp-btn--secondary:hover {
    background-color: #e2e6ea;
}

:root.look-classic .layout-default .btn-success,
:root.look-classic .layout-default .gp-btn--success {
    background-color: #3fa313;
    border-color: #3fa313;
    color: #fff;
}

:root.look-classic .layout-default .btn-danger,
:root.look-classic .layout-default .gp-btn--danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

/* Hover, focus and press darken the green and the red, as Bootstrap's own did (7.5%, 10%
   and 12.5% darker). Without these the rules above, later in the file, would hold the
   resting colour. */
:root.look-classic .layout-default .btn-success:hover,
:root.look-classic .layout-default .btn-success:focus,
:root.look-classic .layout-default .gp-btn--success:hover,
:root.look-classic .layout-default .gp-btn--success:focus {
    background-color: #32810f;
    border-color: #2d750e;
    color: #fff;
}

:root.look-classic .layout-default .btn-success:not(:disabled):active,
:root.look-classic .layout-default .gp-btn--success:not(:disabled):active {
    background-color: #2d750e;
    border-color: #296a0c;
    color: #fff;
}

:root.look-classic .layout-default .btn-danger:hover,
:root.look-classic .layout-default .btn-danger:focus,
:root.look-classic .layout-default .gp-btn--danger:hover,
:root.look-classic .layout-default .gp-btn--danger:focus {
    background-color: #c82333;
    border-color: #bd2130;
    color: #fff;
}

:root.look-classic .layout-default .btn-danger:not(:disabled):active,
:root.look-classic .layout-default .gp-btn--danger:not(:disabled):active {
    background-color: #bd2130;
    border-color: #b21f2d;
    color: #fff;
}

:root.look-classic .layout-default .dropdown-menu {
    padding: 10px 0;
}

:root.look-classic .layout-default .dropdown-menu .dropdown-item {
    padding: 4px 24px;
    border-radius: 0;
    font-size: 16px;
    color: #212529;
}

/* Done-when 12: the box beside a field, white with the field's edge. */
:root.look-classic .layout-default .input-group-text {
    background-color: #fff;
    border: 1px solid var(--gp-field-line);
    color: #939fad;
}

/* The merchant's filter panel on the old light grey, its fields white. */
:root.look-classic .layout-default:not(:has(.sm-super-admin)) form.fp-card {
    background-color: #f3f5f6;
}

:root.look-classic .layout-default form.fp-card .form-control,
:root.look-classic .layout-default form.fp-card .fp-input,
:root.look-classic .layout-default form.fp-card .input-group,
:root.look-classic .layout-default form.fp-card .input-group-merge,
:root.look-classic .layout-default form.fp-card .select2-selection {
    background-color: #fff;
}

/* Grey on every other table row: the old 5% black over the row. */
:root.look-classic .layout-default .table-striped > tbody > tr:nth-of-type(odd) > * {
    box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.05);
}

:root.look-classic .layout-default .page-link {
    border: 0;
    color: #66717f;
}

:root.look-classic .layout-default .page-item.active .page-link {
    background-color: #00857f;
    color: #fff;
}

:root.look-classic .layout-default .page-item.disabled .page-link {
    color: rgba(146, 158, 172, 0.3);
}

:root.look-classic .layout-default .alert-info { background-color: #dcedf3; border-color: #cee6ef; color: #2a5766; }
:root.look-classic .layout-default .alert-danger { background-color: #f8d7da; border-color: #f5c6cb; color: #721c24; }
:root.look-classic .layout-default .alert-success { background-color: #d4edda; border-color: #c3e6cb; color: #155724; }
:root.look-classic .layout-default .alert-warning { background-color: #fff3cd; border-color: #ffeeba; color: #856404; }

/* The old "soft" boxes were coloured text on a 5% tint, below 4.5:1 (the warning 1.59:1), so
   they take the boxes above (PAYL-1973). The dark one keeps ink on sand through the tokens. */
:root.look-classic .layout-default .alert-soft-info,
:root.look-classic .layout-default .alert-soft-primary { background-color: #dcedf3; border-color: #cee6ef; color: #2a5766; }
:root.look-classic .layout-default .alert-soft-danger { background-color: #f8d7da; border-color: #f5c6cb; color: #721c24; }
:root.look-classic .layout-default .alert-soft-success { background-color: #d4edda; border-color: #c3e6cb; color: #155724; }
:root.look-classic .layout-default .alert-soft-warning { background-color: #fff3cd; border-color: #ffeeba; color: #856404; }

/* The breadcrumb: dark items, the current page grey. */
:root.look-classic .layout-default .page__heading .breadcrumb-item,
:root.look-classic .layout-default .page__heading .breadcrumb-item a {
    color: #112b4a;
}

:root.look-classic .layout-default .page__heading .breadcrumb-item.active {
    color: #66717f;
}

:root.look-classic .layout-default #default-drawer .sidebar-heading {
    letter-spacing: 0.92px;
    color: #000;
}

:root.look-classic .layout-default #default-drawer .sidebar-menu:not(.sm-super-admin) .sidebar-menu-item.active > .sidebar-menu-button {
    border-radius: 0;
}

:root.look-classic .layout-default .navbar-main,
:root.look-classic .layout-default #header .navbar {
    border-bottom: 0;
}

/* The one empty state in the product (<x-empty-state>). Here rather than pushed by the
   component, so a list loaded on its own (async refresh, a dialog) is styled too. [dir] on each
   rule: the theme's [dir=ltr] p outranked a bare class and took the gap under the icon away. */
[dir] .gp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px 36px;
    text-align: center;
}

[dir] .gp-empty__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--gp-radius-round, 50%);
    background: var(--gp-sand, #eceeef);
}

[dir] .gp-empty__icon {
    color: var(--gp-faint, #7c8f8b);
}

[dir] .gp-empty__message {
    max-width: 420px;
    margin: 14px 0 0;
    color: var(--gp-ink, #12332f);
    font-family: var(--gp-text, Figtree, sans-serif);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
}

[dir] .gp-empty__action {
    margin-top: 16px;
}

/* In a table: less air, and the message stays on the part of a wide table that is on screen
   rather than centred across the whole width and cut off. */
[dir] td > .gp-empty {
    position: sticky;
    inset-inline-start: 0;
    max-width: calc(100vw - 32px);
    padding: 28px 16px;
}

/* "Nothing here yet": the old larger icon and words. The filled icon sizes its glyph
   from this box. */
:root.look-classic .layout-default .gp-empty__mark {
    width: auto;
    height: auto;
    background: none;
}

:root.look-classic .layout-default .gp-empty__icon {
    width: 64px;
    height: 64px;
    color: #212529;
}

:root.look-classic .layout-default .gp-empty__message {
    font-size: 24px;
    font-weight: 600;
    color: #212529;
}

/* Done-when 13: the Settings pages' own list. A plain list in the old light grey, the
   current page in the old teal, on the old 42px line: a long name that wraps takes two
   lines, as on the old website, rather than a fixed height it would spill out of. The New
   look's rules for this list mark .text-primary and .text-secondary with !important, so
   these do too. */
:root.look-classic .layout-default .page__container .sidebar-menu {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

:root.look-classic .layout-default .page__container .sidebar-menu .sidebar-menu-button {
    height: auto;
    padding: 0 20px;
    background: transparent;
    border-radius: 0;
    font-size: 16px;
    line-height: 42px;
}

:root.look-classic .layout-default .page__container .sidebar-menu .sidebar-menu-button.text-secondary,
:root.look-classic .layout-default .page__container .sidebar-menu .sidebar-menu-button .sidebar-menu-icon {
    color: #6c757d !important;
}

:root.look-classic .layout-default .page__container .sidebar-menu .sidebar-menu-button.text-primary,
:root.look-classic .layout-default .page__container .sidebar-menu .sidebar-menu-button.text-primary .sidebar-menu-icon {
    background: transparent;
    color: #009c95 !important;
}

/* Subscribed at's "Repeat yearly" choice, sitting on the field's label line as text (the
   Subscriptions and Add-ons filters): no box, no layout shift. */
.layout-default .fp-repeat {
  position: absolute; top: 0; right: 0; max-width: 60%; z-index: 2;
  border: 0; background: transparent; padding: 0 14px 0 0; height: auto; line-height: 1.4;
  font-size: 12px; font-weight: 600; color: var(--gp-teal-ink, #00736e); cursor: pointer;
  appearance: none; -webkit-appearance: none; text-align: right; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 5px top 55%, right 1px top 55%; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat;
}
.layout-default .fp-repeat:focus-visible { outline: 2px solid var(--gp-teal, #009c95); outline-offset: 2px; border-radius: var(--gp-radius-xs, 6px); }

/* --- Toggles and switches sit level with their labels (Modern and Classic) -----------------
 * Measured on the panels: the theme's toggle (.custom-checkbox-toggle) sat 6.5px below the text
 * beside it, Bootstrap 4's .custom-switch 1.6px below, and a Bootstrap 5 .form-switch written
 * without .form-check floated off its label. Each is centred on its label's first line now. */
[dir] .layout-default .custom-checkbox-toggle { vertical-align: middle; }
[dir] .layout-default .custom-checkbox-toggle + label { vertical-align: middle; margin-bottom: 0; }
[dir] .layout-default .custom-switch .custom-control-label { padding-left: 8px; }
[dir] .layout-default .custom-switch .custom-control-label::before { top: calc((1lh - 20px) / 2); }
[dir] .layout-default .custom-switch .custom-control-label::after { top: calc((1lh - 14px) / 2); }
[dir] .layout-default .form-switch { display: flex; align-items: center; gap: 10px; padding-left: 0; }
[dir] .layout-default .form-switch .form-check-input { position: static; float: none; margin: 0; flex-shrink: 0; }
[dir] .layout-default .form-switch .form-check-label { margin: 0; }

/* Figtree draws its letters about a pixel high in the line, so on the Modern look a section
 * tab's text sat above its icon; most visible on the current tab's filled pill. */
:root:not(.look-classic) .layout-default .gp-section-nav__tab > span { position: relative; top: 1px; }

/* A list region being refreshed in place (assets/js/async-list.js): dimmed, not hidden, so the
   page keeps its shape while the new rows arrive. */
[dir] [data-async-region].gp-async-loading {
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.12s ease;
}


/* The TEST and CyberSource-only marks beside a company's name: small and tight, so they read as a
   tag on the name rather than a second, louder name. */
[dir] .layout-default :is(.tc-badge, .cso-badge) {
    padding: 0 6px;
    font-size: 10px;
    letter-spacing: 0.02em;
    line-height: 1.5;
    vertical-align: middle;
}
