/* ================================================================
   ZagrosVPS × WHMCS Nexus visual integration
   Target: WHMCS 9 / Nexus / Bootstrap 4.5.3
   Scope: visual layer only; no WHMCS business logic is changed.
   ================================================================ */

:root {
    --zv-navy-950: #020914;
    --zv-navy-900: #061126;
    --zv-navy-850: #08172f;
    --zv-navy-800: #0a1d3b;
    --zv-ink: #0a1630;
    --zv-text: #17233b;
    --zv-muted: #66738a;
    --zv-subtle: #8b97aa;
    --zv-line: #e3e9f2;
    --zv-line-strong: #d6deea;
    --zv-surface: #ffffff;
    --zv-surface-soft: #f7f9fc;
    --zv-surface-blue: #f2f8ff;
    --zv-blue: #168df2;
    --zv-blue-strong: #0876db;
    --zv-cyan: #32c9ff;
    --zv-green: #16a36a;
    --zv-orange: #e88720;
    --zv-red: #dc4a50;
    --zv-purple: #7867e8;
    --zv-shadow-sm: 0 6px 18px rgba(8, 23, 47, .055);
    --zv-shadow: 0 14px 38px rgba(8, 23, 47, .075);
    --zv-shadow-lg: 0 24px 64px rgba(5, 18, 43, .13);
    --zv-radius-sm: 10px;
    --zv-radius: 14px;
    --zv-radius-lg: 20px;

    /* Nexus variable bridge */
    --white: #fff;
    --neutral-50: #f8fafc;
    --neutral-100: #f3f6fa;
    --neutral-200: #e5ebf3;
    --neutral-300: #d6deea;
    --neutral-400: #98a4b7;
    --neutral-500: #66738a;
    --neutral-600: #4b5870;
    --neutral-700: #344159;
    --neutral-800: #1e2a41;
    --neutral-900: #0a1630;
    --neutral-950: #020914;

    --primary-50: #eef8ff;
    --primary-100: #dff1ff;
    --primary-200: #b9e3ff;
    --primary-300: #7fd0ff;
    --primary-400: #39b8ff;
    --primary-500: #168df2;
    --primary-600: #0876db;
    --primary-700: #075eb1;
    --primary-800: #0a4f91;
    --primary-900: #0d4378;
    --primary-950: #082a50;

    --primary: var(--zv-blue);
    --primary-lifted: var(--zv-blue-strong);
    --primary-accented: #075eb1;
    --secondary: #66738a;
    --secondary-lifted: #4b5870;
    --secondary-accented: #344159;
    --success: #16a36a;
    --success-lifted: #108557;
    --success-accented: #0d6c49;
    --info: var(--zv-blue);
    --info-lifted: var(--zv-blue-strong);
    --info-accented: #075eb1;
    --warning: #e88720;
    --warning-lifted: #c96e10;
    --warning-accented: #a6570c;
    --error: #dc4a50;
    --error-lifted: #bd353d;
    --error-accented: #9d2b32;
    --grayscale: var(--zv-ink);
    --grayscale-lifted: #1e2a41;
    --grayscale-accented: #07142c;
    --text-inverted: #fff;
    --text-muted: #8b97aa;
    --text-lifted: #66738a;
    --text-accented: #4b5870;
    --text: var(--zv-ink);
    --border-muted: #e8edf4;
    --border: #dce4ef;
    --border-lifted: #cbd5e3;
    --border-accented: #9ba9bc;
    --bg: #fff;
    --bg-muted: #fbfcfe;
    --bg-lifted: #f6f8fb;
    --bg-accented: #eef2f7;
    --bg-inverted: var(--zv-navy-950);
    --rounding-sm: 8px;
    --rounding-md: 12px;
    --rounding-lg: 18px;
    --letter-spacing: -.01em;
}

/* ---------- Global rhythm & readability ---------- */
html,
body {
    background: var(--zv-navy-950);
}

body.zv-shell,
body {
    color: var(--zv-text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--zv-ink);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.28;
}

h1, .h1 { font-size: 2rem; }
h2, .h2 { font-size: 1.6rem; }
h3, .h3 { font-size: 1.3rem; }

p, li, td, th, label, .form-control, .custom-select {
    letter-spacing: -.005em;
}

small, .small, .text-muted {
    color: var(--zv-muted) !important;
}

a {
    color: var(--zv-blue-strong);
    transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

a:hover {
    color: #075eb1;
    text-decoration: none;
}

::selection {
    background: rgba(22, 141, 242, .18);
    color: var(--zv-ink);
}

.container {
    max-width: 1200px;
}

section#main-body {
    padding: 34px 0 46px;
    background:
        radial-gradient(circle at 10% 0, rgba(33, 155, 255, .055), transparent 25rem),
        radial-gradient(circle at 92% 8%, rgba(58, 205, 255, .04), transparent 26rem),
        var(--zv-surface-soft);
    min-height: calc(100vh - 156px - 40px - 235px);
}

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

.header-lined {
    margin: 0 0 24px;
    padding: 0 0 16px;
    border-bottom: 1px solid var(--zv-line);
}

.header-lined h1 {
    margin: 0;
    font-size: 1.75rem;
}

/* ---------- Branded header ---------- */
header.header.zv-header {
    position: relative;
    z-index: 990;
    background: rgba(255,255,255,.98);
    border-bottom: 1px solid rgba(214,222,234,.8);
    box-shadow: 0 4px 20px rgba(7, 20, 44, .035);
}

header.header .zv-site-navbar {
    min-height: 78px;
    padding: 0;
    background: #fff;
}

.zv-site-navbar .container {
    min-height: 78px;
}

.zv-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    margin: 0 34px 0 0;
    padding: 0;
}

.zv-brand img {
    display: block;
    width: 196px;
    max-width: 44vw;
    height: auto;
}

.zv-public-links {
    align-items: center;
    gap: 2px !important;
    margin: 0 !important;
}

.zv-public-links > li > a,
.zv-public-links > .nav-item > .nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 12px !important;
    border-radius: 9px;
    color: #26344d !important;
    font-size: 14.5px !important;
    font-weight: 600;
    white-space: nowrap;
}

.zv-public-links > li > a:hover,
.zv-public-links > .nav-item > .nav-link:hover,
.zv-public-links > .nav-item.show > .nav-link {
    color: var(--zv-blue-strong) !important;
    background: var(--zv-surface-blue);
}

.zv-public-links .dropdown-toggle:after {
    margin-left: 7px;
    vertical-align: .18em;
    border-top-width: 4px;
    border-right-width: 4px;
    border-left-width: 4px;
    opacity: .55;
}

.zv-location-menu {
    width: 330px;
    padding: 10px;
    border: 1px solid var(--zv-line);
    border-radius: 15px;
    box-shadow: var(--zv-shadow-lg);
}

.zv-location-menu .dropdown-item {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 10px;
    align-items: center;
    padding: 9px 10px !important;
    border-radius: 10px;
    color: var(--zv-text) !important;
}

.zv-location-menu .dropdown-item:hover {
    background: var(--zv-surface-blue);
}

.zv-loc-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 28px;
    border-radius: 8px;
    background: #eef5ff;
    border: 1px solid #dae9fb;
    color: var(--zv-blue-strong);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
}

.zv-loc-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.18;
}

.zv-loc-copy strong {
    color: var(--zv-ink);
    font-size: 13px;
    font-weight: 700;
}

.zv-loc-copy small {
    margin-top: 3px;
    font-size: 11px;
    color: var(--zv-muted) !important;
}

.zv-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}

.zv-header-link,
.zv-header-cta,
.zv-cart-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
}

.zv-header-link {
    padding: 0 12px;
    color: var(--zv-text) !important;
}

.zv-header-link:hover {
    background: var(--zv-surface-soft);
    color: var(--zv-blue-strong) !important;
}

.zv-header-cta {
    padding: 0 16px;
    border: 1px solid var(--zv-blue);
    background: linear-gradient(135deg, #1796f8, #0876db);
    color: #fff !important;
    box-shadow: 0 7px 18px rgba(8,118,219,.18);
}

.zv-header-cta:hover {
    background: linear-gradient(135deg, #0f88e9, #066bc9);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(8,118,219,.24);
}

.zv-cart-link {
    position: relative;
    width: 40px;
    border: 1px solid var(--zv-line);
    background: #fff;
    color: var(--zv-text) !important;
}

.zv-cart-link:hover {
    border-color: #bddcf7;
    background: var(--zv-surface-blue);
    color: var(--zv-blue-strong) !important;
}

.zv-cart-link .badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 3px 5px;
    border: 2px solid #fff;
    background: var(--zv-blue) !important;
    font-size: 9px;
}

.zv-site-toggle,
.zv-portal-toggle {
    min-width: 42px;
    height: 40px;
    border: 1px solid var(--zv-line) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--zv-ink) !important;
}

/* Signed-in notification strip */
.zv-account-strip,
header.header .topbar {
    min-height: 36px;
    padding: 0;
    background: var(--zv-navy-900);
    color: #b9c7dc;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.zv-account-strip .container {
    min-height: 36px;
}

.zv-account-strip .btn,
.zv-account-strip .input-group-text,
header.header .topbar .btn,
header.header .topbar .active-client .input-group-text,
header.header .topbar .active-client .btn {
    color: #c4d1e4;
}

.zv-account-strip .btn:hover,
header.header .topbar .btn:hover {
    color: #fff;
}

.zv-account-strip .btn-active-client span,
header.header .topbar .active-client .btn.btn-active-client span {
    border-bottom-color: rgba(102, 197, 255, .45);
}

/* WHMCS portal navigation kept intact, visually secondary */
header.header .main-navbar-wrapper.zv-client-navbar {
    min-height: 46px;
    padding: 0;
    background: #fbfcfe;
    border-top: 1px solid #edf1f6;
}

.zv-client-navbar .container {
    min-height: 46px;
}

.zv-client-navbar #nav,
.zv-client-navbar .navbar-nav {
    gap: 2px;
    margin: 0 !important;
}

.zv-client-navbar .navbar-nav > li > a {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 10px 11px;
    color: #516079 !important;
    font-size: 13px !important;
    font-weight: 600;
    border-radius: 0;
}

.zv-client-navbar .navbar-nav > li > a:hover,
.zv-client-navbar .navbar-nav > li.show > a,
.zv-client-navbar .navbar-nav > li.active > a {
    color: var(--zv-blue-strong) !important;
    background: transparent;
}

.zv-client-navbar .navbar-nav > li > a:after {
    margin-left: 6px;
}

.zv-client-navbar .dropdown-menu {
    min-width: 220px;
    padding: 8px;
    border: 1px solid var(--zv-line);
    border-radius: 12px;
    box-shadow: var(--zv-shadow);
}

.zv-client-navbar .dropdown-item,
header.header .dropdown-item {
    border-radius: 8px;
}

.zv-client-navbar .dropdown-item:hover,
header.header .dropdown-item:hover,
header.header .dropdown-item.active,
header.header .dropdown-item:active {
    background: var(--zv-surface-blue);
    color: var(--zv-blue-strong) !important;
}

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

.master-breadcrumb .breadcrumb {
    padding: 10px 0;
    background: #fff;
    font-size: 12.5px;
}

.master-breadcrumb .breadcrumb a {
    color: var(--zv-muted);
}

.master-breadcrumb .breadcrumb a:hover {
    color: var(--zv-blue-strong);
}

.master-breadcrumb .breadcrumb .breadcrumb-item.active {
    color: #394861;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #b7c0ce;
}

/* ---------- Core surfaces ---------- */
.card,
.mc-promo-manage,
.mc-promo-login,
.modal-content,
.popover {
    border: 1px solid var(--zv-line);
    border-radius: var(--zv-radius);
    background: var(--zv-surface);
    box-shadow: var(--zv-shadow-sm);
}

.primary-content .card,
.primary-content .mc-promo-manage,
.primary-content .mc-promo-login {
    margin-bottom: 18px;
    border-radius: var(--zv-radius);
}

.card-header {
    padding: 15px 18px;
    border-bottom: 1px solid var(--zv-line);
    background: #fbfcfe;
    border-radius: var(--zv-radius) var(--zv-radius) 0 0 !important;
}

.card-header .card-title {
    color: var(--zv-ink);
    font-size: 15px;
    font-weight: 700;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 13px 18px;
    border-top: 1px solid var(--zv-line);
    background: #fbfcfe;
    border-radius: 0 0 var(--zv-radius) var(--zv-radius) !important;
}

.list-group-item {
    border-color: var(--zv-line);
    color: var(--zv-text);
}

.list-group-item-action:hover,
.list-group-item-action:focus {
    background: var(--zv-surface-blue);
    color: var(--zv-ink);
}

.list-group-item.active {
    border-color: #cbe5fb;
    background: #edf7ff;
    color: #0b6fc7;
}

/* ---------- Sidebar ---------- */
.sidebar .card-sidebar {
    overflow: hidden;
    margin-bottom: 16px !important;
    border: 1px solid var(--zv-line);
    border-radius: var(--zv-radius);
    box-shadow: none;
}

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

.card-sidebar .card-header .card-title {
    font-size: 13.5px;
    font-weight: 750;
}

.card-sidebar .card-header .card-title > i:first-child {
    color: var(--zv-blue);
}

.card-sidebar .list-group-item {
    padding: 11px 14px;
    border-left: 0;
    border-right: 0;
    color: #526078;
    font-size: 13px;
}

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

.card-sidebar .list-group-item.active:before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    bottom: 7px;
    width: 3px;
    border-radius: 0 5px 5px 0;
    background: var(--zv-blue);
}

.sidebar-menu-item-icon-wrapper {
    color: #7c8aa1;
}

.list-group-item.active .sidebar-menu-item-icon-wrapper {
    color: var(--zv-blue);
}

.card-sidebar .badge {
    background: #eaf5ff;
    color: #0b73ca;
}

/* ---------- Buttons ---------- */
.btn {
    border-radius: 9px;
    font-weight: 650;
    letter-spacing: -.01em;
    box-shadow: none;
}

.btn:focus,
.btn.focus {
    box-shadow: 0 0 0 3px rgba(22,141,242,.12) !important;
}

.btn-primary {
    border-color: var(--zv-blue);
    background: linear-gradient(135deg, #1796f8, #0876db);
    color: #fff;
    box-shadow: 0 7px 16px rgba(8,118,219,.14);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active {
    border-color: #066bc9;
    background: linear-gradient(135deg, #0f88e9, #066bc9);
    color: #fff;
}

.btn-outline-primary {
    border-color: #a7d6fb;
    color: #0876db;
    background: #fff;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    border-color: var(--zv-blue);
    background: #eef8ff;
    color: #066bc9;
}

.btn-default,
.btn-secondary {
    border-color: var(--zv-line-strong);
    background: #fff;
    color: #344159;
}

.btn-default:hover,
.btn-secondary:hover {
    border-color: #bac7d8;
    background: #f5f8fb;
    color: var(--zv-ink);
}

.btn-success {
    border-color: #159861;
    background: #16a36a;
}

.btn-danger {
    border-color: #d63f47;
    background: #dc4a50;
}

.btn-warning {
    border-color: #da7b18;
    background: #e88720;
    color: #fff;
}

.btn-link {
    color: var(--zv-blue-strong);
}

/* ---------- Forms ---------- */
.form-control,
.custom-select,
.custom-file-label {
    min-height: 42px;
    border: 1px solid var(--zv-line-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--zv-ink);
    font-size: 14px;
}

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

.form-control::placeholder {
    color: #a2adbd;
}

.form-control:focus,
.custom-select:focus {
    border-color: #7dc6fa;
    box-shadow: 0 0 0 3px rgba(22,141,242,.1);
}

.form-control-label,
label {
    color: #394861;
    font-size: 13px;
    font-weight: 650;
}

.input-group-text {
    min-height: 42px;
    border-color: var(--zv-line-strong);
    background: #f8fafc;
    color: #76849b;
}

.input-group > .form-control:not(:first-child),
.input-group > .custom-select:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.custom-control-label:before,
.custom-control-label:after {
    top: .17rem;
}

/* ---------- Login / registration ---------- */
.login-form .card,
#registration .card,
.card.mw-540 {
    overflow: hidden;
    border-color: #dbe5f0;
    box-shadow: var(--zv-shadow);
}

.login-form .card:before,
#registration .card:before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, #2bd0ff, #158ef2 48%, #4a6df4);
}

.login-form .card-body {
    position: relative;
}

.login-form .card-body:after {
    content: "";
    position: absolute;
    top: -56px;
    right: -46px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,166,255,.08), rgba(37,166,255,0) 67%);
    pointer-events: none;
}

.login-form .input-group-text {
    width: 44px;
    justify-content: center;
}

/* ---------- Dashboard tiles ---------- */
.tiles .row {
    margin-right: -7px;
    margin-left: -7px;
}

.tiles [class*="col-"] {
    padding: 0 7px;
}

.tiles .tile {
    position: relative;
    min-height: 142px;
    margin-bottom: 14px;
    padding: 20px 18px;
    border: 1px solid var(--zv-line);
    border-radius: var(--zv-radius);
    background: #fff;
    color: var(--zv-text);
    box-shadow: var(--zv-shadow-sm);
    overflow: hidden;
}

.tiles .tile:hover {
    border-color: #bdddf7;
    color: var(--zv-ink);
    transform: translateY(-2px);
    box-shadow: var(--zv-shadow);
}

.tiles .tile > i {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #edf7ff;
    color: var(--zv-blue);
    font-size: 18px;
}

.tiles .tile .stat {
    margin: 14px 0 2px;
    color: var(--zv-ink);
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.04em;
}

.tiles .tile .title {
    color: var(--zv-muted);
    font-size: 12.5px;
    font-weight: 650;
}

.tiles .tile .highlight {
    top: auto;
    right: 18px;
    bottom: 0;
    left: 18px;
    height: 3px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(90deg, #2bcaff, #178df1) !important;
}

/* ---------- Home action cards ---------- */
.card-columns.home .card,
.action-icon-btns a {
    border: 1px solid var(--zv-line) !important;
    border-radius: var(--zv-radius) !important;
    background: #fff !important;
    color: var(--zv-text) !important;
    box-shadow: var(--zv-shadow-sm);
}

.card-columns.home .card:hover,
.action-icon-btns a:hover {
    border-color: #bdddf7 !important;
    transform: translateY(-2px);
    box-shadow: var(--zv-shadow);
}

.action-icon-btns .ico-container {
    background: #edf7ff !important;
    color: var(--zv-blue) !important;
    border: 1px solid #d9edfc;
}

/* ---------- Tables / data tables ---------- */
.table-container,
.dataTables_wrapper {
    overflow: hidden;
    border: 1px solid var(--zv-line);
    border-radius: var(--zv-radius);
    background: #fff;
    box-shadow: var(--zv-shadow-sm);
}

.dataTables_wrapper .table-container,
.table-container .dataTables_wrapper {
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.table {
    margin-bottom: 0;
    color: var(--zv-text);
}

.table thead th,
.table thead td {
    border-top: 0;
    border-bottom: 1px solid var(--zv-line-strong);
    background: #f8fafc;
    color: #59677e;
    font-size: 11.5px;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .035em;
}

.table td,
.table th {
    padding: .82rem .78rem;
    border-top-color: var(--zv-line);
    vertical-align: middle;
}

.table-hover tbody tr:hover,
.table-list tbody tr:hover {
    background: #f4faff;
}

.table-list tbody tr {
    cursor: pointer;
}

.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length {
    padding: 14px 14px 8px;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding: 12px 14px 14px;
}

.page-link {
    border-color: var(--zv-line);
    color: var(--zv-blue-strong);
}

.page-item.active .page-link {
    border-color: var(--zv-blue);
    background: var(--zv-blue);
}

/* ---------- Status pills ---------- */
.label.status,
.badge {
    border-radius: 999px;
}

.label.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 6px 10px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .02em;
}

.status-active,
.status-paid,
.status-completed,
.status-resolved,
.label-success,
.badge-success {
    background: #eaf9f2 !important;
    color: #147a52 !important;
}

.status-pending,
.status-unpaid,
.status-open,
.label-warning,
.badge-warning {
    background: #fff5e8 !important;
    color: #ad620e !important;
}

.status-suspended,
.status-cancelled,
.status-terminated,
.status-overdue,
.label-danger,
.badge-danger {
    background: #fff0f1 !important;
    color: #b73840 !important;
}

.label-info,
.badge-info {
    background: #edf7ff !important;
    color: #0876db !important;
}

/* ---------- Alerts ---------- */
.alert {
    border-width: 1px;
    border-radius: 11px;
    box-shadow: none;
}

.alert-info {
    border-color: #cfe8fb;
    background: #eff8ff;
    color: #235f91;
}

.alert-success {
    border-color: #ccebdd;
    background: #effaf5;
    color: #267354;
}

.alert-warning {
    border-color: #f3dfc4;
    background: #fff8ef;
    color: #8d5b20;
}

.alert-danger {
    border-color: #f1d1d4;
    background: #fff3f4;
    color: #9f3940;
}

.network-issue-alert {
    margin: 0;
}

/* ---------- Tabs / nav pills ---------- */
.nav-tabs {
    border-bottom-color: var(--zv-line-strong);
}

.nav-tabs .nav-link {
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--zv-muted);
    font-size: 13px;
    font-weight: 650;
}

.nav-tabs .nav-link:hover {
    border-bottom-color: #b9dcf7;
    color: var(--zv-blue-strong);
}

.nav-tabs .nav-link.active {
    border-bottom-color: var(--zv-blue);
    background: transparent;
    color: var(--zv-blue-strong);
}

.nav-pills .nav-link {
    border-radius: 9px;
}

.nav-pills .nav-link.active {
    background: var(--zv-blue);
}

/* ---------- Product details ---------- */
.product-details .product-status {
    overflow: hidden;
    border: 1px solid var(--zv-line);
    border-radius: var(--zv-radius);
    background: linear-gradient(180deg, #fff, #f8fbff);
}

.product-details .product-status .product-icon {
    padding: 26px 18px;
}

.product-details .product-status .fa-circle {
    color: #eaf6ff !important;
}

.product-details .product-status .fa-inverse {
    color: var(--zv-blue) !important;
}

.product-details .product-status-text {
    padding: 9px 12px;
    font-weight: 750;
    letter-spacing: .02em;
}

.product-details h4 {
    margin-top: 18px;
    color: var(--zv-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .045em;
}

/* ---------- Tickets / knowledge base ---------- */
.ticket-reply,
.ticket-reply.staff,
.ticket-reply.admin {
    overflow: hidden;
    border: 1px solid var(--zv-line);
    border-radius: var(--zv-radius);
    box-shadow: var(--zv-shadow-sm);
}

.ticket-reply .date,
.ticket-reply .user {
    color: var(--zv-muted);
}

.kb-article-content,
.markdown-content {
    font-size: 15px;
    line-height: 1.8;
}

.kb-article-content code,
.markdown-content code {
    border-radius: 6px;
    background: #eef3f8;
    color: #244361;
}

/* ---------- Invoice ---------- */
.invoice-container {
    overflow: hidden;
    border: 1px solid var(--zv-line) !important;
    border-radius: var(--zv-radius-lg) !important;
    box-shadow: var(--zv-shadow) !important;
}

.invoice-container .invoice-header {
    border-bottom-color: var(--zv-line) !important;
}

.invoice-container .invoice-status span {
    border-radius: 999px !important;
}

/* ---------- Domain search ---------- */
.home-domain-search {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #07152e, #061126 56%, #0a2145) !important;
    color: #fff;
}

.home-domain-search:before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../img/zagros-network.svg") center / cover no-repeat;
    opacity: .65;
    pointer-events: none;
}

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

.home-domain-search h2,
.home-domain-search .btn-link {
    color: #fff;
}

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

.home-domain-search .form-control {
    min-height: 52px;
    border-color: rgba(255,255,255,.22);
    background: #fff;
}

.home-domain-search .btn {
    min-height: 52px;
}

/* ---------- Modal ---------- */
.modal-content {
    overflow: hidden;
    box-shadow: var(--zv-shadow-lg);
}

.modal .modal-header {
    border-bottom: 1px solid var(--zv-line);
    background: #f8fafc;
}

.modal .modal-footer {
    border-top: 1px solid var(--zv-line);
    background: #fbfcfe;
}

.modal-localisation .modal-content {
    background: var(--zv-navy-900);
}

.modal-localisation .modal-body {
    background: linear-gradient(rgba(6,17,38,.72), rgba(6,17,38,.8)), url("../img/zagros-network.svg") center/cover no-repeat;
}

.modal-localisation .item-selector .item {
    border-color: rgba(255,255,255,.18);
    border-radius: 9px;
}

.modal-localisation .item-selector .item:hover,
.modal-localisation .item-selector .item.active {
    border-color: rgba(73,185,255,.6);
    background: rgba(42,156,244,.18);
    color: #fff;
}

/* ---------- Branded footer ---------- */
footer.footer.zv-footer,
footer.footer {
    position: relative;
    overflow: hidden;
    padding: 46px 0 20px;
    background: var(--zv-navy-950);
    color: #aebbd0;
    font-size: 13px;
}

footer.footer.zv-footer:before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../img/zagros-network.svg") center 18% / cover no-repeat;
    opacity: .33;
    pointer-events: none;
}

.zv-footer .container {
    position: relative;
    z-index: 1;
}

.zv-footer-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1.65fr) repeat(3, minmax(130px, .7fr));
    gap: 44px;
    padding-bottom: 34px;
}

.zv-footer-brand img {
    width: 184px;
    height: auto;
}

.zv-footer-brand p {
    max-width: 450px;
    margin: 15px 0 0;
    color: #9cabc2;
    line-height: 1.75;
}

.zv-footer h4 {
    margin: 7px 0 14px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.zv-footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.zv-footer-links li + li {
    margin-top: 8px;
}

.zv-footer-links a,
footer.footer .nav-link {
    padding: 0;
    color: #aebbd0;
}

.zv-footer-links a:hover,
footer.footer .nav-link:hover {
    color: #fff;
}

.zv-footer-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.085);
}

.zv-footer-utility {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
}

.zv-footer .copyright {
    margin: 0 !important;
    color: #8190a8;
    text-align: left !important;
    font-size: 11.5px !important;
}

.zv-footer .btn-outline-light {
    border-color: rgba(255,255,255,.16);
    background: rgba(255,255,255,.035);
    color: #c7d2e2;
}

.zv-footer .btn-outline-light:hover {
    border-color: rgba(255,255,255,.28);
    background: rgba(255,255,255,.07);
    color: #fff;
}

/* ---------- Utility polish ---------- */
.dropdown-menu {
    border-color: var(--zv-line);
    border-radius: 11px;
    box-shadow: var(--zv-shadow);
}

.dropdown-item {
    color: var(--zv-text);
    font-size: 13px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--zv-surface-blue);
    color: var(--zv-blue-strong);
}

.tooltip-inner {
    border-radius: 7px;
    background: #07142c;
    font-size: 11px;
}

hr {
    border-top-color: var(--zv-line);
}

.progress {
    height: 8px;
    border-radius: 999px;
    background: #eaf0f6;
}

.progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, #2cc9ff, #168df2);
}

pre {
    border: 1px solid var(--zv-line);
    border-radius: 10px;
    background: #f7f9fc;
}

/* ---------- Responsive ---------- */
@media (max-width: 1199.98px) {
    .zv-site-navbar .container {
        flex-wrap: wrap;
        padding-top: 13px;
        padding-bottom: 13px;
    }

    .zv-brand {
        margin-right: auto;
    }

    .zv-site-navbar .navbar-collapse {
        flex-basis: 100%;
        padding-top: 14px;
    }

    .zv-public-links {
        align-items: stretch;
    }

    .zv-public-links > li > a,
    .zv-public-links > .nav-item > .nav-link {
        width: 100%;
        justify-content: space-between;
        padding: 9px 10px !important;
    }

    .zv-location-menu {
        width: 100%;
        margin: 4px 0 8px;
        box-shadow: none;
    }

    .zv-header-actions {
        justify-content: flex-start;
        margin: 10px 0 0;
        padding-top: 12px;
        border-top: 1px solid var(--zv-line);
    }

    .zv-client-navbar {
        padding: 7px 0 !important;
    }

    .zv-client-navbar #mainNavbar {
        padding-top: 7px;
    }

    .zv-client-navbar .navbar-nav > li > a {
        width: 100%;
        min-height: 39px;
        border-radius: 8px;
    }

    .zv-footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
    }

    .zv-footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 991.98px) {
    section#main-body {
        padding-top: 26px;
    }

    .sidebar {
        margin-bottom: 20px;
    }
}

@media (max-width: 767.98px) {
    body {
        font-size: 14px;
    }

    h1, .h1 { font-size: 1.7rem; }
    h2, .h2 { font-size: 1.42rem; }

    .zv-brand img {
        width: 170px;
    }

    .zv-account-strip .input-group-prepend,
    .zv-account-strip .btn-active-client span {
        display: none !important;
    }

    .master-breadcrumb {
        overflow-x: auto;
        white-space: nowrap;
    }

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

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

    .table-container,
    .dataTables_wrapper {
        border-radius: 11px;
    }

    .zv-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px 22px;
    }

    .zv-footer-brand {
        grid-column: 1 / -1;
    }

    .zv-footer-meta {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 575.98px) {
    .zv-site-navbar .container {
        justify-content: space-between !important;
    }

    .zv-brand {
        margin: 0 auto 0 0;
    }

    .zv-brand img {
        width: 154px;
        max-width: 58vw;
    }

    .zv-header-actions {
        flex-wrap: wrap;
    }

    .zv-header-cta,
    .zv-header-link {
        flex: 1 1 auto;
    }

    .zv-footer-grid {
        grid-template-columns: 1fr;
    }

    .zv-footer-brand {
        grid-column: auto;
    }

    .tiles .tile {
        min-height: 126px;
        padding: 16px 14px;
    }

    .tiles .tile > i {
        top: 14px;
        right: 14px;
        width: 36px;
        height: 36px;
    }

    .tiles .tile .stat {
        font-size: 25px;
    }
}

/* Print: preserve WHMCS semantics, remove visual chrome. */
@media print {
    .zv-site-navbar,
    .zv-client-navbar,
    .zv-account-strip,
    .master-breadcrumb,
    footer.footer {
        display: none !important;
    }

    section#main-body {
        padding: 0;
        background: #fff;
    }

    .card,
    .invoice-container,
    .table-container {
        box-shadow: none !important;
    }
}

/* ---------- WHMCS standard_cart integration ---------- */
body #order-standard_cart .products .product {
    overflow: hidden;
    border-color: var(--zv-line);
    border-radius: var(--zv-radius);
    box-shadow: var(--zv-shadow-sm);
}

body #order-standard_cart .products .product:hover {
    border-color: #bcdcf7;
    box-shadow: var(--zv-shadow);
}

body #order-standard_cart .cart-body .products .product header,
body #order-standard_cart .products .product header {
    padding: 15px 18px;
    border-bottom: 1px solid var(--zv-line);
    background: #fbfcfe;
    color: var(--zv-ink);
}

body #order-standard_cart .products .product div.product-desc {
    padding: 16px 18px;
    color: var(--zv-muted);
    line-height: 1.7;
}

body #order-standard_cart .products .product footer {
    padding: 12px 18px 16px;
}

body #order-standard_cart .products .product footer .product-pricing {
    color: var(--zv-ink);
    font-weight: 700;
}

body #order-standard_cart .products .product footer .btn-order-now,
body #order-standard_cart .text-right .btn-checkout {
    border-color: var(--zv-blue);
    background: linear-gradient(135deg, #1796f8, #0876db);
    color: #fff;
    box-shadow: 0 7px 16px rgba(8,118,219,.14);
}

body #order-standard_cart .products .product footer .btn-order-now:hover,
body #order-standard_cart .text-right .btn-checkout:hover,
body #order-standard_cart .text-right .btn-checkout:focus {
    border-color: #066bc9;
    background: linear-gradient(135deg, #0f88e9, #066bc9);
}

body #order-standard_cart .cart-sidebar .card-sidebar,
body #order-standard_cart .order-summary,
body #order-standard_cart .product-info,
body #order-standard_cart .domain-selection-options,
body #order-standard_cart #frmCheckout #creditCardInputFields {
    border-color: var(--zv-line);
    border-radius: var(--zv-radius);
    box-shadow: var(--zv-shadow-sm);
}

body #order-standard_cart .cart-sidebar .card-header,
body #order-standard_cart .order-summary h2 {
    border-color: var(--zv-line);
    background: #fbfcfe;
    color: var(--zv-ink);
}

body #order-standard_cart .cart-sidebar .list-group-item {
    color: #55637a;
}

body #order-standard_cart .cart-sidebar .list-group-item.active,
body #order-standard_cart .cart-sidebar .list-group-item.active:hover,
body #order-standard_cart .cart-sidebar .list-group-item.active:focus {
    background: #eff8ff;
    color: #0876db;
    font-weight: 700;
}

body #order-standard_cart .cart-body .view-cart-items-header,
body #order-standard_cart .cart-body .view-cart-items .item,
body #order-standard_cart .cart-body .view-cart-empty,
body #order-standard_cart .order-summary .summary-container {
    border-color: var(--zv-line);
}

body #order-standard_cart .cart-body .view-cart-items-header {
    padding: 11px 14px;
    background: #f8fafc;
    color: #536078;
    font-weight: 700;
}

body #order-standard_cart .cart-body .view-cart-items .item {
    background: #fff;
}

body #order-standard_cart .cart-body .view-cart-items .item:hover {
    background: #f7fbff;
}

body #order-standard_cart .order-summary h2 {
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 750;
}

body #order-standard_cart .order-summary .summary-container {
    background: #fff;
}

body #order-standard_cart .domain-selection-options .option-selected {
    background: #eff8ff;
}

body #order-standard_cart .product-info {
    padding: 14px 16px;
    background: #f8fbff;
}

body #order-standard_cart .sub-heading span {
    background: var(--zv-surface-soft);
    color: var(--zv-ink);
    font-weight: 700;
}

body #order-standard_cart .secondary-cart-body .view-cart-tabs .tab-content {
    border-color: var(--zv-line);
    border-radius: var(--zv-radius);
    box-shadow: var(--zv-shadow-sm);
}

body #frmConfigureProduct label {
    color: #3d4c64;
    font-weight: 650;
}

body #frmConfigureProduct .form-control {
    color: var(--zv-ink);
}
