.dark,
.dark body,
.dark #main-body,
.dark .main-body,
.dark .app-main,
.dark .app-content,
.dark .main-content,
.dark .contentbox,
.dark .page-container,
.dark .page-content {
    background-color: #0b132b !important; /* match footer */
    color: #dbeafe !important; /* soft blue-white text */
}

.dark header,
.dark header *,
.dark .page-header,
.dark .main-header,
.dark .top-nav,
.dark .navbar,
.dark .navbar-inverse,
.dark .navbar-default,
.dark .main-navbar-wrapper,
.dark .main-navbar,
.dark .navbar-collapse,
.dark .navbar-nav,
.dark .navbar-nav > li > a,
.dark .navbar-brand {
    background-color: #0b132b !important; /* deeper blue-black */
    color: #e0f2fe !important;
    border-color: rgba(96, 165, 250, 0.2) !important;
}

.dark a {
    color: #60a5fa;
}

.dark a:hover,
.dark a:focus {
    color: #93c5fd;
}

.dark .card,
.dark .panel,
.dark .well,
.dark .modal-content,
.dark .list-group-item {
    background-color: #0f172a;
    color: #e0f2fe;
    border-color: rgba(96, 165, 250, 0.2);
}

/* Shard Hosting cards (homepage product panels) */
html.dark .card-columns.home .card,
html.dark .card-columns.home .card .card-body,
html.dark .card-columns.home .card .card-title,
html.dark .card-columns.home .card p,
html.dark .home .card,
html.dark .home .card .card-body,
html.dark .card-columns.home .card * {
    background-color: #0b132b !important;
    color: #dbeafe !important;
    border-color: rgba(96, 165, 250, 0.2) !important;
}

/* Force all cards in dark mode */
html.dark .card,
html.dark .card-header,
html.dark .card-body,
html.dark .card-footer {
    background: #0b132b !important;
    background-color: #0b132b !important;
    background-image: none !important;
    color: #dbeafe !important;
    border-color: rgba(96, 165, 250, 0.2) !important;
}

.dark .form-control,
.dark .input-group-addon,
.dark .input-group-text,
.dark .custom-select {
    background-color: #0b132b;
    color: #e0f2fe;
    border-color: rgba(96, 165, 250, 0.3);
}

.dark .form-control::placeholder {
    color: #93c5fd;
}

.dark .table,
.dark .table th,
.dark .table td {
    color: #e0f2fe;
    border-color: rgba(96, 165, 250, 0.2);
}

.dark .footer,
.dark footer {
    background-color: #0b132b;
    color: #93c5fd;
    border-top-color: rgba(96, 165, 250, 0.2);
}

/* Horizontal primary navbar when logged in */
.navbar-nav.ml-6.items-center,
.navbar-nav.ml-6.items-center > li {
    display: flex;
    align-items: center;
}

.navbar-nav.ml-6.items-center {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.navbar-nav.ml-6.items-center > li > a {
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .navbar-nav.ml-6.items-center {
        display: none;
    }
}

/* Hide "Powered by WHMCompleteSolution" footer badge (fallback) */
p:has(> a[href*="whmcompletesolution"]),
p:has(> a[title*="WHMCompleteSolution"]),
a[href*="whmcompletesolution"] {
    display: none !important;
}

/* Store/Orderform cards in dark mode (product group pages like shard-hosting) */
html.dark #order-standard_cart .panel,
html.dark #order-standard_cart .panel-heading,
html.dark #order-standard_cart .panel-body,
html.dark #order-standard_cart .panel-footer,
html.dark #order-standard_cart .product,
html.dark #order-standard_cart .product-header,
html.dark #order-standard_cart .product-body,
html.dark #order-standard_cart .product-footer,
html.dark #order-standard_cart .product-box,
html.dark #order-standard_cart .product-pricing,
html.dark #order-standard_cart .product-description,
html.dark #order-standard_cart .product-features,
html.dark #order-standard_cart .product-features li,
html.dark #order-standard_cart .package,
html.dark #order-standard_cart .plan,
html.dark #order-standard_cart .pricing-table,
html.dark #order-standard_cart .pricing,
html.dark #order-standard_cart .card,
html.dark #order-standard_cart .card-body,
html.dark #order-standard_cart .card-footer,
html.dark #order-standard_cart .card-header,
html.dark #order-standard_cart .list-group-item {
    background: #0b132b !important;
    background-color: #0b132b !important;
    background-image: none !important;
    color: #dbeafe !important;
    border-color: rgba(96, 165, 250, 0.2) !important;
}

html.dark #order-standard_cart .product-features li,
html.dark #order-standard_cart .list-group-item {
    border-color: rgba(96, 165, 250, 0.2) !important;
}

/* Clientarea tables in dark mode */
html.dark table,
html.dark .table,
html.dark .table thead th,
html.dark .table tbody td,
html.dark .table tbody th,
html.dark .table tfoot td,
html.dark .table-striped tbody tr,
html.dark .table-hover tbody tr:hover,
html.dark .dataTables_wrapper,
html.dark .dataTables_wrapper .dataTables_filter input,
html.dark .dataTables_wrapper .dataTables_length select,
html.dark .dataTables_wrapper .dataTables_paginate .paginate_button,
html.dark .dataTables_wrapper .dataTables_info,
html.dark .dataTables_wrapper .dataTables_processing,
html.dark #tableServicesList tbody tr,
html.dark #tableDomainsList tbody tr,
html.dark #tableInvoicesList tbody tr,
html.dark #tableTicketsList tbody tr,
html.dark #tableQuotesList tbody tr,
html.dark #tableCreditCardList tbody tr,
html.dark #tableAffiliatesList tbody tr,
html.dark #tableEmailsList tbody tr,
html.dark #tableStatusList tbody tr {
    background-color: #0b132b !important;
    color: #dbeafe !important;
    border-color: rgba(96, 165, 250, 0.2) !important;
}

html.dark .table-striped tbody tr:nth-of-type(odd) {
    background-color: #0f172a !important;
}

html.dark .table-hover tbody tr:hover {
    background-color: rgba(59, 130, 246, 0.08) !important;
}

html.dark .table thead th {
    background-color: #0b132b !important;
    color: #e0f2fe !important;
}

html.dark .table tbody td,
html.dark .table tbody th {
    color: #dbeafe !important;
}

html.dark .table-bordered,
html.dark .table-bordered th,
html.dark .table-bordered td {
    border-color: rgba(96, 165, 250, 0.2) !important;
}

/* Cart view page dark mode */
html.dark #order-standard_cart,
html.dark #order-standard_cart .cart-sidebar,
html.dark #order-standard_cart .cart-body,
html.dark #order-standard_cart .cart-summary,
html.dark #order-standard_cart .summary-container,
html.dark #order-standard_cart .panel,
html.dark #order-standard_cart .panel-heading,
html.dark #order-standard_cart .panel-body,
html.dark #order-standard_cart .panel-footer,
html.dark #order-standard_cart .order-summary,
html.dark #order-standard_cart .order-summary .header,
html.dark #order-standard_cart .order-summary .body,
html.dark #order-standard_cart .order-summary .total,
html.dark #order-standard_cart .order-summary .summary-item,
html.dark #order-standard_cart .order-summary .summary-item span,
html.dark #order-standard_cart .view-cart,
html.dark #order-standard_cart .view-cart .item,
html.dark #order-standard_cart .view-cart .item-title,
html.dark #order-standard_cart .view-cart .item-price,
html.dark #order-standard_cart .view-cart .item-qty,
html.dark #order-standard_cart .view-cart .item-config,
html.dark #order-standard_cart .view-cart .cart-items,
html.dark #order-standard_cart .view-cart .cart-item,
html.dark #order-standard_cart .view-cart .cart-item *,
html.dark #order-standard_cart .btn-checkout,
html.dark #order-standard_cart .promo,
html.dark #order-standard_cart .promo .form-control {
    background-color: #0b132b !important;
    color: #dbeafe !important;
    border-color: rgba(96, 165, 250, 0.2) !important;
}

html.dark #order-standard_cart .view-cart .item,
html.dark #order-standard_cart .view-cart .cart-item {
    border-color: rgba(96, 165, 250, 0.2) !important;
}

/* Checkout + Review blocks */
html.dark #order-standard_cart .checkout,
html.dark #order-standard_cart .checkout-form,
html.dark #order-standard_cart .checkout-summary,
html.dark #order-standard_cart .checkout-review,
html.dark #order-standard_cart .review,
html.dark #order-standard_cart .review-order,
html.dark #order-standard_cart .review-item,
html.dark #order-standard_cart .review-summary,
html.dark #order-standard_cart .checkout-step,
html.dark #order-standard_cart .checkout-step .panel,
html.dark #order-standard_cart .checkout-step .panel-heading,
html.dark #order-standard_cart .checkout-step .panel-body,
html.dark #order-standard_cart .checkout-step .panel-footer,
html.dark #order-standard_cart .order-review,
html.dark #order-standard_cart .order-review * {
    background-color: #0b132b !important;
    color: #dbeafe !important;
    border-color: rgba(96, 165, 250, 0.2) !important;
}

/* Cart product list (holder rows/items) */
html.dark #order-standard_cart .cart-items,
html.dark #order-standard_cart .cart-item,
html.dark #order-standard_cart .item,
html.dark #order-standard_cart .item-row,
html.dark #order-standard_cart .item-name,
html.dark #order-standard_cart .item-description,
html.dark #order-standard_cart .item-qty,
html.dark #order-standard_cart .item-price,
html.dark #order-standard_cart .item-total,
html.dark #order-standard_cart .item-options,
html.dark #order-standard_cart .product,
html.dark #order-standard_cart .product-name,
html.dark #order-standard_cart .product-description,
html.dark #order-standard_cart .product-options,
html.dark #order-standard_cart .product-price,
html.dark #order-standard_cart .line-item,
html.dark #order-standard_cart .line-item-title,
html.dark #order-standard_cart .line-item-price {
    background-color: #0b132b !important;
    color: #dbeafe !important;
    border-color: rgba(96, 165, 250, 0.2) !important;
}

html.dark #order-standard_cart .cart-item,
html.dark #order-standard_cart .item,
html.dark #order-standard_cart .line-item {
    border-color: rgba(96, 165, 250, 0.2) !important;
}

/* Announcements page dark mode */
html.dark .announcement,
html.dark .announcement .title,
html.dark .announcement .article,
html.dark .announcement .meta,
html.dark .announcements,
html.dark .announcement-item,
html.dark .announcement-item .panel,
html.dark .announcement-item .panel-heading,
html.dark .announcement-item .panel-body,
html.dark .announcement-item .panel-footer,
html.dark .announcement-list .list-group-item,
html.dark .announcement-list .list-group-item * {
    background-color: #0b132b !important;
    color: #dbeafe !important;
    border-color: rgba(96, 165, 250, 0.2) !important;
}

/* Announcement post header */
html.dark .post,
html.dark .post .post-header,
html.dark .post .post-header *,
html.dark .post-title,
html.dark .post-title a,
html.dark .post-meta,
html.dark .post-date,
html.dark .post-author {
    background-color: #0b132b !important;
    color: #dbeafe !important;
    border-color: rgba(96, 165, 250, 0.2) !important;
}

/* Prevent fixed header overlap on inner/client pages */
#main-body.main-body-offset {
    margin-top: 0 !important;
    padding-top: 104px !important;
}

@media (max-width: 991.98px) {
    #main-body.main-body-offset {
        padding-top: 88px !important;
    }
}

/* Extra guard: prevent inner wrappers from slipping under fixed header */
#main-body.main-body-offset .container,
#main-body.main-body-offset .row,
#main-body.main-body-offset .primary-content {
    margin-top: 0 !important;
    transform: none !important;
}

#main-body.main-body-offset .primary-content {
    padding-top: 16px !important;
}

/* Ensure landing page sections darken on theme toggle */
html.dark .landing-root,
html.dark .landing-root section,
html.dark .landing-root .bg-white,
html.dark .landing-root .bg-slate-50 {
    background-color: #0b132b !important;
    color: #dbeafe !important;
}

/* Smooth anchor navigation to homepage sections */
html {
    scroll-behavior: smooth;
}

/* Keep section visible below fixed header */
#web_hosting {
    scroll-margin-top: 120px;
}
