:root {
    /*
       CJG brand variables for the wrapper/footer.
       These are separate from the Nexus variables below.
    */
    --cjg-navy: #071832;
    --cjg-red: #e01612;
    --cjg-red-dark: #b70000;
    --cjg-paper: #ffffff;
    --cjg-soft: #f6f8fb;
    --cjg-ink: #111827;
    --cjg-muted: #5b6475;
    --cjg-line: rgba(7, 24, 50, 0.12);

    /*
       Nexus variables.
       Do not use Bootstrap-style variables such as --body-bg or --link-color here.
       Nexus Cart reads these WHMCS-specific variables for the domain/cart SPA.
    */

    --white: #fff;

    /* Neutral shades — kept very close to Nexus defaults */
    --neutral-50: #fbf9fa;
    --neutral-100: #f4f5f7;
    --neutral-200: #e4e4e7;
    --neutral-300: #d0d5dd;
    --neutral-400: #9ca3af;
    --neutral-500: #6b7280;
    --neutral-600: #4b5563;
    --neutral-700: #374151;
    --neutral-800: #1f2937;
    --neutral-900: #111827;
    --neutral-950: #030712;

    /*
       Primary palette — CJG red, but with proper light/dark steps.
       This lets Nexus Cart create readable buttons, hovers, borders and highlights.
    */
    --primary-50: #fff1f1;
    --primary-100: #ffe1e1;
    --primary-200: #ffc7c7;
    --primary-300: #ff9f9f;
    --primary-400: #ff6666;
    --primary-500: #f23636;
    --primary-600: #e01612;
    --primary-700: #b70000;
    --primary-800: #8f0000;
    --primary-900: #6f0505;
    --primary-950: #3f0000;

    --primary: var(--primary-600);
    --primary-lifted: var(--primary-700);
    --primary-accented: var(--primary-800);

    /*
       Secondary palette — CJG navy.
       Good for supporting UI, badges and active states.
    */
    --secondary: #071832;
    --secondary-lifted: #0d2447;
    --secondary-accented: #111827;

    /* Leave status colours close to Nexus defaults for clarity */
    --success: #00a63e;
    --success-lifted: #008236;
    --success-accented: #016630;

    --info: #155dfc;
    --info-lifted: #1447e6;
    --info-accented: #193cb8;

    --notice: #7f22fe;
    --notice-lifted: #7008e7;
    --notice-accented: #5d0ec0;

    --warning: #f54a00;
    --warning-lifted: #ca3500;
    --warning-accented: #9f2d00;

    --error: #e7000b;
    --error-lifted: #c10007;
    --error-accented: #9f0712;

    --grayscale: var(--neutral-900);
    --grayscale-lifted: var(--neutral-800);
    --grayscale-accented: var(--neutral-700);

    --neutral: var(--neutral-500);
    --neutral-lifted: var(--neutral-600);
    --neutral-accented: var(--neutral-700);

    --text-inverted: var(--white);
    --text-muted: var(--neutral-400);
    --text-lifted: var(--neutral-500);
    --text-accented: var(--neutral-600);
    --text: var(--neutral-900);

    --border-muted: var(--neutral-200);
    --border: var(--neutral-300);
    --border-lifted: var(--neutral-400);
    --border-accented: var(--neutral-600);

    --bg: var(--white);
    --bg-muted: var(--neutral-50);
    --bg-lifted: var(--neutral-100);
    --bg-accented: var(--neutral-200);
    --bg-inverted: var(--neutral-900);

    --yellow-200: #fff085;
    --yellow-300: #ffdf20;
    --teal-300: #46edd5;
    --teal-400: #00d5be;
    --emerald-300: #5ee9b5;
    --pink-400: #fb64b6;

    --text-xs: 0.625rem;
    --text-sm: 0.75rem;
    --text-md: 0.875rem;
    --text-lg: 1rem;

    --outline-sm: 1px;
    --outline-md: 2px;
    --outline-lg: 3px;

    --rounding-sm: 0.25rem;
    --rounding-md: 0.5rem;
    --rounding-lg: 0.75rem;

    --letter-spacing: 0em;
    --disabled-opacity: 25%;
}

/*
   Overall client area feel.
   Keep this light. Nexus Cart will use its own --bg / --bg-muted variables above.
*/
body {
    color: var(--cjg-ink);
    background: var(--cjg-soft);
}

/* Header */
.header .navbar.navbar-light {
    background: var(--cjg-paper);
    border-bottom: 1px solid var(--cjg-line);
}

.header .navbar-brand {
    color: var(--cjg-navy);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.header .navbar-brand:hover,
.header .navbar-brand:focus {
    color: var(--cjg-red);
}

.logo-img {
    max-height: 46px;
    width: auto;
}

.main-navbar-wrapper {
    background: var(--cjg-navy);
}

.main-navbar-wrapper .navbar-nav .nav-link,
.main-navbar-wrapper .navbar-nav > li > a {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 700;
}

.main-navbar-wrapper .navbar-nav .nav-link:hover,
.main-navbar-wrapper .navbar-nav > li > a:hover,
.main-navbar-wrapper .navbar-nav .nav-link:focus,
.main-navbar-wrapper .navbar-nav > li > a:focus {
    color: #ffffff;
}

.cart-btn {
    color: var(--cjg-navy);
}

.cart-btn .badge {
    background: var(--cjg-red);
    color: #ffffff;
}

/*
   Classic WHMCS pages still use Bootstrap buttons.
   Nexus Cart uses the variables above, but these keep contact forms,
   tickets and account pages aligned with CJG.
*/
.btn-primary,
a.btn-primary,
button.btn-primary,
input.btn-primary {
    color: #ffffff;
    background-color: var(--cjg-red);
    border-color: var(--cjg-red);
}

.btn-primary:hover,
.btn-primary:focus,
a.btn-primary:hover,
a.btn-primary:focus,
button.btn-primary:hover,
button.btn-primary:focus,
input.btn-primary:hover,
input.btn-primary:focus {
    color: #ffffff;
    background-color: var(--cjg-red-dark);
    border-color: var(--cjg-red-dark);
}

/*
   Keep success buttons green where they indicate an actually successful state.
   Some WHMCS cart buttons may be success buttons; if you want all purchase buttons
   red later, we can change this, but keeping green is clearer for users.
*/
.btn-success,
a.btn-success,
button.btn-success,
input.btn-success {
    color: #ffffff;
}

/* Footer */
.footer.cjg-footer {
    margin-top: 3rem;
    padding: 3rem 0 2rem;
    background: var(--cjg-navy);
    color: rgba(255, 255, 255, 0.78);
}

.cjg-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(180px, 0.65fr) minmax(180px, 0.75fr);
    gap: 2rem;
    align-items: start;
}

.cjg-footer h5,
.cjg-footer h6 {
    color: #ffffff;
    font-weight: 850;
    letter-spacing: -0.02em;
}

.cjg-footer h5 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.cjg-footer h6 {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.cjg-footer p {
    color: rgba(255, 255, 255, 0.78);
}

.cjg-footer__brand p {
    max-width: 560px;
}

.cjg-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cjg-footer li {
    margin-bottom: 0.42rem;
}

.cjg-footer a,
.cjg-footer .nav-link {
    color: rgba(255, 255, 255, 0.92);
    padding: 0;
    text-decoration: none;
    font-weight: 700;
}

.cjg-footer a:hover,
.cjg-footer a:focus,
.cjg-footer .nav-link:hover,
.cjg-footer .nav-link:focus {
    color: #ffffff;
    text-decoration: underline;
}

.cjg-footer .copyright {
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.62);
}

.cjg-footer__utility {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.cjg-footer__utility .list-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.cjg-footer__utility .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.cjg-footer__utility .btn-outline-light:hover,
.cjg-footer__utility .btn-outline-light:focus {
    background: #ffffff;
    color: var(--cjg-navy);
}

/* Mobile footer */
@media (max-width: 767.98px) {
    .footer.cjg-footer {
        padding: 2.5rem 0 1.7rem;
    }

    .cjg-footer__grid {
        grid-template-columns: 1fr;
        gap: 1.6rem;
    }
}
