/*
 * Golden Hosts Pro v3 — WHMCS Store & Checkout Contrast Hotfix
 * Built by Online Audience
 *
 * IMPORTANT: This file is deliberately loaded AFTER {$headoutput} in header.tpl.
 * WHMCS injects order-form styles through $headoutput, so loading this last
 * prevents Standard Cart from restoring white panels and low-contrast text.
 */

body.gh-body.gh-shopping-cart {
    --gh-cart-bg: #080809;
    --gh-cart-panel: #121214;
    --gh-cart-panel-2: #18181b;
    --gh-cart-panel-3: #202024;
    --gh-cart-text: #e8e8ec;
    --gh-cart-muted: #b0b1b9;
    --gh-cart-line: rgba(255,255,255,.13);
    --gh-cart-gold: #f5cb4b;
    background:
        radial-gradient(circle at 82% 4%, rgba(212,175,55,.10), transparent 34rem),
        #080809 !important;
}

/* ---------------------------------------------------------------------
   Global order-form containment and readable typography
   --------------------------------------------------------------------- */
body.gh-body #order-standard_cart,
body.gh-body #order-standard_cart .cart-body,
body.gh-body #order-standard_cart .cart-body > .container,
body.gh-body .order-form,
body.gh-body .store-order-container,
body.gh-body .product-selection {
    color: var(--gh-cart-text, #e8e8ec) !important;
    background-color: transparent !important;
}

body.gh-body #order-standard_cart h1,
body.gh-body #order-standard_cart .header-lined h1,
body.gh-body #order-standard_cart .page-header h1 {
    color: #fff !important;
    font-size: clamp(27px, 2.5vw, 38px) !important;
    line-height: 1.15 !important;
}

body.gh-body #order-standard_cart h2 {
    color: #fff !important;
    font-size: clamp(21px, 1.8vw, 28px) !important;
    line-height: 1.22 !important;
}

body.gh-body #order-standard_cart h3,
body.gh-body #order-standard_cart .products .product header span,
body.gh-body #order-standard_cart .products .product header .product-title,
body.gh-body #order-standard_cart .product-info .product-title {
    color: #fff !important;
    font-size: clamp(17px, 1.35vw, 21px) !important;
    line-height: 1.28 !important;
    text-shadow: none !important;
}

body.gh-body #order-standard_cart h4,
body.gh-body #order-standard_cart h5,
body.gh-body #order-standard_cart h6 {
    color: #f6f6f8 !important;
}

body.gh-body #order-standard_cart p,
body.gh-body #order-standard_cart li,
body.gh-body #order-standard_cart label,
body.gh-body #order-standard_cart small,
body.gh-body #order-standard_cart .text-muted,
body.gh-body #order-standard_cart .product-desc,
body.gh-body #order-standard_cart .product-description,
body.gh-body #order-standard_cart .description,
body.gh-body #order-standard_cart .product-info,
body.gh-body #order-standard_cart .product-info p,
body.gh-body #order-standard_cart .product-info li,
body.gh-body #order-standard_cart .product-info span:not(.badge),
body.gh-body #order-standard_cart .product-info div:not(.btn):not(.badge),
body.gh-body #order-standard_cart .product-info strong,
body.gh-body #order-standard_cart .product-info b {
    color: var(--gh-cart-text, #e8e8ec) !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

body.gh-body #order-standard_cart .text-muted,
body.gh-body #order-standard_cart .product-desc .text-muted,
body.gh-body #order-standard_cart .product-info small,
body.gh-body #order-standard_cart .cycle,
body.gh-body #order-standard_cart .setup-fee,
body.gh-body #order-standard_cart .billing-cycle,
body.gh-body #order-standard_cart .renewal-price {
    color: var(--gh-cart-muted, #b0b1b9) !important;
}

body.gh-body #order-standard_cart a:not(.btn) {
    color: var(--gh-cart-gold, #f5cb4b) !important;
}
body.gh-body #order-standard_cart a:not(.btn):hover {
    color: #fff !important;
}

/* Override product descriptions containing inline dark text. */
body.gh-body #order-standard_cart .products .product .product-desc *,
body.gh-body #order-standard_cart .products .product .product-description *,
body.gh-body #order-standard_cart .product-info .product-description *,
body.gh-body #order-standard_cart .product-info .description * {
    color: inherit !important;
    opacity: 1 !important;
}

/* ---------------------------------------------------------------------
   Product listing cards
   --------------------------------------------------------------------- */
body.gh-body #order-standard_cart .products .product,
body.gh-body #order-standard_cart .product,
body.gh-body #order-standard_cart .product-info,
body.gh-body #order-standard_cart .product-info-container,
body.gh-body #order-standard_cart .product-details,
body.gh-body #order-standard_cart .product-description,
body.gh-body #order-standard_cart .product-desc,
body.gh-body .product-selection .product,
body.gh-body .store-promoted-product {
    color: var(--gh-cart-text, #e8e8ec) !important;
    background: linear-gradient(145deg, var(--gh-cart-panel-2, #18181b), var(--gh-cart-panel, #121214)) !important;
    border-color: var(--gh-cart-line, rgba(255,255,255,.13)) !important;
    box-shadow: 0 18px 52px rgba(0,0,0,.25) !important;
}

body.gh-body #order-standard_cart .products .product,
body.gh-body #order-standard_cart .product-info,
body.gh-body #order-standard_cart .product-info-container {
    overflow: hidden !important;
    border: 1px solid var(--gh-cart-line, rgba(255,255,255,.13)) !important;
    border-radius: 17px !important;
}

body.gh-body #order-standard_cart .products .product:hover {
    border-color: rgba(212,175,55,.55) !important;
    transform: translateY(-2px);
}

body.gh-body #order-standard_cart .products .product header,
body.gh-body #order-standard_cart .product header,
body.gh-body #order-standard_cart .product-info > header,
body.gh-body #order-standard_cart .product-info .product-title,
body.gh-body #order-standard_cart .product-info .product-heading {
    color: #fff !important;
    background: #151517 !important;
    border-color: var(--gh-cart-line, rgba(255,255,255,.13)) !important;
}

body.gh-body #order-standard_cart .products .product header,
body.gh-body #order-standard_cart .product header {
    min-height: 58px;
    padding: 16px 18px !important;
}

body.gh-body #order-standard_cart .products .product .product-desc,
body.gh-body #order-standard_cart .products .product .product-description,
body.gh-body #order-standard_cart .product-info .product-description,
body.gh-body #order-standard_cart .product-info .description {
    padding: 18px !important;
    color: var(--gh-cart-text, #e8e8ec) !important;
    background: transparent !important;
}

body.gh-body #order-standard_cart .products .product img,
body.gh-body #order-standard_cart .product-info img,
body.gh-body #order-standard_cart .product-description img,
body.gh-body #order-standard_cart .product-desc img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 280px !important;
    margin: 0 auto 16px !important;
    padding: 0 !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 12px !important;
    background: #0c0c0e !important;
}

body.gh-body #order-standard_cart .products .product .price,
body.gh-body #order-standard_cart .products .product .pricing,
body.gh-body #order-standard_cart .product .price,
body.gh-body #order-standard_cart .product .pricing,
body.gh-body #order-standard_cart .product-price,
body.gh-body #order-standard_cart .pricing .price,
body.gh-body #order-standard_cart .price .price-prefix,
body.gh-body #order-standard_cart .price .price-cycle,
body.gh-body #order-standard_cart .price .price-amount {
    color: var(--gh-cart-gold, #f5cb4b) !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

body.gh-body #order-standard_cart .products .product .price {
    font-size: clamp(24px, 2vw, 31px) !important;
    line-height: 1.15 !important;
}

/* ---------------------------------------------------------------------
   Configure product panels and option groups
   --------------------------------------------------------------------- */
body.gh-body #order-standard_cart .product-info,
body.gh-body #order-standard_cart .product-info > div,
body.gh-body #order-standard_cart .product-info .row,
body.gh-body #order-standard_cart .product-info .col-sm-12,
body.gh-body #order-standard_cart .product-info .col-md-12,
body.gh-body #order-standard_cart .product-info .col-lg-12 {
    background-color: transparent !important;
}

body.gh-body #order-standard_cart .product-configurable-options,
body.gh-body #order-standard_cart .configurable-options,
body.gh-body #order-standard_cart .product-addons,
body.gh-body #order-standard_cart .addon-products,
body.gh-body #order-standard_cart .domain-selection-options,
body.gh-body #order-standard_cart .field-container,
body.gh-body #order-standard_cart .panel-addon,
body.gh-body #order-standard_cart .panel-addon-selected,
body.gh-body #order-standard_cart .addon-promo-container,
body.gh-body #order-standard_cart .domain-input-group,
body.gh-body #order-standard_cart .domain-selection-options .option {
    color: var(--gh-cart-text, #e8e8ec) !important;
    background: var(--gh-cart-panel, #121214) !important;
    border-color: var(--gh-cart-line, rgba(255,255,255,.13)) !important;
}

body.gh-body #order-standard_cart .product-configurable-options,
body.gh-body #order-standard_cart .configurable-options,
body.gh-body #order-standard_cart .product-addons,
body.gh-body #order-standard_cart .addon-products {
    padding: 20px !important;
    border: 1px solid var(--gh-cart-line, rgba(255,255,255,.13)) !important;
    border-radius: 15px !important;
}

body.gh-body #order-standard_cart .panel-addon,
body.gh-body #order-standard_cart .panel-addon-selected,
body.gh-body #order-standard_cart .domain-selection-options .option {
    border: 1px solid var(--gh-cart-line, rgba(255,255,255,.13)) !important;
    border-radius: 12px !important;
}

body.gh-body #order-standard_cart .panel-addon-selected,
body.gh-body #order-standard_cart .domain-selection-options .option-selected {
    border-color: rgba(212,175,55,.75) !important;
    background: rgba(212,175,55,.08) !important;
}

body.gh-body #order-standard_cart .sub-heading {
    margin-top: 25px !important;
    border-top-color: var(--gh-cart-line, rgba(255,255,255,.13)) !important;
}
body.gh-body #order-standard_cart .sub-heading span {
    color: var(--gh-cart-gold, #f5cb4b) !important;
    background: var(--gh-cart-bg, #080809) !important;
    font-size: 12px !important;
    font-weight: 850 !important;
    letter-spacing: .03em;
}

/* ---------------------------------------------------------------------
   Form controls — fix white-on-white and grey-on-white inputs
   --------------------------------------------------------------------- */
body.gh-body #order-standard_cart .form-control,
body.gh-body #order-standard_cart .custom-select,
body.gh-body #order-standard_cart select,
body.gh-body #order-standard_cart textarea,
body.gh-body #order-standard_cart input[type="text"],
body.gh-body #order-standard_cart input[type="email"],
body.gh-body #order-standard_cart input[type="password"],
body.gh-body #order-standard_cart input[type="number"],
body.gh-body #order-standard_cart input[type="tel"],
body.gh-body #order-standard_cart input[type="url"] {
    min-height: 45px !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background: #0b0b0d !important;
    border: 1px solid rgba(255,255,255,.17) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

body.gh-body #order-standard_cart .form-control:focus,
body.gh-body #order-standard_cart .custom-select:focus,
body.gh-body #order-standard_cart select:focus,
body.gh-body #order-standard_cart textarea:focus,
body.gh-body #order-standard_cart input:focus {
    color: #fff !important;
    background: #0d0d0f !important;
    border-color: rgba(212,175,55,.8) !important;
    box-shadow: 0 0 0 3px rgba(212,175,55,.12) !important;
}

body.gh-body #order-standard_cart input::placeholder,
body.gh-body #order-standard_cart textarea::placeholder {
    color: #7d7e87 !important;
    opacity: 1 !important;
}

body.gh-body #order-standard_cart select option {
    color: #121214 !important;
    background: #fff !important;
}

body.gh-body #order-standard_cart .input-group-text,
body.gh-body #order-standard_cart .input-group-addon {
    color: var(--gh-cart-gold, #f5cb4b) !important;
    background: #151517 !important;
    border-color: rgba(255,255,255,.17) !important;
}

body.gh-body #order-standard_cart input[type="radio"],
body.gh-body #order-standard_cart input[type="checkbox"] {
    accent-color: #d4af37;
}

/* ---------------------------------------------------------------------
   Cart sidebar, categories and actions
   --------------------------------------------------------------------- */
body.gh-body #order-standard_cart .cart-sidebar,
body.gh-body #order-standard_cart .sidebar,
body.gh-body #order-standard_cart .sidebar-collapsed,
body.gh-body #order-standard_cart .categories-collapsed,
body.gh-body #order-standard_cart .panel,
body.gh-body #order-standard_cart .card,
body.gh-body #order-standard_cart .list-group-item {
    color: var(--gh-cart-text, #e8e8ec) !important;
    background: linear-gradient(145deg, var(--gh-cart-panel-2, #18181b), var(--gh-cart-panel, #121214)) !important;
    border-color: var(--gh-cart-line, rgba(255,255,255,.13)) !important;
}

body.gh-body #order-standard_cart .panel-heading,
body.gh-body #order-standard_cart .card-header,
body.gh-body #order-standard_cart .cart-sidebar .sidebar-header {
    color: #fff !important;
    background: #18181b !important;
    border-color: var(--gh-cart-line, rgba(255,255,255,.13)) !important;
}

body.gh-body #order-standard_cart .list-group-item a,
body.gh-body #order-standard_cart .cart-sidebar a {
    color: #d8d8de !important;
}
body.gh-body #order-standard_cart .list-group-item a:hover,
body.gh-body #order-standard_cart .cart-sidebar a:hover {
    color: var(--gh-cart-gold, #f5cb4b) !important;
}

/* ---------------------------------------------------------------------
   Order summary and totals
   --------------------------------------------------------------------- */
body.gh-body #order-standard_cart .summary-container,
body.gh-body #order-standard_cart .order-summary,
body.gh-body #order-standard_cart .view-cart-items,
body.gh-body #order-standard_cart .view-cart-tabs,
body.gh-body #order-standard_cart .empty-cart,
body.gh-body #order-standard_cart .checkout,
body.gh-body #order-standard_cart .cart-totals {
    color: var(--gh-cart-text, #e8e8ec) !important;
    background: linear-gradient(145deg, #18150e, var(--gh-cart-panel, #121214)) !important;
    border: 1px solid rgba(212,175,55,.32) !important;
    border-radius: 16px !important;
    box-shadow: 0 18px 50px rgba(0,0,0,.24) !important;
}

body.gh-body #order-standard_cart .summary-container *,
body.gh-body #order-standard_cart .order-summary *:not(.btn):not(button):not(input):not(select):not(option),
body.gh-body #order-standard_cart .cart-totals * {
    color: var(--gh-cart-text, #e8e8ec) !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

body.gh-body #order-standard_cart .summary-container h2,
body.gh-body #order-standard_cart .order-summary h2,
body.gh-body #order-standard_cart .order-summary .summary-heading {
    color: #fff !important;
    background: transparent !important;
    font-size: clamp(22px, 1.8vw, 28px) !important;
}

body.gh-body #order-standard_cart .summary-container .total-due-today,
body.gh-body #order-standard_cart .summary-container .total-due-today .amt,
body.gh-body #order-standard_cart .order-summary .total-due-today,
body.gh-body #order-standard_cart .order-summary .total-due-today .amt,
body.gh-body #order-standard_cart .order-summary .total-due-today span,
body.gh-body #order-standard_cart .cart-totals .total-due-today {
    color: var(--gh-cart-gold, #f5cb4b) !important;
    font-weight: 850 !important;
}

body.gh-body #order-standard_cart .summary-container hr,
body.gh-body #order-standard_cart .order-summary hr,
body.gh-body #order-standard_cart .cart-totals hr {
    border-color: rgba(255,255,255,.18) !important;
}

/* ---------------------------------------------------------------------
   Buttons — preserve black text on gold/green buttons
   --------------------------------------------------------------------- */
body.gh-body #order-standard_cart .btn-primary,
body.gh-body #order-standard_cart .btn-success,
body.gh-body #order-standard_cart .btn-info,
body.gh-body #order-standard_cart .btn-order-now,
body.gh-body #order-standard_cart .checkout-btn {
    color: #070707 !important;
    -webkit-text-fill-color: #070707 !important;
    font-weight: 850 !important;
    text-shadow: none !important;
}
body.gh-body #order-standard_cart .btn-primary *,
body.gh-body #order-standard_cart .btn-success *,
body.gh-body #order-standard_cart .btn-info *,
body.gh-body #order-standard_cart .btn-order-now *,
body.gh-body #order-standard_cart .checkout-btn * {
    color: inherit !important;
}

body.gh-body #order-standard_cart .btn-default,
body.gh-body #order-standard_cart .btn-secondary,
body.gh-body #order-standard_cart .btn-outline-secondary {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background: #171719 !important;
    border-color: rgba(255,255,255,.18) !important;
}

/* ---------------------------------------------------------------------
   Store landing pages and promoted product blocks
   --------------------------------------------------------------------- */
body.gh-body .landing-page .product-options .item,
body.gh-body .landing-page .tab-content,
body.gh-body .landing-page .light-grey-bg,
body.gh-body .dynamic-landing-page .background-light,
body.gh-body .dynamic-landing-page .background-main,
body.gh-body .dynamic-landing-page .features-content .feature {
    color: var(--gh-cart-text, #e8e8ec) !important;
    background: var(--gh-cart-panel, #121214) !important;
}

body.gh-body .landing-page .product-options .item *,
body.gh-body .landing-page .tab-content *,
body.gh-body .landing-page .light-grey-bg *,
body.gh-body .dynamic-landing-page .background-light *,
body.gh-body .dynamic-landing-page .background-main *,
body.gh-body .dynamic-landing-page .features-content .feature * {
    color: inherit !important;
}

body.gh-body .landing-page .product-options .item .price,
body.gh-body .landing-page .product-options .item .btn-buy,
body.gh-body .dynamic-landing-page .price {
    color: var(--gh-cart-gold, #f5cb4b) !important;
}

/* ---------------------------------------------------------------------
   Responsive order form
   --------------------------------------------------------------------- */
@media (max-width: 991.98px) {
    body.gh-body #order-standard_cart .product-info,
    body.gh-body #order-standard_cart .summary-container,
    body.gh-body #order-standard_cart .order-summary {
        margin-bottom: 20px !important;
    }

    body.gh-body #order-standard_cart .products .product img,
    body.gh-body #order-standard_cart .product-info img {
        max-height: 240px !important;
    }
}

@media (max-width: 767.98px) {
    body.gh-body #order-standard_cart h1,
    body.gh-body #order-standard_cart .header-lined h1,
    body.gh-body #order-standard_cart .page-header h1 {
        font-size: 27px !important;
    }

    body.gh-body #order-standard_cart h2,
    body.gh-body #order-standard_cart .summary-container h2,
    body.gh-body #order-standard_cart .order-summary h2 {
        font-size: 21px !important;
    }

    body.gh-body #order-standard_cart .product-info,
    body.gh-body #order-standard_cart .product-configurable-options,
    body.gh-body #order-standard_cart .configurable-options,
    body.gh-body #order-standard_cart .product-addons,
    body.gh-body #order-standard_cart .addon-products {
        padding: 16px !important;
    }

    body.gh-body #order-standard_cart .products .product img,
    body.gh-body #order-standard_cart .product-info img {
        max-height: 210px !important;
    }

    body.gh-body #order-standard_cart .btn,
    body.gh-body #order-standard_cart button {
        min-height: 46px;
        white-space: normal;
    }
}

@media (max-width: 479.98px) {
    body.gh-body #order-standard_cart .products .product img,
    body.gh-body #order-standard_cart .product-info img {
        max-height: 180px !important;
    }

    body.gh-body #order-standard_cart .summary-container,
    body.gh-body #order-standard_cart .order-summary,
    body.gh-body #order-standard_cart .product-info {
        border-radius: 13px !important;
    }
}

/* =====================================================================
   Golden Hosts WHMCS Pro v4
   Complete logged-in client-area dark UI and contrast hardening
   Loaded last so WHMCS/DataTables/Markdown defaults cannot restore white
   panels or low-contrast text.
   ===================================================================== */

:root {
    --gh-client-bg: #070708;
    --gh-client-panel: #111113;
    --gh-client-panel-alt: #171719;
    --gh-client-panel-hover: #1d1a12;
    --gh-client-field: #0b0b0d;
    --gh-client-border: rgba(255, 255, 255, 0.14);
    --gh-client-border-gold: rgba(212, 175, 55, 0.52);
    --gh-client-text: #ececf0;
    --gh-client-muted: #a9abb4;
    --gh-client-gold: #f5cb4b;
}

/* Page-level colour safety */
body.gh-body.gh-logged-in,
body.gh-body.gh-logged-in #main-body,
body.gh-body.gh-logged-in .primary-content,
body.gh-body.gh-logged-in .tab-content,
body.gh-body.gh-logged-in .table-container,
body.gh-body.gh-logged-in .listtable {
    color: var(--gh-client-text) !important;
    background-color: transparent !important;
}

body.gh-body.gh-logged-in .primary-content p,
body.gh-body.gh-logged-in .primary-content li,
body.gh-body.gh-logged-in .primary-content dd,
body.gh-body.gh-logged-in .primary-content dt,
body.gh-body.gh-logged-in .primary-content small,
body.gh-body.gh-logged-in .primary-content .help-block,
body.gh-body.gh-logged-in .primary-content .form-text {
    color: var(--gh-client-muted);
}

body.gh-body.gh-logged-in .bg-white,
body.gh-body.gh-logged-in .bg-light,
body.gh-body.gh-logged-in .product-details-tab-container,
body.gh-body.gh-logged-in .domain-details-tab-container,
body.gh-body.gh-logged-in .service-details-tab-container,
body.gh-body.gh-logged-in .tab-pane,
body.gh-body.gh-logged-in .panel-body,
body.gh-body.gh-logged-in .well,
body.gh-body.gh-logged-in .jumbotron {
    color: var(--gh-client-text) !important;
    background: linear-gradient(145deg, var(--gh-client-panel-alt), var(--gh-client-panel)) !important;
    border-color: var(--gh-client-border) !important;
}

/* Generic Bootstrap/WHMCS panels */
body.gh-body .panel-default,
body.gh-body .panel-primary,
body.gh-body .panel-info,
body.gh-body .panel-success,
body.gh-body .panel-warning,
body.gh-body .panel-danger,
body.gh-body .card,
body.gh-body .modal-content,
body.gh-body .popover,
body.gh-body .dropdown-menu {
    color: var(--gh-client-text) !important;
    background: linear-gradient(145deg, var(--gh-client-panel-alt), var(--gh-client-panel)) !important;
    border-color: var(--gh-client-border) !important;
}

body.gh-body .panel-heading,
body.gh-body .panel-footer,
body.gh-body .card-header,
body.gh-body .card-footer,
body.gh-body .modal-header,
body.gh-body .modal-footer,
body.gh-body .popover-header {
    color: #fff !important;
    background: #171719 !important;
    border-color: var(--gh-client-border) !important;
}

body.gh-body .popover-body,
body.gh-body .modal-body,
body.gh-body .card-body,
body.gh-body .panel-body {
    color: var(--gh-client-text) !important;
}

body.gh-body .close,
body.gh-body button.close {
    color: #fff !important;
    text-shadow: none !important;
    opacity: 0.8;
}

body.gh-body .close:hover,
body.gh-body button.close:hover {
    color: var(--gh-client-gold) !important;
    opacity: 1;
}

/* All normal client-area tables, DataTables and responsive child rows */
body.gh-body .table-responsive,
body.gh-body .table-container,
body.gh-body .dataTables_wrapper,
body.gh-body .dataTables_wrapper .listtable {
    color: var(--gh-client-text) !important;
    background: rgba(13, 13, 15, 0.82) !important;
    border-color: var(--gh-client-border) !important;
}

body.gh-body table.table,
body.gh-body table.table-list,
body.gh-body table.dataTable,
body.gh-body .dataTables_wrapper table.table-list {
    width: 100% !important;
    color: var(--gh-client-text) !important;
    background: var(--gh-client-panel) !important;
    border: 1px solid var(--gh-client-border) !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

body.gh-body table.table thead,
body.gh-body table.table-list thead,
body.gh-body table.dataTable thead,
body.gh-body .dataTables_wrapper table.table-list thead {
    background: #18181b !important;
}

body.gh-body table.table thead th,
body.gh-body table.table-list thead th,
body.gh-body table.dataTable thead th,
body.gh-body .dataTables_wrapper table.table-list thead th,
body.gh-body .dataTables_wrapper table.table-list thead th.sorting,
body.gh-body .dataTables_wrapper table.table-list thead th.sorting_asc,
body.gh-body .dataTables_wrapper table.table-list thead th.sorting_desc {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background-color: #18181b !important;
    border-color: var(--gh-client-border) !important;
    border-bottom: 2px solid rgba(212, 175, 55, 0.46) !important;
    opacity: 1 !important;
}

body.gh-body table.table tbody,
body.gh-body table.table-list tbody,
body.gh-body table.dataTable tbody,
body.gh-body table.table tbody tr,
body.gh-body table.table-list tbody tr,
body.gh-body table.dataTable tbody tr {
    color: var(--gh-client-text) !important;
    background: var(--gh-client-panel) !important;
}

body.gh-body table.table tbody td,
body.gh-body table.table tbody th,
body.gh-body table.table-list tbody td,
body.gh-body table.table-list tbody th,
body.gh-body table.dataTable tbody td,
body.gh-body table.dataTable tbody th,
body.gh-body .table-list > tbody > tr > td,
body.gh-body .dataTables_wrapper table.table-list tbody td {
    color: #dedee4 !important;
    -webkit-text-fill-color: #dedee4 !important;
    background-color: #111113 !important;
    border-color: rgba(255, 255, 255, 0.09) !important;
    opacity: 1 !important;
}

body.gh-body table.table tbody tr:nth-child(even) td,
body.gh-body table.table-list tbody tr:nth-child(even) td,
body.gh-body table.dataTable tbody tr:nth-child(even) td {
    background-color: #141416 !important;
}

body.gh-body table.table-hover tbody tr:hover td,
body.gh-body table.table-list tbody tr:hover td,
body.gh-body table.dataTable tbody tr:hover td,
body.gh-body .table-list > tbody > tr:hover > td {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background-color: var(--gh-client-panel-hover) !important;
}

body.gh-body table.table tbody td a,
body.gh-body table.table-list tbody td a,
body.gh-body table.dataTable tbody td a,
body.gh-body .dtr-data a {
    color: var(--gh-client-gold) !important;
    -webkit-text-fill-color: var(--gh-client-gold) !important;
    font-weight: 650;
}

body.gh-body table.table tbody td a:hover,
body.gh-body table.table-list tbody td a:hover,
body.gh-body table.dataTable tbody td a:hover {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

body.gh-body table.table tbody td small,
body.gh-body table.table-list tbody td small,
body.gh-body table.dataTable tbody td small,
body.gh-body table.table tbody td .text-muted,
body.gh-body table.table-list tbody td .text-muted,
body.gh-body table.dataTable tbody td .text-muted {
    color: #a6a8b1 !important;
    -webkit-text-fill-color: #a6a8b1 !important;
    opacity: 1 !important;
}

body.gh-body table.table-list .w-hidden,
body.gh-body table.dataTable .w-hidden {
    color: inherit !important;
}

body.gh-body table.dataTable.no-footer,
body.gh-body table.dataTable thead th,
body.gh-body table.dataTable thead td {
    border-color: var(--gh-client-border) !important;
}

body.gh-body table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
body.gh-body table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before {
    color: #080808 !important;
    background-color: var(--gh-client-gold) !important;
    border-color: var(--gh-client-gold) !important;
    box-shadow: none !important;
}

body.gh-body table.dataTable > tbody > tr.child,
body.gh-body table.dataTable > tbody > tr.child td,
body.gh-body table.dataTable > tbody > tr.child ul.dtr-details,
body.gh-body table.dataTable > tbody > tr.child ul.dtr-details li {
    color: var(--gh-client-text) !important;
    background: #0e0e10 !important;
    border-color: var(--gh-client-border) !important;
}

body.gh-body table.dataTable > tbody > tr.child span.dtr-title {
    color: #fff !important;
    font-weight: 800 !important;
}

body.gh-body table.dataTable > tbody > tr.child span.dtr-data {
    color: #cfd0d6 !important;
}

/* DataTables search, page length, information and pagination */
body.gh-body .dataTables_wrapper .dataTables_filter,
body.gh-body .dataTables_wrapper .dataTables_length,
body.gh-body .dataTables_wrapper .dataTables_info,
body.gh-body .dataTables_wrapper .dataTables_paginate,
body.gh-body .dataTables_wrapper label {
    color: #c4c5cc !important;
}

body.gh-body .dataTables_wrapper .dataTables_filter input,
body.gh-body .dataTables_wrapper .dataTables_filter label .form-control,
body.gh-body .dataTables_wrapper .dataTables_length select {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background-color: var(--gh-client-field) !important;
    background-image: none !important;
    border: 1px solid var(--gh-client-border) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

body.gh-body .dataTables_wrapper .dataTables_filter input::placeholder,
body.gh-body .dataTables_wrapper .dataTables_filter label .form-control::placeholder {
    color: #7f818b !important;
    -webkit-text-fill-color: #7f818b !important;
    opacity: 1 !important;
}

body.gh-body .dataTables_wrapper .dataTables_filter input:focus,
body.gh-body .dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--gh-client-border-gold) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12) !important;
}

body.gh-body .dataTables_wrapper .dataTables_paginate .paginate_button,
body.gh-body .pagination .page-link,
body.gh-body .pagination > li > a,
body.gh-body .pagination > li > span {
    color: #d0d1d7 !important;
    background: #121214 !important;
    border: 1px solid var(--gh-client-border) !important;
    border-radius: 8px !important;
}

body.gh-body .dataTables_wrapper .dataTables_paginate .paginate_button:hover,
body.gh-body .pagination .page-link:hover {
    color: #fff !important;
    background: #1b1810 !important;
    border-color: var(--gh-client-border-gold) !important;
}

body.gh-body .dataTables_wrapper .dataTables_paginate .paginate_button.current,
body.gh-body .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
body.gh-body .pagination .page-item.active .page-link,
body.gh-body .pagination > .active > a,
body.gh-body .pagination > .active > span {
    color: #070707 !important;
    background: linear-gradient(135deg, #f5cb4b, #b88a1e) !important;
    border-color: var(--gh-client-gold) !important;
}

body.gh-body .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
body.gh-body .pagination .page-item.disabled .page-link {
    color: #696b74 !important;
    background: #0e0e10 !important;
    border-color: rgba(255, 255, 255, 0.07) !important;
}

/* Support ticket Markdown editor — removes the white editor block */
body.gh-body .md-editor,
body.gh-body div.md-editor,
body.gh-body div.md-editor.active {
    overflow: hidden;
    color: var(--gh-client-text) !important;
    background: #0d0d0f !important;
    border: 1px solid var(--gh-client-border-gold) !important;
    border-radius: 14px !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.24) !important;
}

body.gh-body .md-editor > .btn-toolbar,
body.gh-body .md-editor > .md-header,
body.gh-body .md-editor .md-header {
    min-height: 54px;
    padding: 9px 11px !important;
    color: var(--gh-client-text) !important;
    background: #171719 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--gh-client-border) !important;
}

body.gh-body .md-editor .btn-toolbar .btn,
body.gh-body .md-editor .md-header .btn,
body.gh-body .md-editor .btn-group .btn {
    min-height: 34px !important;
    color: #e4e4e9 !important;
    background: #222226 !important;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    box-shadow: none !important;
}

body.gh-body .md-editor .btn-toolbar .btn:hover,
body.gh-body .md-editor .md-header .btn:hover,
body.gh-body .md-editor .btn-toolbar .btn.active,
body.gh-body .md-editor .md-header .btn.active {
    color: #080808 !important;
    background: var(--gh-client-gold) !important;
    border-color: var(--gh-client-gold) !important;
}

body.gh-body .md-editor > textarea.markdown-editor,
body.gh-body .md-editor > textarea.md-input,
body.gh-body .md-editor > .md-input,
body.gh-body .md-editor > .md-preview,
body.gh-body textarea.markdown-editor {
    min-height: 310px !important;
    color: #f4f4f6 !important;
    -webkit-text-fill-color: #f4f4f6 !important;
    caret-color: var(--gh-client-gold) !important;
    background: #09090b !important;
    border: 0 !important;
    border-top: 1px solid var(--gh-client-border) !important;
    border-bottom: 1px solid var(--gh-client-border) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

body.gh-body .md-editor > textarea.markdown-editor:focus,
body.gh-body .md-editor > textarea.md-input:focus,
body.gh-body textarea.markdown-editor:focus {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background: #0b0b0d !important;
    outline: none !important;
    box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.42) !important;
}

body.gh-body .md-editor > textarea.markdown-editor::placeholder,
body.gh-body .md-editor > textarea.md-input::placeholder,
body.gh-body textarea.markdown-editor::placeholder {
    color: #777984 !important;
    -webkit-text-fill-color: #777984 !important;
    opacity: 1 !important;
}

body.gh-body .md-editor > .md-preview,
body.gh-body .md-preview,
body.gh-body .markdown-content {
    color: #e7e7eb !important;
    background: #0b0b0d !important;
}

body.gh-body .md-preview h1,
body.gh-body .md-preview h2,
body.gh-body .md-preview h3,
body.gh-body .md-preview h4,
body.gh-body .markdown-content h1,
body.gh-body .markdown-content h2,
body.gh-body .markdown-content h3,
body.gh-body .markdown-content h4 {
    color: #fff !important;
}

body.gh-body .md-preview p,
body.gh-body .md-preview li,
body.gh-body .markdown-content p,
body.gh-body .markdown-content li {
    color: #d7d8de !important;
}

body.gh-body .md-preview blockquote,
body.gh-body .markdown-content blockquote {
    color: #d5d6dc !important;
    background: rgba(212, 175, 55, 0.07) !important;
    border-left-color: var(--gh-client-gold) !important;
}

body.gh-body .md-preview pre,
body.gh-body .markdown-content pre,
body.gh-body .md-preview code,
body.gh-body .markdown-content code {
    color: #f0f0f3 !important;
    background: #050506 !important;
    border-color: var(--gh-client-border) !important;
}

body.gh-body .md-preview table,
body.gh-body .markdown-content table,
body.gh-body .md-preview table th,
body.gh-body .markdown-content table th,
body.gh-body .md-preview table td,
body.gh-body .markdown-content table td {
    color: #e8e8ec !important;
    background: #111113 !important;
    border-color: var(--gh-client-border) !important;
}

body.gh-body .markdown-editor-status,
body.gh-body .md-footer {
    color: #92949e !important;
    background: #131315 !important;
    border-color: var(--gh-client-border) !important;
}

/* Ticket conversation cards */
body.gh-body .view-ticket .card-body {
    color: var(--gh-client-text) !important;
    background: #111113 !important;
    border-bottom-color: var(--gh-client-border) !important;
}

body.gh-body .view-ticket .ticket-reply,
body.gh-body .view-ticket .ticket-reply .message,
body.gh-body .view-ticket .ticket-reply .attachments {
    color: #dedee4 !important;
    background: #111113 !important;
    border-color: var(--gh-client-border) !important;
}

body.gh-body .view-ticket .ticket-reply.staff,
body.gh-body .view-ticket .ticket-reply.staff .message {
    background: linear-gradient(145deg, #17140c, #111113) !important;
}

body.gh-body .view-ticket .posted-by {
    color: #bfc0c8 !important;
    background: #19191c !important;
    border-bottom: 1px solid var(--gh-client-border) !important;
}

body.gh-body .view-ticket .posted-by-name {
    color: #fff !important;
}

body.gh-body .view-ticket .attachments {
    border-top-color: rgba(255, 255, 255, 0.12) !important;
}

body.gh-body .view-ticket .attachment-list li span,
body.gh-body .view-ticket .attachment-list li figure {
    color: #e2e2e7 !important;
    background: #0b0b0d !important;
    border-color: var(--gh-client-border) !important;
}

/* Form controls, including disabled/read-only fields and file uploads */
body.gh-body .form-control,
body.gh-body .custom-select,
body.gh-body select,
body.gh-body textarea,
body.gh-body input[type="text"],
body.gh-body input[type="email"],
body.gh-body input[type="password"],
body.gh-body input[type="number"],
body.gh-body input[type="tel"],
body.gh-body input[type="url"],
body.gh-body input[type="search"] {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background-color: var(--gh-client-field) !important;
    border-color: var(--gh-client-border) !important;
    box-shadow: none !important;
    opacity: 1 !important;
}

body.gh-body .form-control:disabled,
body.gh-body .form-control[readonly],
body.gh-body input:disabled,
body.gh-body input[readonly],
body.gh-body select:disabled,
body.gh-body textarea:disabled {
    color: #bfc0c8 !important;
    -webkit-text-fill-color: #bfc0c8 !important;
    background-color: #171719 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    opacity: 1 !important;
}

body.gh-body .form-control::placeholder,
body.gh-body input::placeholder,
body.gh-body textarea::placeholder {
    color: #777984 !important;
    -webkit-text-fill-color: #777984 !important;
    opacity: 1 !important;
}

body.gh-body select option {
    color: #fff !important;
    background: #111113 !important;
}

body.gh-body .custom-file-label,
body.gh-body .custom-file-label::after,
body.gh-body .input-group-text,
body.gh-body .input-group-addon {
    color: #e8e8ec !important;
    background: #151517 !important;
    border-color: var(--gh-client-border) !important;
}

body.gh-body .custom-file-label::after {
    color: #080808 !important;
    background: var(--gh-client-gold) !important;
}

body.gh-body .form-control:focus,
body.gh-body .custom-select:focus,
body.gh-body select:focus,
body.gh-body textarea:focus,
body.gh-body input:focus {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background-color: #0d0d0f !important;
    border-color: var(--gh-client-border-gold) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12) !important;
}

/* Tabs and action groups */
body.gh-body .nav-tabs,
body.gh-body .responsive-tabs-sm {
    border-bottom-color: var(--gh-client-border) !important;
}

body.gh-body .nav-tabs .nav-link,
body.gh-body .responsive-tabs-sm .nav-link,
body.gh-body .nav-pills .nav-link {
    color: #c6c7ce !important;
    background: #111113 !important;
    border-color: var(--gh-client-border) !important;
}

body.gh-body .nav-tabs .nav-link:hover,
body.gh-body .responsive-tabs-sm .nav-link:hover,
body.gh-body .nav-pills .nav-link:hover {
    color: #fff !important;
    background: #1b1810 !important;
    border-color: var(--gh-client-border-gold) !important;
}

body.gh-body .nav-tabs .nav-link.active,
body.gh-body .responsive-tabs-sm .nav-link.active,
body.gh-body .nav-pills .nav-link.active {
    color: #070707 !important;
    background: linear-gradient(135deg, #f5cb4b, #b88a1e) !important;
    border-color: var(--gh-client-gold) !important;
}

body.gh-body .btn-default,
body.gh-body .btn-secondary,
body.gh-body .btn-light,
body.gh-body .btn-outline-secondary {
    color: #f0f0f3 !important;
    background: #171719 !important;
    border-color: var(--gh-client-border) !important;
    box-shadow: none !important;
}

body.gh-body .btn-default:hover,
body.gh-body .btn-default:focus,
body.gh-body .btn-secondary:hover,
body.gh-body .btn-secondary:focus,
body.gh-body .btn-light:hover,
body.gh-body .btn-light:focus,
body.gh-body .btn-outline-secondary:hover,
body.gh-body .btn-outline-secondary:focus {
    color: #080808 !important;
    background: var(--gh-client-gold) !important;
    border-color: var(--gh-client-gold) !important;
}

body.gh-body .btn-group > .btn,
body.gh-body .input-group-append > .btn,
body.gh-body .input-group-prepend > .btn {
    min-height: 42px;
}

/* Dropdowns, Select2 and autocomplete menus */
body.gh-body .dropdown-item,
body.gh-body .dropdown-menu a,
body.gh-body .select2-results__option,
body.gh-body .tt-menu,
body.gh-body .ui-autocomplete {
    color: #d8d9df !important;
    background: #151517 !important;
}

body.gh-body .dropdown-item:hover,
body.gh-body .dropdown-item:focus,
body.gh-body .select2-results__option--highlighted,
body.gh-body .ui-menu-item-wrapper.ui-state-active {
    color: #080808 !important;
    background: var(--gh-client-gold) !important;
}

body.gh-body .select2-container--default .select2-selection--single,
body.gh-body .select2-container--default .select2-selection--multiple,
body.gh-body .select2-dropdown {
    color: #fff !important;
    background: var(--gh-client-field) !important;
    border-color: var(--gh-client-border) !important;
}

body.gh-body .select2-container--default .select2-selection--single .select2-selection__rendered,
body.gh-body .select2-container--default .select2-selection--multiple .select2-selection__choice {
    color: #fff !important;
}

/* Status labels remain readable on dark backgrounds */
body.gh-body .label,
body.gh-body .status,
body.gh-body .badge {
    opacity: 1 !important;
    -webkit-text-fill-color: currentColor !important;
}

body.gh-body .status-active,
body.gh-body .status-paid,
body.gh-body .label-success,
body.gh-body .badge-success {
    color: #07110b !important;
    background: #68d891 !important;
}

body.gh-body .status-cancelled,
body.gh-body .status-canceled,
body.gh-body .status-terminated,
body.gh-body .label-default,
body.gh-body .badge-secondary {
    color: #f2f2f4 !important;
    background: #61636c !important;
}

body.gh-body .status-pending,
body.gh-body .status-unpaid,
body.gh-body .label-warning,
body.gh-body .badge-warning {
    color: #171005 !important;
    background: #e7b64a !important;
}

body.gh-body .status-suspended,
body.gh-body .status-overdue,
body.gh-body .label-danger,
body.gh-body .badge-danger {
    color: #fff !important;
    background: #c94754 !important;
}

/* Actual invoice view is dark on screen but remains print-safe */
@media screen {
    body.gh-body .invoice-container,
    body.gh-body .invoice-container .invoice-status,
    body.gh-body .invoice-container .invoice-col,
    body.gh-body .invoice-container .payment-btn-container {
        color: var(--gh-client-text) !important;
        background: linear-gradient(145deg, var(--gh-client-panel-alt), var(--gh-client-panel)) !important;
        border-color: var(--gh-client-border) !important;
    }

    body.gh-body .invoice-container table,
    body.gh-body .invoice-container table th,
    body.gh-body .invoice-container table td {
        color: var(--gh-client-text) !important;
        background: #111113 !important;
        border-color: var(--gh-client-border) !important;
    }
}

@media print {
    body.gh-body .invoice-container,
    body.gh-body .invoice-container * {
        color: #222 !important;
        background: #fff !important;
        box-shadow: none !important;
    }
}

/* Mobile table and editor usability */
@media (max-width: 767.98px) {
    body.gh-body .dataTables_wrapper .dataTables_filter,
    body.gh-body .dataTables_wrapper .dataTables_length,
    body.gh-body .dataTables_wrapper .dataTables_filter label,
    body.gh-body .dataTables_wrapper .dataTables_filter input,
    body.gh-body .dataTables_wrapper .dataTables_filter label .form-control {
        float: none !important;
        width: 100% !important;
        max-width: none !important;
        margin: 0 0 10px !important;
    }

    body.gh-body .dataTables_wrapper .dataTables_length select {
        width: auto !important;
        min-width: 78px;
    }

    body.gh-body .table-responsive,
    body.gh-body .table-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    body.gh-body .md-editor > textarea.markdown-editor,
    body.gh-body .md-editor > textarea.md-input,
    body.gh-body textarea.markdown-editor {
        min-height: 240px !important;
    }

    body.gh-body .btn-group.mb-3,
    body.gh-body .btn-group[role="group"] {
        display: flex;
        flex-wrap: wrap;
        gap: 7px;
    }

    body.gh-body .btn-group.mb-3 > .btn,
    body.gh-body .btn-group[role="group"] > .btn,
    body.gh-body .btn-group[role="group"] > .btn-group {
        flex: 1 1 auto;
        margin: 0 !important;
        border-radius: 9px !important;
    }
}
