/* ============================================================
   NorwichDC (norwichdc.com): WHMCS client area
   Ported from the NorwichDC site (NorwichDC-Main-Website/css/main.css,
   "Server Constellation" design system): Space Grotesk headings over
   Inter, void-black canvas, network-violet brand, teal / amber / red
   status tones, hairline borders, pill buttons and 24px cards.

   Derived from the Rust Server Hosting theme (itself from the
   EUGameHost twenty-one theme). What changed:
     . section 1 tokens re-pointed at the NorwichDC palette; two faces
       (Space Grotesk display, Inter body); radii are the site's
       (pill buttons, 24px cards, 12px controls) instead of square;
     . headings are sentence case and tightly tracked, as on the site;
       buttons, eyebrow labels, table heads and nav labels stay
       uppercase, which the site also does;
     . section 4 (site chrome) is a fresh port of the NorwichDC nav
       pill, Colocation dropdown, mobile panel and footer. Nothing is
       renamed: the site's classes already carry the ndc- prefix;
     . the app-bar credit chip is .ndc-credit-balance (was .iw-credit-balance);
     . the content shell is 1280px with 24px gutters (the site's
       .ndc-container), not the 1200px shell RSH used;
     . sections 2, 3, 5, 6 and 7 keep the RSH rules, retokenised:
       rust tints became violet tints, gold became amber, moss became
       teal, the square corners became the site's radii. Inline
       comments in those sections that still name RSH's source rules
       (.btn-gold, .browser-search) describe where a rule came from;
       the tokens are the truth.

   Layout of this file
     1. Tokens + page foundation
     2. Bootstrap 4 component overrides (every WHMCS page)
     3. Order form / cart / domain flows
     4. Imported site chrome: nav pill, dropdown, mobile panel, footer
     5. WHMCS application bar
     6. Gap fill
     7. Mobile
   ============================================================ */

/* ── Fonts: the site's two faces, same weights it loads ─────── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

/* ── Core variables ───────────────────────────────────────────
   --egh-* are the names the whole client area is written against
   (kept from twenty-one / RSH so sections 2 to 7 carry over unchanged).
   The --color-*, --font-*, --text-*, --radius-*, --hairline and
   --surface-* tokens are the site's own names from main.css :root, so
   the imported chrome below is a near copy of the site's CSS.      */
:root {
    /* Surfaces */
    --egh-bg:            #000000;   /* canvas (--color-void) */
    --egh-bg-card:       #08090d;   /* --color-rack-black, the site's solid plate; --surface-card over black is within 2 units of it */
    --egh-bg-raised:     #0e1016;   /* dropdowns, popovers, card headers */
    --egh-bg-input:      #111319;   /* input plate */
    --egh-bg-interactive:#161922;   /* row hover */

    /* Lines */
    --egh-border:        rgba(255,255,255,0.12);  /* --hairline */
    --egh-border-subtle: rgba(255,255,255,0.08);
    --egh-border-blue:   rgba(128,82,255,0.55);   /* name kept so the shared rules resolve; it is violet now */

    /* Brand */
    --egh-primary:       #8052ff;   /* --color-network-violet */
    --egh-primary-hov:   #9a73ff;   /* --color-network-violet-bright */
    --egh-primary-deep:  #6a3fe0;
    --egh-secondary:     #9a73ff;
    --egh-accent:        #8052ff;   /* the one CTA colour (.ndc-btn--primary) */
    --egh-accent-hov:    #9a73ff;
    --egh-accent-ink:    #ffffff;   /* label colour on violet */
    --egh-link:          #9a73ff;   /* .ndc-link */

    /* Focus plate (the site's ring is violet-bright) */
    --egh-glow:          rgba(154,115,255,0.35);
    --egh-glow-strong:   rgba(154,115,255,0.6);

    /* Text */
    --egh-text:          #c7ced8;   /* --color-rack-steel */
    --egh-text-dim:      #c7ced8;
    --egh-muted:         #8d94a3;   /* --color-smoke */

    /* Status */
    --egh-danger:        #ff4d5e;   /* --color-alert-red */
    --egh-success:       #16d6b1;   /* --color-uptime-teal */
    --egh-success-deep:  #0f9f84;
    --egh-warning:       #ffb829;   /* --color-power-amber */
    --egh-info:          #8052ff;

    /* Shape: the site's radii */
    --egh-radius:        12px;
    --egh-radius-lg:     24px;      /* --radius-card */
    --egh-pill:          999px;     /* --radius-pill */

    /* Type */
    --egh-font-display:  "Space Grotesk", "Inter Tight", ui-sans-serif, system-ui, sans-serif;
    --egh-font-body:     "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    /* Site token aliases, used verbatim by the imported chrome */
    --color-void:                   #000000;
    --color-rack-black:             #08090d;
    --color-bone:                   #ffffff;
    --color-rack-steel:             #c7ced8;
    --color-smoke:                  #8d94a3;
    --color-network-violet:         #8052ff;
    --color-network-violet-bright:  #9a73ff;
    --color-uptime-teal:            #16d6b1;
    --color-power-amber:            #ffb829;
    --color-alert-red:              #ff4d5e;
    --font-display:                 "Space Grotesk", "Inter Tight", ui-sans-serif, system-ui, sans-serif;
    --font-body:                    "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --text-caption:                 12px;
    --text-body-sm:                 14px;
    --page-max-width:               1280px;
    --radius-pill:                  999px;
    --radius-card:                  24px;
    --radius-nav:                   24px;
    --hairline:                     rgba(255, 255, 255, 0.12);
    --hairline-strong:              rgba(255, 255, 255, 0.22);
    --surface-card:                 rgba(255, 255, 255, 0.025);
    --surface-nav:                  rgba(8, 9, 13, 0.72);
    --ndc-wrap:                     1280px;    /* the site's .ndc-container width */
}

/* The site's selection colour (main.css ::selection) */
::selection { background: rgba(128,82,255,0.45); color: #ffffff; }

/* ── Page foundation ──────────────────────────────────────── */
html, body {
    background-color: var(--egh-bg) !important;
    color: var(--egh-text) !important;
    font-family: var(--egh-font-body) !important;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.primary-bg-color {
    background-color: var(--egh-bg) !important;
}

section#main-body {
    background-color: var(--egh-bg) !important;
    padding: 40px 0 64px !important;
}

/* The site topbar is sticky, so anything the browser scrolls to (an
   in-page anchor, or a control taking keyboard focus) has to clear it,
   or it lands underneath (SC 2.4.11). 18px offset + 64px nav + 22px,
   the site's own 96px scroll-padding plus the pill's gap. */
html { scroll-padding-top: 104px; }
[id] { scroll-margin-top: 104px; }

/* One focus ring for every control, the site's own: 2px violet-bright
   (#9a73ff, main.css :focus-visible). Measured: #9a73ff on #000 = 6.9:1.

   !important is required, not stylistic. theme.min.css ships
   `.btn:focus{outline:0}`, `.form-control:focus{outline:0}`,
   `.custom-select:focus{outline:0}` and `.page-link:focus{outline:0}`,
   all at (0,2,0), which outrank a plain `body :focus-visible` at (0,1,1)
   and would silently swallow the ring on exactly the controls that need
   it. `.btn:focus{box-shadow:none}` removes the framework's own fallback
   ring too, so without this there is no keyboard focus indicator on
   buttons at all (SC 2.4.7). */
body :focus-visible {
    outline: 2px solid #9a73ff !important;
    outline-offset: 3px !important;
}

/* ── Typography ─────────────────────────────────────────────
   Two faces, as on the site: Space Grotesk for headings, Inter for
   everything else. Headings are white, semibold, sentence case and
   tightly tracked (.ndc-h2 is -0.03em, card h3 -0.015em). */
h1, h2, h3, h4, h5, h6,
.card-title,
.mc-promo-manage .panel-heading h3,
.mc-promo-login .panel-heading h3 {
    color: #fff !important;
    font-family: var(--egh-font-display) !important;
    font-weight: 600 !important;
    letter-spacing: -0.02em !important;
}

h1 { font-size: clamp(1.9rem, 3.4vw, 2.5rem) !important; line-height: 1.08 !important; }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem) !important; line-height: 1.12 !important; }
h3 { font-size: 1.25rem !important; letter-spacing: -0.015em !important; }

/* Page title above the content column */
#main-body h1 { margin-bottom: 22px !important; }

p, li, label, small {
    color: var(--egh-text-dim);
}

body {
    font-size: 1rem;
    line-height: 1.55;
    letter-spacing: 0.01em;
}

.text-muted {
    color: var(--egh-muted) !important;
}

/* ── Links ────────────────────────────────────────────────────
   Violet-bright, as .ndc-link is set on the site. The site's underline is kept
   for links inside copy only: WHMCS renders hundreds of anchors as
   buttons, tabs, rows and tiles, and a global underline reaches them
   all. */
a {
    color: var(--egh-link);
    text-decoration: none;
    transition: color 0.12s ease;
}
a:hover {
    color: #fff;
    text-decoration: none;
}
p a, li:not(.nav-item):not(.list-group-item) > a:not(.btn), td a:not(.btn), dd a, small a, label a, .alert a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Breadcrumb ───────────────────────────────────────────── */
.master-breadcrumb {
    background-color: var(--egh-bg-card) !important;
    border-bottom: 1px solid var(--egh-border) !important;
}
.master-breadcrumb .breadcrumb {
    background-color: transparent !important;
    margin: 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}
/* inline <a> in a breadcrumb measures 23px tall, 1px under the 24x24
   minimum target (SC 2.5.8). inline-block so the padding takes effect. */
.breadcrumb-item a {
    color: var(--egh-muted);
    display: inline-block;
    padding: 3px 0;
}
.breadcrumb-item a:hover { color: #fff; }
.breadcrumb-item.active {
    color: var(--egh-text) !important;
}
.breadcrumb-item + .breadcrumb-item::before {
    color: var(--egh-muted) !important;
}

/* ── Cards ────────────────────────────────────────────────────
   The site's .ndc-service-card and .ndc-plan: a translucent plate
   (rgba 255/0.025 over black) with a hairline border and the 24px card
   radius. No shadow, no lift; hover brightens the border to violet. */
.card,
.mc-promo-manage,
.mc-promo-login {
    background-color: var(--egh-bg-card) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius-lg) !important;
    color: var(--egh-text) !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease !important;
    position: relative;
    overflow: hidden;
}

.card:hover,
.mc-promo-manage:hover,
.mc-promo-login:hover {
    border-color: rgba(128,82,255,0.45) !important;
}

.card-header {
    background-color: var(--egh-bg-raised) !important;
    border-bottom: 1px solid var(--egh-border) !important;
    color: #fff !important;
    border-radius: var(--egh-radius-lg) var(--egh-radius-lg) 0 0 !important;
    font-family: var(--egh-font-body) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.12em !important;
    font-size: 12px !important;
}

.card-footer {
    background-color: rgba(255,255,255,0.02) !important;
    border-top: 1px solid var(--egh-border) !important;
    color: var(--egh-muted) !important;
    border-radius: 0 0 var(--egh-radius-lg) var(--egh-radius-lg) !important;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar .card {
    border-color: var(--egh-border) !important;
}

.sidebar .list-group-item {
    background-color: transparent !important;
    border-color: var(--egh-border-subtle) !important;
    color: var(--egh-muted) !important;
    transition: all 0.12s ease !important;
    font-size: 0.9rem;
}

.sidebar .list-group-item:hover {
    background-color: #ffffff0f !important;
    color: #fff !important;
    padding-left: 20px !important;
}

/* Active row: the site marks its current dropdown item with a 3px rust
   inset bar on a #ffffff0f plate (.nav-dropdown a.is-current). */
.sidebar .list-group-item.active,
.sidebar .list-group-item.active:hover {
    background: #ffffff0f !important;
    border-color: var(--egh-border-subtle) !important;
    box-shadow: inset 3px 0 var(--egh-primary) !important;
    color: #fff !important;
    font-weight: 700 !important;
}

.sidebar .card-title {
    color: var(--egh-muted) !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
}

/* ── Form controls ────────────────────────────────────────────
   The site's inputs (power estimator) are a dark plate with a
   hairline; focus brightens the hairline to violet. */
.form-control {
    background-color: var(--egh-bg-input) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius) !important;
    color: #fff !important;
    letter-spacing: 0.03em;
    transition: border-color 0.12s ease, box-shadow 0.12s ease !important;
}

.form-control:focus {
    background-color: var(--egh-bg-input) !important;
    border-color: var(--egh-primary) !important;
    color: #fff !important;
    box-shadow: none !important;
}

.form-control::placeholder {
    color: #6b7280 !important;
    opacity: 1;
}

.form-control:disabled,
.form-control[readonly] {
    background-color: rgba(255,255,255,0.03) !important;
    color: var(--egh-muted) !important;
    border-color: var(--egh-border-subtle) !important;
}

.input-group-text {
    background-color: var(--egh-bg-raised) !important;
    border-color: var(--egh-border) !important;
    color: var(--egh-muted) !important;
    border-radius: var(--egh-radius) !important;
}

.custom-select,
select.form-control {
    background-color: var(--egh-bg-input) !important;
    border-color: var(--egh-border) !important;
    color: #fff !important;
    border-radius: var(--egh-radius) !important;
}

select.form-control option,
.custom-select option {
    background-color: var(--egh-bg-raised);
    color: var(--egh-text);
}

/* Field labels follow the site's .stat .k: small, uppercase, tracked.
   Check and radio labels are sentences ("I agree to the terms"), so
   they keep sentence case at body size. */
label {
    color: var(--egh-muted) !important;
    font-size: 12px;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px !important;
}
.custom-control-label,
.form-check-label,
.checkbox label,
.radio label {
    font-size: 0.95rem;
    font-weight: 400 !important;
    text-transform: none;
    letter-spacing: 0;
    color: var(--egh-text-dim) !important;
}

.form-group {
    margin-bottom: 1.2rem !important;
}

/* Checkbox / radio */
.custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--egh-secondary) !important;
    border-color: var(--egh-secondary) !important;
}

.custom-control-label::before {
    background-color: var(--egh-bg-input) !important;
    border-color: #ffffff33 !important;
    border-radius: 5px !important;
}

/* ── Buttons ──────────────────────────────────────────────────
   The site's .ndc-btn system: 12.5px uppercase, tracked, pill, no
   border. violet = the one action you want taken (.ndc-btn--primary),
   hairline plate = everything else (.ndc-btn--secondary); the status
   fills (teal confirm, red destructive) are the site's status tones. */
.btn {
    border: 0 !important;
    border-radius: var(--egh-pill) !important;
    font-family: var(--egh-font-body) !important;
    font-weight: 700 !important;
    font-size: 12.5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 13px 22px !important;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 70ms !important;
}
.btn:active { transform: translateY(1px) scale(0.98); }

.btn-sm { padding: 8px 14px !important; font-size: 11.5px !important; }
.btn-lg { padding: 16px 28px !important; font-size: 13.5px !important; }

/* Primary = violet CTA, exactly .ndc-btn--primary on the site */
.btn-primary {
    background: var(--egh-accent) !important;
    color: var(--egh-accent-ink) !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active {
    background: var(--egh-accent-hov) !important;
    color: var(--egh-accent-ink) !important;
}

/* Secondary = hairline plate, as .ndc-btn--secondary */
.btn-default,
.btn-secondary {
    background-color: transparent !important;
    border: 1px solid rgba(255,255,255,0.16) !important;
    color: var(--egh-text) !important;
}
.btn-default:hover,
.btn-secondary:hover,
.btn-default:focus,
.btn-secondary:focus {
    background-color: transparent !important;
    border-color: rgba(255,255,255,0.4) !important;
    color: #fff !important;
}

/* Status buttons: teal and red fills in the site's status tones. Teal takes
   a dark label (white on teal is 3.3:1); red is deepened to #d8303f so a
   white label passes (4.8:1), the site's #ff4d5e stays for text and chips. */
.btn-success {
    background: var(--egh-success) !important;
    color: #06201a !important;
}
.btn-success:hover {
    background: #12b897 !important;
    color: #06201a !important;
}

/* Danger = solid red, white label */
.btn-danger {
    background: #d8303f !important;
    color: #fff !important;
}
.btn-danger:hover {
    background: #c9283a !important;
    color: #fff !important;
}

/* Warning and info have no button on the site; tinted plates so they sit
   on the canvas the way the site's status chips do. */
.btn-warning {
    background: rgba(255,184,41,0.14) !important;
    color: var(--egh-warning) !important;
}
.btn-warning:hover {
    background: rgba(255,184,41,0.22) !important;
    color: var(--egh-warning) !important;
}

.btn-info {
    background: rgba(128,82,255,0.14) !important;
    color: var(--egh-secondary) !important;
}
.btn-info:hover {
    background: rgba(128,82,255,0.22) !important;
    color: var(--egh-secondary) !important;
}

.btn.disabled, .btn:disabled {
    opacity: 0.45 !important;
}

.btn-outline-primary {
    color: var(--egh-secondary) !important;
    border: 1px solid var(--egh-primary) !important;
    background: transparent !important;
}
.btn-outline-primary:hover {
    background: rgba(128,82,255,0.12) !important;
    border-color: var(--egh-secondary) !important;
    color: var(--egh-secondary) !important;
}

.btn-link {
    color: var(--egh-secondary) !important;
}
.btn-link:hover {
    color: var(--egh-secondary) !important;
}

/* ── Tables ───────────────────────────────────────────────── */
.table {
    color: var(--egh-text) !important;
}

.table th,
.table td {
    border-color: var(--egh-border-subtle) !important;
    padding: 12px 16px !important;
    vertical-align: middle !important;
}

.table thead th {
    background-color: rgba(128,82,255,0.08) !important;
    color: var(--egh-secondary) !important;
    border-color: var(--egh-border) !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-weight: 600 !important;
    border-bottom: 2px solid var(--egh-border) !important;
}

table.table-list thead th {
    background-color: rgba(128,82,255,0.08) !important;
    color: var(--egh-secondary) !important;
    border-color: var(--egh-border) !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-weight: 600 !important;
}

.table-list > tbody > tr > td {
    background-color: var(--egh-bg-card) !important;
    color: var(--egh-text) !important;
    border-color: var(--egh-border-subtle) !important;
}

.table-list > tbody > tr:hover > td {
    background-color: rgba(128,82,255,0.06) !important;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255,255,255,0.02) !important;
}

.table-hover tbody tr:hover {
    background-color: rgba(128,82,255,0.06) !important;
    color: var(--egh-text) !important;
}

.dataTables_wrapper table.table-list {
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius-lg) !important;
    overflow: hidden;
}

/* ── Dropdowns ────────────────────────────────────────────── */
.dropdown-menu {
    background-color: var(--egh-bg-raised) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5) !important;
    padding: 4px 0 !important;
}

/* Highlight lives on the <li> only */
li.dropdown-item {
    background-color: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: var(--egh-radius) !important;
    transition: background-color 0.2s ease !important;
}

li.dropdown-item:hover,
li.dropdown-item:focus {
    background-color: rgba(128,82,255,0.12) !important;
}

li.dropdown-item.active {
    background: rgba(128,82,255,0.14) !important;
}

/* <a> is purely a text/layout element - no hover background.
   ---------------------------------------------------------------------
   The second selector is the "More" overflow menu. scripts.js:22910
   (autoCollapse) moves overflowing nav items in with

       child.removeClass().addClass('dropdown-item');

   which rewrites the <li> only: the <a> keeps its original `pr-4` and
   never gains .dropdown-item, so a class-based selector misses it and the
   label falls back to .dropdown-menu's own `color:#212529` (1.3:1 on this
   panel). It has to be matched by position instead.

   Keep it in the SAME rule rather than a parallel one: when it was written
   as its own block the two drifted, and the More items rendered at
   font-weight 500 against 400 everywhere else. */
a.dropdown-item,
.collapsable-dropdown-menu > li > a {
    background-color: transparent !important;
    color: var(--egh-muted) !important;
    padding: 8px 16px !important;
    font-size: 0.9rem !important;
    display: block !important;
    width: 100% !important;
    border-bottom: 0 !important;
    transition: color 0.2s ease !important;
}

a.dropdown-item:hover,
a.dropdown-item:focus,
a.dropdown-item:active,
.collapsable-dropdown-menu > li > a:hover,
.collapsable-dropdown-menu > li > a:focus,
.collapsable-dropdown-menu > li > a:active {
    background-color: transparent !important;
    color: var(--egh-text) !important;
}

li.dropdown-item.active a.dropdown-item {
    color: #fff !important;
}

/* Badges WHMCS carries over with a moved item (e.g. open ticket counts) */
.collapsable-dropdown-menu > li > a .badge {
    background: var(--egh-primary) !important;
    color: #ffffff !important;
}

.dropdown-divider {
    border-color: var(--egh-border-subtle) !important;
    margin: 4px 0 !important;
}

.dropdown-header {
    color: var(--egh-secondary) !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-weight: 600 !important;
}

/* ── Nav tabs (detail page tabs) ──────────────────────────── */
.nav-tabs {
    border-color: var(--egh-border) !important;
}

.nav-tabs .nav-link {
    color: var(--egh-muted) !important;
    border-color: transparent !important;
    border-radius: var(--egh-radius) var(--egh-radius) 0 0 !important;
    transition: all 0.2s ease !important;
    font-weight: 500 !important;
}

.nav-tabs .nav-link:hover {
    color: var(--egh-text) !important;
    background-color: rgba(128,82,255,0.06) !important;
    border-color: var(--egh-border-subtle) var(--egh-border-subtle) transparent !important;
}

.nav-tabs .nav-link.active {
    background-color: var(--egh-bg-card) !important;
    border-color: var(--egh-border) var(--egh-border) var(--egh-bg-card) !important;
    color: var(--egh-secondary) !important;
    font-weight: 600 !important;
}

/* ── Nav pills ────────────────────────────────────────────── */
.nav-pills .nav-link {
    color: var(--egh-muted) !important;
    border-radius: var(--egh-radius) !important;
    transition: all 0.2s ease !important;
}
.nav-pills .nav-link:hover {
    background-color: rgba(128,82,255,0.08) !important;
    color: var(--egh-text) !important;
}
.nav-pills .nav-link.active {
    background: var(--egh-primary) !important;
    color: #ffffff !important;
}

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
    gap: 4px;
}

.page-link {
    background-color: var(--egh-bg-raised) !important;
    border-color: var(--egh-border) !important;
    color: var(--egh-muted) !important;
    border-radius: var(--egh-radius) !important;
    transition: all 0.2s ease !important;
}

.page-link:hover {
    background-color: rgba(128,82,255,0.12) !important;
    border-color: var(--egh-secondary) !important;
    color: var(--egh-secondary) !important;
}

.page-item.active .page-link {
    background: var(--egh-primary) !important;
    border-color: var(--egh-secondary) !important;
    color: #ffffff !important;
}

.page-item.disabled .page-link {
    background-color: var(--egh-bg-card) !important;
    border-color: var(--egh-border-subtle) !important;
    color: rgba(255,255,255,0.2) !important;
}

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
    border-radius: var(--egh-radius) !important;
    border-left-width: 3px !important;
}

.alert-primary {
    background-color: rgba(128,82,255,0.1) !important;
    border-color: var(--egh-secondary) !important;
    color: #9a73ff !important;
}

.alert-success {
    background-color: rgba(22,214,177,0.1) !important;
    border-color: var(--egh-success) !important;
    color: #16d6b1 !important;
}

.alert-danger {
    background-color: rgba(255,77,94,0.1) !important;
    border-color: var(--egh-danger) !important;
    color: #ff4d5e !important;
}

.alert-warning {
    background-color: rgba(255,184,41,0.1) !important;
    border-color: var(--egh-warning) !important;
    color: #ffb829 !important;
}

.alert-info {
    background-color: rgba(128,82,255,0.1) !important;
    border-color: #9a73ff !important;
    color: #9a73ff !important;
}

.alert-secondary {
    background-color: var(--egh-bg-raised) !important;
    border-color: var(--egh-border) !important;
    color: var(--egh-muted) !important;
}

/* Links inside alerts. The framework gives every variant a near-black
   .alert-link (#533f03 on warning, #062c33 on info, …) intended for light
   plates; on these tinted dark plates they measured 1.76:1: the "Learn more"
   in the network-issue banner was effectively invisible. Inheriting the
   alert's own colour keeps each link at the contrast already verified for
   that variant's body text, and the underline carries the affordance. */
.alert .alert-link,
.alert a {
    color: inherit !important;
    text-decoration: underline !important;
    font-weight: 700 !important;
    /* bare inline links here measure 17px tall: under the 24x24 minimum
       (SC 2.5.8), which applies at every width, not just on phones */
    display: inline-block;
    padding: 4px 0;
}
.alert .alert-link:hover,
.alert a:hover { opacity: 0.82; }

/* ── Legacy Bootstrap 3 labels ────────────────────────────────
   Still emitted by store/ox/manage.tpl and service-renewal-item.tpl, and
   added at runtime by scripts.js (label-warning). The framework fills them
   with saturated mid-tones and white text: measured 1.95:1 on warning,
   2.09:1 on info, 2.48:1 on success. Restyled as tinted plates so they
   match the .badge / .status-* family. */
.label {
    display: inline-block;
    padding: 4px 8px !important;
    border-radius: var(--egh-radius) !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    line-height: 1.2;
}
.label-default {
    background-color: rgba(255,255,255,0.06) !important;
    color: var(--egh-muted) !important;
    border: 1px solid var(--egh-border-subtle) !important;
}
.label-success {
    background-color: rgba(22,214,177,0.16) !important;
    color: var(--egh-success) !important;
    border: 1px solid rgba(22,214,177,0.4) !important;
}
.label-info {
    background-color: rgba(128,82,255,0.16) !important;
    color: var(--egh-secondary) !important;
    border: 1px solid var(--egh-border-blue) !important;
}
.label-warning {
    background-color: rgba(255,184,41,0.16) !important;
    color: var(--egh-warning) !important;
    border: 1px solid rgba(255,184,41,0.4) !important;
}
.label-danger {
    background-color: rgba(255,77,94,0.16) !important;
    color: var(--egh-danger) !important;
    border: 1px solid rgba(255,77,94,0.4) !important;
}

/* ── Badges ───────────────────────────────────────────────── */
.badge {
    border-radius: var(--egh-radius) !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
}

.badge-primary,
.badge-info {
    background: var(--egh-primary) !important;
    color: #ffffff !important;
}

.badge-success {
    background-color: rgba(22,214,177,0.2) !important;
    color: #16d6b1 !important;
    border: 1px solid rgba(22,214,177,0.4) !important;
}

.badge-danger {
    background-color: rgba(255,77,94,0.2) !important;
    color: #ff4d5e !important;
    border: 1px solid rgba(255,77,94,0.4) !important;
}

.badge-warning {
    background-color: rgba(255,184,41,0.2) !important;
    color: #ffb829 !important;
    border: 1px solid rgba(255,184,41,0.4) !important;
}

/* ── Status labels (WHMCS service statuses) ───────────────── */
.status-active,
.status-open,
.status-completed,
.status-paid {
    background: rgba(22,214,177,0.16) !important;
    color: #16d6b1 !important;
    border: 1px solid rgba(22,214,177,0.4) !important;
    border-radius: var(--egh-radius) !important;
}

.status-pending,
.status-unpaid {
    background: rgba(255,77,94,0.16) !important;
    color: #ff4d5e !important;
    border: 1px solid rgba(255,77,94,0.4) !important;
    border-radius: var(--egh-radius) !important;
}

.status-suspended {
    background: rgba(255,184,41,0.16) !important;
    color: #ffb829 !important;
    border: 1px solid rgba(255,184,41,0.4) !important;
    border-radius: var(--egh-radius) !important;
}

.status-terminated,
.status-cancelled,
.status-closed {
    background-color: rgba(255,255,255,0.05) !important;
    color: var(--egh-muted) !important;
    border: 1px solid var(--egh-border-subtle) !important;
    border-radius: var(--egh-radius) !important;
}

.status-onhold,
.status-payment-pending,
.status-delivered {
    background: rgba(128,82,255,0.14) !important;
    color: #9a73ff !important;
    border: 1px solid rgba(128,82,255,0.4) !important;
    border-radius: var(--egh-radius) !important;
}

/* ── List groups ──────────────────────────────────────────── */
.list-group-item {
    background-color: var(--egh-bg-card) !important;
    border-color: var(--egh-border-subtle) !important;
    color: var(--egh-text) !important;
    transition: all 0.2s ease !important;
}

.list-group-item-action:hover {
    background-color: rgba(128,82,255,0.06) !important;
    color: var(--egh-text) !important;
}

.list-group-item.active {
    background: rgba(128,82,255,0.14) !important;
    border-color: var(--egh-secondary) !important;
    color: #fff !important;
}

/* ── Modals ───────────────────────────────────────────────── */
.modal-content {
    background-color: var(--egh-bg-card) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius-lg) !important;
    box-shadow: 0 24px 80px rgba(0,0,0,0.7) !important;
}

.modal-header {
    background-color: rgba(128,82,255,0.05) !important;
    border-bottom: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius-lg) var(--egh-radius-lg) 0 0 !important;
}

.modal-title {
    color: var(--egh-text) !important;
    font-family: var(--egh-font-display) !important;
    font-weight: 600 !important;
}

.modal-footer {
    background-color: rgba(255,255,255,0.02) !important;
    border-top: 1px solid var(--egh-border) !important;
    border-radius: 0 0 var(--egh-radius-lg) var(--egh-radius-lg) !important;
}

.modal-header > .close {
    color: var(--egh-muted) !important;
    opacity: 0.7;
    transition: all 0.2s ease !important;
}

.modal-header > .close:hover {
    color: #fff !important;
    opacity: 1;
}

.modal-backdrop.show {
    opacity: 0.7 !important;
}

/* ── Popovers (notifications) ─────────────────────────────── */
.popover {
    background-color: var(--egh-bg-raised) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5) !important;
}

.popover-header {
    background-color: rgba(128,82,255,0.05) !important;
    border-color: var(--egh-border) !important;
    color: var(--egh-text) !important;
    border-radius: var(--egh-radius) var(--egh-radius) 0 0 !important;
    font-weight: 600 !important;
}

.popover-body {
    color: var(--egh-text) !important;
    padding: 0 !important;
}

.popover-user-notifications {
    background-color: var(--egh-bg-raised) !important;
    border-color: var(--egh-border) !important;
    border-radius: var(--egh-radius) !important;
}

.popover-user-notifications ul li {
    border-color: var(--egh-border-subtle) !important;
}

.popover-user-notifications ul li a {
    color: var(--egh-text) !important;
    transition: background 0.2s ease !important;
}

.popover-user-notifications ul li a:hover {
    background-color: rgba(128,82,255,0.08) !important;
}

/* ── Progress bars ────────────────────────────────────────── */
.progress {
    background-color: rgba(255,255,255,0.06) !important;
    border-radius: var(--egh-radius) !important;
    height: 8px !important;
}

.progress-bar {
    background: var(--egh-primary) !important;
    border-radius: var(--egh-radius) !important;
}

/* ── HR ───────────────────────────────────────────────────── */
hr {
    border-color: var(--egh-border-subtle) !important;
}

/* ── Jumbotron ────────────────────────────────────────────── */
.jumbotron {
    background-color: var(--egh-bg-raised) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius-lg) !important;
    color: var(--egh-text) !important;
}

/* ── Client home tiles ────────────────────────────────────── */
.tiles .tile {
    background-color: var(--egh-bg-card) !important;
    border-right-color: var(--egh-border-subtle) !important;
    border-radius: var(--egh-radius) !important;
    color: var(--egh-text) !important;
    transition: all 0.3s ease !important;
}

.tiles .tile .title {
    color: var(--egh-muted) !important;
}

.tiles .tile i {
    color: rgba(128,82,255,0.1) !important;
    transition: all 0.3s ease !important;
}

.tiles .tile:hover {
    background-color: var(--egh-bg-raised) !important;
    cursor: pointer;
}

.tiles .tile:hover i {
    color: rgba(128,82,255,0.25) !important;
}

/* ── Action icon buttons ──────────────────────────────────── */
.action-icon-btns a {
    background-color: var(--egh-bg-card) !important;
    border: 1px solid var(--egh-border-subtle) !important;
    border-radius: var(--egh-radius) !important;
    color: var(--egh-muted) !important;
    transition: all 0.3s ease !important;
}

.action-icon-btns a:hover {
    border-color: var(--egh-secondary) !important;
    background-color: rgba(128,82,255,0.06) !important;
    color: var(--egh-text) !important;
}

.action-icon-btns a .ico-container i {
    color: rgba(128,82,255,0.2) !important;
    transition: all 0.3s ease !important;
}

.action-icon-btns a:hover .ico-container i {
    color: var(--egh-secondary) !important;
}

/* ── Client home cards ────────────────────────────────────── */
.client-home-cards .card-header {
    background-color: rgba(128,82,255,0.05) !important;
    font-weight: 600 !important;
}

.client-home-cards .list-group {
    border-color: var(--egh-border-subtle) !important;
}

.client-home-cards .list-group .list-group-item {
    border-color: var(--egh-border-subtle) !important;
}

.client-home-cards small {
    color: var(--egh-muted) !important;
}

/* ── Ticket view ──────────────────────────────────────────── */
.view-ticket .posted-by {
    background-color: rgba(128,82,255,0.05) !important;
    border-bottom: 1px solid var(--egh-border-subtle) !important;
    color: var(--egh-muted) !important;
}

.view-ticket .posted-by .posted-by-name {
    color: var(--egh-secondary) !important;
}

.view-ticket .attachments {
    border-color: var(--egh-border-subtle) !important;
}

.view-ticket .attachment-list li span {
    background-color: var(--egh-bg-raised) !important;
    border-color: var(--egh-border) !important;
}

.view-ticket .attachment-list li figure {
    background-color: var(--egh-bg-raised) !important;
}

/* ── Ticket reply star rating ─────────────────────────────────
   viewticket.tpl emits five empty <span class="star"> and theme.min.css
   paints them as ::before glyphs:

       .ticket-reply .rating span.star:before {
           font-family: "Font Awesome 5 Pro"; content: "\f005"; }

   but nothing defines that @font-face: it has to come from WHMCS core's
   /assets/css/fontawesome-all.min.css. Where that ships Free rather than
   Pro the family never resolves, and because U+F005 is a Private Use Area
   codepoint there is no fallback glyph and no tofu box: the spans simply
   paint nothing. Measured with canvas: "Font Awesome 5 Pro" gave a 31.11px
   advance, byte-identical to a deliberately nonexistent family, while
   "Font Awesome 5 Free" gave 45px.

   Appending the Free families fixes it without changing anything where Pro
   IS present, since Pro stays first in the list. Weight is left at the
   framework's 400: fa-star exists in Free Regular (verified: 400 and 900
   both measured 45px), so the hollow-star design is preserved. */
.ticket-reply .rating span.star,
.ticket-reply .rating-done span.star {
    font-family: "Font Awesome 5 Pro", "Font Awesome 6 Pro",
                 "Font Awesome 5 Free", "Font Awesome 6 Free", FontAwesome !important;
    /* the .rating stars are clickable controls but measure ~19px wide as
       bare glyphs: pad them to the 24x24 minimum (SC 2.5.8) */
    font-size: 1.05rem !important;
    padding: 2px 4px !important;
}

/* ── Verification banner ──────────────────────────────────────
   This is a warning, so it is tinted amber rather than brand blue -
   a blue plate with a grey icon read as decoration and the whole bar
   was easy to scroll past. The icon inherits #666 from the framework
   otherwise, which lands around 2.5:1 on this plate. */
.verification-banner {
    background-color: rgba(255,184,41,0.10) !important;
    border-top: 1px solid rgba(255,184,41,0.28) !important;
    border-bottom: 1px solid rgba(255,184,41,0.28) !important;
    color: var(--egh-text) !important;
    padding: 14px 0 !important;
}
/* Target the warning glyph, not every <i> in the banner: the Resend button
   contains a fa-spinner that was inheriting this and rendering amber at
   17.6px inside a btn-sm. */
.verification-banner .fa-exclamation-triangle {
    color: var(--egh-warning) !important;
    font-size: 1.1rem !important;
    margin-right: 6px;
}
.verification-banner .text { color: var(--egh-text) !important; }
/* padding:0 here would drop the dismiss button to a 10x15 hit area (measured
   at 360px): under the 24x24 minimum. Zero the .btn padding but restore the
   target with an explicit box. */
.verification-banner .btn.close {
    color: var(--egh-muted) !important;
    padding: 4px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}
.verification-banner .btn.close:hover { color: var(--egh-text) !important; }
/* Make the action read as the way out of the banner, not as chrome */
.verification-banner .btn-resend-verify-email {
    border-color: rgba(255,184,41,0.5) !important;
    color: var(--egh-warning) !important;
}
.verification-banner .btn-resend-verify-email:hover {
    background: rgba(255,184,41,0.14) !important;
    border-color: var(--egh-warning) !important;
    color: var(--egh-warning) !important;
}

/* ── Announcements ────────────────────────────────────────── */
.announcements .announcement article {
    background-color: var(--egh-bg-raised) !important;
    border-left: 3px solid var(--egh-primary) !important;
    border-radius: 0 var(--egh-radius) var(--egh-radius) 0 !important;
}

/* ── KB ───────────────────────────────────────────────────── */
.kb-article-item:hover {
    background-color: rgba(128,82,255,0.06) !important;
    border-radius: var(--egh-radius) !important;
}

.kb-article-item small {
    color: var(--egh-muted) !important;
}

/* ── Domain search ────────────────────────────────────────── */
.home-domain-search .input-group-wrapper {
    background-color: var(--egh-bg-raised) !important;
    border-color: var(--egh-border) !important;
    border-radius: var(--egh-radius) !important;
}

/* ── Select account ───────────────────────────────────────── */
.select-account {
    border-color: var(--egh-border-subtle) !important;
}

.select-account a {
    border-color: var(--egh-border-subtle) !important;
    color: var(--egh-text) !important;
    transition: all 0.2s ease !important;
}

.select-account a:hover {
    background-color: rgba(128,82,255,0.06) !important;
}

/* ── Continue / invite containers ────────────────────────── */
.continue-container,
.invite-box {
    background-color: var(--egh-bg-raised) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius) !important;
    color: var(--egh-text) !important;
}

/* ── Product details ──────────────────────────────────────── */
div.product-details div.product-icon {
    background: rgba(128,82,255,0.10) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius-lg) !important;
    color: var(--egh-secondary) !important;
}

div.product-details-tab-container {
    background-color: var(--egh-bg-card) !important;
    border-color: var(--egh-border) !important;
    color: var(--egh-text) !important;
    border-radius: 0 var(--egh-radius-lg) var(--egh-radius-lg) var(--egh-radius-lg) !important;
}

/* ── Credit card display ──────────────────────────────────── */
div.credit-card {
    background: var(--egh-bg-raised) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius-lg) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4) !important;
}

div.credit-card div.card-number {
    background-color: rgba(128,82,255,0.1) !important;
    color: var(--egh-text) !important;
}

/* ── Promo container ──────────────────────────────────────── */
.promo-container {
    background-color: var(--egh-bg-card) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius-lg) !important;
}

/* ── Markdown editor ──────────────────────────────────────── */
.md-editor {
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius) !important;
}

.md-editor > .btn-toolbar {
    background-color: var(--egh-bg-raised) !important;
    border-radius: var(--egh-radius) var(--egh-radius) 0 0 !important;
}

.md-editor > textarea.markdown-editor,
.md-editor > .md-preview {
    background-color: var(--egh-bg-input) !important;
    border-color: var(--egh-border-subtle) !important;
    color: var(--egh-text) !important;
}

/* ── Localisation modal ───────────────────────────────────── */
.modal-localisation .modal-content {
    background-color: var(--egh-bg-card) !important;
}

.modal-localisation .item-selector .item {
    border-color: var(--egh-border) !important;
    color: var(--egh-text) !important;
    border-radius: var(--egh-radius) !important;
    transition: all 0.2s ease !important;
}

.modal-localisation .item-selector .item:hover {
    background-color: rgba(128,82,255,0.1) !important;
    color: #fff !important;
}

.modal-localisation .item-selector .item.active {
    background: var(--egh-primary) !important;
    border-color: var(--egh-secondary) !important;
    color: #ffffff !important;
}

/* ── DataTables ───────────────────────────────────────────── */
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length label {
    color: var(--egh-muted) !important;
}

.dataTables_wrapper .dataTables_filter label .form-control {
    background-color: var(--egh-bg-input) !important;
    color: var(--egh-text) !important;
    border-color: rgba(255,255,255,0.1) !important;
}

/* ── Network issue alert ──────────────────────────────────── */
.network-issue-alert {
    background-color: rgba(255,77,94,0.1) !important;
    border-color: var(--egh-danger) !important;
    color: #ff4d5e !important;
}

/* ── Full page overlay ────────────────────────────────────── */
#fullpage-overlay {
    background-color: rgba(8,9,13,0.92) !important;
}

/* ── Responsive tabs ──────────────────────────────────────── */
.responsive-tabs-sm {
    background: var(--egh-bg-card) !important;
    border-color: var(--egh-border) !important;
}

.responsive-tabs-sm .nav-item {
    border-color: var(--egh-border-subtle) !important;
}

/* ── Card accent colours ──────────────────────────────────── */
.card-accent-gold   { border-top: 2px solid #ffb829 !important; }
.card-accent-green  { border-top: 2px solid #16d6b1 !important; }
.card-accent-red    { border-top: 2px solid #ff4d5e !important; }
.card-accent-blue   { border-top: 2px solid var(--egh-primary) !important; }

/* ── Form error styling ───────────────────────────────────── */
.form-group .field-error-msg {
    color: #ff4d5e !important;
}

.form-control.is-invalid,
.was-validated .form-control:invalid {
    border-color: var(--egh-danger) !important;
    box-shadow: 0 0 0 3px rgba(255,77,94,0.15) !important;
}

/* .has-error is the OTHER error state WHMCS uses: scripts.js sets it on the
   payment-method and bank/card validation forms. The framework's only cue is
   `background-color:#fff0f0` on the field, which our `.form-control` rule
   correctly overrides (dark backgrounds win): but that left those fields with
   no error indication at all beyond the message text. Give them the same
   treatment as .is-invalid so the two error states look alike. */
.has-error .form-control,
.has-error input.form-control,
.has-error select.form-control,
.has-error textarea.form-control {
    border-color: var(--egh-danger) !important;
    box-shadow: 0 0 0 3px rgba(255,77,94,0.15) !important;
}
.has-error > label,
.has-error .control-label { color: var(--egh-danger) !important; }
.has-error button { border-color: var(--egh-danger) !important; }

.form-control.is-valid,
.was-validated .form-control:valid {
    border-color: var(--egh-success) !important;
    box-shadow: 0 0 0 3px rgba(22,214,177,0.15) !important;
}

/* ── Scrollbar: thin, rounded, quiet ──────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0006; }
::-webkit-scrollbar-thumb { background: #ffffff47; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #ffffff6b; }
::-webkit-scrollbar-corner { background: var(--egh-bg); }
/* Firefox, scoped so it does not disable the WebKit thumb in Chrome */
@supports (-moz-appearance: none) {
    html { scrollbar-width: thin; scrollbar-color: rgba(128,82,255,0.5) var(--egh-bg); }
}

/* ── Tooltips ─────────────────────────────────────────────── */
.tooltip-inner {
    background-color: var(--egh-bg-raised) !important;
    border: 1px solid var(--egh-border) !important;
    color: var(--egh-text) !important;
    border-radius: var(--egh-radius) !important;
    font-family: var(--egh-font-body) !important;
}

/* ── Misc ─────────────────────────────────────────────────── */
.breadcrumb {
    background: transparent !important;
}

code {
    background-color: rgba(128,82,255,0.1) !important;
    color: var(--egh-secondary) !important;
    border-radius: var(--egh-radius) !important;
    padding: 2px 6px !important;
}

pre {
    background-color: var(--egh-bg-raised) !important;
    border: 1px solid var(--egh-border-subtle) !important;
    border-radius: var(--egh-radius) !important;
    color: var(--egh-text) !important;
}

/* Card sidebar alert */
.card-sidebar .alert {
    border-radius: var(--egh-radius) !important;
}

/* Upgrade page */
.upgrade .products .product .header {
    background: rgba(128,82,255,0.14) !important;
    border-radius: var(--egh-radius) var(--egh-radius) 0 0 !important;
}

/* Invoice summary */
.invoice-summary-table td.total-row {
    background-color: rgba(128,82,255,0.08) !important;
    color: var(--egh-secondary) !important;
}

/* ============================================================
   3. ORDER FORM / CART / DOMAIN FLOWS
   Carried over from twenty-one and retokenised; the selectors are
   WHMCS's standard_cart ones.
   ============================================================ */

/* ── Order form foundation ────────────────────────────────── */
#order-standard_cart {
    color: var(--egh-text) !important;
    font-family: var(--egh-font-body) !important;
}

/* No cart sidebar (Categories, Actions, Choose Currency) and no phone version of it: visitors pick products on
   norwichdc.com, the cart link sits in the header and the currency chooser in the footer. The cart body takes
   the full width, capped and centred. Two ids so these beat standard_cart's all.min.css, which loads after this
   file. Same rule as the dedicatedgaming theme. */
#main-body #order-standard_cart .cart-sidebar,
#main-body #order-standard_cart .sidebar-collapsed { display: none; }
#main-body #order-standard_cart .cart-body {
    float: none;
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Sidebar category list ────────────────────────────────── */
#order-standard_cart .cart-sidebar h3,
#order-standard_cart .sidebar-collapsed h3 {
    color: var(--egh-secondary) !important;
    font-family: var(--egh-font-display) !important;
    font-size: 0.8rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

#order-standard_cart .cart-sidebar .list-group-item {
    background-color: transparent !important;
    border-color: var(--egh-border-subtle) !important;
    color: var(--egh-muted) !important;
    transition: all 0.2s ease !important;
    font-size: 0.9rem !important;
}

#order-standard_cart .cart-sidebar .list-group-item:hover {
    background-color: rgba(128,82,255,0.08) !important;
    color: var(--egh-text) !important;
    padding-left: 20px !important;
}

#order-standard_cart .cart-sidebar .list-group-item.active {
    background: rgba(128,82,255,0.14) !important;
    border-color: var(--egh-secondary) !important;
    color: #fff !important;
}

/* ── Section dividers ─────────────────────────────────────── */
#order-standard_cart .sub-heading {
    border-color: var(--egh-border-subtle) !important;
}

#order-standard_cart .sub-heading span,
#order-standard_cart .sub-heading-borderless span {
    color: var(--egh-secondary) !important;
    background-color: var(--egh-bg) !important;
    font-family: var(--egh-font-display) !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    font-size: 0.85rem !important;
    letter-spacing: 1px !important;
}

/* ── Labels ───────────────────────────────────────────────── */
#order-standard_cart label,
#order-standard_cart p.domain-renewal-desc,
.service-renewals .div-renewal-period-label {
    color: var(--egh-muted) !important;
    font-weight: 500 !important;
}

#order-standard_cart .field-help-text {
    color: var(--egh-muted) !important;
    font-size: 0.8rem !important;
}

/* ── Form controls ────────────────────────────────────────── */
#order-standard_cart .field,
#order-standard_cart .form-control {
    background-color: var(--egh-bg-input) !important;
    border-color: rgba(255,255,255,0.1) !important;
    color: var(--egh-text) !important;
    border-radius: var(--egh-radius) !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}

#order-standard_cart .form-control:focus {
    border-color: var(--egh-secondary) !important;
    box-shadow: 0 0 0 3px var(--egh-glow) !important;
    background-color: var(--egh-bg-input) !important;
    color: var(--egh-text) !important;
}

#order-standard_cart .field[disabled],
#order-standard_cart .field[readonly],
#order-standard_cart .form-control[disabled],
#order-standard_cart .form-control[readonly] {
    background-color: rgba(255,255,255,0.03) !important;
    color: var(--egh-muted) !important;
}

#order-standard_cart .prepend-icon .field-icon i {
    color: var(--egh-muted) !important;
}

/* ── Products list ────────────────────────────────────────── */
#order-standard_cart .products .product {
    background: var(--egh-bg-card) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius-lg) !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4) !important;
    transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
    overflow: hidden;
}

#order-standard_cart .products .product:hover {
    border-color: rgba(128,82,255,0.35) !important;
    box-shadow: 0 4px 32px rgba(0,0,0,0.5) !important;
}

#order-standard_cart .products .product header {
    background: rgba(128,82,255,0.06) !important;
    border-bottom: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius-lg) var(--egh-radius-lg) 0 0 !important;
    margin: 0 !important;
}

#order-standard_cart .products .product header span {
    color: var(--egh-text) !important;
    font-family: var(--egh-font-display) !important;
    font-weight: 600 !important;
}

#order-standard_cart .products .product header .qty {
    color: var(--egh-muted) !important;
}

#order-standard_cart .products .product div.product-desc {
    color: var(--egh-text-dim) !important;
}

#order-standard_cart .products .product span.feature-value {
    color: var(--egh-secondary) !important;
}

#order-standard_cart .products .product div.product-pricing span.price {
    color: var(--egh-secondary) !important;
    font-weight: 700 !important;
    font-family: var(--egh-font-display) !important;
}

/* ── Product info bar ─────────────────────────────────────── */
#order-standard_cart .product-info {
    background: rgba(128,82,255,0.06) !important;
    border-top: 1px solid var(--egh-border) !important;
    border-bottom: 1px solid var(--egh-border) !important;
    color: var(--egh-text) !important;
    border-radius: var(--egh-radius) !important;
}

#order-standard_cart .product-info .product-title {
    color: var(--egh-text) !important;
    font-family: var(--egh-font-display) !important;
    font-weight: 600 !important;
}

/* ── Order summary sidebar ────────────────────────────────── */
#order-standard_cart .order-summary {
    background: var(--egh-bg-card) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius-lg) !important;
    border-bottom: 2px solid var(--egh-primary) !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4) !important;
    overflow: hidden;
}

#order-standard_cart .order-summary h2 {
    background: rgba(128,82,255,0.14) !important;
    color: var(--egh-text) !important;
    border-bottom: 1px solid var(--egh-border) !important;
    font-family: var(--egh-font-display) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-size: 0.9rem !important;
}

#order-standard_cart .summary-container {
    background-color: transparent !important;
    color: var(--egh-text) !important;
}

#order-standard_cart .order-summary .product-name {
    color: var(--egh-text) !important;
    font-weight: 700 !important;
}

#order-standard_cart .order-summary .product-group {
    color: var(--egh-muted) !important;
}

#order-standard_cart .order-summary .summary-totals {
    border-color: var(--egh-border-subtle) !important;
}

#order-standard_cart .order-summary .total-due-today .amt {
    color: var(--egh-secondary) !important;
    font-family: var(--egh-font-display) !important;
    font-weight: 700 !important;
}

#order-standard_cart .order-summary .subtotal {
    border-color: var(--egh-border-subtle) !important;
    color: var(--egh-text) !important;
}

#order-standard_cart .order-summary .bordered-totals {
    border-color: var(--egh-border-subtle) !important;
    color: var(--egh-text-dim) !important;
}

#order-standard_cart .order-summary .recurring-charges {
    color: var(--egh-muted) !important;
}

#order-standard_cart .order-summary .btn-continue-shopping {
    color: var(--egh-muted) !important;
    transition: color 0.2s ease !important;
}

#order-standard_cart .order-summary .btn-continue-shopping:hover {
    color: var(--egh-secondary) !important;
}

#order-standard_cart .order-summary .loader {
    color: var(--egh-secondary) !important;
}

/* ── View cart items ──────────────────────────────────────── */
#order-standard_cart .view-cart-items-header {
    background: var(--egh-primary) !important;
    color: #ffffff !important;
    border-radius: var(--egh-radius) var(--egh-radius) 0 0 !important;
    font-family: var(--egh-font-display) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

#order-standard_cart .view-cart-items {
    border-bottom: 2px solid var(--egh-primary) !important;
    border-radius: 0 0 var(--egh-radius) var(--egh-radius) !important;
    overflow: hidden;
}

#order-standard_cart .view-cart-items .item {
    background-color: var(--egh-bg-card) !important;
    border-bottom: 1px solid var(--egh-border-subtle) !important;
    color: var(--egh-text) !important;
}

#order-standard_cart .view-cart-items .item:nth-child(even) {
    background-color: rgba(255,255,255,0.02) !important;
}

#order-standard_cart .view-cart-items .item-title {
    color: var(--egh-text) !important;
    font-weight: 600 !important;
}

#order-standard_cart .view-cart-items .item-group {
    color: var(--egh-muted) !important;
}

#order-standard_cart .view-cart-items .item-domain {
    color: var(--egh-secondary) !important;
}

#order-standard_cart .view-cart-items .item-price span {
    color: var(--egh-secondary) !important;
    font-weight: 700 !important;
    font-family: var(--egh-font-display) !important;
}

#order-standard_cart .view-cart-items .item-price .cycle {
    color: var(--egh-muted) !important;
}

#order-standard_cart .btn-remove-from-cart {
    color: var(--egh-muted) !important;
    transition: color 0.2s ease !important;
}

#order-standard_cart .btn-remove-from-cart:hover {
    color: var(--egh-danger) !important;
}

/* ── Empty cart button ────────────────────────────────────── */
#order-standard_cart .empty-cart .btn {
    background: var(--egh-primary) !important;
    border: 0 !important;
    color: #ffffff !important;
    border-radius: 0 0 var(--egh-radius) var(--egh-radius) !important;
}

/* ── Checkout button ──────────────────────────────────────── */
#order-standard_cart .btn-checkout {
    background: var(--egh-accent) !important;
    border: 0 !important;
    color: var(--egh-accent-ink) !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    font-family: var(--egh-font-body) !important;
    letter-spacing: 0 !important;
    border-radius: var(--egh-radius) !important;
    transition: background 0.18s, border-color 0.18s !important;
}

#order-standard_cart .btn-checkout:hover,
#order-standard_cart .btn-checkout:focus {
    background: var(--egh-accent-hov) !important;
    border-color: var(--egh-accent-hov) !important;
    color: var(--egh-accent-ink) !important;
}

/* ── View cart tabs ───────────────────────────────────────── */
#order-standard_cart .view-cart-tabs .nav-tabs {
    border-color: var(--egh-border) !important;
}

#order-standard_cart .view-cart-tabs .nav-tabs a[aria-selected="true"],
#order-standard_cart .view-cart-tabs .nav-tabs a[aria-expanded="true"] {
    background-color: var(--egh-bg-card) !important;
    border-color: var(--egh-border) var(--egh-border) var(--egh-bg-card) !important;
    color: var(--egh-secondary) !important;
}

#order-standard_cart .view-cart-tabs .tab-content {
    background-color: var(--egh-bg-card) !important;
    border: 1px solid var(--egh-border) !important;
    border-top: 0 !important;
    border-radius: 0 var(--egh-radius) var(--egh-radius) var(--egh-radius) !important;
    color: var(--egh-text) !important;
}

/* ── Promo code box ───────────────────────────────────────── */
#order-standard_cart .view-cart-promotion-code {
    background-color: rgba(128,82,255,0.05) !important;
    border: 1px dashed var(--egh-primary) !important;
    border-radius: var(--egh-radius) !important;
    color: var(--egh-text) !important;
}

/* ── Gateway checkout box ─────────────────────────────────── */
#order-standard_cart .view-cart-gateway-checkout {
    background: rgba(128,82,255,0.06) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius) !important;
    color: var(--egh-text) !important;
}

/* ── Apply credit container ───────────────────────────────── */
#order-standard_cart .apply-credit-container {
    background: rgba(128,82,255,0.06) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius) !important;
    color: var(--egh-text) !important;
}

#order-standard_cart .apply-credit-container span {
    color: var(--egh-secondary) !important;
}

/* ── Credit card input container ──────────────────────────── */
#order-standard_cart .cc-input-container {
    background: var(--egh-bg-raised) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius) !important;
    color: var(--egh-text) !important;
}

#order-standard_cart .cc-input-container .existing-cc-grid {
    color: var(--egh-muted) !important;
}

/* ── Domain selection options ─────────────────────────────── */
#order-standard_cart .domain-selection-options .option {
    background-color: var(--egh-bg-raised) !important;
    border: 1px solid var(--egh-border-subtle) !important;
    border-radius: var(--egh-radius) !important;
    color: var(--egh-text) !important;
    transition: all 0.2s ease !important;
}

#order-standard_cart .domain-selection-options .option:hover {
    border-color: var(--egh-secondary) !important;
    background: rgba(128,82,255,0.06) !important;
}

#order-standard_cart .domain-selection-options .option-selected {
    background: rgba(128,82,255,0.1) !important;
    border-color: var(--egh-secondary) !important;
}

#order-standard_cart .domain-selection-options .option-selected label {
    color: var(--egh-text) !important;
    font-weight: 600 !important;
}

/* ── Domain checker results ───────────────────────────────── */
#order-standard_cart .domain-lookup-primary-results .headline,
#order-standard_cart .domain-checker-result-headline {
    color: var(--egh-text) !important;
    font-family: var(--egh-font-display) !important;
    font-weight: 700 !important;
}

#order-standard_cart .domain-checker-available {
    color: #16d6b1 !important;
}

#order-standard_cart .domain-checker-unavailable,
#order-standard_cart .domain-checker-invalid {
    color: #ff4d5e !important;
}

#order-standard_cart .transfer-eligible {
    background: rgba(22,214,177,0.1) !important;
    border: 1px solid rgba(22,214,177,0.3) !important;
    color: #16d6b1 !important;
    border-radius: var(--egh-radius) !important;
}

#order-standard_cart .transfer-not-eligible {
    background: var(--egh-bg-raised) !important;
    border: 1px solid var(--egh-border) !important;
    color: var(--egh-muted) !important;
    border-radius: var(--egh-radius) !important;
}

/* ── Domain suggestions ───────────────────────────────────── */
.suggested-domains .panel-heading,
.suggested-domains .card-header {
    border-bottom: 2px solid var(--egh-primary) !important;
    background: rgba(128,82,255,0.08) !important;
    color: var(--egh-text) !important;
}

.suggested-domains .domain-lookup-suggestions-loader {
    background-color: var(--egh-bg-raised) !important;
    color: var(--egh-muted) !important;
}

.suggested-domains .list-group-item {
    background-color: var(--egh-bg-card) !important;
    border-color: var(--egh-border-subtle) !important;
    color: var(--egh-text) !important;
}

.suggested-domains .extension {
    color: var(--egh-secondary) !important;
}

.suggested-domains .price {
    color: var(--egh-secondary) !important;
    font-weight: 700 !important;
    font-family: var(--egh-font-display) !important;
}

.suggested-domains .btn:not(.domain-contact-support) {
    background: var(--egh-primary) !important;
    border-color: var(--egh-secondary) !important;
    color: #ffffff !important;
    border-radius: var(--egh-radius) !important;
}

/* ── Spotlight TLDs ───────────────────────────────────────── */
.spotlight-tlds {
    background-color: var(--egh-bg-raised) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius) !important;
}

.spotlight-tld {
    background-color: var(--egh-bg-card) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius) !important;
    color: var(--egh-text) !important;
    transition: all 0.3s ease !important;
}

.spotlight-tld:hover {
    border-color: var(--egh-secondary) !important;
}

.spotlight-tld span {
    color: var(--egh-muted) !important;
}

.spotlight-tld .btn:not(.domain-contact-support) {
    background: var(--egh-primary) !important;
    border-color: var(--egh-secondary) !important;
    color: #ffffff !important;
    border-radius: var(--egh-radius) !important;
}

/* ── Domain promo box ─────────────────────────────────────── */
.domain-promo-box {
    background-color: var(--egh-bg-raised) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius) !important;
    color: var(--egh-text) !important;
}

.domain-promo-box h3 {
    color: var(--egh-text) !important;
}

.domain-promo-box .small {
    color: var(--egh-muted) !important;
}

/* ── Domain pricing table ─────────────────────────────────── */
.domain-pricing .tld-row {
    border-color: var(--egh-border-subtle) !important;
    transition: background 0.2s ease !important;
}

.domain-pricing .tld-row.highlighted,
.domain-pricing .tld-row:hover {
    background: rgba(128,82,255,0.05) !important;
}

.domain-pricing .tld-pricing-header .col-xs-2,
.domain-pricing .tld-pricing-header .col-sm-2,
.domain-pricing .tld-pricing-header .col-xs-4,
.domain-pricing .tld-pricing-header .col-sm-4,
.domain-pricing .tld-pricing-header .tld-column {
    background-color: rgba(128,82,255,0.08) !important;
    border-bottom-color: var(--egh-secondary) !important;
    color: var(--egh-text) !important;
    border-radius: var(--egh-radius) var(--egh-radius) 0 0 !important;
}

.domain-pricing .tld-pricing-header div:nth-child(odd) {
    background-color: rgba(128,82,255,0.05) !important;
    border-color: var(--egh-secondary) !important;
}

.domain-pricing .two-row-center {
    border-right-color: var(--egh-border) !important;
}

/* ── Domain renewals ──────────────────────────────────────── */
.domain-renewals,
.service-renewals {
    border-color: var(--egh-border) !important;
}

.domain-renewals,
.service-renewals,
.addon-renewals .service-renewal {
    background-color: var(--egh-bg-card) !important;
}

.domain-renewals .domain-renewal,
.service-renewals .service-renewal {
    border-color: var(--egh-border-subtle) !important;
    color: var(--egh-text) !important;
}

.domain-renewals .domain-renewal:nth-child(even),
.service-renewals .service-renewal:nth-child(even),
.addon-renewals .service-renewal:nth-child(even) {
    background-color: rgba(255,255,255,0.02) !important;
}

.domain-renewals .domain-renewal h3,
.service-renewals .service-renewal h3 {
    color: var(--egh-text) !important;
}

.addon-renewals > div {
    border-color: var(--egh-border) !important;
    border-radius: var(--egh-radius) !important;
    overflow: hidden;
}

/* ── Addon panels ─────────────────────────────────────────── */
#order-standard_cart .panel-addon .panel-body {
    background-color: var(--egh-bg-card) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius) !important;
    transition: all 0.3s ease !important;
}

#order-standard_cart .panel-addon:hover .panel-body {
    border-color: var(--egh-secondary) !important;
}

#order-standard_cart .panel-addon .panel-body label {
    color: var(--egh-text) !important;
    font-weight: 600 !important;
}

#order-standard_cart .panel-addon .panel-price {
    background-color: rgba(255,255,255,0.05) !important;
    color: var(--egh-secondary) !important;
    font-weight: 700 !important;
}

#order-standard_cart .panel-addon .panel-add {
    background: var(--egh-success) !important;
    color: #06201a !important;
    border-radius: 0 0 var(--egh-radius) var(--egh-radius) !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

#order-standard_cart .panel-addon-selected {
    border-color: var(--egh-secondary) !important;
}

/* ── Addon promo container ────────────────────────────────── */
#order-standard_cart .addon-promo-container {
    background-color: var(--egh-bg-raised) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius) !important;
    color: var(--egh-text) !important;
}

#order-standard_cart .addon-promo-container h3 {
    color: var(--egh-text) !important;
    font-family: var(--egh-font-display) !important;
    font-weight: 600 !important;
}

#order-standard_cart .addon-promo-container label {
    color: var(--egh-text-dim) !important;
}

#order-standard_cart .addon-promo-container a {
    color: var(--egh-secondary) !important;
}

/* ── Account select container ─────────────────────────────── */
#order-standard_cart .account-select-container {
    border-color: var(--egh-border-subtle) !important;
}

#order-standard_cart .account-select-container div.account {
    background: var(--egh-bg-raised) !important;
    border: 1px solid var(--egh-border-subtle) !important;
    color: var(--egh-text) !important;
    transition: all 0.2s ease !important;
}

#order-standard_cart .account-select-container div.account.active {
    background: rgba(128,82,255,0.08) !important;
    border-color: var(--egh-secondary) !important;
}

/* ── Order confirmation ───────────────────────────────────── */
#order-standard_cart .order-confirmation {
    color: var(--egh-text) !important;
}

#order-standard_cart .order-confirmation span {
    color: var(--egh-secondary) !important;
    font-weight: 700 !important;
    font-family: var(--egh-font-display) !important;
}

/* ── Error page ───────────────────────────────────────────── */
.error-heading {
    color: var(--egh-text) !important;
    font-family: var(--egh-font-display) !important;
    font-weight: 600 !important;
}

/* ── Default captcha box ──────────────────────────────────── */
#order-standard_cart .default-captcha {
    background-color: var(--egh-bg-raised) !important;
    border: 1px solid var(--egh-border) !important;
    color: var(--egh-muted) !important;
    border-radius: var(--egh-radius) !important;
}

/* ── Checkout security message ────────────────────────────── */
#order-standard_cart .checkout-security-msg {
    color: var(--egh-muted) !important;
}

#order-standard_cart .checkout-security-msg i {
    color: var(--egh-secondary) !important;
}

/* ── Remove item modal ────────────────────────────────────── */
#order-standard_cart .modal-header,
#order-standard_cart .modal-body,
#order-standard_cart .modal-footer {
    background-color: var(--egh-bg-card) !important;
    border-color: var(--egh-border) !important;
    color: var(--egh-text) !important;
}

/* ── Domain checker container ─────────────────────────────── */
.domain-checker-container {
    background: rgba(128,82,255,0.10) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius-lg) !important;
}

.domain-checker-container .input-group-box {
    background-color: var(--egh-bg-input) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius) !important;
}

div.domainresults div:not(.btn-group) {
    background-color: var(--egh-bg-raised) !important;
    color: var(--egh-text) !important;
    border-radius: var(--egh-radius) var(--egh-radius) 0 0 !important;
}

div.domainresults div:not(.btn-group) span {
    color: var(--egh-muted) !important;
}

/* ── Domain searching spinner ─────────────────────────────── */
.domain-searching {
    color: var(--egh-muted) !important;
}

/* ── Trash icon in order summary ──────────────────────────── */
#order-standard_cart .order-summary i.fa-trash {
    color: var(--egh-muted) !important;
    opacity: 0.5;
    transition: all 0.2s ease !important;
}

#order-standard_cart .order-summary i.fa-trash:hover {
    color: var(--egh-danger) !important;
    opacity: 1;
}

/* ── Slim alert ───────────────────────────────────────────── */
.slim-alert {
    border-radius: var(--egh-radius) !important;
}

/* ── Domain disclaimers ───────────────────────────────────── */
.domain-disclaimer-area {
    color: var(--egh-muted) !important;
}

.domain-suggestions-warning {
    color: var(--egh-muted) !important;
}
/* ── Card input text colour fix ───────────────────────────── */
input[name="ccnumber"],
input[name="ccexpirydate"],
input[name="cccvv"],
input[name="ccstartdate"],
input[name="ccissuenum"],
input[name="ccdescription"],
#inputCardNumber,
#inputCardExpiry,
#inputCardCVV,
#inputCardCVV2,
#inputCardStart,
#inputCardIssue,
#inputDescription {
    color: #c7ced8 !important;
    -webkit-text-fill-color: #c7ced8 !important;
    background-color: #08090d !important;
    caret-color: #9a73ff !important;
}

/* Autofill override */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #c7ced8 !important;
    -webkit-box-shadow: 0 0 0px 1000px #08090d inset !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* ============================================================
   4. SITE CHROME: imported from norwichdc.com
   ------------------------------------------------------------
   Nav, Colocation dropdown, mobile panel and footer are a port of
   NorwichDC-Main-Website/includes/nav.php and includes/footer.php
   plus the "Buttons", "Navigation" and "Footer" blocks of
   css/main.css, so the client area and the site share one nav.

   The site's own classes already carry an ndc- prefix, so unlike the
   RSH theme nothing is renamed: the rules below diff against
   css/main.css directly. The client-area additions (skip link,
   account chip, cart, the mobile-only app rows, the footer's Account
   column) are the ndc-skip / ndc-nav-account / ndc-nav-cart classes,
   which the site does not have.

   Deltas from the source, all forced by the client area:
     . the nav wrap is position:sticky with its 18px offset as padding,
       not position:fixed with top:18px. The site pads each hero to
       clear the fixed bar; WHMCS pages have no hero to pad, and
       sticky keeps the bar in flow so the application bar below sits
       in the right place without a body offset. It still floats over
       the content when the page scrolls, as on the site;
     . link colour and underline are re-asserted inside the chrome,
       because this file sets a global violet underlined `a` that the
       site does not have (its links inherit);
     . the site's `img, svg { display:block }` and `button` resets are
       scoped to the chrome, or they would restyle every Font Awesome
       glyph and Bootstrap button in the application;
     . the row carries an account chip and the cart on top of the six
       site links, phone and CTA, so the collapse point moves up from
       the site's 1080px (see "Chrome responsive");
     . the mobile panel also lists the client-area rows (account, cart,
       affiliates) that have no place in the site nav;
     . the footer gains an Account column for the client-area links the
       stock WHMCS footer carried, which is hidden. The site's sticky
       mobile CTA bar and its "taking you to our portal" redirect
       interstitial are not ported: the client area is that portal.
   ============================================================ */

/* Chrome links never take the global link colour or underline. */
.ndc-nav-wrap a,
.ndc-footer a {
    color: inherit;
    text-decoration: none !important;
}

/* Bootstrap's reboot draws `button:focus { outline: 5px auto }` on a
   mouse click too; the keyboard ring is body :focus-visible above. */
.ndc-nav-subtrigger:focus:not(:focus-visible),
.ndc-nav-toggle:focus:not(:focus-visible) { outline: 0; }

/* The site's resets, scoped to the chrome. */
.ndc-nav-wrap svg,
.ndc-footer svg { display: block; max-width: 100%; }
/* :where() keeps this at (0,0,1): it only has to beat the UA button styles
   and must not outrank .ndc-nav-subtrigger's own font and colour (the
   site's reset is a bare `button` selector plus a global padding:0). */
:where(.ndc-nav-wrap) button {
    font: inherit; cursor: pointer; background: none; border: none; color: inherit; padding: 0; margin: 0;
}
.ndc-nav-wrap ul,
.ndc-footer ul { margin: 0; padding: 0; }

/* ── Skip link (WCAG 2.4.1) ───────────────────────────────── */
.ndc-skip {
    position: fixed; left: 16px; top: -100px; z-index: 120;
    padding: 12px 20px;
    background: var(--color-network-violet); color: var(--color-bone) !important;
    border-radius: var(--radius-pill);
    font-family: var(--font-body); font-size: 12.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    text-decoration: none;
    transition: top 0.15s ease;
}
.ndc-skip:focus { top: 12px; }
.ndc-skip:focus-visible { outline: 2px solid var(--color-bone) !important; outline-offset: -4px !important; }
@media (prefers-reduced-motion: reduce) { .ndc-skip { transition: none; } }

/* ── Buttons (main.css "Buttons") ─────────────────────────── */
.ndc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius-pill);
    padding: 14px 22px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.ndc-btn--primary {
    background: var(--color-network-violet);
    color: var(--color-bone) !important;
}
.ndc-btn--primary:hover { background: var(--color-network-violet-bright); }
.ndc-btn--secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--color-bone) !important;
}
.ndc-btn--secondary:hover { border-color: rgba(255, 255, 255, 0.4); }

/* ── Navigation (main.css "Navigation") ───────────────────── */
.ndc-nav-wrap {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 18px 18px 0;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    letter-spacing: 0.01em;
}

.ndc-nav {
    max-width: var(--page-max-width);
    margin-inline: auto;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 24px;
    padding-inline: 22px 10px;
    background: var(--surface-nav);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-nav);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.ndc-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 19px;
    letter-spacing: -0.02em;
    color: var(--color-bone) !important;
    white-space: nowrap;
}
.ndc-logo-dc { color: var(--color-network-violet-bright); }

.ndc-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin-inline: auto;
}
.ndc-nav-links a {
    display: block;
    padding: 8px 12px;
    font-size: var(--text-body-sm);
    font-weight: 500;
    color: var(--color-smoke) !important;
    white-space: nowrap;
    transition: color 0.15s ease;
}
.ndc-nav-links a:hover { color: var(--color-bone) !important; }

.ndc-nav-right { display: flex; align-items: center; gap: 14px; }

.ndc-nav-phone {
    font-size: var(--text-body-sm);
    font-weight: 600;
    color: var(--color-rack-steel) !important;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.ndc-nav-phone:hover { color: var(--color-bone) !important; }

.ndc-nav .ndc-btn--primary { padding: 12px 18px; font-size: 12px; }

/* Account chip (client area only): the site's secondary button plate
   at the nav's control height, so it reads as a control, not a link. */
.ndc-nav-account {
    display: inline-flex; align-items: center; gap: 8px;
    height: 40px; padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-pill);
    color: var(--color-rack-steel) !important;
    font-size: 13px; font-weight: 600;
    white-space: nowrap;
    transition: border-color 0.18s ease, color 0.18s ease;
    /* Company names run long; cap the chip so one client cannot widen
       the whole row. */
    max-width: 180px;
}
.ndc-nav-account:hover { border-color: rgba(255, 255, 255, 0.4); color: var(--color-bone) !important; }
.ndc-nav-account svg { width: 16px; height: 16px; flex-shrink: 0; }
.ndc-nav-account span { overflow: hidden; text-overflow: ellipsis; }

/* Cart with live item count */
.ndc-nav-cart {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    color: var(--color-rack-steel) !important;
    transition: border-color 0.18s ease, color 0.18s ease;
}
.ndc-nav-cart:hover { border-color: rgba(255, 255, 255, 0.4); color: var(--color-bone) !important; }
.ndc-nav-cart svg { width: 17px; height: 17px; }
.ndc-nav-cart-count {
    position: absolute; top: -4px; right: -4px;
    min-width: 18px; height: 18px; padding: 0 5px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--color-network-violet); color: var(--color-bone);
    border-radius: var(--radius-pill);
    font-size: 11px; font-weight: 700; line-height: 1;
}
.ndc-nav-cart-count:empty,
.ndc-nav-cart-count[data-count="0"] { display: none; }

/* Mobile nav toggle */
.ndc-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    align-items: center;
    border-radius: 12px;
}
.ndc-nav-toggle span {
    display: block;
    width: 20px;
    height: 1.5px;
    background: var(--color-bone);
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.ndc-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.ndc-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.ndc-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu panel */
.ndc-nav-mobile {
    display: none;
    max-width: var(--page-max-width);
    margin: 8px auto 0;
    background: var(--surface-nav);
    border: 1px solid var(--hairline);
    border-radius: var(--radius-nav);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 12px;
    /* client area: the panel can be taller than a phone screen once
       the app rows are in it, so it scrolls inside the sticky wrap */
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}
.ndc-nav-mobile.is-open { display: block; }
.ndc-nav-mobile ul { list-style: none; }
.ndc-nav-mobile ul a {
    display: block;
    padding: 13px 14px;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-rack-steel) !important;
    border-radius: 14px;
}
.ndc-nav-mobile ul a:hover { background: rgba(255, 255, 255, 0.05); color: var(--color-bone) !important; }
.ndc-nav-mobile-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 6px 6px;
    border-top: 1px solid var(--hairline);
    margin-top: 8px;
}
/* Mobile: grouped "Colocation" (and, here, "Account") sub-items */
.ndc-nav-mobile-label {
    padding: 14px 14px 4px;
    font-size: var(--text-caption);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-network-violet-bright);
}
.ndc-nav-mobile ul a.ndc-nav-mobile-sub { padding-left: 26px; }

/* ---------- Desktop dropdown (Colocation) ---------- */
.ndc-nav-has-sub { position: relative; }
.ndc-nav-subtrigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: var(--text-body-sm);
    font-weight: 500;
    color: var(--color-smoke);
    white-space: nowrap;
    transition: color 0.15s ease;
}
.ndc-nav-has-sub:hover .ndc-nav-subtrigger,
.ndc-nav-has-sub:focus-within .ndc-nav-subtrigger { color: var(--color-bone); }
.ndc-nav-chev { transition: transform 0.18s ease; }
.ndc-nav-has-sub:hover .ndc-nav-chev,
.ndc-nav-has-sub:focus-within .ndc-nav-chev,
.ndc-nav-has-sub.is-open .ndc-nav-chev { transform: rotate(180deg); }

.ndc-nav-sub {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 232px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    background: #08090d;
    border: 1px solid var(--hairline);
    border-radius: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
    z-index: 110;
}
/* Invisible bridge so the cursor can cross the gap without closing the menu */
.ndc-nav-sub::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}
.ndc-nav-has-sub:hover .ndc-nav-sub,
.ndc-nav-has-sub:focus-within .ndc-nav-sub,
.ndc-nav-has-sub.is-open .ndc-nav-sub {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.ndc-nav-sub a {
    display: block;
    padding: 10px 12px;
    font-size: var(--text-body-sm);
    font-weight: 500;
    color: var(--color-rack-steel) !important;
    border-radius: 10px;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}
.ndc-nav-sub a:hover { background: rgba(255, 255, 255, 0.05); color: var(--color-bone) !important; }
/* Written as a.ndc-nav-sub-all so it outranks the .ndc-nav-sub a colour above. */
.ndc-nav-sub a.ndc-nav-sub-all {
    margin-top: 4px;
    padding-top: 12px !important;
    border-top: 1px solid var(--hairline);
    color: var(--color-network-violet-bright) !important;
}

/* ── Footer (main.css "Footer") ───────────────────────────── */
.ndc-footer {
    border-top: 1px solid var(--hairline);
    padding-block: 64px 40px;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.55;
    letter-spacing: 0.01em;
    color: var(--color-rack-steel);
}
.ndc-footer .ndc-container {
    max-width: var(--page-max-width);
    margin-inline: auto;
    padding-inline: 24px;
}
/* Five columns, not the site's four: the Account column carries the
   client-area links (support, knowledge base, contact, order) that the
   stock WHMCS footer had, which is hidden below. */
.ndc-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
}
.ndc-footer-brand p {
    margin: 14px 0 0;
    font-size: var(--text-body-sm);
    color: var(--color-smoke);
    max-width: 300px;
    line-height: 1.55;
}
/* The theme's heading rule above sets h1-h6 to Space Grotesk white; the
   site's footer headings are caption-size body text. */
.ndc-footer h4 {
    margin: 0 0 16px !important;
    font-family: var(--font-body) !important;
    font-size: var(--text-caption) !important;
    font-weight: 600 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    color: var(--color-smoke) !important;
    line-height: 1.55 !important;
}
/* gap 10 with bare inline links is the site's pitch; the client area
   keeps the pitch (gap 2 + 4px padding) but makes every link a 26px
   touch target instead of 18px (SC 2.5.8). */
.ndc-footer ul { list-style: none; display: grid; gap: 2px; }
.ndc-footer li { color: inherit; }
.ndc-footer ul a {
    display: inline-block;
    padding: 4px 0;
    font-size: var(--text-body-sm);
    color: var(--color-rack-steel) !important;
    transition: color 0.12s;
}
.ndc-footer ul a:hover { color: var(--color-bone) !important; }
.ndc-footer-bottom {
    margin-top: 56px;
    padding-top: 24px;
    border-top: 1px solid var(--hairline);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--color-smoke);
}
.ndc-footer-bottom .btn { font-size: 12px !important; padding: 7px 12px !important; }

/* Hide the stock WHMCS footer: its contact / TOS links are reproduced in
   the imported footer above, and the localisation picker is moved into it. */
#footer.footer { display: none !important; }

/* ── Chrome responsive ────────────────────────────────────────
   The site has six top-level items, the phone and the CTA, and goes
   to the hamburger at 1080px. The client-area row also carries the
   account chip (up to 180px) and the cart (40px), about 240px more with
   gaps, so the collapse point moves up. Measured in the static render
   with Inter loaded, logged in, a 16-character company name and two
   items in the cart: the full row needs 1342px of viewport, so
     . from 1480px up the chip may run to its 180px cap;
     . 1400 to 1480: the row is exactly packed with a 114px name, so
       the chip is capped at 120px (ellipsis) to leave room for longer
       company names;
     . below 1400 the chip drops its label (the name stays in the
       accessibility tree) and the phone goes;
     . below 1180 the links go and the hamburger takes over (the site's
       1080 point, moved up by the chip and cart);
     . below 480 the row tightens exactly as the site's does, and the
       chip goes too (the mobile panel lists the account instead). */
@media (max-width: 1479.98px) {
    .ndc-nav-account { max-width: 120px; }
}
@media (max-width: 1399.98px) {
    .ndc-nav-account { padding: 0 11px; }
    .ndc-nav-account span {
        position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
        overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
    }
    .ndc-nav-phone { display: none; }
}
@media (max-width: 1179.98px) {
    .ndc-nav-links { display: none; }
    .ndc-nav-toggle { display: flex; }
    .ndc-nav { padding-inline: 18px 10px; justify-content: space-between; }
}
@media (max-width: 480px) {
    .ndc-nav-wrap { padding: 10px 10px 0; }
    .ndc-nav { gap: 10px; padding-inline: 14px 6px; height: 58px; }
    .ndc-nav-right { gap: 6px; }
    .ndc-logo { font-size: 17px; }
    .ndc-nav .ndc-btn--primary { padding: 10px 14px; font-size: 11px; }
    .ndc-nav-account { display: none; }
}
@media (max-width: 900px) {
    .ndc-footer-grid { grid-template-columns: 1fr 1fr; }
    .ndc-footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 540px) {
    .ndc-footer-grid { grid-template-columns: 1fr; }
    .ndc-footer { padding-block: 48px 32px; }
}


/* ============================================================
   5. WHMCS APPLICATION BAR
   ------------------------------------------------------------
   The client-area navigation (Home / Services / Domains / Billing /
   Support) sits directly under the site header as a quieter second
   bar, so the imported nav stays the loudest thing on the page.
   ============================================================ */

/* Every WHMCS .container is pulled onto the site's content grid: the
   1200px / 24px .wrap that the site's sections and footer columns use.
   Without this, Bootstrap caps them at 1140px with 15px gutters, so the
   application bar, breadcrumb and content would sit 30px inside the
   footer columns below them. The site nav pill is capped at the same
   1280px, so header, content and footer share one edge. */
#header .container,
.master-breadcrumb .container,
.verification-banner .container,
.network-issue-alert .container,
#main-body > .container,
/* header.tpl drops the .container class when $skipMainBodyContainer is set
   (the order form does this), which would leave those pages full-bleed while
   the footer sits at 1200. Match the container-less branch too. */
#main-body > div:not(.container) {
    max-width: var(--ndc-wrap) !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* .navbar-collapse ships 16px of side padding, which insets the whole client
   nav: measured, it pushed the first link 16px right of the site logo and
   pulled the credit chip 16px in from the header's right edge. */
.main-navbar-wrapper .navbar-collapse {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
/* Pull the row back by one link's padding so the first LABEL lines up with the
   logo while every link keeps an identical hover target. Only above the
   navbar-expand-xl breakpoint: collapsed, the links stack and must not
   hang off the left edge. */
@media (min-width: 1200px) {
    .main-navbar-wrapper #nav { margin-left: -14px; }
}

#header.header {
    background: var(--egh-bg-card) !important;
    border-bottom: 1px solid var(--egh-border) !important;
}

/* Logged-in strip: notifications left, active client right */
#header .topbar {
    background: var(--egh-bg) !important;
    border-bottom: 1px solid var(--egh-border) !important;
    padding: 6px 0 !important;
    font-size: 0.85rem !important;
}
#header .topbar .btn,
#header .topbar .input-group-text,
#header .topbar .btn-active-client {
    background: transparent !important;
    border-color: var(--egh-border) !important;
    color: var(--egh-muted) !important;
    font-weight: 500 !important;
    padding: 5px 12px !important;
    font-size: 0.85rem !important;
}
#header .topbar .btn:hover,
#header .topbar .btn-active-client:hover { color: var(--egh-text) !important; }
#header .topbar .btn-return-to-admin {
    border-color: rgba(255,184,41,0.45) !important;
    color: var(--egh-warning) !important;
}

.main-navbar-wrapper {
    padding: 0 !important;
    background: transparent !important;
}
/* IMPORTANT: read includes/navbar.tpl before touching these selectors.
   WHMCS does NOT emit Bootstrap's .nav-item / .nav-link here. It emits

     <li class="d-block dropdown no-collapse"><a class="pr-4 dropdown-toggle">

   so a `.navbar-nav > .nav-item > .nav-link` rule matches nothing and the
   links silently fall back to theme.min.css's light-theme #444: measured
   1.92:1 on this bar, i.e. unreadable. Match the element, not the class.
   The :not() keeps the credit chip, which is a real .nav-item, out of it. */
.main-navbar-wrapper .navbar-nav > li > a:not(.ndc-credit-balance) {
    display: inline-flex !important;
    align-items: center !important;
    padding: 16px 14px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: var(--egh-muted) !important;
    border-bottom: 2px solid transparent !important;
    transition: color 0.18s, border-color 0.18s !important;
}
/* .pr-4 on the anchor carries !important, so these need it plus the higher
   specificity to win the padding back. */
.main-navbar-wrapper .navbar-nav > li > a:not(.ndc-credit-balance):hover,
.main-navbar-wrapper .navbar-nav > li.active > a,
.main-navbar-wrapper .navbar-nav > li.open > a,
.main-navbar-wrapper .navbar-nav > li.show > a,
.main-navbar-wrapper .navbar-nav > li > a[aria-expanded="true"] {
    color: var(--egh-text) !important;
    border-bottom-color: var(--egh-secondary) !important;
}
/* Badge counters WHMCS hangs off nav labels (e.g. open tickets) */
.main-navbar-wrapper .navbar-nav > li > a .badge {
    background: var(--egh-primary) !important;
    color: #ffffff !important;
}
.navbar-toggler {
    border: 1px solid var(--egh-border) !important;
    color: var(--egh-text) !important;
    border-radius: var(--egh-radius) !important;
    margin: 10px 0 !important;
}

/* Credit chip on the right of the application bar. The cart moved up into
   the site nav, so there is no .cart-btn here any more. */
.ndc-credit-balance {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 7px 13px !important;
    border-radius: var(--egh-pill) !important;
    border: 1px solid var(--egh-border) !important;
    background: rgba(255,255,255,0.04) !important;
    color: var(--egh-text) !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    transition: border-color 0.18s, background 0.18s !important;
}
.ndc-credit-balance:hover {
    border-color: var(--egh-secondary) !important;
    background: rgba(128,82,255,0.08) !important;
    color: var(--egh-text) !important;
}


/* ============================================================
   6. GAP FILL: WHMCS/Bootstrap surfaces the original theme
   did not reach. Grouped rather than scattered so a future page
   audit has one place to add to.
   ============================================================ */

/* Legacy Bootstrap 3 panels still used by some WHMCS modules */
.panel, .well {
    background-color: var(--egh-bg-card) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius-lg) !important;
    color: var(--egh-text) !important;
    box-shadow: none !important;
}
.panel-heading {
    background-color: var(--egh-bg-raised) !important;
    border-bottom: 1px solid var(--egh-border) !important;
    color: var(--egh-text) !important;
    font-family: var(--egh-font-display) !important;
    font-weight: 700 !important;
}
.panel-footer {
    background-color: var(--egh-bg-raised) !important;
    border-top: 1px solid var(--egh-border) !important;
    color: var(--egh-muted) !important;
}

/* Button groups and toolbars */
.btn-group > .btn + .btn { margin-left: -1px !important; }
.btn-group > .btn:not(:first-child) { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.btn-group > .btn:not(:last-child)  { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }

/* File inputs */
.custom-file-label,
.custom-file-label::after {
    background-color: var(--egh-bg-input) !important;
    border-color: var(--egh-border) !important;
    color: var(--egh-text) !important;
}

/* Switches / checks used on the security and marketing pages */
.custom-switch .custom-control-label::before { background-color: var(--egh-bg-input) !important; }
.custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 3px var(--egh-glow) !important;
}
.form-check-input { accent-color: var(--egh-primary); }

/* Close buttons on alerts and modals */
.close, .close span { color: var(--egh-muted) !important; opacity: 1 !important; text-shadow: none !important; }
.close:hover { color: var(--egh-text) !important; }

/* Definition lists on invoice / order summary pages */
dt { color: var(--egh-muted) !important; font-weight: 600 !important; }
dd { color: var(--egh-text) !important; }

/* Horizontal rules and section headings inside cards */
.card hr { border-color: var(--egh-border) !important; }

/* Invoice views (viewinvoice.tpl, invoicepdf.tpl, masspay.tpl) */
.invoice-container {
    background-color: var(--egh-bg-card) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius-lg) !important;
    color: var(--egh-text) !important;
}
.invoice-header { color: var(--egh-text) !important; }
.invoice-status { border-radius: var(--egh-radius) !important; }

/* ------------------------------------------------------------
   Light surfaces the bundled theme.min.css paints that this file
   did not previously override. Derived by diffing every class used
   in the theme's .tpl files against the framework rules that set a
   light background or dark text: not from guesswork, so each of
   these is a page that really does render white-on-white today.
   ------------------------------------------------------------ */

/* Bootstrap background utilities, used directly in several templates */
.bg-white, .bg-light {
    background-color: var(--egh-bg-card) !important;
    color: var(--egh-text) !important;
}
.bg-color-gold { background-color: rgba(255,184,41,0.14) !important; color: var(--egh-warning) !important; }

/* Knowledge base category tiles */
.kb-category a:hover { background-color: rgba(128,82,255,0.08) !important; color: var(--egh-text) !important; }

/* Mass payment total row */
tr.masspay-total td { background-color: rgba(128,82,255,0.08) !important; color: var(--egh-secondary) !important; }

/* Ticket feedback: the staff-comment block */
.ticketfeedbackstaffcont {
    background-color: var(--egh-bg-raised) !important;
    border: 1px solid var(--egh-border) !important;
    color: var(--egh-text) !important;
}

/* Two-factor setup: recovery codes are printed on a light plate */
.twofa-setup .backup-code {
    background-color: var(--egh-bg-raised) !important;
    border: 1px solid var(--egh-border) !important;
    color: var(--egh-text) !important;
}

/* Domain store: featured TLD price flag and the active domain tab */
.featured-tld .price.tv { background-color: rgba(128,82,255,0.14) !important; color: var(--egh-secondary) !important; }
.store-order-container .store-domain-tabs li.active a {
    background-color: var(--egh-bg-card) !important;
    color: var(--egh-secondary) !important;
}

/* Service detail: the responsive tab connector strip */
.responsive-tabs-sm-connector .channel { background-color: var(--egh-border) !important; }

/* Misc framework leftovers */
.carousel-indicators li { background-color: var(--egh-muted) !important; }
.list-group-item-danger.list-group-item-action:hover {
    background-color: rgba(255,77,94,0.16) !important;
    color: var(--egh-danger) !important;
}
.custom-file-input[disabled] ~ .custom-file-label {
    background-color: rgba(255,255,255,0.03) !important;
    color: var(--egh-muted) !important;
}
a.text-primary:hover { color: var(--egh-primary-hov) !important; }
a.text-success:hover { color: var(--egh-success) !important; }

/* Affiliate summary tiles (affiliates.tpl uses .affiliate-stat, singular) */
.affiliate-stat {
    background-color: var(--egh-bg-card) !important;
    border: 1px solid var(--egh-border) !important;
    border-radius: var(--egh-radius) !important;
    color: var(--egh-text) !important;
}
.affiliate-stat-green { color: var(--egh-success) !important; }


/* ============================================================
   7. MOBILE
   ------------------------------------------------------------
   Everything here was measured on a 360x740 viewport rendering
   realistic client-area content: a six-column invoices table and
   an account-details form. Breakpoints follow Bootstrap's own
   (991.98 = below lg, 575.98 = below sm) so they interleave with
   the framework rather than fighting it.
   ============================================================ */

@media (max-width: 991.98px) {

    /* ---- Tables: the critical one -----------------------------------
       WHMCS ships 41 bare <table> elements against 4 .table-responsive
       wrappers. Combined with `.card { overflow: hidden }` the excess was
       being CLIPPED rather than scrolled: on a 360px viewport the invoices
       table measured 568px inside a 318px card and the "Pay Now" button sat
       at x=535 with no page scroll to reach it. Not off-screen-but-
       reachable: simply unreachable. Same for every action in the last
       column of every table in the client area.

       display:block makes the TABLE its own scroll container, so card
       bodies stay overflow:visible and dropdowns inside them are not
       clipped. The only table in the theme that contains a dropdown is
       store/ox/manage.tpl, which trades its menu overflow for this: the
       right call when the alternative is 40 pages with unreachable
       actions. */
    .card table,
    table.table,
    table.table-list,
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 6 columns x 32px of horizontal padding was ~190px of the 568px */
    .table th, .table td,
    .table-list th, .table-list td,
    table.table-list > tbody > tr > td { padding: 10px 12px !important; }

    /* ---- Vertical budget --------------------------------------------
       Site header + application bar + breadcrumb + verification banner
       measured 416px of a 740px screen: 56% consumed before any content.
       These trim the chrome without touching the desktop layout. */
    #main-body { padding: 24px 0 40px !important; }

    #header .topbar {
        padding: 3px 0 !important;
        font-size: 0.8rem !important;
    }
    #header .topbar .btn,
    #header .topbar .input-group-text,
    #header .topbar .btn-active-client {
        padding: 4px 9px !important;
        font-size: 0.8rem !important;
        /* the trimmed padding puts these at 23px: 1px under the 24x24
           minimum (SC 2.5.8), so pin the box rather than re-inflate the bar */
        min-height: 26px !important;
        display: inline-flex !important;
        align-items: center !important;
    }

    .master-breadcrumb .breadcrumb {
        padding: 6px 0 !important;
        font-size: 0.85rem;
    }

    .card-body { padding: 16px !important; }
    .card-header { padding: 12px 16px !important; }

    /* The nav links stack when the client-area menu is expanded; the 16px
       side padding is gone (zeroed for desktop alignment), so give the
       stacked rows their own breathing room instead. */
    .main-navbar-wrapper .navbar-collapse .navbar-nav { padding-bottom: 8px; }
}

@media (max-width: 575.98px) {

    /* Buttons wrap rather than overflow, but inline-block gives the wrapped
       rows no vertical gap: measured a 3-button footer needing 337px in a
       318px box, so the second row sat flush against the first. */
    .card-footer .btn,
    .card-body > .btn,
    .card-body > form > .btn,
    .btn + .btn { margin-bottom: 8px; }
    .card-footer .btn:last-child,
    .card-body > .btn:last-child { margin-bottom: 0; }

    /* The 24px card radius is too much against a 16px gutter; the
       small radius keeps them reading as panels. */
    .card { border-radius: var(--egh-radius) !important; }

    /* Long unbroken identifiers (invoice refs, API keys, server hostnames)
       inside table cells cannot rely on the cell wrapping. */
    .table td, .table-list td { overflow-wrap: break-word; }

    /* Bootstrap's modal is 8px off each edge by default; on a 360px screen
       that leaves the content cramped against the border. */
    .modal-dialog { margin: 10px !important; }
    .modal-body { padding: 16px !important; }
    .modal-footer { padding: 12px 16px !important; }
    .modal-footer .btn { margin-bottom: 0; }
}

/* The nav's own narrow-screen trim lives with the chrome in section 4
   (480px rule): the pill tightens and the account chip gives, the wordmark does not. */
