/* Keep the custom NeWorld sidebar visible inside its drawer. */
.o-page__sidebar .c-sidebar {
    display: block;
}

/* Match the original NeWorld client overview: four live account counters. */
body.clientareahome .nw-home-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin: 0 0 24px;
}
body.clientareahome .nw-home-stat {
    box-sizing: border-box;
    display: flex;
    min-width: 0;
    min-height: 196px;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 20px 16px;
    border: 1px solid #e5eaf0;
    border-bottom: 4px solid #32b4cc;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 14px rgb(31 49 70 / 5%);
    color: #354052;
    text-decoration: none;
    transition: transform .16s ease, box-shadow .16s ease;
}
body.clientareahome .nw-home-stat:hover,
body.clientareahome .nw-home-stat:focus-visible {
    color: #354052;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgb(31 49 70 / 10%);
}
body.clientareahome .nw-home-stat__icon {
    display: flex;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border-bottom: 2px solid #e0e6ed;
    background: #f8fafc;
    color: #279ce4;
    font-size: 23px;
}
body.clientareahome .nw-home-stat__value {
    color: #279ce4;
    font-size: 38px;
    font-weight: 400;
    line-height: 1.12;
}
body.clientareahome .nw-home-stat__label {
    margin-top: 4px;
    color: #667386;
    font-size: 15px;
    font-weight: 600;
}
body.clientareahome .nw-home-stat--domains {
    border-bottom-color: #56b86a;
}
body.clientareahome .nw-home-stat--tickets {
    border-bottom-color: #d9534f;
}
body.clientareahome .nw-home-stat--invoices {
    border-bottom-color: #f0ad4e;
}
@media (max-width: 991px) {
    body.clientareahome .nw-home-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    body.clientareahome .nw-home-stat {
        min-height: 164px;
        padding: 14px 16px 12px;
    }
    body.clientareahome .nw-home-stat__value {
        font-size: 34px;
    }
}

/* Restore the original NeWorld overview and two-column home panels. */
body.clientareahome .nw-client-dashboard {
    box-sizing: border-box;
    width: 100%;
    padding: 24px 30px 40px;
}

body.clientareahome .client-home-panels {
    margin-top: 4px;
}

body.clientareahome .client-home-panel__heading {
    align-items: center;
    gap: 12px;
}

body.clientareahome .client-home-panel__heading h5 {
    min-width: 0;
    overflow-wrap: anywhere;
}

body.clientareahome .client-home-panel .panel-cards {
    overflow: hidden;
}

body.clientareahome .client-home-panel .panel-cards .card-body,
body.clientareahome .client-home-panel .panel-cards .card-footer {
    padding: 18px 24px;
}

body.clientareahome .client-home-panel .card-row {
    box-sizing: border-box;
    height: auto;
    min-height: 72px;
    min-width: 0;
    overflow-wrap: anywhere;
}

body.clientareahome .client-home-panel .card-row .cell-title {
    padding-right: 76px;
    white-space: normal;
}

body.clientareahome .client-home-panel .card-row .cell-total {
    width: auto;
}

/* Give inherited WHMCS forms the same inset as the surrounding NeWorld card. */
body.c-login-wrapper .page-content .c-card .card-body {
    box-sizing: border-box;
    padding: 24px 30px;
}

/* The page title is already shown in the NeWorld card header. */
body.clientareadetails .page-content .c-card form > .card > .card-body > .card-title {
    display: none;
}


/* Keep the required terms checkbox native while presenting it as a switch. */
body.clientregister #registration p.text-center > label.form-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

body.clientregister #registration .accepttos {
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex: 0 0 46px;
    margin: 0;
    padding: 0;
    border: 1px solid #b8c2ce;
    border-radius: 999px;
    background-color: #cbd2da;
    background-image: radial-gradient(circle at center, #fff 0 8px, transparent 8.5px);
    background-repeat: no-repeat;
    background-size: 20px 20px;
    background-position: left 2px center;
    box-shadow: inset 0 1px 2px rgb(25 42 62 / 12%);
    vertical-align: middle;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, background-position .18s ease;
}

body.clientregister #registration .accepttos:checked {
    border-color: #279ce4;
    background-color: #279ce4;
    background-position: right 2px center;
}

body.clientregister #registration .accepttos:focus-visible {
    outline: 3px solid rgb(39 156 228 / 28%);
    outline-offset: 2px;
}

@media (max-width: 767px) {
    body.clientareahome .nw-client-dashboard {
        padding: 16px 16px 28px;
    }

    body.clientareahome .client-home-panel .panel-cards .card-body,
    body.clientareahome .client-home-panel .panel-cards .card-footer {
        padding: 14px 16px;
    }

    body.c-login-wrapper .page-content .c-card .card-body {
        padding: 16px;
    }
}

/* Keep WHMCS product/service panel rows in normal document flow. */
body.clientareahome .client-home-panel .panel-cards .card-row {
    box-sizing: border-box;
    height: auto;
    min-height: 0;
    padding: 18px 24px;
    overflow: visible;
    line-height: 1.55;
}

body.clientareahome .client-home-panel .panel-cards .card-row .cell-title {
    box-sizing: border-box;
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    color: #354052;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    text-overflow: clip;
}

body.clientareahome .client-home-panel .panel-cards .card-row .cell-title strong,
body.clientareahome .client-home-panel .panel-cards .card-row .cell-title b {
    color: #354052;
    font-weight: 600;
}

body.clientareahome .client-home-panel .panel-cards .card-row .cell-title a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.clientareahome .client-home-panel .panel-cards .card-row .cell-title .btn,
body.clientareahome .client-home-panel .panel-cards .card-row .cell-title .c-btn {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    margin-top: 8px;
    white-space: normal;
    vertical-align: top;
}

body.clientareahome .client-home-panel .panel-cards .card-row .cell-total {
    position: static;
    display: inline-flex;
    width: auto;
    height: auto;
    margin: 8px 0 0;
    text-align: left;
    vertical-align: middle;
}

@media (max-width: 767px) {
    body.clientareahome .client-home-panel .panel-cards .card-row {
        padding: 14px 16px;
    }
}

/* Pair the invoice summary with the wider products and services panel. */
body.clientareahome .client-home-panel-slot {
    min-width: 0;
}

body.clientareahome .client-home-panel-slot--services .panel-cards .cards > li {
    min-width: 0;
}

/* Give each service its own readable row and keep status/actions distinct. */
body.clientareahome .client-home-panel-slot--services .panel-cards .card-row {
    display: block;
    min-height: 0;
    padding: 20px 24px;
    border-bottom: 1px solid #e8edf2;
    color: #354052;
    line-height: 1.65;
    overflow-wrap: anywhere;
    transition: background-color .16s ease;
}

body.clientareahome .client-home-panel-slot--services .panel-cards .card-row:hover {
    background-color: #f8fbfd;
}

body.clientareahome .client-home-panel-slot--services .card-row .cell-title {
    padding: 0;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

body.clientareahome .client-home-panel-slot--services .cell-title .label,
body.clientareahome .client-home-panel-slot--services .cell-title .badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin: 0 8px 6px 0;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    vertical-align: middle;
}

body.clientareahome .client-home-panel-slot--services .cell-title a:not(.btn):not(.c-btn) {
    color: #247c9e;
    overflow-wrap: anywhere;
    word-break: break-word;
}

body.clientareahome .client-home-panel-slot--services .cell-title .btn,
body.clientareahome .client-home-panel-slot--services .cell-title .c-btn {
    margin: 10px 0 0;
}

body.clientareahome .client-home-panel-slot--services .card-row .cell-total {
    margin-top: 8px;
}

@media (max-width: 991px) {
    body.clientareahome .client-home-panel-slot--services .panel-cards .card-row {
        padding: 16px 18px;
    }
}


/* Add funds uses the same AJAX invoice flow as the recharge rewards module. */
.nw-addfunds {
    box-sizing: border-box;
    padding: 24px 30px 32px;
}
.nw-addfunds__layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr);
    align-items: start;
    gap: 24px;
}
.nw-addfunds__form,
.nw-addfunds__limits {
    min-width: 0;
    padding: 24px;
    border: 1px solid #e2e8ef;
    border-radius: 8px;
    background: #fff;
}
.nw-addfunds__section + .nw-addfunds__section {
    margin-top: 24px;
}
.nw-addfunds__presets {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 10px 0 20px;
}
.nw-addfunds__preset {
    min-height: 44px;
    border: 1px solid #d7dfe8;
    border-radius: 6px;
    background: #fff;
    color: #354052;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}
.nw-addfunds__preset:hover,
.nw-addfunds__preset.is-selected {
    border-color: #279ce4;
    background: #f0f8fe;
    color: #167dbb;
}
.nw-addfunds__amount {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}
.nw-addfunds__amount .form-control {
    flex: 1 1 220px;
    min-width: 0;
    min-height: 48px;
}
.nw-addfunds__amount > span {
    color: #7b8795;
    font-size: 13px;
}
.nw-addfunds__gateways {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    margin: 10px 0 0;
}
.nw-addfunds__gateway-option {
    display: block;
    position: relative;
    margin: 0;
    cursor: pointer;
}
.nw-addfunds__gateway-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.nw-addfunds__gateway-card {
    box-sizing: border-box;
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #d7dfe8;
    border-radius: 6px;
    color: #354052;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.nw-addfunds__gateway-option input:checked + .nw-addfunds__gateway-card {
    border-color: #279ce4;
    background: #f5fbff;
    box-shadow: 0 0 0 2px rgb(39 156 228 / 12%);
}
.nw-addfunds__gateway-option input:focus-visible + .nw-addfunds__gateway-card {
    outline: 3px solid rgb(39 156 228 / 24%);
    outline-offset: 2px;
}
.nw-addfunds__gateway-icon {
    display: block;
    width: 38px;
    height: 30px;
    flex: 0 0 38px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}
.nw-addfunds__notice {
    margin: 20px 0;
}
.nw-addfunds__submit {
    min-width: 180px;
    min-height: 46px;
}
.nw-addfunds__feedback:not([hidden]) {
    display: block;
    margin: 0 0 16px;
}
.nw-addfunds__limits h5 {
    margin: 0 0 16px;
    font-weight: 600;
}
.nw-addfunds__limits dl {
    margin: 0;
}
.nw-addfunds__limits dl > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #edf0f4;
}
.nw-addfunds__limits dl > div:last-child {
    border-bottom: 0;
}
.nw-addfunds__limits dt {
    color: #697586;
    font-weight: 500;
}
.nw-addfunds__limits dd {
    margin: 0;
    color: #354052;
    font-weight: 600;
    text-align: right;
}
@media (max-width: 767px) {
    .nw-addfunds {
        padding: 16px;
    }
    .nw-addfunds__layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    .nw-addfunds__form,
    .nw-addfunds__limits {
        padding: 18px;
    }
    .nw-addfunds__presets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .nw-addfunds__submit {
        width: 100%;
    }
}

.nw-addfunds__promotions {
    margin: 20px 0 24px;
    padding: 18px;
    border: 1px solid #e4edf5;
    border-radius: 8px;
    background: #f8fbfe;
}
.nw-addfunds__promotions h3 {
    margin: 0 0 6px;
    color: #354052;
    font-size: 18px;
    font-weight: 600;
}
.nw-addfunds__promotions > p {
    margin: 0 0 14px;
    color: #748092;
    font-size: 13px;
    line-height: 1.6;
}
.nw-addfunds__promotion-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    gap: 10px;
}
.nw-addfunds__promotion {
    display: flex;
    min-height: 74px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
    padding: 12px 14px;
    border: 1px solid #d7dfe8;
    border-radius: 6px;
    background: #fff;
    color: #354052;
    text-align: left;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}
.nw-addfunds__promotion:hover,
.nw-addfunds__promotion.is-selected {
    border-color: #279ce4;
    background: #f0f8fe;
    color: #167dbb;
}
.nw-addfunds__promotion-amount {
    font-size: 14px;
}
.nw-addfunds__promotion strong {
    color: #e77d24;
    font-size: 14px;
    font-weight: 600;
}
@media (max-width: 767px) {
    .nw-addfunds__promotions {
        padding: 14px;
    }
    .nw-addfunds__promotion-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.nw-addfunds__feedback[hidden] {
    display: none;
}
