:root {
    --cwh-navy: #101c3a;
    --cwh-navy-deep: #091329;
    --cwh-blue: #1e64d8;
    --cwh-blue-dark: #154ca8;
    --cwh-sky: #dceaff;
    --cwh-ice: #f1f6ff;
    --cwh-warm: #fbfaf7;
    --cwh-white: #ffffff;
    --cwh-ink: #17213a;
    --cwh-muted: #53617b;
    --cwh-line: #cbd7ea;
    --cwh-shadow: 0 22px 60px rgba(16, 28, 58, .12);
    --cwh-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

html { scroll-behavior: smooth; }
body.primary-bg-color {
    background: var(--cwh-warm);
    color: var(--cwh-ink);
    font-family: var(--cwh-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--cwh-blue-dark); }
a:hover, a:focus { color: var(--cwh-blue); }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--cwh-navy);
    font-family: var(--cwh-sans);
    font-weight: 800;
    letter-spacing: -.035em;
}
.container, .cwh-shell { width: min(calc(100% - 64px), 1380px); max-width: 1380px; margin-inline: auto; }

.cwh-skip-link { position: fixed; z-index: 9999; top: -80px; left: 16px; padding: 12px 18px; background: var(--cwh-white); border: 2px solid var(--cwh-blue); color: var(--cwh-navy); }
.cwh-skip-link:focus { top: 12px; }
.cwh-site-header { position: relative; z-index: 1050; background: rgba(251, 250, 247, .98); border-bottom: 1px solid var(--cwh-line); }
.cwh-site-header-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.cwh-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--cwh-navy); font-size: 20px; font-weight: 800; letter-spacing: -.045em; line-height: 1; text-decoration: none; }
.cwh-brand:hover, .cwh-brand:focus { color: var(--cwh-navy); text-decoration: none; }
.cwh-brand-dot { color: var(--cwh-blue); }
.cwh-brand-mark { width: 36px; height: 36px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 8px; border-radius: 10px; background: var(--cwh-navy); }
.cwh-brand-mark i { display: block; width: 5px; border-radius: 4px; background: var(--cwh-white); }
.cwh-brand-mark i:nth-child(1) { height: 8px; }
.cwh-brand-mark i:nth-child(2) { height: 14px; }
.cwh-brand-mark i:nth-child(3) { height: 20px; background: #78aaf7; }
.cwh-site-nav, .cwh-site-nav.collapse { display: flex; align-items: center; gap: 29px; font-size: 14px; font-weight: 700; }
.cwh-site-nav a { color: var(--cwh-navy); }
.cwh-site-nav a:hover, .cwh-site-nav a:focus { color: var(--cwh-blue); text-decoration: none; }
.cwh-site-nav .cwh-client-pill { padding: 10px 18px; border: 1px solid var(--cwh-navy); border-radius: 999px; }
.cwh-site-nav .cwh-client-pill:hover, .cwh-site-nav .cwh-client-pill:focus { background: var(--cwh-navy); color: var(--cwh-white); }
.cwh-menu-toggle { display: none; width: 46px; height: 46px; padding: 10px; border: 0; background: transparent; }
.cwh-menu-toggle i { display: block; height: 2px; margin: 6px 0; background: var(--cwh-navy); }

#header.header { margin: 0; box-shadow: none; }
#header .navbar-light { display: none; }
#header .topbar { background: var(--cwh-navy-deep); border: 0; }
#header .topbar .btn, #header .topbar .input-group-text { color: #d7e1f2; background: transparent; border-color: rgba(255,255,255,.18); }
#header .main-navbar-wrapper { min-height: 58px; padding: 0; background: var(--cwh-navy); border: 0; }
#header .main-navbar-wrapper .nav-link,
#header .main-navbar-wrapper .navbar-nav > li > a {
    color: #f1f6ff;
    font-size: 14px;
    font-weight: 700;
    padding: 18px 15px;
}
#header .main-navbar-wrapper .nav-link:hover,
#header .main-navbar-wrapper .nav-link:focus,
#header .main-navbar-wrapper .navbar-nav > li > a:hover,
#header .main-navbar-wrapper .navbar-nav > li > a:focus,
#header .main-navbar-wrapper .active > .nav-link,
#header .main-navbar-wrapper .navbar-nav > .active > a {
    color: var(--cwh-white);
    background: var(--cwh-blue);
    text-decoration: none;
}
#header .dropdown-menu { border: 1px solid var(--cwh-line); border-radius: 4px; box-shadow: var(--cwh-shadow); }
#header .dropdown-item { color: var(--cwh-ink); }
#header .dropdown-item:hover, #header .dropdown-item:focus { color: var(--cwh-navy); background: var(--cwh-ice); }
.master-breadcrumb { background: var(--cwh-ice); border-bottom: 1px solid var(--cwh-line); }
.master-breadcrumb .breadcrumb { padding-block: 15px; background: transparent; }
.master-breadcrumb .breadcrumb-item { color: var(--cwh-navy); font-size: 13px; font-weight: 700; }

#main-body { min-height: 58vh; padding: 70px 0 96px; background: var(--cwh-warm); }
.primary-content > .page-header:first-child h1, .primary-content > h1:first-child { font-size: clamp(2.5rem, 5vw, 5.4rem); line-height: .95; letter-spacing: -.065em; }
.card, .panel, .list-group, .table-container { border: 1px solid var(--cwh-line); border-radius: 4px; background: var(--cwh-white); box-shadow: none; }
.card { margin-bottom: 24px; }
.card-header, .card-footer { border-color: var(--cwh-line); background: var(--cwh-ice); }
.card-header { padding: 20px 24px; }
.card-body { padding: 26px; }
.card-title { color: var(--cwh-navy); font-weight: 800; }
.list-group-item { border-color: var(--cwh-line); color: var(--cwh-ink); }
.list-group-item-action:hover, .list-group-item-action:focus { background: var(--cwh-ice); color: var(--cwh-navy); }
.sidebar .card { overflow: hidden; }
.sidebar .card-header { background: var(--cwh-navy); }
.sidebar .card-header h3, .sidebar .card-header .card-title { color: var(--cwh-white); }

.btn { min-height: 44px; border-radius: 999px; font-weight: 700; }
.btn-primary, .btn-success, .btn-info, .btn-submit { border-color: var(--cwh-blue); background: var(--cwh-blue); color: var(--cwh-white); }
.btn-primary:hover, .btn-primary:focus, .btn-success:hover, .btn-success:focus, .btn-info:hover, .btn-info:focus, .btn-submit:hover, .btn-submit:focus { border-color: var(--cwh-blue-dark); background: var(--cwh-blue-dark); color: var(--cwh-white); }
.btn-default, .btn-secondary { border-color: var(--cwh-navy); background: var(--cwh-white); color: var(--cwh-navy); }
.btn-default:hover, .btn-default:focus, .btn-secondary:hover, .btn-secondary:focus { background: var(--cwh-navy); color: var(--cwh-white); }
.btn-danger { border-color: #8c2834; background: #8c2834; }
.form-control, .custom-select { min-height: 48px; border: 1px solid #aebdd3; border-radius: 4px; color: var(--cwh-navy); background: var(--cwh-white); }
.form-control:focus, .custom-select:focus { border-color: var(--cwh-blue); box-shadow: 0 0 0 3px rgba(30,100,216,.18); }
.input-group-text { border-color: #aebdd3; background: var(--cwh-ice); color: var(--cwh-navy); }
.alert { border: 1px solid currentColor; border-radius: 4px; }
.alert-info { color: #1f4f87; background: var(--cwh-ice); }
.badge-info, .label-info { background: var(--cwh-blue); }
.table { color: var(--cwh-ink); }
.table thead th, .table thead td { border-color: var(--cwh-line); color: var(--cwh-navy); background: var(--cwh-ice); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.table td, .table th { border-color: var(--cwh-line); vertical-align: middle; }
.table-hover tbody tr:hover { background: var(--cwh-ice); }

.login-form { max-width: 620px; margin: 30px auto; }
.login-form .card { overflow: hidden; border: 0; border-radius: 78px 0 0 0; box-shadow: var(--cwh-shadow); }
.login-form .card-body { padding: 52px !important; }
.login-form .h3 { font-size: 42px; }
.login-form .card-footer { padding: 22px 52px !important; }
.password-reset-container, .providerLinkingFeedback + .login-form { position: relative; }

.tiles .tile { min-height: 180px; padding: 28px; border: 1px solid var(--cwh-line); background: var(--cwh-white); color: var(--cwh-navy); }
.tiles .tile:hover { background: var(--cwh-ice); }
.tiles .tile .stat { color: var(--cwh-navy); font-size: 44px; font-weight: 800; }
.tiles .tile .title { color: var(--cwh-muted); font-weight: 700; }
.tiles .tile .highlight { height: 5px; background: var(--cwh-blue) !important; }
.client-home-cards .card { box-shadow: none; }

.product-details .product-status { overflow: hidden; border-radius: 58px 0 0 0; background: var(--cwh-navy) !important; color: var(--cwh-white); }
.product-details .product-status h3, .product-details .product-status h4 { color: var(--cwh-white); }
.product-details .product-status .fa-circle { color: var(--cwh-blue); }
.product-details .product-status-text { background: var(--cwh-blue) !important; }
.nav-tabs { border-color: var(--cwh-line); }
.nav-tabs .nav-link { color: var(--cwh-muted); font-weight: 700; }
.nav-tabs .nav-link.active { color: var(--cwh-navy); border-color: var(--cwh-line) var(--cwh-line) var(--cwh-white); }

.invoice-container { border: 1px solid var(--cwh-line); border-radius: 4px; box-shadow: var(--cwh-shadow); }
.invoice-container .invoice-header { color: var(--cwh-navy); }
.invoice-container .invoice-status { border-color: var(--cwh-blue); }
.ticket-reply, .ticket-reply.staff { border: 1px solid var(--cwh-line); border-radius: 4px; box-shadow: none; }
.ticket-reply .user, .ticket-reply.staff .user { background: var(--cwh-ice); }
.kb-search .form-control { border-radius: 4px 0 0 4px; }
.kb-category { min-height: 125px; }
.kb-category .fa-folder, .kb-article-item .fa-file-alt { color: var(--cwh-blue) !important; }

.cwh-invoice-page { margin: 0; background: var(--cwh-warm); color: var(--cwh-ink); font-family: var(--cwh-sans); }
.cwh-invoice-page .invoice-container { width: min(calc(100% - 64px), 960px); margin: 54px auto 80px; padding: 48px; background: var(--cwh-white); }
.cwh-invoice-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--cwh-navy); font-size: 20px; font-weight: 800; letter-spacing: -.045em; }
.cwh-invoice-page .invoice-header h3 { margin-top: 28px; color: var(--cwh-navy); font-size: 34px; font-weight: 800; letter-spacing: -.04em; }
.cwh-invoice-page .invoice-status { border-color: var(--cwh-blue); }
.cwh-invoice-page .table { table-layout: fixed; }
.cwh-invoice-page .table td, .cwh-invoice-page .table th { overflow-wrap: anywhere; }
.cwh-invoice-page .cwh-invoice-back { padding: 24px 0 60px; text-align: center; }

.cwh-client-footer { padding: 72px 0 26px; background: var(--cwh-navy-deep); color: #b9c7df; }
.cwh-footer-cta { display: flex; align-items: end; justify-content: space-between; gap: 45px; padding-bottom: 58px; border-bottom: 1px solid rgba(255,255,255,.14); }
.cwh-footer-cta span { display: block; margin-bottom: 18px; color: #8cb8ff; font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.cwh-footer-cta h2 { max-width: 820px; margin: 0; color: var(--cwh-white); font-size: clamp(2.5rem, 4vw, 4.5rem); line-height: .98; }
.cwh-footer-button { border-color: var(--cwh-white); background: var(--cwh-white); color: var(--cwh-navy); padding-inline: 24px; }
.cwh-footer-button:hover, .cwh-footer-button:focus { border-color: var(--cwh-sky); background: var(--cwh-sky); color: var(--cwh-navy); }
.cwh-footer-grid { display: grid; grid-template-columns: 1.45fr repeat(3,1fr); gap: 70px; padding-block: 64px; }
.cwh-brand-light { color: var(--cwh-white); }
.cwh-brand-light:hover, .cwh-brand-light:focus { color: var(--cwh-white); }
.cwh-footer-brand p { max-width: 330px; margin-top: 23px; }
.cwh-footer-grid > div:not(.cwh-footer-brand) { display: flex; flex-direction: column; gap: 11px; }
.cwh-footer-grid h3 { margin: 0 0 11px; color: var(--cwh-white); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.cwh-footer-grid a { color: #b9c7df; }
.cwh-footer-grid a:hover, .cwh-footer-grid a:focus { color: var(--cwh-white); }
.cwh-footer-bottom { display: flex; justify-content: space-between; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.14); color: #8292af; font-size: 12px; }

/* Standard Cart and comparison templates inherit the same visual system in preview. */
#order-standard_cart, #order-pure_comparison { color: var(--cwh-ink); font-family: var(--cwh-sans); }
#order-standard_cart .products .product, #order-standard_cart .product-info, #order-standard_cart .summary-container, #order-pure_comparison .product { border-color: var(--cwh-line); border-radius: 4px; background: var(--cwh-white); box-shadow: none; }
#order-standard_cart .products .product header, #order-standard_cart .view-cart-tabs .nav-tabs, #order-pure_comparison .product header { background: var(--cwh-navy); color: var(--cwh-white); }
#order-standard_cart .products .product header span, #order-standard_cart .products .product header h3, #order-pure_comparison .product header span, #order-pure_comparison .product header h3 { color: var(--cwh-white); }
#order-standard_cart .products .product .product-desc, #order-pure_comparison .product .product-desc { color: var(--cwh-muted); }
#order-standard_cart .btn-primary, #order-pure_comparison .btn-primary { border-color: var(--cwh-blue); background: var(--cwh-blue); }

@media (max-width: 991px) {
    .container, .cwh-shell { width: min(calc(100% - 40px), 1380px); }
    .cwh-site-header-inner { min-height: 74px; }
    .cwh-menu-toggle { display: block; margin-left: auto; }
    .cwh-site-nav { position: absolute; top: 100%; left: 0; right: 0; padding: 12px 20px 22px; background: var(--cwh-white); border-bottom: 1px solid var(--cwh-line); box-shadow: var(--cwh-shadow); }
    .cwh-site-nav.collapse:not(.show) { display: none; }
    .cwh-site-nav.show { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
    .cwh-site-nav a { padding: 12px 8px; }
    .cwh-site-nav .cwh-client-pill { margin-top: 8px; text-align: center; }
    #header .main-navbar-wrapper { min-height: 52px; }
    #header .main-navbar-wrapper .navbar-toggler, #header .main-navbar-wrapper button { color: var(--cwh-white); }
    .cwh-footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
    .cwh-footer-grid > div:last-child { grid-column: 2; }
}

@media (max-width: 575px) {
    body.primary-bg-color { font-size: 15px; }
    .container, .cwh-shell { width: min(calc(100% - 32px), 1380px); }
    .cwh-brand { font-size: 17px; }
    .cwh-brand-mark { width: 32px; height: 32px; padding: 7px; }
    #main-body { padding: 42px 0 68px; }
    .card-body { padding: 21px; }
    .login-form .card { border-radius: 52px 0 0 0; }
    .login-form .card-body { padding: 34px 24px !important; }
    .login-form .h3 { font-size: 34px; }
    .login-form .card-footer { padding: 20px 24px !important; }
    .tiles .tile { min-height: 145px; padding: 20px 15px; }
    .cwh-footer-cta { align-items: flex-start; flex-direction: column; }
    .cwh-footer-cta h2 { font-size: 2.5rem; }
    .cwh-footer-grid { grid-template-columns: 1fr 1fr; gap: 44px 26px; }
    .cwh-footer-brand { grid-column: 1 / -1; }
    .cwh-footer-grid > div:last-child { grid-column: auto; }
    .cwh-footer-bottom { gap: 12px; flex-direction: column; }
    .table-container { overflow-x: auto; }
    .invoice-container { margin-inline: -8px; padding: 20px 12px; }
    .cwh-invoice-page .invoice-container { width: calc(100% - 32px); margin: 28px auto 48px; padding: 28px 16px; overflow: hidden; }
    .cwh-invoice-page .invoice-header h3 { font-size: 28px; }
    .cwh-invoice-page .table { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
