/*
 * TupaHost v2 - WHMCS 9 / Nexus
 * Camada visual TupaHost aplicada sobre o Nexus oficial.
 * Objetivo: manter intactos Smarty, hooks, menus, formulários e JS nativos.
 */

:root {
    --white: #ffffff;

    --neutral-50: #f8fafc;
    --neutral-100: #f2f6fb;
    --neutral-200: #e7ebf1;
    --neutral-300: #dfe5ee;
    --neutral-400: #a8b3c5;
    --neutral-500: #64748b;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1e293b;
    --neutral-900: #172052;
    --neutral-950: #0b132c;

    --primary-50: #fff8f3;
    --primary-100: #fff0e6;
    --primary-200: #ffdaca;
    --primary-300: #ffb98e;
    --primary-400: #ff9150;
    --primary-500: #ff6c18;
    --primary-600: #e85d0f;
    --primary-700: #c64b09;
    --primary-800: #9f3d0a;
    --primary-900: #7e340d;
    --primary-950: #431704;

    --primary: #ff6c18;
    --primary-lifted: #e85d0f;
    --primary-accented: #c64b09;

    --secondary: #64748b;
    --secondary-lifted: #475569;
    --secondary-accented: #334155;

    --success: #16835d;
    --success-lifted: #106b4b;
    --success-accented: #0c533b;
    --info: #2856b6;
    --info-lifted: #1f4799;
    --info-accented: #183a7c;
    --notice: #7254b8;
    --notice-lifted: #60449f;
    --notice-accented: #4d3681;
    --warning: #f59e0b;
    --warning-lifted: #d98604;
    --warning-accented: #b56d03;
    --error: #dc3545;
    --error-lifted: #bd2130;
    --error-accented: #9d1c28;

    --grayscale: #172052;
    --grayscale-lifted: #101a3d;
    --grayscale-accented: #0b132c;
    --neutral: #64748b;
    --neutral-lifted: #475569;
    --neutral-accented: #334155;

    --text-inverted: #ffffff;
    --text-muted: #94a3b8;
    --text-lifted: #64748b;
    --text-accented: #334155;
    --text: #172033;

    --border-muted: #e7ebf1;
    --border: #dfe5ee;
    --border-lifted: #cbd5e1;
    --border-accented: #94a3b8;

    --bg: #ffffff;
    --bg-muted: #f8fafc;
    --bg-lifted: #f2f6fb;
    --bg-accented: #e9eff7;
    --bg-inverted: #0b132c;

    --th-orange: #ff6c18;
    --th-orange-hover: #e85d0f;
    --th-navy: #101a3d;
    --th-navy-deep: #0b132c;
    --th-heading: #172052;
    --th-ink: #172033;
    --th-muted: #5e6879;
    --th-line: #dfe5ee;
    --th-soft: #f2f6fb;
    --th-paper: #ffffff;
    --th-green: #16835d;
    --th-shadow: 0 15px 35px rgba(48, 64, 91, .08);
    --th-shadow-hover: 0 22px 45px rgba(48, 64, 91, .13);

    --text-xs: .625rem;
    --text-sm: .75rem;
    --text-md: .875rem;
    --text-lg: 1rem;
    --outline-sm: 1px;
    --outline-md: 2px;
    --outline-lg: 3px;
    --rounding-sm: .375rem;
    --rounding-md: .65rem;
    --rounding-lg: 1rem;
    --letter-spacing: 0;
    --disabled-opacity: 40%;
}

/* ---------- Base ---------- */
html, body {
    background: var(--th-soft);
    color: var(--th-ink);
}

body {
    font-family: Inter, "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body a {
    color: var(--th-heading);
    transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

body a:hover {
    color: var(--th-orange);
    text-decoration: none;
}

body h1,
body h2,
body h3,
body h4,
body h5,
body h6,
body .h1,
body .h2,
body .h3,
body .h4,
body .h5,
body .h6 {
    color: var(--th-heading);
    font-weight: 800;
    letter-spacing: -.025em;
}

.container {
    max-width: 1240px;
}

::selection {
    background: rgba(255, 108, 24, .2);
    color: var(--th-heading);
}

/* ---------- Header / navegação ---------- */
header.header {
    position: relative;
    z-index: 1030;
    background: var(--th-navy);
    border-bottom: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 10px 30px rgba(11, 19, 44, .10);
}

header.header .topbar {
    margin: 0;
    padding: 4px 0;
    background: var(--th-navy-deep);
    border-bottom: 1px solid rgba(255,255,255,.07);
    color: #a8b7d3;
}

header.header .topbar .btn,
header.header .topbar .active-client .btn,
header.header .topbar .active-client .input-group-text {
    color: #cbd5e1;
}

header.header .topbar .btn:hover,
header.header .topbar .active-client .btn:hover {
    color: #ffffff;
}

header.header .topbar .active-client .btn.btn-active-client span {
    border-bottom-color: rgba(255,255,255,.25);
}

header.header > .navbar.navbar-light {
    min-height: 82px;
    padding: 0;
    background: var(--th-navy);
}

header.header > .navbar.navbar-light > .container {
    min-height: 82px;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 10px;
    padding-bottom: 10px;
}

header.header .navbar-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    padding: 0;
    margin: 0 24px 0 0;
    color: #ffffff !important;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.035em;
}

header.header .logo-img {
    width: auto;
    max-width: 270px;
    max-height: 58px;
    object-fit: contain;
}

header.header .search {
    width: 300px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 10px;
    background: rgba(255,255,255,.055);
    box-shadow: none;
}

header.header .search:focus-within {
    border-color: rgba(255,108,24,.7);
    box-shadow: 0 0 0 3px rgba(255,108,24,.10);
}

header.header .search .btn,
header.header .search .form-control,
header.header .search .input-group-prepend .btn {
    border: 0;
    background: transparent;
    color: #d8e0ed;
}

header.header .search .form-control::placeholder {
    color: #8ea0ba;
}

header.header .toolbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
}

header.header .toolbar .nav-item {
    margin: 0 !important;
}

header.header .toolbar .nav-link,
header.header .toolbar button.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 43px;
    height: 43px;
    padding: 0 13px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 10px;
    background: rgba(255,255,255,.045);
    color: #f8fafc;
    overflow: visible !important;
}

header.header .toolbar .nav-link:hover,
header.header .toolbar button.nav-link:hover {
    border-color: var(--th-orange);
    background: var(--th-orange);
    color: #fff;
}

header.header .toolbar .nav-link .badge {
    right: -8px;
    top: -8px;
    padding: 5px 7px;
    border: 2px solid var(--th-navy);
    background: var(--th-orange);
    color: #fff;
}

header.header .main-navbar-wrapper {
    min-height: 48px;
    padding: 9px 0 10px;
    background: var(--th-navy);
    border-top: 1px solid rgba(255,255,255,.065);
}

header.header .main-navbar-wrapper > .container {
    min-height: 28px;
}

header.header .main-navbar-wrapper .navbar-collapse {
    align-items: center;
}

header.header .main-navbar-wrapper form.d-xl-none {
    padding: 10px 0;
}

header.header .navbar-nav {
    align-items: center;
    gap: 2px;
    margin-top: 0;
    margin-bottom: 0;
}

/* O script nativo do Nexus usa 30px para decidir quando mover itens para "Mais".
   Mantemos a linha do menu abaixo desse limite quando cabe em uma única linha. */
header.header #nav > li,
header.header #nav > li > a {
    min-height: 28px;
}

header.header #nav > li > a,
header.header .main-navbar-wrapper .navbar-nav > li > a {
    display: flex;
    align-items: center;
    height: 28px;
    padding: 0 11px;
    border-radius: 7px;
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 700;
    line-height: 28px;
    white-space: nowrap;
}

header.header #nav > li > a:hover,
header.header #nav > li.show > a,
header.header #nav > li.active > a,
header.header .main-navbar-wrapper .navbar-nav > li > a:hover,
header.header .main-navbar-wrapper .navbar-nav > li.show > a,
header.header .main-navbar-wrapper .navbar-nav > li.active > a {
    background: rgba(255,108,24,.10);
    color: #ffb185;
}

header.header .main-navbar-wrapper .dropdown-menu {
    min-width: 230px;
    margin-top: 9px;
    padding: 9px;
    border: 1px solid #e5eaf1;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(24, 38, 70, .18);
}

header.header .main-navbar-wrapper .dropdown-item,
header.header .main-navbar-wrapper .dropdown-item a {
    color: var(--th-ink);
}

header.header .main-navbar-wrapper .dropdown-item {
    padding: 0;
    border-radius: 8px;
}

header.header .main-navbar-wrapper .dropdown-item > a {
    display: block;
    padding: 9px 11px !important;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

header.header .main-navbar-wrapper .dropdown-item:hover,
header.header .main-navbar-wrapper .dropdown-item:focus,
header.header .main-navbar-wrapper .dropdown-item.active,
header.header .main-navbar-wrapper .dropdown-item:active {
    background: #fff3ec;
    color: var(--th-orange);
}

header.header .main-navbar-wrapper .dropdown-item:hover > a,
header.header .main-navbar-wrapper .dropdown-item:focus > a,
header.header .main-navbar-wrapper .dropdown-item.active > a {
    color: var(--th-orange);
}

header.header .main-navbar-wrapper .dropdown-divider {
    margin: 7px 4px;
    border-color: #edf0f5;
}

/* Reforço específico contra regressões de navegação em desktop. */
@media (min-width: 1200px) {
    header.header .main-navbar-wrapper .navbar-collapse {
        display: flex !important;
        visibility: visible !important;
        height: auto !important;
        opacity: 1 !important;
    }
    header.header .main-navbar-wrapper .navbar-nav {
        display: flex !important;
    }
    header.header .main-navbar-wrapper #nav > li.d-block {
        display: block !important;
    }
}

/* ---------- Breadcrumb ---------- */
.master-breadcrumb {
    background: #ffffff;
    border-bottom: 1px solid var(--th-line);
}

.master-breadcrumb .breadcrumb {
    margin: 0;
    padding: 12px 0;
    background: transparent;
    color: var(--th-muted);
    font-size: 13px;
}

.master-breadcrumb .breadcrumb a {
    color: #64748b;
}

.master-breadcrumb .breadcrumb a:hover {
    color: var(--th-orange);
}

.master-breadcrumb .breadcrumb .breadcrumb-item.active {
    color: var(--th-heading);
    font-weight: 700;
}

/* ---------- Corpo ---------- */
section#main-body {
    min-height: calc(100vh - 270px);
    margin: 0;
    padding: 40px 0 64px;
    background: linear-gradient(180deg, #f5f8fc 0, #f8fafc 160px, #f8fafc 100%);
}

.primary-content {
    min-width: 0;
}

.header-lined {
    margin: 0 0 26px;
    padding: 0 0 18px;
    border-bottom: 1px solid var(--th-line);
}

.header-lined h1 {
    margin: 0;
    color: var(--th-heading);
    font-weight: 800;
    letter-spacing: -.035em;
}

.header-lined .breadcrumb {
    background: transparent;
}

/* ---------- Cards / painéis ---------- */
body .card,
body .panel,
body .mc-promo-manage,
body .mc-promo-login,
body .promo-container {
    border: 1px solid var(--th-line);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(48,64,91,.055);
}

.primary-content .card,
.sidebar .card {
    margin-bottom: 18px;
}

body .card-header,
body .panel-heading {
    padding: 16px 19px;
    border-bottom: 1px solid #e7ebf1;
    border-radius: 15px 15px 0 0;
    background: #fff;
}

body .card-header:first-child {
    border-radius: 15px 15px 0 0;
}

body .card-title,
body .panel-title {
    color: var(--th-heading);
    font-weight: 800;
    letter-spacing: -.015em;
}

body .card-body,
body .panel-body {
    color: var(--th-ink);
}

body .card-footer,
body .panel-footer {
    padding: 14px 19px;
    border-top: 1px solid #edf0f4;
    border-radius: 0 0 15px 15px;
    background: #fbfcfe;
}

body .list-group-item {
    border-color: #edf0f4;
    background: #fff;
    color: var(--th-ink);
}

body .list-group-item-action:hover,
body .list-group-item-action:focus {
    background: #fff8f3;
    color: var(--th-orange);
}

body .list-group-item.active,
body .list-group-item-action.active {
    border-color: #ffe0ce;
    background: #fff3ec;
    color: #cc500a;
}

/* ---------- Sidebar ---------- */
.sidebar .card-sidebar {
    overflow: hidden;
    border: 1px solid var(--th-line);
    border-radius: 14px;
    box-shadow: 0 9px 24px rgba(48,64,91,.045);
}

.sidebar .card-sidebar .card-header {
    padding: 15px 17px;
    background: #fff;
}

.sidebar .card-sidebar .card-title {
    font-size: 15px;
}

.sidebar .card-sidebar .list-group-item {
    padding: 11px 17px;
    font-size: 14px;
}

.sidebar .card-sidebar .list-group-item.active {
    position: relative;
    background: #fff7f1;
    color: #b94708;
    font-weight: 700;
}

.sidebar .card-sidebar .list-group-item.active::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: var(--th-orange);
}

/* ---------- Botões ---------- */
body .btn {
    min-height: 39px;
    border-radius: 9px;
    font-weight: 700;
    line-height: 1.25;
}

body .btn-sm,
body .btn-group-sm > .btn {
    min-height: 31px;
    border-radius: 8px;
}

body .btn-lg,
body .btn-group-lg > .btn {
    min-height: 48px;
    border-radius: 10px;
}

body .btn-primary,
body #main-body .btn-primary {
    border-color: var(--th-orange);
    background: var(--th-orange);
    color: #fff;
    box-shadow: 0 8px 20px rgba(255,108,24,.14);
}

body .btn-primary:hover,
body .btn-primary:focus,
body .btn-primary:not(:disabled):not(.disabled):active,
body #main-body .btn-primary:hover {
    border-color: var(--th-orange-hover);
    background: var(--th-orange-hover);
    color: #fff;
    box-shadow: 0 10px 24px rgba(255,108,24,.20);
}

body .btn-outline-primary,
body #main-body .btn-outline-primary {
    border-color: #ffc8a7;
    background: #fff;
    color: #c94e08;
}

body .btn-outline-primary:hover,
body #main-body .btn-outline-primary:hover {
    border-color: var(--th-orange);
    background: var(--th-orange);
    color: #fff;
}

body .btn-default,
body .btn-secondary,
body .btn-outline-secondary {
    border-color: #d6dee8;
    background: #fff;
    color: #334155;
}

body .btn-default:hover,
body .btn-secondary:hover,
body .btn-outline-secondary:hover {
    border-color: #b8c4d3;
    background: #f8fafc;
    color: var(--th-heading);
}

body .btn-success {
    border-color: var(--th-green);
    background: var(--th-green);
}

body .btn-link {
    color: var(--th-heading);
    font-weight: 700;
}

body .btn-link:hover {
    color: var(--th-orange);
}

/* ---------- Formulários ---------- */
body .form-control,
body .custom-select,
body select.form-control {
    min-height: 42px;
    border: 1px solid #d7e0ea;
    border-radius: 9px;
    background-color: #fff;
    color: var(--th-ink);
    box-shadow: none;
}

body textarea.form-control {
    min-height: 120px;
}

body .form-control:focus,
body .custom-select:focus,
body .login-form .form-control:focus {
    border-color: rgba(255,108,24,.75);
    box-shadow: 0 0 0 3px rgba(255,108,24,.10);
}

body .input-group-text {
    border-color: #d7e0ea;
    background: #f7f9fc;
    color: #64748b;
}

body .form-control-label,
body label {
    color: #334155;
    font-weight: 700;
}

body .custom-control-input:checked ~ .custom-control-label::before {
    border-color: var(--th-orange);
    background-color: var(--th-orange);
}

/* ---------- Tabelas ---------- */
body .table {
    color: var(--th-ink);
}

body .table th,
body .table td {
    border-color: #e8edf3;
    vertical-align: middle;
}

body .table thead th,
body .table .thead-light th {
    border-top: 0;
    border-bottom: 1px solid #dfe5ee;
    background: #f5f8fc;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}

body .table-hover tbody tr:hover {
    background: #fff8f3;
}

body .dataTables_wrapper .dataTables_filter input,
body .dataTables_wrapper .dataTables_length select {
    border: 1px solid #d7e0ea;
    border-radius: 8px;
    background: #fff;
}

/* ---------- Badges / status ---------- */
body .badge {
    border-radius: 999px;
    font-weight: 800;
}

body .badge-primary,
body .label-primary {
    background: var(--th-orange);
}

body .badge-success,
body .label-success {
    background: var(--th-green);
}

body .badge-light {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
}

/* ---------- Alertas ---------- */
body .alert {
    border-radius: 12px;
    border-width: 1px;
    box-shadow: none;
}

body .alert-info {
    border-color: #d6e3f7;
    background: #eef5ff;
    color: #274b86;
}

body .alert-success {
    border-color: #cfe9df;
    background: #edf8f3;
    color: #126747;
}

body .alert-warning {
    border-color: #f7dfae;
    background: #fff8e8;
    color: #785106;
}

body .alert-danger {
    border-color: #f2cbd0;
    background: #fff1f2;
    color: #9f2937;
}

/* ---------- Página inicial pública ---------- */
.home-domain-search {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #e7ebf1;
    background: linear-gradient(112deg, #f5f8fc 0%, #eef5ff 58%, #fff8f3 100%) !important;
}

.home-domain-search::before {
    content: "";
    position: absolute;
    top: -140px;
    right: -90px;
    width: 390px;
    height: 390px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,108,24,.10), rgba(255,108,24,0) 68%);
    pointer-events: none;
}

.home-domain-search .container {
    position: relative;
    z-index: 1;
}

.home-domain-search .p-5 {
    padding-top: 64px !important;
    padding-bottom: 64px !important;
}

.home-domain-search h2 {
    margin-bottom: 24px;
    color: var(--th-heading);
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 800;
    letter-spacing: -.045em;
}

.home-domain-search .input-group-wrapper {
    max-width: 860px;
    margin: 0 auto;
}

.home-domain-search .input-group {
    padding: 7px;
    border: 1px solid #d7e0ea;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(48,64,91,.10);
}

.home-domain-search .input-group .form-control {
    min-height: 52px;
    border: 0;
    box-shadow: none;
    font-size: 16px;
}

.home-domain-search .input-group .btn {
    min-height: 52px;
    padding-left: 24px;
    padding-right: 24px;
}

.home-domain-search .tld-logos {
    max-width: 860px;
    margin: 22px auto 0;
}

section#main-body .card-columns.home {
    column-gap: 22px;
}

section#main-body .card-columns.home .card {
    overflow: hidden;
    border-radius: 17px;
    box-shadow: var(--th-shadow);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

section#main-body .card-columns.home .card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,108,24,.32);
    box-shadow: var(--th-shadow-hover);
}

section#main-body .card-columns.home .card-title {
    color: var(--th-heading);
}

section#main-body .action-icon-btns a {
    min-height: 136px;
    border: 1px solid var(--th-line) !important;
    border-radius: 15px;
    background: #fff !important;
    color: var(--th-heading) !important;
    box-shadow: 0 8px 25px rgba(48,64,91,.045);
    font-weight: 800;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

section#main-body .action-icon-btns a:hover {
    transform: translateY(-4px);
    border-color: rgba(255,108,24,.35) !important;
    box-shadow: var(--th-shadow-hover);
    color: var(--th-orange) !important;
}

section#main-body .action-icon-btns .ico-container {
    color: var(--th-orange) !important;
}

/* ---------- Área do cliente ---------- */
.tiles .tile {
    min-height: 154px;
    border: 1px solid var(--th-line);
    background: #fff;
    color: var(--th-heading);
    box-shadow: 0 8px 24px rgba(48,64,91,.045);
}

.tiles .col-6:first-child .tile {
    border-radius: 15px 0 0 15px;
}

.tiles .col-6:last-child .tile {
    border-radius: 0 15px 15px 0;
}

.tiles .tile:hover {
    position: relative;
    z-index: 2;
    border-color: rgba(255,108,24,.38);
    background: #fffaf7;
    color: var(--th-orange);
}

.tiles .tile i {
    color: var(--th-orange);
}

.tiles .tile .stat {
    color: var(--th-heading);
    font-weight: 800;
}

.tiles .tile .title {
    color: #64748b;
    font-weight: 700;
}

.tiles .tile .highlight {
    background: var(--th-orange) !important;
}

.client-home-cards .card {
    border-radius: 15px;
}

.client-home-cards .card-header {
    background: #fff;
}

/* ---------- Login / cadastro / recuperação ---------- */
.login-form .card,
#registration .card,
.providerLinkingFeedback + .login-form .card,
.primary-content .mw-540,
.primary-content .mw-750 {
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 20px 55px rgba(39,55,82,.10);
}

.login-form .card-body {
    padding-top: 38px !important;
    padding-bottom: 34px !important;
}

.login-form .h3 {
    font-size: 30px;
    letter-spacing: -.04em;
}

.login-form .card-footer {
    background: #f8fafc;
}

/* ---------- Serviços, domínios e faturas ---------- */
.product-details .product-status,
.domain-renewals,
.domain-pricing,
.invoice-container,
.quote-container {
    border-radius: 15px;
}

.product-status-active,
.status-active,
.domain-status-active {
    color: var(--th-green);
}

/* ---------- Tickets / conhecimento ---------- */
.ticket-reply,
.ticket-reply.staff,
.ticket-reply.client {
    border-radius: 14px;
    border-color: var(--th-line);
}

.ticket-reply .date,
.ticket-reply .user {
    color: #64748b;
}

.kb-article-item,
.kb-category,
.announcement-single {
    border-color: var(--th-line);
}

/* ---------- Carrinho / order form ---------- */
body #order-standard_cart .cart-body,
body #order-standard_cart .cart-sidebar {
    color: var(--th-ink);
}

body #order-standard_cart .products .product,
body #order-standard_cart .product-info,
body #order-standard_cart .summary-container,
body #order-standard_cart .view-cart-items,
body #order-standard_cart .view-cart-tabs .tab-content,
body #order-standard_cart .cart-sidebar .card {
    border-color: var(--th-line) !important;
    border-radius: 15px !important;
    background: #fff;
    box-shadow: 0 9px 26px rgba(48,64,91,.05);
}

body #order-standard_cart .products .product:hover {
    border-color: rgba(255,108,24,.36) !important;
}

body #order-standard_cart .products .product header,
body #order-standard_cart .products .product .product-desc {
    color: var(--th-ink);
}

body #order-standard_cart .products .product .product-title,
body #order-standard_cart .products .product header span {
    color: var(--th-heading);
}

body #order-standard_cart .btn-primary,
body #order-standard_cart .btn-success {
    border-color: var(--th-orange) !important;
    background: var(--th-orange) !important;
    color: #fff !important;
}

body #order-standard_cart .btn-primary:hover,
body #order-standard_cart .btn-success:hover {
    border-color: var(--th-orange-hover) !important;
    background: var(--th-orange-hover) !important;
}

/* ---------- Store / MarketConnect ---------- */
.store-order-container .store-domain-tabs li.active a,
.store-order-container .nav-tabs .nav-link.active,
.store-order-container .nav-pills .nav-link.active {
    border-color: var(--th-orange) !important;
    background: var(--th-orange) !important;
    color: #fff !important;
}

.store-order-container .btn-primary,
.store-order-container .btn-success,
.marketconnect .btn-primary,
.marketconnect .btn-success {
    border-color: var(--th-orange) !important;
    background: var(--th-orange) !important;
    color: #fff !important;
}

/* ---------- Paginação ---------- */
body .page-link {
    border-color: #dfe5ee;
    color: #475569;
}

body .page-link:hover {
    border-color: #ffc8a7;
    background: #fff3ec;
    color: var(--th-orange);
}

body .page-item.active .page-link {
    border-color: var(--th-orange);
    background: var(--th-orange);
    color: #fff;
}

/* ---------- Modais / dropdowns ---------- */
body .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 17px;
    box-shadow: 0 24px 70px rgba(11,19,44,.25);
}

body .modal-header,
body .modal-footer {
    border-color: #e9edf3;
}

body .dropdown-menu {
    border-color: #e5eaf1;
    border-radius: 11px;
    box-shadow: 0 18px 45px rgba(24,38,70,.15);
}

/* ---------- Footer ---------- */
footer.footer {
    margin: 0;
    padding: 34px 0 26px;
    border-top: 1px solid rgba(255,255,255,.07);
    background: #010203;
    color: #94a3b8;
}

footer.footer .nav-link,
footer.footer a {
    color: #cbd5e1;
}

footer.footer .nav-link:hover,
footer.footer a:hover {
    color: #ffb537;
}

footer.footer .btn {
    border-color: rgba(255,255,255,.16);
    background: rgba(255,255,255,.04);
    color: #e2e8f0;
}

footer.footer .btn:hover {
    border-color: var(--th-orange);
    background: rgba(255,108,24,.12);
    color: #fff;
}

footer.footer .copyright {
    margin: 25px 0 8px;
    color: #64748b;
    font-size: 13px;
}

/* ---------- Foco / acessibilidade ---------- */
body a:focus-visible,
body button:focus-visible,
body input:focus-visible,
body select:focus-visible,
body textarea:focus-visible {
    outline: 2px solid var(--th-orange);
    outline-offset: 2px;
}

/* ---------- Responsivo ---------- */
@media (max-width: 1199.98px) {
    header.header > .navbar.navbar-light,
    header.header > .navbar.navbar-light > .container {
        min-height: 72px;
    }

    header.header .logo-img {
        max-width: 230px;
        max-height: 52px;
    }

    header.header .main-navbar-wrapper {
        padding: 0;
        border-top: 1px solid rgba(255,255,255,.08);
    }

    header.header .main-navbar-wrapper .navbar-collapse {
        padding: 14px 0 18px;
    }

    header.header .main-navbar-wrapper .navbar-collapse.collapse:not(.show) {
        display: none !important;
    }

    header.header .main-navbar-wrapper .navbar-collapse.collapse.show,
    header.header .main-navbar-wrapper .navbar-collapse.collapsing {
        display: block !important;
    }

    header.header .navbar-nav {
        width: 100% !important;
        align-items: stretch;
        gap: 3px;
    }

    header.header #nav > li,
    header.header #nav > li > a,
    header.header .main-navbar-wrapper .navbar-nav > li > a {
        width: 100%;
        height: auto;
        min-height: 44px;
    }

    header.header #nav > li > a,
    header.header .main-navbar-wrapper .navbar-nav > li > a {
        justify-content: space-between;
        padding: 10px 12px;
        line-height: 1.35;
    }

    header.header .main-navbar-wrapper .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        margin: 4px 0 8px;
        border: 1px solid rgba(255,255,255,.09);
        background: rgba(255,255,255,.045);
        box-shadow: none;
        transform: none !important;
    }

    header.header .main-navbar-wrapper .dropdown-item,
    header.header .main-navbar-wrapper .dropdown-item a,
    header.header .main-navbar-wrapper .dropdown-item > a {
        color: #d8e0ed;
    }

    header.header .main-navbar-wrapper .dropdown-item:hover,
    header.header .main-navbar-wrapper .dropdown-item:focus {
        background: rgba(255,108,24,.12);
    }

    header.header .main-navbar-wrapper form.d-xl-none .search {
        width: 100%;
        margin: 0 0 9px;
    }

    section#main-body {
        padding-top: 28px;
    }

    .tiles .tile {
        border-radius: 0 !important;
    }
}

@media (max-width: 767.98px) {
    .container {
        width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }

    header.header > .navbar.navbar-light > .container {
        justify-content: space-between;
        gap: 10px;
    }

    header.header .navbar-brand {
        flex: 1 1 auto;
        margin-right: 8px;
        font-size: 24px;
    }

    header.header .logo-img {
        max-width: min(210px, 52vw);
        max-height: 48px;
    }

    header.header .toolbar {
        flex: 0 0 auto;
    }

    header.header .toolbar .nav-link,
    header.header .toolbar button.nav-link {
        min-width: 40px;
        height: 40px;
        padding: 0 11px;
    }

    .master-breadcrumb .breadcrumb {
        padding: 10px 0;
        font-size: 12px;
    }

    section#main-body {
        padding: 22px 0 42px;
    }

    .home-domain-search .p-5 {
        padding: 42px 0 !important;
    }

    .home-domain-search h2 {
        font-size: 31px;
    }

    .home-domain-search .input-group {
        padding: 5px;
    }

    .home-domain-search .input-group .form-control {
        min-height: 48px;
    }

    body .card,
    body .panel,
    .sidebar .card-sidebar {
        border-radius: 12px;
    }

    .primary-content .card-body {
        padding: 17px;
    }

    .tiles .tile {
        min-height: 138px;
    }

    footer.footer {
        padding: 28px 0 22px;
    }

    footer.footer .nav {
        gap: 8px 16px;
    }
}

@media (max-width: 575.98px) {
    header.header > .navbar.navbar-light > .container {
        justify-content: space-between;
    }

    header.header .navbar-brand {
        justify-content: flex-start;
    }

    .home-domain-search .row.d-sm-none {
        margin-top: 12px;
    }

    .home-domain-search .row.d-sm-none .btn {
        min-height: 44px;
    }

    section#main-body h2.text-center.m-4 {
        margin: 28px 0 20px !important;
        font-size: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* ========================================================================== 
   TupaHost v2.1 - cabecalho institucional + cabecalho nativo do WHMCS
   O primeiro bloco replica a navegacao publica da TupaHost.
   O segundo bloco apenas reestiliza o header Nexus, preservando seus menus.
   ========================================================================== */

/* ---------- Header institucional TupaHost ---------- */
.th-institutional-header {
    position: relative;
    z-index: 1045;
    width: 100%;
    min-height: 100px;
    background: #11151b;
    border-bottom: 1px solid #242a33;
    color: #cfd5df;
}

.th-institutional-inner {
    position: relative;
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 1600px;
    min-height: 100px;
    margin: 0 auto;
    padding: 0 20px;
}

.th-institutional-logo {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    width: 340px;
    margin-right: auto;
    padding-right: 24px;
}

.th-institutional-logo img {
    display: block;
    width: auto;
    max-width: 320px;
    max-height: 66px;
    object-fit: contain;
}

.th-institutional-nav {
    display: flex;
    flex: 0 1 auto;
    align-items: stretch;
    justify-content: flex-end;
    min-width: 0;
    height: 100px;
    margin-left: auto;
}

.th-institutional-nav > .th-web-nav-link,
.th-institutional-nav > .th-web-nav-item > .th-web-nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    padding: 0 18px;
    color: #d4d9e2;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .025em;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
}

.th-institutional-nav > .th-web-nav-link:hover,
.th-institutional-nav > .th-web-nav-link:focus,
.th-institutional-nav > .th-web-nav-item:hover > .th-web-nav-link,
.th-institutional-nav > .th-web-nav-item:focus-within > .th-web-nav-link {
    background: rgba(255,255,255,.025);
    color: #ff7b24;
}

.th-institutional-nav .th-web-nav-link span {
    margin-left: 4px;
    font-size: 12px;
}

.th-web-nav-item {
    position: relative;
    display: flex;
    align-items: stretch;
}

.th-web-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1060;
    width: max-content;
    min-width: 245px;
    max-width: 320px;
    padding: 10px;
    border: 1px solid #272d37;
    border-radius: 0 0 12px 12px;
    background: #0e1218;
    box-shadow: 0 22px 42px rgba(0,0,0,.42);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
}

.th-web-dropdown-compact {
    min-width: 205px;
}

.th-web-nav-item:hover > .th-web-dropdown,
.th-web-nav-item:focus-within > .th-web-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.th-web-dropdown a {
    display: block;
    padding: 11px 13px;
    border-radius: 8px;
    color: #cdd4de;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: none;
    white-space: nowrap;
}

.th-web-dropdown a:hover,
.th-web-dropdown a:focus {
    background: rgba(255,108,24,.11);
    color: #ff7b24;
}

.th-institutional-toggle {
    display: none;
    align-self: center;
    flex-direction: column;
    gap: 5px;
    width: 46px;
    height: 42px;
    padding: 9px;
    border: 1px solid #2b323c;
    border-radius: 8px;
    background: #171c23;
    cursor: pointer;
}

.th-institutional-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: #f7f8fa;
}

/* ---------- Header funcional do WHMCS / Nexus ---------- */
header.header {
    position: relative;
    z-index: 1030;
    background: #ffffff;
    border-bottom: 1px solid #dfe4eb;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .07);
}

header.header .topbar {
    margin: 0;
    padding: 4px 0;
    background: #f5f7fa;
    border-bottom: 1px solid #e4e8ee;
    color: #596273;
}

header.header .topbar .btn,
header.header .topbar .active-client .btn,
header.header .topbar .active-client .input-group-text {
    color: #475569;
}

header.header .topbar .btn:hover,
header.header .topbar .active-client .btn:hover {
    color: #ff6c18;
}

header.header .topbar .active-client .btn.btn-active-client span {
    border-bottom-color: #cfd6df;
}

header.header > .navbar.navbar-light {
    min-height: 72px;
    padding: 0;
    background: #ffffff;
}

header.header > .navbar.navbar-light > .container {
    min-height: 72px;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 8px;
    padding-bottom: 8px;
}

header.header .navbar-brand.th-client-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    margin: 0 26px 0 0;
    padding: 0;
    color: #151a22 !important;
}

.th-client-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-right: 11px;
    border: 1px solid #ffd5bd;
    border-radius: 10px;
    background: #fff6f0;
    color: #ff6c18;
    font-size: 21px;
}

.th-client-brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.08;
}

.th-client-brand-copy strong {
    color: #171b22;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.015em;
}

.th-client-brand-copy small {
    margin-top: 4px;
    color: #7a8493;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

header.header .search {
    width: 300px;
    border: 1px solid #dbe1e9;
    border-radius: 10px;
    background: #f8fafc;
    box-shadow: none;
}

header.header .search:focus-within {
    border-color: rgba(255,108,24,.72);
    box-shadow: 0 0 0 3px rgba(255,108,24,.10);
}

header.header .search .btn,
header.header .search .form-control,
header.header .search .input-group-prepend .btn {
    border: 0;
    background: transparent;
    color: #475569;
}

header.header .search .form-control::placeholder {
    color: #8a94a3;
}

header.header .toolbar .nav-link,
header.header .toolbar button.nav-link {
    border: 1px solid #dbe1e9;
    background: #f8fafc;
    color: #364152;
}

header.header .toolbar .nav-link:hover,
header.header .toolbar button.nav-link:hover {
    border-color: #ff6c18;
    background: #ff6c18;
    color: #ffffff;
}

header.header .toolbar .nav-link .badge {
    border-color: #ffffff;
    background: #ff6c18;
    color: #ffffff;
}

header.header .main-navbar-wrapper {
    min-height: 50px;
    padding: 9px 0 10px;
    background: #ffffff;
    border-top: 1px solid #edf0f4;
    border-bottom: 1px solid #e4e8ee;
}

header.header #nav > li > a,
header.header .main-navbar-wrapper .navbar-nav > li > a {
    color: #3f4958;
}

header.header #nav > li > a:hover,
header.header #nav > li.show > a,
header.header #nav > li.active > a,
header.header .main-navbar-wrapper .navbar-nav > li > a:hover,
header.header .main-navbar-wrapper .navbar-nav > li.show > a,
header.header .main-navbar-wrapper .navbar-nav > li.active > a {
    background: #fff3eb;
    color: #e65d0e;
}

header.header .main-navbar-wrapper .dropdown-menu {
    border-color: #e4e8ee;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(15,23,42,.14);
}

/* Desktop: o menu institucional nao depende do estado Bootstrap .collapse. */
@media (min-width: 1200px) {
    .th-institutional-nav.collapse {
        display: flex !important;
    }
}

@media (max-width: 1360px) and (min-width: 1200px) {
    .th-institutional-logo {
        width: 285px;
        padding-right: 14px;
    }

    .th-institutional-logo img {
        max-width: 270px;
    }

    .th-institutional-nav > .th-web-nav-link,
    .th-institutional-nav > .th-web-nav-item > .th-web-nav-link {
        padding-left: 11px;
        padding-right: 11px;
        font-size: 13px;
    }
}

@media (max-width: 1199.98px) {
    .th-institutional-header,
    .th-institutional-inner {
        min-height: 82px;
    }

    .th-institutional-inner {
        flex-wrap: wrap;
        align-items: center;
        padding: 0 18px;
    }

    .th-institutional-logo {
        width: auto;
        max-width: calc(100% - 66px);
        min-height: 82px;
        margin-right: auto;
        padding-right: 12px;
    }

    .th-institutional-logo img {
        max-width: min(290px, 62vw);
        max-height: 58px;
    }

    .th-institutional-toggle {
        display: flex;
    }

    .th-institutional-nav {
        flex: 0 0 100%;
        width: 100%;
        height: auto;
        margin: 0;
        padding: 6px 0 16px;
        border-top: 1px solid #252b34;
    }

    .th-institutional-nav.collapse:not(.show) {
        display: none !important;
    }

    .th-institutional-nav.collapse.show,
    .th-institutional-nav.collapsing {
        display: block !important;
    }

    .th-institutional-nav > .th-web-nav-link,
    .th-institutional-nav > .th-web-nav-item > .th-web-nav-link {
        justify-content: flex-start;
        width: 100%;
        min-height: 46px;
        padding: 13px 8px;
        border-bottom: 1px solid rgba(255,255,255,.055);
        font-size: 14px;
        text-align: left;
    }

    .th-web-nav-item {
        display: block;
        width: 100%;
    }

    .th-web-dropdown,
    .th-web-nav-item:hover > .th-web-dropdown,
    .th-web-nav-item:focus-within > .th-web-dropdown {
        position: static;
        width: auto;
        min-width: 0;
        max-width: none;
        margin: 2px 0 9px 14px;
        padding: 6px;
        border: 0;
        border-left: 2px solid #343b46;
        border-radius: 0;
        background: #0d1117;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .th-web-dropdown a {
        padding: 10px 12px;
        white-space: normal;
    }

    header.header .main-navbar-wrapper {
        border-top-color: #edf0f4;
    }

    header.header .main-navbar-wrapper .navbar-collapse {
        padding: 14px 0 18px;
    }

    header.header .main-navbar-wrapper .dropdown-menu {
        border: 1px solid #e4e8ee;
        background: #f8fafc;
    }

    header.header .main-navbar-wrapper .dropdown-item,
    header.header .main-navbar-wrapper .dropdown-item a,
    header.header .main-navbar-wrapper .dropdown-item > a {
        color: #3f4958;
    }

    header.header .main-navbar-wrapper .dropdown-item:hover,
    header.header .main-navbar-wrapper .dropdown-item:focus {
        background: #fff3eb;
    }
}

@media (max-width: 575.98px) {
    .th-institutional-header,
    .th-institutional-inner,
    .th-institutional-logo {
        min-height: 74px;
    }

    .th-institutional-logo img {
        max-width: min(235px, 65vw);
        max-height: 50px;
    }

    header.header > .navbar.navbar-light,
    header.header > .navbar.navbar-light > .container {
        min-height: 66px;
    }

    .th-client-brand-icon {
        width: 38px;
        height: 38px;
        margin-right: 8px;
    }

    .th-client-brand-copy strong {
        font-size: 15px;
    }

    .th-client-brand-copy small {
        font-size: 9px;
    }
}
